mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: test errors
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
ToolErrorType,
|
||||
MCPServerStatus,
|
||||
getMCPServerStatus,
|
||||
OutputFormat,
|
||||
} from '@qwen-code/qwen-code-core';
|
||||
import type { Part } from '@google/genai';
|
||||
import type {
|
||||
@@ -530,11 +531,8 @@ describe('buildSystemMessage', () => {
|
||||
model: 'test-model',
|
||||
permissionMode: 'auto',
|
||||
slash_commands: ['commit', 'help', 'memory'],
|
||||
apiKeySource: 'none',
|
||||
qwen_code_version: '1.0.0',
|
||||
output_style: 'default',
|
||||
agents: [],
|
||||
skills: [],
|
||||
});
|
||||
});
|
||||
|
||||
@@ -591,12 +589,15 @@ describe('createTaskToolProgressHandler', () => {
|
||||
beforeEach(() => {
|
||||
mockConfig = {
|
||||
getDebugMode: vi.fn().mockReturnValue(false),
|
||||
isInteractive: vi.fn().mockReturnValue(false),
|
||||
getOutputFormat: vi.fn().mockReturnValue(OutputFormat.JSON),
|
||||
} as unknown as Config;
|
||||
|
||||
mockAdapter = {
|
||||
processSubagentToolCall: vi.fn(),
|
||||
emitSubagentErrorResult: vi.fn(),
|
||||
emitToolResult: vi.fn(),
|
||||
emitUserMessage: vi.fn(),
|
||||
} as unknown as JsonOutputAdapterInterface;
|
||||
});
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ export class StartSessionEvent implements BaseTelemetryEvent {
|
||||
mcp_servers_count: number;
|
||||
mcp_tools_count?: number;
|
||||
mcp_tools?: string;
|
||||
output_format: OutputFormat | 'stream-json';
|
||||
output_format: OutputFormat;
|
||||
|
||||
constructor(config: Config, toolRegistry?: ToolRegistry) {
|
||||
const generatorConfig = config.getContentGeneratorConfig();
|
||||
|
||||
Reference in New Issue
Block a user