




























@@ -24,10 +24,7 @@ import {
2424normalizeTextForComparison,
2525} from "../../pi-embedded-helpers.js";
2626import type { ToolResultFormat } from "../../pi-embedded-subscribe.shared-types.js";
27-import {
28-extractAssistantThinking,
29-extractAssistantVisibleText,
30-} from "../../pi-embedded-utils.js";
27+import { extractAssistantThinking, extractAssistantVisibleText } from "../../pi-embedded-utils.js";
3128import { isExecLikeToolName, type ToolErrorSummary } from "../../tool-error-summary.js";
3229import { isLikelyMutatingToolName } from "../../tool-mutation.js";
3330@@ -48,7 +45,7 @@ const RECOVERABLE_TOOL_ERROR_KEYWORDS = [
4845] as const;
49465047const MUTATING_FAILURE_ACTION_PATTERN =
51-"(?:write|edit|update|save|create|delete|remove|modify|change|apply|patch|move|rename|send|reply|message|tool|action|operation)";
48+"(?:write|edit|update|save|create|delete|remove|modify|change|apply|patch|move|rename|send|reply|message|run|execute|execution|command|script|shell|bash|exec|tool|action|operation)";
52495350const MUTATING_FAILURE_INABILITY_PATTERN = new RegExp(
5451`\\b(?:couldn't|could not|can't|cannot|unable to|am unable to|wasn't able to|was not able to|were unable to)\\b.{0,100}\\b${MUTATING_FAILURE_ACTION_PATTERN}\\b`,
@@ -143,9 +140,6 @@ function resolveToolErrorWarningPolicy(params: {
143140if (params.suppressToolErrorWarnings) {
144141return { showWarning: false, includeDetails };
145142}
146-if (isExecLikeToolName(params.lastToolError.toolName) && !includeDetails) {
147-return { showWarning: false, includeDetails };
148-}
149143// sessions_send timeouts and errors are transient inter-session communication
150144// issues — the message may still have been delivered. Suppress warnings to
151145// prevent raw error text from leaking into the chat surface (#23989).
@@ -160,6 +154,9 @@ function resolveToolErrorWarningPolicy(params: {
160154 includeDetails,
161155};
162156}
157+if (isExecLikeToolName(params.lastToolError.toolName) && !includeDetails) {
158+return { showWarning: false, includeDetails };
159+}
163160if (params.suppressToolErrors) {
164161return { showWarning: false, includeDetails };
165162}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。