@@ -36,7 +36,9 @@ export function approvalRemainingLabel(expiresAtMs: number, nowMs: number): stri
3636}
3737
3838function renderMetaRow ( label : string , value ?: string | null , opts ?: { path ?: boolean } ) {
39- if ( ! value ) return nothing ;
39+ if ( ! value ) {
40+ return nothing ;
41+ }
4042 return html `< div class ="exec-approval-meta-row ">
4143 < span > ${ label } </ span > < span > ${ opts ?. path ? formatApprovalDisplayPath ( value ) : value } </ span >
4244 </ div > ` ;
@@ -61,20 +63,25 @@ function renderCommandWithSpans(request: ExecApprovalRequestPayload) {
6163 cursor = span . endIndex ;
6264 }
6365 }
64- if ( ! accepted . length )
66+ if ( ! accepted . length ) {
6567 return html `< div class ="exec-approval-command mono "> ${ request . command } </ div > ` ;
68+ }
6669 const parts = [ ] ;
6770 cursor = 0 ;
6871 for ( const span of accepted ) {
69- if ( span . startIndex > cursor ) parts . push ( request . command . slice ( cursor , span . startIndex ) ) ;
72+ if ( span . startIndex > cursor ) {
73+ parts . push ( request . command . slice ( cursor , span . startIndex ) ) ;
74+ }
7075 parts . push (
7176 html `< mark class ="exec-approval-command-span "
7277 > ${ request . command . slice ( span . startIndex , span . endIndex ) } </ mark
7378 > ` ,
7479 ) ;
7580 cursor = span . endIndex ;
7681 }
77- if ( cursor < request . command . length ) parts . push ( request . command . slice ( cursor ) ) ;
82+ if ( cursor < request . command . length ) {
83+ parts . push ( request . command . slice ( cursor ) ) ;
84+ }
7885 return html `< div class ="exec-approval-command mono "> ${ parts } </ div > ` ;
7986}
8087
@@ -129,7 +136,9 @@ function decisionShortcut(decision: ExecApprovalDecision) {
129136export function resolveApprovalDecisions (
130137 active : ExecApprovalRequest ,
131138) : readonly ExecApprovalDecision [ ] {
132- if ( active . request . allowedDecisions ?. length ) return active . request . allowedDecisions ;
139+ if ( active . request . allowedDecisions ?. length ) {
140+ return active . request . allowedDecisions ;
141+ }
133142 return active . kind === "exec" && active . request . ask === "always"
134143 ? [ "allow-once" , "deny" ]
135144 : DEFAULT_EXEC_APPROVAL_DECISIONS ;
0 commit comments