diff --git a/packages/cli/src/ui/components/AuthDialog.test.tsx b/packages/cli/src/ui/components/AuthDialog.test.tsx index 239e8a1f..77c361db 100644 --- a/packages/cli/src/ui/components/AuthDialog.test.tsx +++ b/packages/cli/src/ui/components/AuthDialog.test.tsx @@ -339,7 +339,7 @@ describe('AuthDialog', () => { // Should show error message instead of calling onSelect expect(lastFrame()).toContain( - 'You must select an auth method to proceed. Press Ctrl+C twice to exit.', + 'You must select an auth method to proceed. Press Ctrl+C again to exit.', ); expect(onSelect).not.toHaveBeenCalled(); unmount(); diff --git a/packages/core/src/subagents/subagent.test.ts b/packages/core/src/subagents/subagent.test.ts index b774c693..29205d07 100644 --- a/packages/core/src/subagents/subagent.test.ts +++ b/packages/core/src/subagents/subagent.test.ts @@ -64,6 +64,7 @@ async function createMockConfig( getTool: vi.fn(), getFunctionDeclarations: vi.fn().mockReturnValue([]), getFunctionDeclarationsFiltered: vi.fn().mockReturnValue([]), + getAllToolNames: vi.fn().mockReturnValue([]), ...toolRegistryMocks, } as unknown as ToolRegistry; @@ -86,25 +87,36 @@ const createMockStream = ( if (response === 'stop') { // When stopping, the model might return text, but the subagent logic primarily cares about the absence of functionCalls. yield { - candidates: [ - { - content: { - parts: [{ text: 'Done.' }], + type: 'chunk', + value: { + candidates: [ + { + content: { + parts: [{ text: 'Done.' }], + }, }, - }, - ], + ], + }, }; } else if (response.length > 0) { - yield { functionCalls: response }; + yield { + type: 'chunk', + value: { + functionCalls: response, + }, + }; } else { yield { - candidates: [ - { - content: { - parts: [{ text: 'Done.' }], + type: 'chunk', + value: { + candidates: [ + { + content: { + parts: [{ text: 'Done.' }], + }, }, - }, - ], + ], + }, }; // Handle empty array also as stop } })(); diff --git a/packages/core/src/utils/filesearch/fileSearch.test.ts b/packages/core/src/utils/filesearch/fileSearch.test.ts index 196f6710..df9df380 100644 --- a/packages/core/src/utils/filesearch/fileSearch.test.ts +++ b/packages/core/src/utils/filesearch/fileSearch.test.ts @@ -66,8 +66,8 @@ describe('FileSearch', () => { expect(results).toEqual([ 'src/', - '.qwenignore', '.gitignore', + '.qwenignore', 'src/not-ignored.js', ]); });