fix: allow user to configure doom loop & external dir perms (#4095)

This commit is contained in:
Aiden Cline
2025-11-09 18:21:38 -08:00
committed by GitHub
parent 7be8e16c33
commit 4e549b1c05
8 changed files with 95 additions and 62 deletions

View File

@@ -1115,18 +1115,21 @@ export namespace SessionPrompt {
JSON.stringify(p.state.input) === JSON.stringify(value.input),
)
) {
await Permission.ask({
type: "doom-loop",
pattern: value.toolName,
sessionID: assistantMsg.sessionID,
messageID: assistantMsg.id,
callID: value.toolCallId,
title: `Possible doom loop: "${value.toolName}" called ${DOOM_LOOP_THRESHOLD} times with identical arguments`,
metadata: {
tool: value.toolName,
input: value.input,
},
})
const permission = await Agent.get(input.agent).then((x) => x.permission)
if (permission.doom_loop === "ask") {
await Permission.ask({
type: "doom_loop",
pattern: value.toolName,
sessionID: assistantMsg.sessionID,
messageID: assistantMsg.id,
callID: value.toolCallId,
title: `Possible doom loop: "${value.toolName}" called ${DOOM_LOOP_THRESHOLD} times with identical arguments`,
metadata: {
tool: value.toolName,
input: value.input,
},
})
}
}
}
break