mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 23:01:30 +00:00
feat(coding-agent): add /quit and /exit slash commands to exit (#426)
Add new slash commands for gracefully exiting the interactive mode: - /quit - exit the application - /exit - alias for /quit (common CLI convention) Both commands await shutdown() which emits session_shutdown events to hooks and custom tools before exiting. Unlike Ctrl+C (twice) which uses void (fire-and-forget), these commands properly wait for hooks and tools to complete their shutdown handlers.
This commit is contained in:
parent
d6c39655e6
commit
8f5466f42a
1 changed files with 5 additions and 0 deletions
|
|
@ -891,6 +891,11 @@ export class InteractiveMode {
|
|||
this.editor.setText("");
|
||||
return;
|
||||
}
|
||||
if (text === "/quit" || text === "/exit") {
|
||||
this.editor.setText("");
|
||||
await this.shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle bash command (! for normal, !! for excluded from context)
|
||||
if (text.startsWith("!")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue