mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 18:39:33 +01:00
fix(approvals): treat DeepSeek permission prompts as terminal-only alerts
Supervised-hook CLIs (DeepSeek Harness) raise Approvals Inbox items whose answer route refuses keystrokes, but push notifications and the mobile/desktop UI still offered Approve/Deny. Mark those items answerInTerminal, omit approvalId (and therefore push actions) for supervised hooks, and show "Answer in the terminal" / Open session instead of broken buttons. Fixes #598 (functional part; docs gaps left for a follow-up).
This commit is contained in:
1 parent
aa3730aace
commit
f5e59283f9
9 files changed
+119
-24
No files matched your search
+5
-1
@@ -2742,9 +2742,13 @@ export class WebServer extends EventEmitter {
|
||||
// Approvals Inbox item id: lets sw.js answer an Approve/Deny action
|
||||
// click directly (POST /api/approvals/:id/answer) with no tab open.
|
||||
// Gated on the opt-in setting together with the action buttons.
|
||||
// Approve/Deny only when we also have an approvalId to answer with.
|
||||
// Supervised-hook CLIs (DeepSeek) omit approvalId upstream so this also
|
||||
// strips their action buttons — buttons without an id can never answer.
|
||||
approvalId: approvalsEnabled && typeof data.approvalId === 'string' ? data.approvalId : undefined,
|
||||
urgency: template.urgency,
|
||||
actions: approvalsEnabled ? template.actions : undefined,
|
||||
actions:
|
||||
approvalsEnabled && typeof data.approvalId === 'string' ? template.actions : undefined,
|
||||
});
|
||||
|
||||
for (const sub of subscriptions) {
|
||||
|
||||
Reference in new issue
Block a user