From b7d146dcb2ea1b02139fd61f06a60aaf12e0d93c Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Thu, 18 Jun 2026 10:25:26 -0700 Subject: [PATCH] Move Prompt Cache Timer setting to Agents pane, simplify expired state (#5691) Co-authored-by: Orca --- .../AdvancedNetworkSettingsSection.test.ts | 90 +++++ .../AdvancedNetworkSettingsSection.tsx | 339 ++++++++++++++++++ .../src/components/settings/AdvancedPane.tsx | 12 + ...Section.tsx => AgentCacheTimerSection.tsx} | 41 +-- .../src/components/settings/AgentsPane.tsx | 3 + .../GeneralNetworkSettingsSection.tsx | 297 --------------- .../components/settings/GeneralPane.test.ts | 84 ++--- .../src/components/settings/GeneralPane.tsx | 51 ++- .../settings/advanced-network-search.ts | 29 ++ .../components/settings/advanced-search.ts | 2 + .../settings/agent-cache-timer-search.ts | 22 ++ .../src/components/settings/agents-search.ts | 4 +- .../src/components/settings/general-search.ts | 56 --- .../src/components/sidebar/CacheTimer.tsx | 9 +- src/renderer/src/i18n/locales/en.json | 11 +- src/renderer/src/i18n/locales/es.json | 11 +- src/renderer/src/i18n/locales/ja.json | 11 +- src/renderer/src/i18n/locales/ko.json | 11 +- src/renderer/src/i18n/locales/zh.json | 11 +- 19 files changed, 601 insertions(+), 493 deletions(-) create mode 100644 src/renderer/src/components/settings/AdvancedNetworkSettingsSection.test.ts create mode 100644 src/renderer/src/components/settings/AdvancedNetworkSettingsSection.tsx rename src/renderer/src/components/settings/{GeneralCacheTimerSection.tsx => AgentCacheTimerSection.tsx} (72%) delete mode 100644 src/renderer/src/components/settings/GeneralNetworkSettingsSection.tsx create mode 100644 src/renderer/src/components/settings/advanced-network-search.ts create mode 100644 src/renderer/src/components/settings/agent-cache-timer-search.ts diff --git a/src/renderer/src/components/settings/AdvancedNetworkSettingsSection.test.ts b/src/renderer/src/components/settings/AdvancedNetworkSettingsSection.test.ts new file mode 100644 index 000000000..2de229d49 --- /dev/null +++ b/src/renderer/src/components/settings/AdvancedNetworkSettingsSection.test.ts @@ -0,0 +1,90 @@ +import { describe, expect, it } from 'vitest' +import type { GlobalSettings } from '../../../../shared/types' +import { + createHttpProxyBypassRulesDraftState, + createHttpProxyUrlDraftState, + hasConfiguredNetworkProxy, + setHttpProxyUrlDraftErrorState, + shouldOpenNetworkProxyConfig, + updateHttpProxyBypassRulesDraftState, + updateHttpProxyUrlDraftState +} from './AdvancedNetworkSettingsSection' + +describe('AdvancedNetworkSettingsSection proxy drafts', () => { + it('keeps a committed proxy URL draft tied to the current persisted source', () => { + const current = createHttpProxyUrlDraftState(undefined) + + expect(updateHttpProxyUrlDraftState(current, undefined, 'http://proxy.test:8080')).toEqual({ + sourceValue: '', + draft: 'http://proxy.test:8080', + error: null + }) + }) + + it('reconciles stale proxy URL state and clears errors before applying a new draft', () => { + const current = setHttpProxyUrlDraftErrorState( + updateHttpProxyUrlDraftState( + createHttpProxyUrlDraftState('http://old.test:8080'), + 'http://old.test:8080', + 'bad proxy' + ), + 'http://old.test:8080', + 'Invalid proxy URL' + ) + + expect( + updateHttpProxyUrlDraftState(current, 'http://new.test:8080', 'http://typed.test:8080') + ).toEqual({ + sourceValue: 'http://new.test:8080', + draft: 'http://typed.test:8080', + error: null + }) + }) + + it('keeps committed proxy bypass rules tied to the current persisted source', () => { + const current = createHttpProxyBypassRulesDraftState('localhost') + + expect( + updateHttpProxyBypassRulesDraftState(current, 'localhost', 'localhost,127.0.0.1') + ).toEqual({ + sourceValue: 'localhost', + draft: 'localhost,127.0.0.1' + }) + }) + + it('reconciles stale proxy bypass rules before applying a new draft', () => { + const current = updateHttpProxyBypassRulesDraftState( + createHttpProxyBypassRulesDraftState('localhost'), + 'localhost', + 'localhost,127.0.0.1' + ) + + expect(updateHttpProxyBypassRulesDraftState(current, '*.internal', '*.corp')).toEqual({ + sourceValue: '*.internal', + draft: '*.corp' + }) + }) +}) + +describe('AdvancedNetworkSettingsSection proxy disclosure', () => { + const asSettings = (partial: Partial): GlobalSettings => partial as GlobalSettings + + it('keeps the fields collapsed by default and with an empty search', () => { + expect(shouldOpenNetworkProxyConfig('')).toBe(false) + expect(hasConfiguredNetworkProxy(asSettings({}))).toBe(false) + }) + + it('reveals the fields when a proxy is already configured', () => { + expect(hasConfiguredNetworkProxy(asSettings({ httpProxyUrl: 'http://proxy.test:8080' }))).toBe( + true + ) + expect(hasConfiguredNetworkProxy(asSettings({ httpProxyBypassRules: 'localhost' }))).toBe(true) + // Whitespace-only values do not count as configured. + expect(hasConfiguredNetworkProxy(asSettings({ httpProxyUrl: ' ' }))).toBe(false) + }) + + it('reveals the fields when the search query matches proxy terms', () => { + expect(shouldOpenNetworkProxyConfig('proxy')).toBe(true) + expect(shouldOpenNetworkProxyConfig('zzz-no-match')).toBe(false) + }) +}) diff --git a/src/renderer/src/components/settings/AdvancedNetworkSettingsSection.tsx b/src/renderer/src/components/settings/AdvancedNetworkSettingsSection.tsx new file mode 100644 index 000000000..e5b8a3b81 --- /dev/null +++ b/src/renderer/src/components/settings/AdvancedNetworkSettingsSection.tsx @@ -0,0 +1,339 @@ +import type React from 'react' +import { useState } from 'react' +import { ChevronDown } from 'lucide-react' +import type { GlobalSettings } from '../../../../shared/types' +import { normalizeProxyBypassRules, normalizeProxyUrl } from '../../../../shared/network-proxy' +import { cn } from '@/lib/utils' +import { useAppStore } from '../../store' +import { Button } from '../ui/button' +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../ui/collapsible' +import { Input } from '../ui/input' +import { Label } from '../ui/label' +import { getAdvancedNetworkSearchEntries } from './advanced-network-search' +import { SearchableSetting } from './SearchableSetting' +import { matchesSettingsSearch, normalizeSettingsSearchQuery } from './settings-search' +import { translate } from '@/i18n/i18n' + +/** Open the proxy fields automatically when a search matches this section. */ +export function shouldOpenNetworkProxyConfig(searchQuery: string): boolean { + return ( + normalizeSettingsSearchQuery(searchQuery) !== '' && + matchesSettingsSearch(searchQuery, getAdvancedNetworkSearchEntries()) + ) +} + +/** A configured proxy should also reveal the fields, so users see the value. */ +export function hasConfiguredNetworkProxy(settings: GlobalSettings): boolean { + return Boolean(settings.httpProxyUrl?.trim() || settings.httpProxyBypassRules?.trim()) +} + +export type HttpProxyUrlDraftState = { + sourceValue: string + draft: string + error: string | null +} + +export function createHttpProxyUrlDraftState( + httpProxyUrl: string | undefined +): HttpProxyUrlDraftState { + const sourceValue = httpProxyUrl ?? '' + return { + sourceValue, + draft: sourceValue, + error: null + } +} + +function resolveHttpProxyUrlDraftState( + state: HttpProxyUrlDraftState, + httpProxyUrl: string | undefined +): HttpProxyUrlDraftState { + const sourceValue = httpProxyUrl ?? '' + return state.sourceValue === sourceValue ? state : createHttpProxyUrlDraftState(httpProxyUrl) +} + +export function updateHttpProxyUrlDraftState( + state: HttpProxyUrlDraftState, + httpProxyUrl: string | undefined, + draft: string +): HttpProxyUrlDraftState { + return { + // Why: settings persistence is async, so edits after an external settings + // reload must build on the latest persisted proxy source. + ...resolveHttpProxyUrlDraftState(state, httpProxyUrl), + draft, + error: null + } +} + +export function setHttpProxyUrlDraftErrorState( + state: HttpProxyUrlDraftState, + httpProxyUrl: string | undefined, + error: string +): HttpProxyUrlDraftState { + return { + ...resolveHttpProxyUrlDraftState(state, httpProxyUrl), + error + } +} + +export type HttpProxyBypassRulesDraftState = { + sourceValue: string + draft: string +} + +export function createHttpProxyBypassRulesDraftState( + httpProxyBypassRules: string | undefined +): HttpProxyBypassRulesDraftState { + const sourceValue = httpProxyBypassRules ?? '' + return { + sourceValue, + draft: sourceValue + } +} + +function resolveHttpProxyBypassRulesDraftState( + state: HttpProxyBypassRulesDraftState, + httpProxyBypassRules: string | undefined +): HttpProxyBypassRulesDraftState { + const sourceValue = httpProxyBypassRules ?? '' + return state.sourceValue === sourceValue + ? state + : createHttpProxyBypassRulesDraftState(httpProxyBypassRules) +} + +export function updateHttpProxyBypassRulesDraftState( + state: HttpProxyBypassRulesDraftState, + httpProxyBypassRules: string | undefined, + draft: string +): HttpProxyBypassRulesDraftState { + return { + ...resolveHttpProxyBypassRulesDraftState(state, httpProxyBypassRules), + draft + } +} + +type AdvancedNetworkSettingsSectionProps = { + settings: GlobalSettings + updateSettings: (updates: Partial) => void +} + +export function AdvancedNetworkSettingsSection({ + settings, + updateSettings +}: AdvancedNetworkSettingsSectionProps): React.JSX.Element { + const searchQuery = useAppStore((s) => s.settingsSearchQuery) + const [proxyConfigOpen, setProxyConfigOpen] = useState(false) + // Reveal the fields when searching for proxy terms or when a proxy is set, + // so the value is never hidden behind a collapsed trigger. + const proxyConfigForcedOpen = + shouldOpenNetworkProxyConfig(searchQuery) || hasConfiguredNetworkProxy(settings) + const proxyConfigExpanded = proxyConfigOpen || proxyConfigForcedOpen + + const [httpProxyUrlDraftState, setHttpProxyUrlDraftState] = useState(() => + createHttpProxyUrlDraftState(settings.httpProxyUrl) + ) + const [httpProxyBypassRulesDraftState, setHttpProxyBypassRulesDraftState] = useState(() => + createHttpProxyBypassRulesDraftState(settings.httpProxyBypassRules) + ) + + const resolvedHttpProxyUrlDraftState = resolveHttpProxyUrlDraftState( + httpProxyUrlDraftState, + settings.httpProxyUrl + ) + if (resolvedHttpProxyUrlDraftState !== httpProxyUrlDraftState) { + // Why: Settings can change outside this pane; reconcile the proxy draft + // before paint so stale network values do not briefly appear. + setHttpProxyUrlDraftState(resolvedHttpProxyUrlDraftState) + } + const httpProxyUrlDraft = resolvedHttpProxyUrlDraftState.draft + const httpProxyUrlError = resolvedHttpProxyUrlDraftState.error + + const resolvedHttpProxyBypassRulesDraftState = resolveHttpProxyBypassRulesDraftState( + httpProxyBypassRulesDraftState, + settings.httpProxyBypassRules + ) + if (resolvedHttpProxyBypassRulesDraftState !== httpProxyBypassRulesDraftState) { + // Why: Proxy bypass rules are local input state, but settings reloads can + // replace their source while this pane is mounted. + setHttpProxyBypassRulesDraftState(resolvedHttpProxyBypassRulesDraftState) + } + const httpProxyBypassRulesDraft = resolvedHttpProxyBypassRulesDraftState.draft + + const updateHttpProxyUrlDraft = (draft: string): void => { + setHttpProxyUrlDraftState((current) => + updateHttpProxyUrlDraftState(current, settings.httpProxyUrl, draft) + ) + } + + const updateHttpProxyBypassRulesDraft = (draft: string): void => { + setHttpProxyBypassRulesDraftState((current) => + updateHttpProxyBypassRulesDraftState(current, settings.httpProxyBypassRules, draft) + ) + } + + const commitHttpProxyUrl = (): void => { + const normalized = normalizeProxyUrl(httpProxyUrlDraft) + if (!normalized.ok) { + setHttpProxyUrlDraftState((current) => + setHttpProxyUrlDraftErrorState(current, settings.httpProxyUrl, normalized.message) + ) + return + } + setHttpProxyUrlDraftState((current) => + updateHttpProxyUrlDraftState(current, settings.httpProxyUrl, normalized.value) + ) + if (normalized.value !== (settings.httpProxyUrl ?? '')) { + updateSettings({ httpProxyUrl: normalized.value }) + } + } + + const commitHttpProxyBypassRules = (): void => { + const normalized = normalizeProxyBypassRules(httpProxyBypassRulesDraft) + setHttpProxyBypassRulesDraftState((current) => + updateHttpProxyBypassRulesDraftState(current, settings.httpProxyBypassRules, normalized) + ) + if (normalized !== (settings.httpProxyBypassRules ?? '')) { + updateSettings({ httpProxyBypassRules: normalized }) + } + } + + return ( + +
+
+ +

+ {translate( + 'auto.components.settings.AdvancedNetworkSettingsSection.1e214e265a', + 'Leave empty to use system proxy settings and inherited proxy environment variables.' + )} +

+
+
+ + + + + + +
+
+ + { + updateHttpProxyUrlDraft(e.target.value) + }} + onBlur={commitHttpProxyUrl} + onKeyDown={(e) => { + if (e.key === 'Enter') { + e.currentTarget.blur() + } + }} + placeholder={translate( + 'auto.components.settings.AdvancedNetworkSettingsSection.476f302aca', + 'http://proxy.example.com:8080' + )} + autoCapitalize="none" + autoCorrect="off" + autoComplete="off" + spellCheck={false} + aria-invalid={httpProxyUrlError ? true : undefined} + className="font-mono text-xs" + /> + {httpProxyUrlError ? ( +

{httpProxyUrlError}

+ ) : ( +

+ {translate( + 'auto.components.settings.AdvancedNetworkSettingsSection.0adfce9fa7', + 'Supports http, https, socks, socks4, and socks5 URLs.' + )} +

+ )} +
+ +
+ + updateHttpProxyBypassRulesDraft(e.target.value)} + onBlur={commitHttpProxyBypassRules} + onKeyDown={(e) => { + if (e.key === 'Enter') { + e.currentTarget.blur() + } + }} + placeholder={translate( + 'auto.components.settings.AdvancedNetworkSettingsSection.3e431564b5', + 'localhost, 127.0.0.1, *.internal' + )} + autoCapitalize="none" + autoCorrect="off" + autoComplete="off" + spellCheck={false} + className="font-mono text-xs" + /> +

