it.skip('should trigger chat compression with /compress command',async()=>{
awaitrig.setup('interactive-compress-test');
const{ptyProcess}=rig.runInteractive();
letfullOutput='';
ptyProcess.onData((data)=>(fullOutput+=data));
constauthDialogAppeared=awaitrig.waitForText(
'How would you like to authenticate',
5000,
);
// select the second option if auth dialog come's up
if(authDialogAppeared){
ptyProcess.write('2');
}
// Wait for the app to be ready
constisReady=awaitrig.waitForText('Type your message',15000);
expect(isReady,'CLI did not start up in interactive mode correctly').toBe(
true,
);
constlongPrompt=
'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.';
awaittype(ptyProcess,longPrompt);
awaittype(ptyProcess,'\r');
awaitrig.waitForText('einstein',25000);
awaittype(ptyProcess,'/compress');
// A small delay to allow React to re-render the command list.