Merge 9689d204f75296fbd33eaf9f076c2c5055b7be12 into 598f1826d8b2bc969aace2c6459824737667218c
This commit is contained in:
commit
eb68fea243
@ -61,6 +61,12 @@ function resolveToolErrorWarningPolicy(params: {
|
||||
verboseLevel?: VerboseLevel;
|
||||
}): ToolErrorWarningPolicy {
|
||||
const includeDetails = isVerboseToolDetailEnabled(params.verboseLevel);
|
||||
// Check suppressToolErrors first so it takes precedence over all other rules.
|
||||
// When true, no tool-error warnings are shown to the user — the agent handles
|
||||
// failures internally and decides what to communicate.
|
||||
if (params.suppressToolErrors) {
|
||||
return { showWarning: false, includeDetails };
|
||||
}
|
||||
if (params.suppressToolErrorWarnings) {
|
||||
return { showWarning: false, includeDetails };
|
||||
}
|
||||
@ -79,9 +85,6 @@ function resolveToolErrorWarningPolicy(params: {
|
||||
if (isMutatingToolError) {
|
||||
return { showWarning: true, includeDetails };
|
||||
}
|
||||
if (params.suppressToolErrors) {
|
||||
return { showWarning: false, includeDetails };
|
||||
}
|
||||
return {
|
||||
showWarning: !params.hasUserFacingReply && !isRecoverableToolError(params.lastToolError.error),
|
||||
includeDetails,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user