wip: refactor permissions

This commit is contained in:
Dax Raad
2025-07-31 12:26:34 -04:00
parent 872b1e068f
commit a5b20f973f
15 changed files with 294 additions and 98 deletions

View File

@@ -108,10 +108,11 @@ export const BashTool = Tool.define("bash", {
const cfg = await Config.get()
if (cfg.permission?.bash === "ask")
await Permission.ask({
id: "bash",
type: "bash",
pattern: params.command.split(" ").slice(0, 2).join(" ").trim(),
sessionID: ctx.sessionID,
messageID: ctx.messageID,
toolCallID: ctx.toolCallID,
callID: ctx.toolCallID,
title: "Run this command: " + params.command,
metadata: {
command: params.command,