feat(core): migrate chat recording to JSONL streaming (#23749)

This commit is contained in:
Spencer
2026-04-09 17:13:55 -04:00
committed by GitHub
parent 45100f7c0e
commit f744913584
15 changed files with 906 additions and 665 deletions
@@ -141,6 +141,7 @@ vi.mock('../core/geminiChat.js', () => ({
CHUNK: 'chunk',
},
GeminiChat: vi.fn().mockImplementation(() => ({
initialize: vi.fn(),
sendMessageStream: mockSendMessageStream,
getHistory: vi.fn((_curated?: boolean) => [...mockChatHistory]),
setHistory: mockSetHistory,
@@ -434,6 +435,7 @@ describe('LocalAgentExecutor', () => {
MockedGeminiChat.mockImplementation(
() =>
({
initialize: vi.fn(),
sendMessageStream: mockSendMessageStream,
setSystemInstruction: mockSetSystemInstruction,
getHistory: vi.fn((_curated?: boolean) => [...mockChatHistory]),
+3 -2
View File
@@ -1021,15 +1021,16 @@ export class LocalAgentExecutor<TOutput extends z.ZodTypeAny> {
: undefined;
try {
return new GeminiChat(
const chat = new GeminiChat(
this.executionContext,
systemInstruction,
[{ functionDeclarations: tools }],
startHistory,
undefined,
undefined,
'subagent',
);
await chat.initialize(undefined, 'subagent');
return chat;
} catch (e: unknown) {
await reportError(
e,