mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
feat(core): Introduce DeclarativeTool and ToolInvocation. (#5613)
This commit is contained in:
@@ -14,7 +14,7 @@ import { ToolCallEvent } from './types.js';
|
||||
import { Config } from '../config/config.js';
|
||||
import { CompletedToolCall } from '../core/coreToolScheduler.js';
|
||||
import { ToolCallRequestInfo, ToolCallResponseInfo } from '../core/turn.js';
|
||||
import { Tool } from '../tools/tools.js';
|
||||
import { MockTool } from '../test-utils/tools.js';
|
||||
|
||||
describe('Circular Reference Handling', () => {
|
||||
it('should handle circular references in tool function arguments', () => {
|
||||
@@ -56,11 +56,13 @@ describe('Circular Reference Handling', () => {
|
||||
errorType: undefined,
|
||||
};
|
||||
|
||||
const tool = new MockTool('mock-tool');
|
||||
const mockCompletedToolCall: CompletedToolCall = {
|
||||
status: 'success',
|
||||
request: mockRequest,
|
||||
response: mockResponse,
|
||||
tool: {} as Tool,
|
||||
tool,
|
||||
invocation: tool.build({}),
|
||||
durationMs: 100,
|
||||
};
|
||||
|
||||
@@ -104,11 +106,13 @@ describe('Circular Reference Handling', () => {
|
||||
errorType: undefined,
|
||||
};
|
||||
|
||||
const tool = new MockTool('mock-tool');
|
||||
const mockCompletedToolCall: CompletedToolCall = {
|
||||
status: 'success',
|
||||
request: mockRequest,
|
||||
response: mockResponse,
|
||||
tool: {} as Tool,
|
||||
tool,
|
||||
invocation: tool.build({}),
|
||||
durationMs: 100,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user