File tree Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 5353 "@types/ws" : " ^8.18.1" ,
5454 "@whatwg-node/server" : " ^0.10.12" ,
5555 "@xterm/headless" : " ^5.5.0" ,
56+ "ansi-escapes" : " ^7.1.1" ,
5657 "chalk" : " ^5.6.2" ,
5758 "commander" : " ^14.0.0" ,
5859 "dotenv" : " ^17.2.3" ,
Original file line number Diff line number Diff line change 106106 "@types/ws" : " ^8.18.1" ,
107107 "@whatwg-node/server" : " ^0.10.12" ,
108108 "@xterm/headless" : " ^5.5.0" ,
109+ "ansi-escapes" : " ^7.1.1" ,
109110 "chalk" : " ^5.6.2" ,
110111 "commander" : " ^14.0.0" ,
111112 "dotenv" : " ^17.2.3" ,
Original file line number Diff line number Diff line change 77 KeypressProvider as KeypressProviderBase ,
88 Config ,
99 type InputPromptProps ,
10- useBracketedPaste
10+ useBracketedPaste ,
1111} from "@jaaydenh/gemini-cli/ui" ;
1212
1313function createMinimalConfig ( ) : Config {
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import React, {
1111 useRef ,
1212 useState ,
1313} from "react" ;
14+ import { clearTerminal as clearTerminalEscape } from "ansi-escapes" ;
1415import { isToolApprovalOutput } from "../agent/tools" ;
1516import useDevMode , { type TokenUsage } from "../react/use-dev-mode" ;
1617import Markdown from "./components/markdown" ;
@@ -169,8 +170,7 @@ const Root = ({ directory }: { directory: string }) => {
169170 const { write } = useStdout ( ) ;
170171 const [ epoch , setEpoch ] = useState ( 0 ) ;
171172 const resetTerminal = useCallback ( ( ) => {
172- write ( "\x1Bc" ) ; // Full terminal reset
173- write ( "\x1B[?25l" ) ; // Hide cursor
173+ write ( clearTerminalEscape ) ;
174174 setEpoch ( ( prev ) => prev + 1 ) ;
175175 } , [ write ] ) ;
176176
You can’t perform that action at this time.
0 commit comments