mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-23 19:44:30 -07:00
feat(core): migrate chat recording to JSONL streaming (#23749)
This commit is contained in:
@@ -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]),
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user