You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use `node-pty` for an interactive shell experience. Fallback to `child_process` still applies. Defaults to `false`.
209
+
-**Description:** Enables interactive terminal for running shell commands. If an interactive session cannot be started, it will fall back to a standard shell.
210
+
-**Default:**`true`
211
211
212
212
-**`tools.core`** (array of strings):
213
213
-**Description:** This can be used to restrict the set of built-in tools [with an allowlist](../cli/enterprise.md#restricting-tool-access). See [Built-in Tools](../core/tools-api.md#built-in-tools) for a list of core tools. The match semantics are the same as `tools.allowed`.
'should trigger chat compression with /compress command',
23
-
async()=>{
24
-
awaitrig.setup('interactive-compress-test');
25
-
26
-
const{ ptyProcess }=rig.runInteractive();
27
-
28
-
letfullOutput='';
29
-
ptyProcess.onData((data)=>(fullOutput+=data));
30
-
31
-
constauthDialogAppeared=awaitrig.waitForText(
32
-
'How would you like to authenticate',
33
-
5000,
34
-
);
35
-
36
-
// select the second option if auth dialog come's up
37
-
if(authDialogAppeared){
38
-
ptyProcess.write('2');
39
-
}
40
-
41
-
// Wait for the app to be ready
42
-
constisReady=awaitrig.waitForText('Type your message',15000);
43
-
expect(
44
-
isReady,
45
-
'CLI did not start up in interactive mode correctly',
46
-
).toBe(true);
47
-
48
-
constlongPrompt=
49
-
'Dont do anything except returning a 1000 token long paragragh with the <name of the scientist who discovered theory of relativity> at the end to indicate end of response. This is a moderately long sentence.';
50
-
51
-
awaittype(ptyProcess,longPrompt);
52
-
awaittype(ptyProcess,'\r');
53
-
54
-
awaitrig.waitForText('einstein',25000);
55
-
56
-
awaittype(ptyProcess,'/compress');
57
-
// A small delay to allow React to re-render the command list.
it.skip('should trigger chat compression with /compress command',async()=>{
23
+
awaitrig.setup('interactive-compress-test');
24
+
25
+
const{ ptyProcess }=rig.runInteractive();
26
+
27
+
letfullOutput='';
28
+
ptyProcess.onData((data)=>(fullOutput+=data));
29
+
30
+
constauthDialogAppeared=awaitrig.waitForText(
31
+
'How would you like to authenticate',
32
+
5000,
33
+
);
34
+
35
+
// select the second option if auth dialog come's up
36
+
if(authDialogAppeared){
37
+
ptyProcess.write('2');
38
+
}
39
+
40
+
// Wait for the app to be ready
41
+
constisReady=awaitrig.waitForText('Type your message',15000);
42
+
expect(isReady,'CLI did not start up in interactive mode correctly').toBe(
43
+
true,
44
+
);
45
+
46
+
constlongPrompt=
47
+
'Dont do anything except returning a 1000 token long paragragh with the <name of the scientist who discovered theory of relativity> at the end to indicate end of response. This is a moderately long sentence.';
48
+
49
+
awaittype(ptyProcess,longPrompt);
50
+
awaittype(ptyProcess,'\r');
51
+
52
+
awaitrig.waitForText('einstein',25000);
53
+
54
+
awaittype(ptyProcess,'/compress');
55
+
// A small delay to allow React to re-render the command list.
0 commit comments