Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions webview-ui/src/components/chat/AutoApproveDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,19 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:

const { effectiveAutoApprovalEnabled } = useAutoApprovalState(toggles, autoApprovalEnabled)

const tooltipText =
!effectiveAutoApprovalEnabled || enabledCount === 0
? t("chat:autoApprove.tooltipManage")
: t("chat:autoApprove.tooltipStatus", {
toggles: settingsArray
.filter((setting) => toggles[setting.key])
.map((setting) => t(setting.labelKey))
.join(", "),
})

return (
<Popover open={open} onOpenChange={setOpen} data-testid="auto-approve-dropdown-root">
<StandardTooltip content={t("chat:autoApprove.tooltip")}>
<StandardTooltip content={tooltipText}>
<PopoverTrigger
disabled={disabled}
data-testid="auto-approve-dropdown-trigger"
Expand Down Expand Up @@ -187,7 +197,7 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
align="start"
sideOffset={4}
container={portalContainer}
className="p-0 overflow-hidden min-w-90 max-w-9/10"
className="p-0 overflow-hidden w-[min(440px,calc(100vw-2rem))]"
onOpenAutoFocus={(e) => e.preventDefault()}>
<div className="flex flex-col w-full">
{/* Header with description */}
Expand All @@ -205,7 +215,7 @@ export const AutoApproveDropdown = ({ disabled = false, triggerClassName = "" }:
{t("chat:autoApprove.description")}
</p>
</div>
<div className="grid grid-cols-2 gap-x-2 gap-y-2 p-3">
<div className="grid grid-cols-1 min-[340px]:grid-cols-2 gap-x-2 gap-y-2 p-3">
{settingsArray.map(({ key, labelKey, descriptionKey, icon }) => {
const isEnabled = toggles[key]
return (
Expand Down
29 changes: 21 additions & 8 deletions webview-ui/src/i18n/locales/ca/chat.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions webview-ui/src/i18n/locales/de/chat.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion webview-ui/src/i18n/locales/en/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@
"issues": "It seems like you're having Windows PowerShell issues, please see this"
},
"autoApprove": {
"tooltip": "Manage auto-approval settings",
"tooltipManage": "Manage auto-approval settings",
"tooltipStatus": "Auto-approval enabled for: {{toggles}}",
"title": "Auto-approve",
"all": "All",
"none": "None",
Expand Down
29 changes: 21 additions & 8 deletions webview-ui/src/i18n/locales/es/chat.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions webview-ui/src/i18n/locales/fr/chat.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 20 additions & 7 deletions webview-ui/src/i18n/locales/hi/chat.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 26 additions & 13 deletions webview-ui/src/i18n/locales/id/chat.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading