mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
#1129, add usage update in ACP mode
This commit is contained in:
@@ -279,10 +279,14 @@ export class ToolCallEmitter extends BaseEmitter {
|
||||
string,
|
||||
unknown
|
||||
>;
|
||||
const outputField = resp['output'];
|
||||
const errorField = resp['error'];
|
||||
const responseText =
|
||||
(resp['output'] as string) ??
|
||||
(resp['error'] as string) ??
|
||||
JSON.stringify(resp);
|
||||
typeof outputField === 'string'
|
||||
? outputField
|
||||
: typeof errorField === 'string'
|
||||
? errorField
|
||||
: JSON.stringify(resp);
|
||||
result.push({
|
||||
type: 'content',
|
||||
content: { type: 'text', text: responseText },
|
||||
|
||||
Reference in New Issue
Block a user