File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -743,6 +743,15 @@ export const App = ({
743743 return
744744 }
745745
746+ if ( cmd === 'exit' || cmd === 'quit' ) {
747+ abortControllerRef . current ?. abort ( )
748+ stopStreaming ( )
749+ setCanProcessQueue ( false )
750+ setInputValue ( '' )
751+ handleCtrlC ( )
752+ return
753+ }
754+
746755 saveToHistory ( trimmed )
747756 setInputValue ( '' )
748757
@@ -771,6 +780,7 @@ export const App = ({
771780 streamMessageIdRef ,
772781 isChainInProgressRef ,
773782 scrollToLatest ,
783+ handleCtrlC ,
774784 ] )
775785
776786 useKeyboardHandlers ( {
Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ export const SLASH_COMMANDS: SlashCommand[] = [
2323 description : 'Sign out of your session' ,
2424 aliases : [ 'signout' ] ,
2525 } ,
26+ {
27+ id : 'exit' ,
28+ label : 'exit' ,
29+ description : 'Quit the CLI' ,
30+ aliases : [ 'quit' , 'q' ] ,
31+ } ,
2632 {
2733 id : 'diff' ,
2834 label : 'diff' ,
You can’t perform that action at this time.
0 commit comments