Skip to content

Commit 68ab72c

Browse files
committed
Better display of auto-approval kb shortcut
1 parent 592155b commit 68ab72c

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

webview-ui/src/components/chat/AutoApproveDropdown.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,16 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
297297
}
298298
handleAutoApprovalToggle()
299299
}}>
300-
<StandardTooltip content={`Toggle auto-approve ${getAutoApproveShortcut()}`}>
301-
<ToggleSwitch
302-
checked={effectiveAutoApprovalEnabled}
303-
aria-label="Toggle auto-approval"
304-
onChange={handleAutoApprovalToggle}
305-
/>
300+
<StandardTooltip content={`${t("chat:autoApprove.toggle")} (${getAutoApproveShortcut()})`}>
301+
<span>
302+
<ToggleSwitch
303+
checked={effectiveAutoApprovalEnabled}
304+
aria-label="Toggle auto-approval"
305+
onChange={handleAutoApprovalToggle}
306+
/>
307+
<span className={cn("text-sm font-bold select-none")}>Enabled</span>
308+
</span>
306309
</StandardTooltip>
307-
<span className={cn("text-sm font-bold select-none")}>Enabled</span>
308310
</label>
309311
</div>
310312
</div>

webview-ui/src/components/settings/AutoApproveSettings.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,12 @@ export const AutoApproveSettings = ({
133133
setAutoApprovalEnabled(newValue)
134134
vscode.postMessage({ type: "autoApprovalEnabled", bool: newValue })
135135
}}>
136-
<span className="font-medium">{t("settings:autoApprove.enabled")}</span>
136+
<span className="font-medium">
137+
{t("settings:autoApprove.enabled")} ({getAutoApproveShortcut()})
138+
</span>
137139
</VSCodeCheckbox>
138140
<div className="text-vscode-descriptionForeground text-sm mt-1">
139-
{t("settings:autoApprove.description")} {getAutoApproveShortcut()}
141+
{t("settings:autoApprove.description")}
140142
</div>
141143
</div>
142144

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@
277277
"tooltipManage": "Manage auto-approval settings",
278278
"tooltipStatus": "Auto-approval enabled for: {{toggles}}",
279279
"title": "Auto-approve",
280+
"toggle": "Toggle auto-approve",
280281
"all": "All",
281282
"none": "None",
282283
"description": "Run these actions without asking for permission. Only enable for actions you fully trust.",

0 commit comments

Comments
 (0)