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:
galz10
2026-02-10 11:19:56 -08:00
parent 00f496a61c
commit 7d655d978e
7 changed files with 273 additions and 123 deletions
+19
View File
@@ -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;
}
}