mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 04:54:25 -07:00
feat(core): optimize ghostty integration and terminal serialization
- Integrate `ghostty-web` terminal initialization into `ShellExecutionService`. - Implement a `serializationCache` in `TerminalSerializer` using `isRowDirty` to significantly reduce CPU usage during terminal updates. - Add binary output detection and halting to `BackgroundShellDisplay` to prevent UI lag from large binary streams. - Shim `console.log` to silence verbose `[ghostty-vt]` internal warnings in the Node.js environment. - Refactor `extensionUpdates.test.ts` to use a more realistic `ExtensionManager` and reduce reliance on fragile FS mocks. - Improve scrollback handling and terminal state synchronization in `ShellExecutionService`.
This commit is contained in:
@@ -303,4 +303,23 @@ export function installBrowserShims(): void {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}
|
||||
|
||||
// Silence noisy ghostty-vt warnings in Node.js environment
|
||||
if (!(console.log as any).__isShimmed) {
|
||||
const originalLog = console.log;
|
||||
const shimmedLog = (...args: any[]) => {
|
||||
const isGhosttyWarning =
|
||||
args.length > 0 &&
|
||||
typeof args[0] === 'string' &&
|
||||
args[0].includes('[ghostty-vt]') &&
|
||||
args.some((arg) => typeof arg === 'string' && arg.includes('warning'));
|
||||
|
||||
if (isGhosttyWarning) {
|
||||
return;
|
||||
}
|
||||
originalLog.apply(console, args);
|
||||
};
|
||||
(shimmedLog as any).__isShimmed = true;
|
||||
console.log = shimmedLog;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user