Migrate console to coreEvents.emitFeedback or debugLogger (#15219)

This commit is contained in:
Adib234
2025-12-29 15:46:10 -05:00
committed by GitHub
parent dcd2449b1a
commit 10ae84869a
66 changed files with 564 additions and 425 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
import { useState, useEffect, useCallback } from 'react';
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
import { isNodeError, Storage } from '@google/gemini-cli-core';
import { debugLogger, isNodeError, Storage } from '@google/gemini-cli-core';
const MAX_HISTORY_LENGTH = 100;
@@ -52,7 +52,7 @@ async function readHistoryFile(filePath: string): Promise<string[]> {
return result;
} catch (err) {
if (isNodeError(err) && err.code === 'ENOENT') return [];
console.error('Error reading history:', err);
debugLogger.error('Error reading history:', err);
return [];
}
}
@@ -65,7 +65,7 @@ async function writeHistoryFile(
await fs.mkdir(path.dirname(filePath), { recursive: true });
await fs.writeFile(filePath, history.join('\n'));
} catch (error) {
console.error('Error writing shell history:', error);
debugLogger.error('Error writing shell history:', error);
}
}