mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-11 22:00:41 -07:00
refactor(stdio): always patch stdout and use createWorkingStdio for clean output (#14159)
This commit is contained in:
@@ -48,7 +48,7 @@ vi.mock('../utils/browser.js', () => ({
|
||||
vi.mock('../utils/stdio.js', () => ({
|
||||
writeToStdout: vi.fn(),
|
||||
writeToStderr: vi.fn(),
|
||||
createInkStdio: vi.fn(() => ({
|
||||
createWorkingStdio: vi.fn(() => ({
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
})),
|
||||
|
||||
@@ -33,7 +33,7 @@ import { FORCE_ENCRYPTED_FILE_ENV_VAR } from '../mcp/token-storage/index.js';
|
||||
import { debugLogger } from '../utils/debugLogger.js';
|
||||
import {
|
||||
writeToStdout,
|
||||
createInkStdio,
|
||||
createWorkingStdio,
|
||||
writeToStderr,
|
||||
} from '../utils/stdio.js';
|
||||
import {
|
||||
@@ -334,7 +334,7 @@ async function authWithUserCode(client: OAuth2Client): Promise<boolean> {
|
||||
const code = await new Promise<string>((resolve, _) => {
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: createInkStdio().stdout,
|
||||
output: createWorkingStdio().stdout,
|
||||
terminal: true,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user