@@ -48,7 +48,7 @@ import type {
4848} from "@vegamo/deepcode-core" ;
4949import { SessionManager } from "@vegamo/deepcode-core" ;
5050import { getCompactPromptTokenThreshold } from "@vegamo/deepcode-core" ;
51- import { writeStdoutLine } from "../../utils/stdio-helpers" ;
51+ import { writeStdout , writeStdoutLine } from "../../utils/stdio-helpers" ;
5252
5353type View = "chat" | "session-list" | "undo" | "mcp-status" ;
5454
@@ -197,7 +197,7 @@ function App({ projectRoot, initialPrompt, resumeSessionId, onRestart }: AppProp
197197 const resetStaticView = useCallback (
198198 ( loadedMessages : SessionMessage [ ] , options ?: { clearScreen ?: boolean } ) : Promise < void > => {
199199 if ( options ?. clearScreen ) {
200- writeStdoutLine ( ANSI_CLEAR_SCREEN ) ;
200+ writeStdout ( ANSI_CLEAR_SCREEN ) ;
201201 }
202202 setMessages ( [ ] ) ;
203203 setWelcomeNonce ( ( n ) => n + 1 ) ;
@@ -629,7 +629,7 @@ function App({ projectRoot, initialPrompt, resumeSessionId, onRestart }: AppProp
629629 setShowWelcome ( false ) ;
630630 setMessages ( [ ] ) ;
631631 // Clear screen to remove stale formatted text.
632- writeStdoutLine ( ANSI_CLEAR_SCREEN ) ;
632+ writeStdout ( ANSI_CLEAR_SCREEN ) ;
633633
634634 setTimeout ( ( ) => {
635635 if ( nextMode === RawMode . Raw ) {
@@ -667,8 +667,8 @@ function App({ projectRoot, initialPrompt, resumeSessionId, onRestart }: AppProp
667667
668668 if ( mode === RawMode . Raw ) {
669669 // In raw mode, re-render all messages directly to stdout at the new width.
670- // Use process. stdout.write instead of writeRef to avoid Ink interference.
671- writeStdoutLine ( ANSI_CLEAR_SCREEN ) ;
670+ // Use direct stdout instead of writeRef to avoid Ink interference.
671+ writeStdout ( ANSI_CLEAR_SCREEN ) ;
672672 const activeSessionId = sessionManager . getActiveSessionId ( ) ;
673673 const allMessages = activeSessionId ? loadVisibleMessages ( sessionManager , activeSessionId ) : [ ] ;
674674 renderRawModeMessages ( allMessages , mode ) ;
0 commit comments