This commit is contained in:
2026-05-14 20:59:57 +03:00
parent 363f0cd607
commit c1a913d5e4
+3 -7
View File
@@ -19,8 +19,7 @@ import {executeToolCall, ToolRuntimeContext} from "./tools/runtime";
import {MessageImagePart, MessagePart} from "../common/message-part"; import {MessageImagePart, MessagePart} from "../common/message-part";
import {KeyedAsyncLock} from "../util/async-lock"; import {KeyedAsyncLock} from "../util/async-lock";
import {type AiRequestQueueTarget} from "./provider-request-queue"; import {type AiRequestQueueTarget} from "./provider-request-queue";
import {PYTHON_INTERPRETER_TOOL_NAME} from "./tools/python-interpretator"; import {PYTHON_INTERPRETER_TOOL_NAME, pythonInterpreterToolPrompt} from "./tools/python-interpretator";
import {pythonInterpreterToolPrompt} from "./tools/python-interpretator";
import {getResponseLanguageInstruction, UserAiResponseLanguage, UserAiVoiceMode} from "../common/user-ai-settings"; import {getResponseLanguageInstruction, UserAiResponseLanguage, UserAiVoiceMode} from "../common/user-ai-settings";
import { import {
isTranscribableAudioDownload, isTranscribableAudioDownload,
@@ -457,13 +456,10 @@ export function roundStatus(round: number, firstRoundStatus: string, content?: s
return null; return null;
} }
const status = toolCalls?.length ? Environment.getUseToolText(toolCalls) return toolCalls?.length ? Environment.getUseToolText(toolCalls)
: thinking ? Environment.reasoningText : thinking ? Environment.reasoningText
: round === 0 ? firstRoundStatus : round === 0 ? firstRoundStatus
: Environment.waitThinkText; : Environment.waitThinkText;
return status;
} }
export function isPlainTextDocument(doc: AiDownloadedFile): boolean { export function isPlainTextDocument(doc: AiDownloadedFile): boolean {
@@ -1287,7 +1283,7 @@ export async function executeTool(
await message.flush(); await message.flush();
const parsedArgs = parseToolArgumentsObject(toolCall.argumentsText); const parsedArgs = parseToolArgumentsObject(toolCall.argumentsText);
if (parsedArgs.ok === false) { if (!parsedArgs.ok) {
const result = toolFailureResult("invalid_arguments", parsedArgs.message, { const result = toolFailureResult("invalid_arguments", parsedArgs.message, {
raw: parsedArgs.raw.slice(0, 4000), raw: parsedArgs.raw.slice(0, 4000),
}); });