mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
feat(cli): migrate console calls to debugLogger and stdioHelpers (M3 Phase 7-9)
Route CLI console.* calls to structured logging: - Debug/internal diagnostics → debugLogger (logfile) - User-facing output → writeStdoutLine/writeStderrLine/clearScreen (stdioHelpers) - Add stdioHelpers.ts with writeStdoutLine, writeStderrLine, clearScreen - Migrate pre-session files (gemini.tsx, sandbox.ts, config.ts) to stdioHelpers - Migrate extension/MCP commands to stdioHelpers - Migrate non-interactive session/control to debugLogger - Migrate UI hooks and components to debugLogger
This commit is contained in:
parent
45df0e8b82
commit
7995c65571
82 changed files with 606 additions and 485 deletions
|
|
@ -11,6 +11,7 @@ import { type LoadedSettings } from './config/settings.js';
|
|||
import { JsonOutputAdapter } from './nonInteractive/io/JsonOutputAdapter.js';
|
||||
import { StreamJsonOutputAdapter } from './nonInteractive/io/StreamJsonOutputAdapter.js';
|
||||
import { runExitCleanup } from './utils/cleanup.js';
|
||||
import { writeStderrLine } from './utils/stdioHelpers.js';
|
||||
|
||||
export async function validateNonInteractiveAuth(
|
||||
useExternalAuth: boolean | undefined,
|
||||
|
|
@ -74,7 +75,7 @@ export async function validateNonInteractiveAuth(
|
|||
}
|
||||
|
||||
// For other modes (text), use existing error handling
|
||||
console.error(error instanceof Error ? error.message : String(error));
|
||||
writeStderrLine(error instanceof Error ? error.message : String(error));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue