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
+1 -3
View File
@@ -68,9 +68,7 @@ function keyedPromptStore<T extends KeyedPrompt>(): PromptStore<T> {
// resolved via approval.respond {choice, session_id}). It carries no request_id,
// unlike sudo/secret which are _block()-style request/response.
export interface ApprovalRequest extends KeyedPrompt {
// Only an explicit false hides "Always allow" — set when the backend will not
// honor a permanent allow (a tirith content-security warning is present), so
// the bar doesn't offer a choice that silently degrades to session scope.
// false when the backend won't honor a permanent allow (tirith warning) → hide "Always allow".
allowPermanent?: boolean
command: string
description: string