+ {translate( + 'auto.components.settings.AdvancedNetworkSettingsSection.33ee3ca3af', + 'Optional. Separate hosts with commas, semicolons, or new lines.' + )} +

+
+
+
+
+
+ ) +} diff --git a/src/renderer/src/components/settings/AdvancedPane.tsx b/src/renderer/src/components/settings/AdvancedPane.tsx index c287b9fa9..f2b014e28 100644 --- a/src/renderer/src/components/settings/AdvancedPane.tsx +++ b/src/renderer/src/components/settings/AdvancedPane.tsx @@ -5,6 +5,7 @@ import { useMountedRef } from '@/hooks/useMountedRef' import { Button } from '../ui/button' import { Label } from '../ui/label' import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../ui/tooltip' +import { AdvancedNetworkSettingsSection } from './AdvancedNetworkSettingsSection' import { SearchableSetting } from './SearchableSetting' import { SettingsSubsectionHeader, SettingsSwitch } from './SettingsFormControls' import { getAdvancedPaneSearchEntries, getAdvancedSearchEntry } from './advanced-search' @@ -135,6 +136,17 @@ export function AdvancedPane({ settings, updateSettings }: AdvancedPaneProps): R ) : null} + +
+ + +
) } diff --git a/src/renderer/src/components/settings/GeneralCacheTimerSection.tsx b/src/renderer/src/components/settings/AgentCacheTimerSection.tsx similarity index 72% rename from src/renderer/src/components/settings/GeneralCacheTimerSection.tsx rename to src/renderer/src/components/settings/AgentCacheTimerSection.tsx index 02293382b..554e95410 100644 --- a/src/renderer/src/components/settings/GeneralCacheTimerSection.tsx +++ b/src/renderer/src/components/settings/AgentCacheTimerSection.tsx @@ -4,43 +4,43 @@ import type { GlobalSettings } from '../../../../shared/types' import { useAppStore } from '../../store' import { Label } from '../ui/label' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select' -import { getGeneralCacheTimerSearchEntries } from './general-search' +import { getAgentCacheTimerSearchEntries } from './agent-cache-timer-search' import { SearchableSetting } from './SearchableSetting' import { SettingsSubsectionHeader, SettingsSwitch } from './SettingsFormControls' import { translate } from '@/i18n/i18n' -type GeneralCacheTimerSectionProps = { +type AgentCacheTimerSectionProps = { settings: GlobalSettings updateSettings: (updates: Partial) => void } -export function GeneralCacheTimerSection({ +export function AgentCacheTimerSection({ settings, updateSettings -}: GeneralCacheTimerSectionProps): React.JSX.Element { +}: AgentCacheTimerSectionProps): React.JSX.Element { return ( -
+
[ + keywords={getAgentCacheTimerSearchEntries().flatMap((entry) => [ entry.title, entry.description ?? '', ...(entry.keywords ?? []) @@ -52,21 +52,21 @@ export function GeneralCacheTimerSection({

{translate( - 'auto.components.settings.GeneralCacheTimerSection.487b176240', + 'auto.components.settings.AgentCacheTimerSection.487b176240', 'Show a countdown in the sidebar after a Claude agent becomes idle.' )}

{translate( - 'auto.components.settings.GeneralCacheTimerSection.8b9e202e0a', + 'auto.components.settings.AgentCacheTimerSection.8b9e202e0a', "Match this to your provider's cache TTL. The default is 5 minutes." )}

@@ -117,15 +117,12 @@ export function GeneralCacheTimerSection({ {translate( - 'auto.components.settings.GeneralCacheTimerSection.54395ecd7c', + 'auto.components.settings.AgentCacheTimerSection.54395ecd7c', '5 minutes' )} - {translate( - 'auto.components.settings.GeneralCacheTimerSection.05de84a104', - '1 hour' - )} + {translate('auto.components.settings.AgentCacheTimerSection.05de84a104', '1 hour')} diff --git a/src/renderer/src/components/settings/AgentsPane.tsx b/src/renderer/src/components/settings/AgentsPane.tsx index 42b342321..1dabf0a0a 100644 --- a/src/renderer/src/components/settings/AgentsPane.tsx +++ b/src/renderer/src/components/settings/AgentsPane.tsx @@ -11,6 +11,7 @@ import { Button } from '../ui/button' import { Input } from '../ui/input' import { cn } from '@/lib/utils' import { AgentAwakeSetting } from './AgentAwakeSetting' +import { AgentCacheTimerSection } from './AgentCacheTimerSection' import { getAgentGeneratedTabTitlesDescription, getAgentGeneratedTabTitlesTitle @@ -818,6 +819,8 @@ export function AgentsPane({ settings, updateSettings }: AgentsPaneProps): React + + {detectedAgents.length > 0 && ( diff --git a/src/renderer/src/components/settings/GeneralNetworkSettingsSection.tsx b/src/renderer/src/components/settings/GeneralNetworkSettingsSection.tsx deleted file mode 100644 index 0c34a50d6..000000000 --- a/src/renderer/src/components/settings/GeneralNetworkSettingsSection.tsx +++ /dev/null @@ -1,297 +0,0 @@ -import type React from 'react' -import { useState } from 'react' -import type { GlobalSettings } from '../../../../shared/types' -import { normalizeProxyBypassRules, normalizeProxyUrl } from '../../../../shared/network-proxy' -import { Input } from '../ui/input' -import { Label } from '../ui/label' -import { SearchableSetting } from './SearchableSetting' -import { SettingsSubsectionHeader } from './SettingsFormControls' -import { translate } from '@/i18n/i18n' - -export type HttpProxyUrlDraftState = { - sourceValue: string - draft: string - error: string | null -} - -export function createHttpProxyUrlDraftState( - httpProxyUrl: string | undefined -): HttpProxyUrlDraftState { - const sourceValue = httpProxyUrl ?? '' - return { - sourceValue, - draft: sourceValue, - error: null - } -} - -function resolveHttpProxyUrlDraftState( - state: HttpProxyUrlDraftState, - httpProxyUrl: string | undefined -): HttpProxyUrlDraftState { - const sourceValue = httpProxyUrl ?? '' - return state.sourceValue === sourceValue ? state : createHttpProxyUrlDraftState(httpProxyUrl) -} - -export function updateHttpProxyUrlDraftState( - state: HttpProxyUrlDraftState, - httpProxyUrl: string | undefined, - draft: string -): HttpProxyUrlDraftState { - return { - // Why: settings persistence is async, so edits after an external settings - // reload must build on the latest persisted proxy source. - ...resolveHttpProxyUrlDraftState(state, httpProxyUrl), - draft, - error: null - } -} - -export function setHttpProxyUrlDraftErrorState( - state: HttpProxyUrlDraftState, - httpProxyUrl: string | undefined, - error: string -): HttpProxyUrlDraftState { - return { - ...resolveHttpProxyUrlDraftState(state, httpProxyUrl), - error - } -} - -export type HttpProxyBypassRulesDraftState = { - sourceValue: string - draft: string -} - -export function createHttpProxyBypassRulesDraftState( - httpProxyBypassRules: string | undefined -): HttpProxyBypassRulesDraftState { - const sourceValue = httpProxyBypassRules ?? '' - return { - sourceValue, - draft: sourceValue - } -} - -function resolveHttpProxyBypassRulesDraftState( - state: HttpProxyBypassRulesDraftState, - httpProxyBypassRules: string | undefined -): HttpProxyBypassRulesDraftState { - const sourceValue = httpProxyBypassRules ?? '' - return state.sourceValue === sourceValue - ? state - : createHttpProxyBypassRulesDraftState(httpProxyBypassRules) -} - -export function updateHttpProxyBypassRulesDraftState( - state: HttpProxyBypassRulesDraftState, - httpProxyBypassRules: string | undefined, - draft: string -): HttpProxyBypassRulesDraftState { - return { - ...resolveHttpProxyBypassRulesDraftState(state, httpProxyBypassRules), - draft - } -} - -type GeneralNetworkSettingsSectionProps = { - settings: GlobalSettings - updateSettings: (updates: Partial) => void -} - -export function GeneralNetworkSettingsSection({ - settings, - updateSettings -}: GeneralNetworkSettingsSectionProps): React.JSX.Element { - const [httpProxyUrlDraftState, setHttpProxyUrlDraftState] = useState(() => - createHttpProxyUrlDraftState(settings.httpProxyUrl) - ) - const [httpProxyBypassRulesDraftState, setHttpProxyBypassRulesDraftState] = useState(() => - createHttpProxyBypassRulesDraftState(settings.httpProxyBypassRules) - ) - - const resolvedHttpProxyUrlDraftState = resolveHttpProxyUrlDraftState( - httpProxyUrlDraftState, - settings.httpProxyUrl - ) - if (resolvedHttpProxyUrlDraftState !== httpProxyUrlDraftState) { - // Why: Settings can change outside this pane; reconcile the proxy draft - // before paint so stale network values do not briefly appear. - setHttpProxyUrlDraftState(resolvedHttpProxyUrlDraftState) - } - const httpProxyUrlDraft = resolvedHttpProxyUrlDraftState.draft - const httpProxyUrlError = resolvedHttpProxyUrlDraftState.error - - const resolvedHttpProxyBypassRulesDraftState = resolveHttpProxyBypassRulesDraftState( - httpProxyBypassRulesDraftState, - settings.httpProxyBypassRules - ) - if (resolvedHttpProxyBypassRulesDraftState !== httpProxyBypassRulesDraftState) { - // Why: Proxy bypass rules are local input state, but settings reloads can - // replace their source while this pane is mounted. - setHttpProxyBypassRulesDraftState(resolvedHttpProxyBypassRulesDraftState) - } - const httpProxyBypassRulesDraft = resolvedHttpProxyBypassRulesDraftState.draft - - const updateHttpProxyUrlDraft = (draft: string): void => { - setHttpProxyUrlDraftState((current) => - updateHttpProxyUrlDraftState(current, settings.httpProxyUrl, draft) - ) - } - - const updateHttpProxyBypassRulesDraft = (draft: string): void => { - setHttpProxyBypassRulesDraftState((current) => - updateHttpProxyBypassRulesDraftState(current, settings.httpProxyBypassRules, draft) - ) - } - - const commitHttpProxyUrl = (): void => { - const normalized = normalizeProxyUrl(httpProxyUrlDraft) - if (!normalized.ok) { - setHttpProxyUrlDraftState((current) => - setHttpProxyUrlDraftErrorState(current, settings.httpProxyUrl, normalized.message) - ) - return - } - setHttpProxyUrlDraftState((current) => - updateHttpProxyUrlDraftState(current, settings.httpProxyUrl, normalized.value) - ) - if (normalized.value !== (settings.httpProxyUrl ?? '')) { - updateSettings({ httpProxyUrl: normalized.value }) - } - } - - const commitHttpProxyBypassRules = (): void => { - const normalized = normalizeProxyBypassRules(httpProxyBypassRulesDraft) - setHttpProxyBypassRulesDraftState((current) => - updateHttpProxyBypassRulesDraftState(current, settings.httpProxyBypassRules, normalized) - ) - if (normalized !== (settings.httpProxyBypassRules ?? '')) { - updateSettings({ httpProxyBypassRules: normalized }) - } - } - - return ( -
- - - -
- -

- {translate( - 'auto.components.settings.GeneralNetworkSettingsSection.1e214e265a', - 'Leave empty to use system proxy settings and inherited proxy environment variables.' - )} -

-
- { - updateHttpProxyUrlDraft(e.target.value) - }} - onBlur={commitHttpProxyUrl} - onKeyDown={(e) => { - if (e.key === 'Enter') { - e.currentTarget.blur() - } - }} - placeholder={translate( - 'auto.components.settings.GeneralNetworkSettingsSection.476f302aca', - 'http://proxy.example.com:8080' - )} - autoCapitalize="none" - autoCorrect="off" - autoComplete="off" - spellCheck={false} - aria-invalid={httpProxyUrlError ? true : undefined} - className="font-mono text-xs" - /> - {httpProxyUrlError ? ( -

{httpProxyUrlError}

- ) : ( -

- {translate( - 'auto.components.settings.GeneralNetworkSettingsSection.0adfce9fa7', - 'Supports http, https, socks, socks4, and socks5 URLs.' - )} -

- )} -
- - -
- -

- {translate( - 'auto.components.settings.GeneralNetworkSettingsSection.33ee3ca3af', - 'Optional. Separate hosts with commas, semicolons, or new lines.' - )} -

-
- updateHttpProxyBypassRulesDraft(e.target.value)} - onBlur={commitHttpProxyBypassRules} - onKeyDown={(e) => { - if (e.key === 'Enter') { - e.currentTarget.blur() - } - }} - placeholder={translate( - 'auto.components.settings.GeneralNetworkSettingsSection.3e431564b5', - 'localhost, 127.0.0.1, *.internal' - )} - autoCapitalize="none" - autoCorrect="off" - autoComplete="off" - spellCheck={false} - className="font-mono text-xs" - /> -
-
- ) -} diff --git a/src/renderer/src/components/settings/GeneralPane.test.ts b/src/renderer/src/components/settings/GeneralPane.test.ts index ef05b730b..2cbb52a18 100644 --- a/src/renderer/src/components/settings/GeneralPane.test.ts +++ b/src/renderer/src/components/settings/GeneralPane.test.ts @@ -1,16 +1,12 @@ import { describe, expect, it } from 'vitest' import { createAutoSaveDelayDraftState, - createHttpProxyBypassRulesDraftState, - createHttpProxyUrlDraftState, getDesktopPlatformFromUserAgent, getGeneralPaneSearchEntries, getTabOrderControlSearchKeywords, - setHttpProxyUrlDraftErrorState, shouldCommitOpenInApplicationsDraft, - updateAutoSaveDelayDraftState, - updateHttpProxyBypassRulesDraftState, - updateHttpProxyUrlDraftState + shouldShowProjectRuntimeSection, + updateAutoSaveDelayDraftState } from './GeneralPane' import { matchesSettingsSearch } from './settings-search' @@ -34,62 +30,6 @@ describe('GeneralPane auto-save delay drafts', () => { }) }) -describe('GeneralPane proxy drafts', () => { - it('keeps a committed proxy URL draft tied to the current persisted source', () => { - const current = createHttpProxyUrlDraftState(undefined) - - expect(updateHttpProxyUrlDraftState(current, undefined, 'http://proxy.test:8080')).toEqual({ - sourceValue: '', - draft: 'http://proxy.test:8080', - error: null - }) - }) - - it('reconciles stale proxy URL state and clears errors before applying a new draft', () => { - const current = setHttpProxyUrlDraftErrorState( - updateHttpProxyUrlDraftState( - createHttpProxyUrlDraftState('http://old.test:8080'), - 'http://old.test:8080', - 'bad proxy' - ), - 'http://old.test:8080', - 'Invalid proxy URL' - ) - - expect( - updateHttpProxyUrlDraftState(current, 'http://new.test:8080', 'http://typed.test:8080') - ).toEqual({ - sourceValue: 'http://new.test:8080', - draft: 'http://typed.test:8080', - error: null - }) - }) - - it('keeps committed proxy bypass rules tied to the current persisted source', () => { - const current = createHttpProxyBypassRulesDraftState('localhost') - - expect( - updateHttpProxyBypassRulesDraftState(current, 'localhost', 'localhost,127.0.0.1') - ).toEqual({ - sourceValue: 'localhost', - draft: 'localhost,127.0.0.1' - }) - }) - - it('reconciles stale proxy bypass rules before applying a new draft', () => { - const current = updateHttpProxyBypassRulesDraftState( - createHttpProxyBypassRulesDraftState('localhost'), - 'localhost', - 'localhost,127.0.0.1' - ) - - expect(updateHttpProxyBypassRulesDraftState(current, '*.internal', '*.corp')).toEqual({ - sourceValue: '*.internal', - draft: '*.corp' - }) - }) -}) - describe('GeneralPane open-in application drafts', () => { it('does not commit rows until both label and command are present', () => { expect( @@ -163,3 +103,23 @@ describe('GeneralPane search entries', () => { expect(matchesSettingsSearch('wsl', entries)).toBe(false) }) }) + +describe('GeneralPane project runtime section visibility', () => { + const entries = getGeneralPaneSearchEntries() + + it('hides the section on non-Windows hosts even with an empty search query', () => { + // Regression: matchesSettingsSearch returns true for an empty query, so the + // platform gate is what keeps the orphaned header off macOS/Linux. + expect(shouldShowProjectRuntimeSection(false, '', [])).toBe(false) + expect(shouldShowProjectRuntimeSection(undefined, '', [])).toBe(false) + }) + + it('shows the section on Windows-capable hosts when entries match', () => { + expect(shouldShowProjectRuntimeSection(true, '', entries)).toBe(true) + expect(shouldShowProjectRuntimeSection(true, 'wsl', entries)).toBe(true) + }) + + it('hides the section when a search query excludes the runtime entries', () => { + expect(shouldShowProjectRuntimeSection(true, 'zzz-no-match', entries)).toBe(false) + }) +}) diff --git a/src/renderer/src/components/settings/GeneralPane.tsx b/src/renderer/src/components/settings/GeneralPane.tsx index 264ca9c33..bf156a803 100644 --- a/src/renderer/src/components/settings/GeneralPane.tsx +++ b/src/renderer/src/components/settings/GeneralPane.tsx @@ -3,18 +3,14 @@ import type { GlobalSettings } from '../../../../shared/types' import { useAppStore } from '../../store' import { Separator } from '../ui/separator' import { CliSection } from './CliSection' -import { GeneralCacheTimerSection } from './GeneralCacheTimerSection' import { GeneralEditorSettingsSection } from './GeneralEditorSettingsSection' -import { GeneralNetworkSettingsSection } from './GeneralNetworkSettingsSection' import { GeneralSupportSection } from './GeneralSupportSection' import { GeneralUpdateSettingsSection } from './GeneralUpdateSettingsSection' import { GeneralWorkspaceSettingsSection } from './GeneralWorkspaceSettingsSection' import { - getGeneralCacheTimerSearchEntries, getGeneralCliSearchEntries, getGeneralEditorSearchEntries, getGeneralNavigationSearchEntries, - getGeneralNetworkSearchEntries, getGeneralPaneSearchEntries, getGeneralSupportSearchEntries, getGeneralUpdateSearchEntries, @@ -22,7 +18,7 @@ import { } from './general-search' import { getGeneralProjectRuntimeSearchEntries } from './general-project-runtime-search' import { RecentTabOrderControl } from './RecentTabOrderControl' -import { matchesSettingsSearch } from './settings-search' +import { matchesSettingsSearch, type SettingsSearchEntry } from './settings-search' import { SearchableSetting } from './SearchableSetting' import { SettingsSubsectionHeader, SettingsSwitchRow } from './SettingsFormControls' import { translate } from '@/i18n/i18n' @@ -33,15 +29,6 @@ export { updateAutoSaveDelayDraftState, type AutoSaveDelayDraftState } from './GeneralEditorSettingsSection' -export { - createHttpProxyBypassRulesDraftState, - createHttpProxyUrlDraftState, - setHttpProxyUrlDraftErrorState, - updateHttpProxyBypassRulesDraftState, - updateHttpProxyUrlDraftState, - type HttpProxyBypassRulesDraftState, - type HttpProxyUrlDraftState -} from './GeneralNetworkSettingsSection' export { shouldCommitOpenInApplicationsDraft } from './OpenInMenuSetting' type GeneralSearchEntry = ReturnType[number] @@ -58,6 +45,22 @@ export function getDesktopPlatformFromUserAgent(userAgent: string): 'darwin' | ' export { getGeneralPaneSearchEntries } +/** + * The Project Runtime section is Windows-only. Gate on the platform directly: + * an empty search query makes matchesSettingsSearch return true even for an + * empty entries array, which would otherwise render an orphaned header (the + * inner control self-hides) on non-Windows hosts. + */ +export function shouldShowProjectRuntimeSection( + wslSupportedPlatform: boolean | undefined, + searchQuery: string, + projectRuntimeSearchEntries: SettingsSearchEntry[] +): boolean { + return ( + Boolean(wslSupportedPlatform) && matchesSettingsSearch(searchQuery, projectRuntimeSearchEntries) + ) +} + export function getTabOrderControlSearchKeywords( navigationEntries: GeneralSearchEntry[] = getGeneralNavigationSearchEntries() ): string[] { @@ -143,7 +146,11 @@ export function GeneralPane({ updateSettings={updateSettings} /> ) : null, - matchesSettingsSearch(searchQuery, projectRuntimeSearchEntries) ? ( + shouldShowProjectRuntimeSection( + wslSupportedPlatform, + searchQuery, + projectRuntimeSearchEntries + ) ? (
) : null, - matchesSettingsSearch(searchQuery, getGeneralNetworkSearchEntries()) ? ( - - ) : null, matchesSettingsSearch(searchQuery, getGeneralEditorSearchEntries()) ? ( ) : null, - matchesSettingsSearch(searchQuery, getGeneralCacheTimerSearchEntries()) ? ( - - ) : null, matchesSettingsSearch(searchQuery, getGeneralUpdateSearchEntries()) ? ( ) : null diff --git a/src/renderer/src/components/settings/advanced-network-search.ts b/src/renderer/src/components/settings/advanced-network-search.ts new file mode 100644 index 000000000..fbabdcc7c --- /dev/null +++ b/src/renderer/src/components/settings/advanced-network-search.ts @@ -0,0 +1,29 @@ +import type { SettingsSearchEntry } from './settings-search' +import { createLocalizedCatalog } from '@/i18n/localized-catalog' +import { translate } from '@/i18n/i18n' +import { translateSearchKeyword } from './settings-search-keywords' + +export const getAdvancedNetworkSearchEntries = createLocalizedCatalog((): SettingsSearchEntry[] => [ + { + title: translate( + 'auto.components.settings.AdvancedNetworkSettingsSection.c46cdbbd4e', + 'Network' + ), + description: translate( + 'auto.components.settings.AdvancedNetworkSettingsSection.823e0f15b1', + 'Proxy URL for Orca network requests and local terminal children.' + ), + keywords: [ + ...translateSearchKeyword('auto.components.settings.general.search.20b711ac9e', 'proxy'), + ...translateSearchKeyword('auto.components.settings.general.search.8f03d44672', 'http_proxy'), + ...translateSearchKeyword( + 'auto.components.settings.general.search.b9096a44cf', + 'https_proxy' + ), + ...translateSearchKeyword('auto.components.settings.general.search.91a46caafc', 'no_proxy'), + ...translateSearchKeyword('auto.components.settings.general.search.3a73054565', 'bypass'), + ...translateSearchKeyword('auto.components.settings.general.search.3566fce83f', 'localhost'), + ...translateSearchKeyword('auto.components.settings.general.search.c56cb6f1c2', 'network') + ] + } +]) diff --git a/src/renderer/src/components/settings/advanced-search.ts b/src/renderer/src/components/settings/advanced-search.ts index 85ab96ffd..59cee35c0 100644 --- a/src/renderer/src/components/settings/advanced-search.ts +++ b/src/renderer/src/components/settings/advanced-search.ts @@ -1,9 +1,11 @@ import type { SettingsSearchEntry } from './settings-search' +import { getAdvancedNetworkSearchEntries } from './advanced-network-search' import { createLocalizedCatalog } from '@/i18n/localized-catalog' import { translate } from '@/i18n/i18n' import { translateSearchKeyword } from './settings-search-keywords' export const getAdvancedPaneSearchEntries = createLocalizedCatalog((): SettingsSearchEntry[] => [ + ...getAdvancedNetworkSearchEntries(), { title: translate( 'auto.components.settings.advanced.search.11eea3da72', diff --git a/src/renderer/src/components/settings/agent-cache-timer-search.ts b/src/renderer/src/components/settings/agent-cache-timer-search.ts new file mode 100644 index 000000000..820439e92 --- /dev/null +++ b/src/renderer/src/components/settings/agent-cache-timer-search.ts @@ -0,0 +1,22 @@ +import { translate } from '@/i18n/i18n' +import { translateSearchKeyword } from './settings-search-keywords' +import { createLocalizedCatalog } from '@/i18n/localized-catalog' + +export const getAgentCacheTimerSearchEntries = createLocalizedCatalog(() => [ + { + title: translate('auto.components.settings.general.search.1e0f28c6f1', 'Prompt Cache Timer'), + description: translate( + 'auto.components.settings.general.search.40c9585e43', + 'Countdown timer showing time until prompt cache expires (Claude agents).' + ), + keywords: [ + ...translateSearchKeyword('auto.components.settings.general.search.b2601a778c', 'cache'), + ...translateSearchKeyword('auto.components.settings.general.search.939b80f5fd', 'timer'), + ...translateSearchKeyword('auto.components.settings.general.search.0efc9d96ad', 'prompt'), + ...translateSearchKeyword('auto.components.settings.general.search.585beac3f8', 'ttl'), + ...translateSearchKeyword('auto.components.settings.general.search.95b63edde7', 'claude'), + ...translateSearchKeyword('auto.components.settings.general.search.660528b048', 'cost'), + ...translateSearchKeyword('auto.components.settings.general.search.3462308bd3', 'tokens') + ] + } +]) diff --git a/src/renderer/src/components/settings/agents-search.ts b/src/renderer/src/components/settings/agents-search.ts index 6941d8d97..61fc88eda 100644 --- a/src/renderer/src/components/settings/agents-search.ts +++ b/src/renderer/src/components/settings/agents-search.ts @@ -14,6 +14,7 @@ import { getAgentStatusHooksSearchKeywords, getAgentStatusHooksTitle } from './agent-status-hooks-copy' +import { getAgentCacheTimerSearchEntries } from './agent-cache-timer-search' import { translate } from '@/i18n/i18n' import { searchKeywords, translateSearchKeyword, uniqueKeywords } from './settings-search-keywords' import { createLocalizedCatalog } from '@/i18n/localized-catalog' @@ -102,5 +103,6 @@ export const getAgentsPaneSearchEntries = createLocalizedCatalog(() => [ ...translateSearchKeyword('auto.components.settings.agents.search.skip', 'skip'), ...translateSearchKeyword('auto.components.settings.agents.search.checks', 'checks') ] - } + }, + ...getAgentCacheTimerSearchEntries() ]) diff --git a/src/renderer/src/components/settings/general-search.ts b/src/renderer/src/components/settings/general-search.ts index 0750db8b1..9cff3c527 100644 --- a/src/renderer/src/components/settings/general-search.ts +++ b/src/renderer/src/components/settings/general-search.ts @@ -95,41 +95,6 @@ export const getGeneralWorkspaceSearchEntries = createLocalizedCatalog(() => [ } ]) -export const getGeneralNetworkSearchEntries = createLocalizedCatalog(() => [ - { - title: translate('auto.components.settings.general.search.c29f23ab57', 'HTTP Proxy'), - description: translate( - 'auto.components.settings.general.search.e3b1d42f95', - 'Proxy URL for Orca network requests and local terminal children.' - ), - keywords: [ - ...translateSearchKeyword('auto.components.settings.general.search.20b711ac9e', 'proxy'), - ...translateSearchKeyword('auto.components.settings.general.search.8f03d44672', 'http_proxy'), - ...translateSearchKeyword( - 'auto.components.settings.general.search.b9096a44cf', - 'https_proxy' - ), - ...translateSearchKeyword('auto.components.settings.general.search.c56cb6f1c2', 'network'), - ...translateSearchKeyword('auto.components.settings.general.search.9da6c875e5', 'dock'), - ...translateSearchKeyword('auto.components.settings.general.search.e55d62dfa4', 'launchpad') - ] - }, - { - title: translate('auto.components.settings.general.search.8436ff6f8e', 'Proxy Bypass Rules'), - description: translate( - 'auto.components.settings.general.search.eb8946b2c9', - 'Hosts that should bypass the configured HTTP proxy.' - ), - keywords: [ - ...translateSearchKeyword('auto.components.settings.general.search.20b711ac9e', 'proxy'), - ...translateSearchKeyword('auto.components.settings.general.search.3a73054565', 'bypass'), - ...translateSearchKeyword('auto.components.settings.general.search.91a46caafc', 'no_proxy'), - ...translateSearchKeyword('auto.components.settings.general.search.3566fce83f', 'localhost'), - ...translateSearchKeyword('auto.components.settings.general.search.c56cb6f1c2', 'network') - ] - } -]) - export const getGeneralNavigationSearchEntries = createLocalizedCatalog(() => [ { title: translate('auto.components.settings.general.search.256d92554d', 'Tab Order'), @@ -228,25 +193,6 @@ export const getGeneralUpdateSearchEntries = createLocalizedCatalog(() => [ } ]) -export const getGeneralCacheTimerSearchEntries = createLocalizedCatalog(() => [ - { - title: translate('auto.components.settings.general.search.1e0f28c6f1', 'Prompt Cache Timer'), - description: translate( - 'auto.components.settings.general.search.40c9585e43', - 'Countdown timer showing time until prompt cache expires (Claude agents).' - ), - keywords: [ - ...translateSearchKeyword('auto.components.settings.general.search.b2601a778c', 'cache'), - ...translateSearchKeyword('auto.components.settings.general.search.939b80f5fd', 'timer'), - ...translateSearchKeyword('auto.components.settings.general.search.0efc9d96ad', 'prompt'), - ...translateSearchKeyword('auto.components.settings.general.search.585beac3f8', 'ttl'), - ...translateSearchKeyword('auto.components.settings.general.search.95b63edde7', 'claude'), - ...translateSearchKeyword('auto.components.settings.general.search.660528b048', 'cost'), - ...translateSearchKeyword('auto.components.settings.general.search.3462308bd3', 'tokens') - ] - } -]) - export const getGeneralAgentSearchEntries = createLocalizedCatalog(() => [ { title: translate('auto.components.settings.general.search.db11502270', 'Default Agent'), @@ -285,12 +231,10 @@ export function getGeneralPaneSearchEntries( ): SettingsSearchEntry[] { return [ ...getGeneralWorkspaceSearchEntries(), - ...getGeneralNetworkSearchEntries(), ...getGeneralNavigationSearchEntries(), ...(options.includeProjectRuntime === false ? [] : getGeneralProjectRuntimeSearchEntries()), ...getGeneralEditorSearchEntries(), ...getGeneralCliSearchEntries(), - ...getGeneralCacheTimerSearchEntries(), ...getGeneralUpdateSearchEntries(), ...getGeneralSupportSearchEntries() ] diff --git a/src/renderer/src/components/sidebar/CacheTimer.tsx b/src/renderer/src/components/sidebar/CacheTimer.tsx index 4baf4ecf8..8be4cb07d 100644 --- a/src/renderer/src/components/sidebar/CacheTimer.tsx +++ b/src/renderer/src/components/sidebar/CacheTimer.tsx @@ -4,7 +4,6 @@ import { Timer } from 'lucide-react' import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip' import { usePromptCacheCountdownNow } from './prompt-cache-countdown-clock' import { getMostUrgentPromptCacheStartedAt } from './prompt-cache-timer-selection' -import { translate } from '@/i18n/i18n' /** * The most-urgent cache start time when a countdown should show, else null. @@ -65,11 +64,9 @@ export default function CacheTimer({ )} > - - {expired - ? translate('auto.components.sidebar.CacheTimer.07729cc155', 'expired') - : label} - + {/* When expired, the red icon alone conveys state — the countdown + text is only meaningful while the cache is still alive. */} + {!expired && {label}} diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json index 523b1a354..6f74439a9 100644 --- a/src/renderer/src/i18n/locales/en.json +++ b/src/renderer/src/i18n/locales/en.json @@ -4297,7 +4297,9 @@ "6627e75c92": "Explain HTTP/1.1 compatibility", "e9506d3377": "HTTP/1.1 Compatibility", "8b7a8df299": "Low-level workarounds for support troubleshooting.", - "8d8d8ac599": "Compatibility" + "8d8d8ac599": "Compatibility", + "network": "Network", + "networkDescription": "App-level network routing for proxies and corporate environments." }, "AgentLocationSetting": { "92f4238f1a": "WSL default", @@ -4749,7 +4751,7 @@ "37df688d6f": "Enable the floating workspace and choose where new tabs start.", "1f67f39384": "Floating Workspace" }, - "GeneralCacheTimerSection": { + "AgentCacheTimerSection": { "05de84a104": "1 hour", "54395ecd7c": "5 minutes", "8b9e202e0a": "Match this to your provider's cache TTL. The default is 5 minutes.", @@ -4785,7 +4787,7 @@ "d21136d9ef": "Configure how Orca persists file edits.", "45c6e85c4d": "Editor" }, - "GeneralNetworkSettingsSection": { + "AdvancedNetworkSettingsSection": { "3e431564b5": "localhost, 127.0.0.1, *.internal", "33ee3ca3af": "Optional. Separate hosts with commas, semicolons, or new lines.", "f6d76cc8f4": "Proxy Bypass Rules", @@ -4796,7 +4798,8 @@ "f00daf6324": "HTTP Proxy", "823e0f15b1": "Proxy URL for Orca network requests and local terminal children.", "d93c7cd531": "Configure app-level network routing.", - "c46cdbbd4e": "Network" + "c46cdbbd4e": "Network", + "configureProxy": "Configure proxy" }, "GeneralPane": { "d58fccfd84": "Navigation", diff --git a/src/renderer/src/i18n/locales/es.json b/src/renderer/src/i18n/locales/es.json index e42be4d28..4bdbdb64b 100644 --- a/src/renderer/src/i18n/locales/es.json +++ b/src/renderer/src/i18n/locales/es.json @@ -4297,7 +4297,9 @@ "6627e75c92": "Explicar la compatibilidad HTTP/1.1", "e9506d3377": "Compatibilidad HTTP/1.1", "8b7a8df299": "Soluciones alternativas de bajo nivel para la resolución de problemas de soporte.", - "8d8d8ac599": "Compatibilidad" + "8d8d8ac599": "Compatibilidad", + "network": "Red", + "networkDescription": "Enrutamiento de red a nivel de aplicación para proxies y entornos corporativos." }, "AgentLocationSetting": { "92f4238f1a": "WSL predeterminado", @@ -4749,7 +4751,7 @@ "37df688d6f": "Habilite el espacio de trabajo flotante y elija dónde comienzan las nuevas pestañas.", "1f67f39384": "Espacio de trabajo flotante" }, - "GeneralCacheTimerSection": { + "AgentCacheTimerSection": { "05de84a104": "1 hora", "54395ecd7c": "5 minutos", "8b9e202e0a": "Haga coincidir esto con el TTL de caché de su proveedor. El valor predeterminado es 5 minutos.", @@ -4785,7 +4787,7 @@ "d21136d9ef": "Configure cómo Orca persiste en las ediciones de archivos.", "45c6e85c4d": "Editor" }, - "GeneralNetworkSettingsSection": { + "AdvancedNetworkSettingsSection": { "3e431564b5": "host local, 127.0.0.1, *.interno", "33ee3ca3af": "Opcional. Separe los hosts con comas, punto y coma o líneas nuevas.", "f6d76cc8f4": "Reglas de omisión de proxy", @@ -4796,7 +4798,8 @@ "f00daf6324": "Proxy HTTP", "823e0f15b1": "URL proxy para solicitudes de red Orca y terminales secundarios locales.", "d93c7cd531": "Configure el enrutamiento de red a nivel de aplicación.", - "c46cdbbd4e": "Red" + "c46cdbbd4e": "Red", + "configureProxy": "Configurar proxy" }, "GeneralPane": { "d58fccfd84": "Navegación", diff --git a/src/renderer/src/i18n/locales/ja.json b/src/renderer/src/i18n/locales/ja.json index 9a5390835..2f119fa47 100644 --- a/src/renderer/src/i18n/locales/ja.json +++ b/src/renderer/src/i18n/locales/ja.json @@ -4282,7 +4282,9 @@ "6627e75c92": "HTTP/1.1の互換性について説明する", "e9506d3377": "HTTP/1.1 互換性", "8b7a8df299": "サポートのトラブルシューティングのための低レベルの回避策。", - "8d8d8ac599": "互換性" + "8d8d8ac599": "互換性", + "network": "ネットワーク", + "networkDescription": "プロキシや企業環境向けのアプリレベルのネットワークルーティング。" }, "AgentLocationSetting": { "92f4238f1a": "WSL のデフォルト", @@ -4734,7 +4736,7 @@ "37df688d6f": "フローティング ワークスペースを有効にして、新規タブの開始位置を選択します。", "1f67f39384": "フローティングワークスペース" }, - "GeneralCacheTimerSection": { + "AgentCacheTimerSection": { "05de84a104": "1時間", "54395ecd7c": "5分", "8b9e202e0a": "これをプロバイダーのキャッシュ TTL と一致させます。デフォルトは 5 分です。", @@ -4770,7 +4772,7 @@ "d21136d9ef": "Orca がファイル編集を保持する方法を構成します。", "45c6e85c4d": "エディタ" }, - "GeneralNetworkSettingsSection": { + "AdvancedNetworkSettingsSection": { "3e431564b5": "ローカルホスト、127.0.0.1、*.internal", "33ee3ca3af": "オプション。ホストはカンマ、セミコロン、または改行で区切ります。", "f6d76cc8f4": "プロキシ バイパス ルール", @@ -4781,7 +4783,8 @@ "f00daf6324": "HTTPプロキシ", "823e0f15b1": "Orca ネットワーク リクエストとローカル terminal の子のプロキシ URL。", "d93c7cd531": "アプリレベルのネットワークルーティングを構成します。", - "c46cdbbd4e": "ネットワーク" + "c46cdbbd4e": "ネットワーク", + "configureProxy": "プロキシを設定" }, "GeneralPane": { "d58fccfd84": "ナビゲーション", diff --git a/src/renderer/src/i18n/locales/ko.json b/src/renderer/src/i18n/locales/ko.json index 326f0babb..17d2f8c83 100644 --- a/src/renderer/src/i18n/locales/ko.json +++ b/src/renderer/src/i18n/locales/ko.json @@ -4282,7 +4282,9 @@ "6627e75c92": "HTTP/1.1 호환성 설명", "e9506d3377": "HTTP/1.1 호환성", "8b7a8df299": "지원 문제 해결을 위한 낮은 수준의 해결 방법입니다.", - "8d8d8ac599": "호환성" + "8d8d8ac599": "호환성", + "network": "네트워크", + "networkDescription": "프록시 및 기업 환경을 위한 앱 수준 네트워크 라우팅." }, "AgentLocationSetting": { "92f4238f1a": "WSL 기본값", @@ -4734,7 +4736,7 @@ "37df688d6f": "플로팅 워크스페이스를 활성화하고 새 탭이 시작되는 위치를 선택하세요.", "1f67f39384": "플로팅 워크스페이스" }, - "GeneralCacheTimerSection": { + "AgentCacheTimerSection": { "05de84a104": "1시간", "54395ecd7c": "5분", "8b9e202e0a": "이를 공급자의 캐시 TTL과 일치시킵니다. 기본값은 5분입니다.", @@ -4770,7 +4772,7 @@ "d21136d9ef": "Orca가 파일 편집을 유지하는 방법을 구성합니다.", "45c6e85c4d": "편집자" }, - "GeneralNetworkSettingsSection": { + "AdvancedNetworkSettingsSection": { "3e431564b5": "로컬호스트, 127.0.0.1, *.internal", "33ee3ca3af": "선택 사항. 쉼표, 세미콜론 또는 새 줄로 호스트를 구분합니다.", "f6d76cc8f4": "프록시 우회 규칙", @@ -4781,7 +4783,8 @@ "f00daf6324": "HTTP 프록시", "823e0f15b1": "Orca 네트워크 요청 및 로컬 terminal 하위 항목에 대한 프록시 URL입니다.", "d93c7cd531": "앱 수준 네트워크 라우팅을 구성합니다.", - "c46cdbbd4e": "회로망" + "c46cdbbd4e": "회로망", + "configureProxy": "프록시 구성" }, "GeneralPane": { "d58fccfd84": "항해", diff --git a/src/renderer/src/i18n/locales/zh.json b/src/renderer/src/i18n/locales/zh.json index 140828fd1..165c3e01f 100644 --- a/src/renderer/src/i18n/locales/zh.json +++ b/src/renderer/src/i18n/locales/zh.json @@ -4282,7 +4282,9 @@ "6627e75c92": "解释 HTTP/1.1 兼容性", "e9506d3377": "HTTP/1.1 兼容性", "8b7a8df299": "支持故障排除的低级解决方法。", - "8d8d8ac599": "兼容性" + "8d8d8ac599": "兼容性", + "network": "网络", + "networkDescription": "用于代理和企业环境的应用级网络路由。" }, "AgentLocationSetting": { "92f4238f1a": "WSL 默认值", @@ -4734,7 +4736,7 @@ "37df688d6f": "启用浮动工作区并选择新选项卡的开始位置。", "1f67f39384": "浮动工作区" }, - "GeneralCacheTimerSection": { + "AgentCacheTimerSection": { "05de84a104": "1小时", "54395ecd7c": "5分钟", "8b9e202e0a": "将此与您的提供商的缓存 TTL 相匹配。默认值为 5 分钟。", @@ -4770,7 +4772,7 @@ "d21136d9ef": "配置 Orca 如何保留文件编辑。", "45c6e85c4d": "编辑" }, - "GeneralNetworkSettingsSection": { + "AdvancedNetworkSettingsSection": { "3e431564b5": "本地主机,127.0.0.1,*.internal", "33ee3ca3af": "可选。用逗号、分号或换行符分隔主机。", "f6d76cc8f4": "代理绕过规则", @@ -4781,7 +4783,8 @@ "f00daf6324": "HTTPAgent", "823e0f15b1": "Orca 网络请求和本地 terminal 子项的 Agent URL。", "d93c7cd531": "配置应用程序级网络路由。", - "c46cdbbd4e": "网络" + "c46cdbbd4e": "网络", + "configureProxy": "配置代理" }, "GeneralPane": { "d58fccfd84": "导航",