fix: permission checks for external_directory and doom_loop (#4433)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Co-authored-by: AerionDyseti <AerionDyseti@users.noreply.github.com>
This commit is contained in:
K Whiteside
2025-11-18 17:18:23 -06:00
committed by GitHub
parent 52cf9e3423
commit 47bfae52c0
6 changed files with 62 additions and 1 deletions

View File

@@ -186,8 +186,13 @@ export namespace Permission {
public readonly permissionID: string,
public readonly toolCallID?: string,
public readonly metadata?: Record<string, any>,
public readonly reason?: string,
) {
super(`The user rejected permission to use this specific tool call. You may try again with different parameters.`)
super(
reason !== undefined
? reason
: `The user rejected permission to use this specific tool call. You may try again with different parameters.`,
)
}
}
}