chore(approval): tighten allow_permanent comments + DRY the no-always opt set

Collapse the verbose multi-line rationale comments across the TUI/desktop/
backend approval surfaces into single-line "why" notes, and derive
APPROVAL_OPTS_NO_ALWAYS from APPROVAL_OPTS instead of re-listing it.
No behavior change.
This commit is contained in:
Brooklyn Nicholson
2026-06-11 18:42:59 -05:00
parent 81436e143e
commit 55a18e6860
7 changed files with 10 additions and 23 deletions
@@ -933,8 +933,7 @@ export function useMessageStream({
// raise it and wait — the sidebar flags "needs input" and the inline bar
// surfaces once the user focuses that chat.
setApprovalRequest({
// Only an explicit false (tirith content-security warning) drops the
// permanent-allow option; the backend omits the field otherwise.
// false only when a tirith warning forbids it; backend omits the field otherwise.
allowPermanent: payload?.allow_permanent !== false,
command: typeof payload?.command === 'string' ? payload.command : '',
description: typeof payload?.description === 'string' ? payload.description : 'dangerous command',