File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/opencode/src/cli/cmd/tui Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -653,9 +653,17 @@ function ErrorComponent(props: {
653653 mode ?: "dark" | "light"
654654} ) {
655655 const term = useTerminalDimensions ( )
656+ const renderer = useRenderer ( )
657+
658+ const handleExit = async ( ) => {
659+ renderer . setTerminalTitle ( "" )
660+ renderer . destroy ( )
661+ props . onExit ( )
662+ }
663+
656664 useKeyboard ( ( evt ) => {
657665 if ( evt . ctrl && evt . name === "c" ) {
658- props . onExit ( )
666+ handleExit ( )
659667 }
660668 } )
661669 const [ copied , setCopied ] = createSignal ( false )
@@ -708,7 +716,7 @@ function ErrorComponent(props: {
708716 < box onMouseUp = { props . reset } backgroundColor = { colors . primary } padding = { 1 } >
709717 < text fg = { colors . bg } > Reset TUI</ text >
710718 </ box >
711- < box onMouseUp = { props . onExit } backgroundColor = { colors . primary } padding = { 1 } >
719+ < box onMouseUp = { handleExit } backgroundColor = { colors . primary } padding = { 1 } >
712720 < text fg = { colors . bg } > Exit</ text >
713721 </ box >
714722 </ box >
You can’t perform that action at this time.
0 commit comments