mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
fix: subagent tool call messages
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
ToolCallConfirmationDetails,
|
||||
ToolConfirmationOutcome,
|
||||
} from '../tools/tools.js';
|
||||
import type { Part } from '@google/genai';
|
||||
|
||||
export type SubAgentEvent =
|
||||
| 'start'
|
||||
@@ -72,7 +73,7 @@ export interface SubAgentToolResultEvent {
|
||||
name: string;
|
||||
success: boolean;
|
||||
error?: string;
|
||||
resultDisplay?: string;
|
||||
responseParts?: Part[];
|
||||
durationMs?: number;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
@@ -619,11 +619,7 @@ export class SubAgentScope {
|
||||
name: toolName,
|
||||
success,
|
||||
error: errorMessage,
|
||||
resultDisplay: call.response.resultDisplay
|
||||
? typeof call.response.resultDisplay === 'string'
|
||||
? call.response.resultDisplay
|
||||
: JSON.stringify(call.response.resultDisplay)
|
||||
: undefined,
|
||||
responseParts: call.response.responseParts,
|
||||
durationMs: duration,
|
||||
timestamp: Date.now(),
|
||||
} as SubAgentToolResultEvent);
|
||||
|
||||
Reference in New Issue
Block a user