feat: add tool-specific approval overrides

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-24 20:02:29 +01:00
co-authored by Copilot
parent f896fa6442
commit d5c538eed9
22 changed files with 897 additions and 221 deletions
+6
View File
@@ -122,6 +122,9 @@ describe('session library helpers', () => {
isPinned: true,
isArchived: true,
lastError: 'sidecar crashed',
approvalSettings: {
autoApprovedToolNames: ['git.status'],
},
pendingApproval: {
id: 'approval-1',
kind: 'tool-call',
@@ -165,6 +168,9 @@ describe('session library helpers', () => {
updatedAt: '2026-03-23T00:07:00.000Z',
});
expect(session.messages[0]?.pending).toBe(false);
expect(session.approvalSettings).toEqual({
autoApprovedToolNames: ['git.status'],
});
expect(session.pendingApproval).toBeUndefined();
expect(session.pendingApprovalQueue).toBeUndefined();
expect(session.runs).toEqual([]);