mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 20:50:34 +00:00
fix adapter undefined
This commit is contained in:
parent
650c625d86
commit
8794678c62
6 changed files with 137 additions and 121 deletions
|
|
@ -984,26 +984,6 @@ describe('createTaskToolProgressHandler', () => {
|
|||
expect(mockAdapter.emitToolResult).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should work without adapter (non-JSON mode)', () => {
|
||||
const { handler } = createTaskToolProgressHandler(
|
||||
mockConfig,
|
||||
'parent-tool-id',
|
||||
undefined,
|
||||
);
|
||||
|
||||
const taskDisplay: TaskResultDisplay = {
|
||||
type: 'task_execution',
|
||||
subagentName: 'test-agent',
|
||||
taskDescription: 'Test task',
|
||||
taskPrompt: 'Test prompt',
|
||||
status: 'running',
|
||||
toolCalls: [],
|
||||
};
|
||||
|
||||
// Should not throw
|
||||
expect(() => handler('task-call-id', taskDisplay)).not.toThrow();
|
||||
});
|
||||
|
||||
it('should work with adapter that does not support subagent APIs', () => {
|
||||
const limitedAdapter = {
|
||||
emitToolResult: vi.fn(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue