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
// Opens a terminal window user can watchconstsession=TerminalManager.spawn({visible: true});// AI controls terminal while user observesawaitsession.runCommand('npm test');awaitsession.runCommand('npm run lint');// User can also type in the terminal// Both see the same session
constsession=TerminalManager.spawn();session.write('npm start\n');// Wait for server ready messageawaitsession.waitFor(/listeningonport\d+/i,{timeout: 30000,});console.log('Server started');// Ctrl+C to stopsession.write('\x03');session.destroy();
Reopen closed window
constsession=TerminalManager.spawn({visible: true});// ... user closes the window ...// Reopen itsession.openWindow();