feat: add tool auto-approval UX in pattern editor and activity panel

- PatternEditor: tool auto-approval defaults section with toggles per tool
- ActivityPanel: per-session override section with inherited/custom state and reset action
- ChatPane: surface toolName in approval banner and queued approval list
- Disable controls while running; scratchpad non-interactive explanation
- Use listApprovalToolDefinitions() exclusively for tool identity

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-24 20:14:14 +01:00
co-authored by Copilot
parent d5c538eed9
commit 4b7409368f
5 changed files with 223 additions and 1 deletions
+4
View File
@@ -262,6 +262,7 @@ function ApprovalBanner({
{/* Agent / permission context */}
<div className="mt-1 flex flex-wrap items-center gap-2 text-[11px] text-zinc-400">
{approval.agentName && <span>Agent: <span className="text-zinc-300">{approval.agentName}</span></span>}
{approval.toolName && <span>Tool: <span className="text-zinc-300">{approval.toolName}</span></span>}
{approval.permissionKind && <span>Permission: <span className="text-zinc-300">{approval.permissionKind}</span></span>}
</div>
@@ -355,6 +356,9 @@ function QueuedApprovalsList({ approvals }: { approvals: PendingApprovalRecord[]
<span className="shrink-0 rounded-full bg-zinc-800 px-1.5 py-0.5 text-[8px] font-semibold uppercase tracking-wider text-zinc-500">
{kindLabel}
</span>
{approval.toolName && (
<span className="shrink-0 text-[10px] text-zinc-500">{approval.toolName}</span>
)}
{approval.agentName && (
<span className="shrink-0 text-[10px] text-zinc-600">{approval.agentName}</span>
)}