mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
refactor: maintain 1 GeminiChat per GeminiClient (#710)
This commit is contained in:
parent
447826ab40
commit
74801e9004
7 changed files with 26 additions and 46 deletions
|
|
@ -39,7 +39,7 @@ describe('runNonInteractive', () => {
|
|||
sendMessageStream: vi.fn(),
|
||||
};
|
||||
mockGeminiClient = {
|
||||
startChat: vi.fn().mockResolvedValue(mockChat),
|
||||
getChat: vi.fn().mockResolvedValue(mockChat),
|
||||
} as unknown as GeminiClient;
|
||||
mockToolRegistry = {
|
||||
getFunctionDeclarations: vi.fn().mockReturnValue([]),
|
||||
|
|
@ -80,7 +80,6 @@ describe('runNonInteractive', () => {
|
|||
|
||||
await runNonInteractive(mockConfig, 'Test input');
|
||||
|
||||
expect(mockGeminiClient.startChat).toHaveBeenCalled();
|
||||
expect(mockChat.sendMessageStream).toHaveBeenCalledWith({
|
||||
message: [{ text: 'Test input' }],
|
||||
config: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue