mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
enable async tool discovery by making the registry accessor async; remove call to discoverTools that caused duplicate discovery (#691)
This commit is contained in:
parent
467dec4edf
commit
c5869db080
7 changed files with 21 additions and 20 deletions
|
|
@ -42,7 +42,6 @@ describe('runNonInteractive', () => {
|
|||
startChat: vi.fn().mockResolvedValue(mockChat),
|
||||
} as unknown as GeminiClient;
|
||||
mockToolRegistry = {
|
||||
discoverTools: vi.fn().mockResolvedValue(undefined),
|
||||
getFunctionDeclarations: vi.fn().mockReturnValue([]),
|
||||
getTool: vi.fn(),
|
||||
} as unknown as ToolRegistry;
|
||||
|
|
@ -82,7 +81,6 @@ describe('runNonInteractive', () => {
|
|||
await runNonInteractive(mockConfig, 'Test input');
|
||||
|
||||
expect(mockGeminiClient.startChat).toHaveBeenCalled();
|
||||
expect(mockToolRegistry.discoverTools).toHaveBeenCalled();
|
||||
expect(mockChat.sendMessageStream).toHaveBeenCalledWith({
|
||||
message: [{ text: 'Test input' }],
|
||||
config: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue