Move Prompt Cache Timer setting to Agents pane, simplify expired state (#5691)
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -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>): 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)
|
||||
})
|
||||
})
|
||||
@@ -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<GlobalSettings>) => 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 (
|
||||
<SearchableSetting
|
||||
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={[
|
||||
'proxy',
|
||||
'http_proxy',
|
||||
'https_proxy',
|
||||
'no_proxy',
|
||||
'network',
|
||||
'bypass',
|
||||
'localhost'
|
||||
]}
|
||||
className="space-y-3"
|
||||
>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<div className="min-w-0 space-y-0.5">
|
||||
<Label>
|
||||
{translate(
|
||||
'auto.components.settings.AdvancedNetworkSettingsSection.f00daf6324',
|
||||
'HTTP Proxy'
|
||||
)}
|
||||
</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.AdvancedNetworkSettingsSection.1e214e265a',
|
||||
'Leave empty to use system proxy settings and inherited proxy environment variables.'
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Collapsible open={proxyConfigExpanded} onOpenChange={setProxyConfigOpen}>
|
||||
<CollapsibleTrigger asChild>
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="-ml-2 h-7 px-2 text-xs text-muted-foreground hover:text-foreground"
|
||||
>
|
||||
{translate(
|
||||
'auto.components.settings.AdvancedNetworkSettingsSection.configureProxy',
|
||||
'Configure proxy'
|
||||
)}
|
||||
<ChevronDown
|
||||
className={cn('size-3.5 transition-transform', proxyConfigExpanded && 'rotate-180')}
|
||||
/>
|
||||
</Button>
|
||||
</CollapsibleTrigger>
|
||||
<CollapsibleContent>
|
||||
<div className="mt-2 space-y-4 rounded-md border border-border/60 bg-muted/20 px-3 py-3">
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="settings-http-proxy-url">
|
||||
{translate(
|
||||
'auto.components.settings.AdvancedNetworkSettingsSection.f00daf6324',
|
||||
'HTTP Proxy'
|
||||
)}
|
||||
</Label>
|
||||
<Input
|
||||
id="settings-http-proxy-url"
|
||||
value={httpProxyUrlDraft}
|
||||
onChange={(e) => {
|
||||
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 ? (
|
||||
<p className="text-xs text-destructive">{httpProxyUrlError}</p>
|
||||
) : (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.AdvancedNetworkSettingsSection.0adfce9fa7',
|
||||
'Supports http, https, socks, socks4, and socks5 URLs.'
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="settings-http-proxy-bypass-rules">
|
||||
{translate(
|
||||
'auto.components.settings.AdvancedNetworkSettingsSection.f6d76cc8f4',
|
||||
'Proxy Bypass Rules'
|
||||
)}
|
||||
</Label>
|
||||
<Input
|
||||
id="settings-http-proxy-bypass-rules"
|
||||
value={httpProxyBypassRulesDraft}
|
||||
onChange={(e) => 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"
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.AdvancedNetworkSettingsSection.33ee3ca3af',
|
||||
'Optional. Separate hosts with commas, semicolons, or new lines.'
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
</SearchableSetting>
|
||||
)
|
||||
}
|
||||
@@ -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}
|
||||
</SearchableSetting>
|
||||
</section>
|
||||
|
||||
<section className="space-y-3">
|
||||
<SettingsSubsectionHeader
|
||||
title={translate('auto.components.settings.AdvancedPane.network', 'Network')}
|
||||
description={translate(
|
||||
'auto.components.settings.AdvancedPane.networkDescription',
|
||||
'App-level network routing for proxies and corporate environments.'
|
||||
)}
|
||||
/>
|
||||
<AdvancedNetworkSettingsSection settings={settings} updateSettings={updateSettings} />
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
+19
-22
@@ -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<GlobalSettings>) => void
|
||||
}
|
||||
|
||||
export function GeneralCacheTimerSection({
|
||||
export function AgentCacheTimerSection({
|
||||
settings,
|
||||
updateSettings
|
||||
}: GeneralCacheTimerSectionProps): React.JSX.Element {
|
||||
}: AgentCacheTimerSectionProps): React.JSX.Element {
|
||||
return (
|
||||
<section key="cache-timer" className="space-y-4">
|
||||
<section className="space-y-4">
|
||||
<SettingsSubsectionHeader
|
||||
title={translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.a137f8854d',
|
||||
'auto.components.settings.AgentCacheTimerSection.a137f8854d',
|
||||
'Prompt Cache Timer'
|
||||
)}
|
||||
description={translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.fe590653c1',
|
||||
'auto.components.settings.AgentCacheTimerSection.fe590653c1',
|
||||
'Claude caches your conversation to reduce costs. When idle too long the cache expires and the next message resends full context at higher cost. This shows a countdown so you know when to resume.'
|
||||
)}
|
||||
/>
|
||||
|
||||
<SearchableSetting
|
||||
title={translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.b4e7302944',
|
||||
'auto.components.settings.AgentCacheTimerSection.b4e7302944',
|
||||
'Cache Timer'
|
||||
)}
|
||||
description={translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.9c20253679',
|
||||
'auto.components.settings.AgentCacheTimerSection.9c20253679',
|
||||
'Show a countdown after a Claude agent becomes idle.'
|
||||
)}
|
||||
keywords={getGeneralCacheTimerSearchEntries().flatMap((entry) => [
|
||||
keywords={getAgentCacheTimerSearchEntries().flatMap((entry) => [
|
||||
entry.title,
|
||||
entry.description ?? '',
|
||||
...(entry.keywords ?? [])
|
||||
@@ -52,21 +52,21 @@ export function GeneralCacheTimerSection({
|
||||
<Timer className="size-4 text-muted-foreground" />
|
||||
<Label>
|
||||
{translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.b4e7302944',
|
||||
'auto.components.settings.AgentCacheTimerSection.b4e7302944',
|
||||
'Cache Timer'
|
||||
)}
|
||||
</Label>
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.487b176240',
|
||||
'auto.components.settings.AgentCacheTimerSection.487b176240',
|
||||
'Show a countdown in the sidebar after a Claude agent becomes idle.'
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<SettingsSwitch
|
||||
ariaLabel={translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.b4e7302944',
|
||||
'auto.components.settings.AgentCacheTimerSection.b4e7302944',
|
||||
'Cache Timer'
|
||||
)}
|
||||
checked={settings.promptCacheTimerEnabled}
|
||||
@@ -83,11 +83,11 @@ export function GeneralCacheTimerSection({
|
||||
{settings.promptCacheTimerEnabled && (
|
||||
<SearchableSetting
|
||||
title={translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.a2a8962138',
|
||||
'auto.components.settings.AgentCacheTimerSection.a2a8962138',
|
||||
'Timer Duration'
|
||||
)}
|
||||
description={translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.80c454e8a6',
|
||||
'auto.components.settings.AgentCacheTimerSection.80c454e8a6',
|
||||
"Match this to your provider's cache TTL."
|
||||
)}
|
||||
keywords={['cache', 'timer', 'duration', 'ttl']}
|
||||
@@ -96,13 +96,13 @@ export function GeneralCacheTimerSection({
|
||||
<div className="min-w-0 flex-1 space-y-0.5">
|
||||
<Label>
|
||||
{translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.a2a8962138',
|
||||
'auto.components.settings.AgentCacheTimerSection.a2a8962138',
|
||||
'Timer Duration'
|
||||
)}
|
||||
</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.8b9e202e0a',
|
||||
'auto.components.settings.AgentCacheTimerSection.8b9e202e0a',
|
||||
"Match this to your provider's cache TTL. The default is 5 minutes."
|
||||
)}
|
||||
</p>
|
||||
@@ -117,15 +117,12 @@ export function GeneralCacheTimerSection({
|
||||
<SelectContent>
|
||||
<SelectItem value="300000">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.54395ecd7c',
|
||||
'auto.components.settings.AgentCacheTimerSection.54395ecd7c',
|
||||
'5 minutes'
|
||||
)}
|
||||
</SelectItem>
|
||||
<SelectItem value="3600000">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralCacheTimerSection.05de84a104',
|
||||
'1 hour'
|
||||
)}
|
||||
{translate('auto.components.settings.AgentCacheTimerSection.05de84a104', '1 hour')}
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@@ -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
|
||||
|
||||
<AgentAwakeSetting settings={settings} updateSettings={updateSettings} />
|
||||
|
||||
<AgentCacheTimerSection settings={settings} updateSettings={updateSettings} />
|
||||
|
||||
<AgentPermissionsSetting mode={agentPermissionMode} onChange={saveAgentPermissionMode} />
|
||||
|
||||
{detectedAgents.length > 0 && (
|
||||
|
||||
@@ -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<GlobalSettings>) => 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 (
|
||||
<section key="network" className="space-y-4">
|
||||
<SettingsSubsectionHeader
|
||||
title={translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.c46cdbbd4e',
|
||||
'Network'
|
||||
)}
|
||||
description={translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.d93c7cd531',
|
||||
'Configure app-level network routing.'
|
||||
)}
|
||||
/>
|
||||
|
||||
<SearchableSetting
|
||||
title={translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.f00daf6324',
|
||||
'HTTP Proxy'
|
||||
)}
|
||||
description={translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.823e0f15b1',
|
||||
'Proxy URL for Orca network requests and local terminal children.'
|
||||
)}
|
||||
keywords={['proxy', 'http_proxy', 'https_proxy', 'network', 'dock', 'launchpad']}
|
||||
className="space-y-3"
|
||||
>
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="settings-http-proxy-url">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.f00daf6324',
|
||||
'HTTP Proxy'
|
||||
)}
|
||||
</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.1e214e265a',
|
||||
'Leave empty to use system proxy settings and inherited proxy environment variables.'
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<Input
|
||||
id="settings-http-proxy-url"
|
||||
value={httpProxyUrlDraft}
|
||||
onChange={(e) => {
|
||||
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 ? (
|
||||
<p className="text-xs text-destructive">{httpProxyUrlError}</p>
|
||||
) : (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.0adfce9fa7',
|
||||
'Supports http, https, socks, socks4, and socks5 URLs.'
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
</SearchableSetting>
|
||||
|
||||
<SearchableSetting
|
||||
title={translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.f6d76cc8f4',
|
||||
'Proxy Bypass Rules'
|
||||
)}
|
||||
description={translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.fb7130dcb9',
|
||||
'Hosts that should bypass the configured HTTP proxy.'
|
||||
)}
|
||||
keywords={['proxy', 'bypass', 'no_proxy', 'localhost', 'network']}
|
||||
className="space-y-3"
|
||||
>
|
||||
<div className="space-y-1">
|
||||
<Label htmlFor="settings-http-proxy-bypass-rules">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.f6d76cc8f4',
|
||||
'Proxy Bypass Rules'
|
||||
)}
|
||||
</Label>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{translate(
|
||||
'auto.components.settings.GeneralNetworkSettingsSection.33ee3ca3af',
|
||||
'Optional. Separate hosts with commas, semicolons, or new lines.'
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
<Input
|
||||
id="settings-http-proxy-bypass-rules"
|
||||
value={httpProxyBypassRulesDraft}
|
||||
onChange={(e) => 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"
|
||||
/>
|
||||
</SearchableSetting>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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<typeof getGeneralNavigationSearchEntries>[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
|
||||
) ? (
|
||||
<section key="project-runtime" className="space-y-4">
|
||||
<SettingsSubsectionHeader
|
||||
title={translate(
|
||||
@@ -165,13 +172,6 @@ export function GeneralPane({
|
||||
/>
|
||||
</section>
|
||||
) : null,
|
||||
matchesSettingsSearch(searchQuery, getGeneralNetworkSearchEntries()) ? (
|
||||
<GeneralNetworkSettingsSection
|
||||
key="network"
|
||||
settings={settings}
|
||||
updateSettings={updateSettings}
|
||||
/>
|
||||
) : null,
|
||||
matchesSettingsSearch(searchQuery, getGeneralEditorSearchEntries()) ? (
|
||||
<GeneralEditorSettingsSection
|
||||
key="editor"
|
||||
@@ -189,13 +189,6 @@ export function GeneralPane({
|
||||
wslCapabilitiesLoading={wslCapabilitiesLoading}
|
||||
/>
|
||||
) : null,
|
||||
matchesSettingsSearch(searchQuery, getGeneralCacheTimerSearchEntries()) ? (
|
||||
<GeneralCacheTimerSection
|
||||
key="cache-timer"
|
||||
settings={settings}
|
||||
updateSettings={updateSettings}
|
||||
/>
|
||||
) : null,
|
||||
matchesSettingsSearch(searchQuery, getGeneralUpdateSearchEntries()) ? (
|
||||
<GeneralUpdateSettingsSection key="updates" />
|
||||
) : null
|
||||
|
||||
@@ -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')
|
||||
]
|
||||
}
|
||||
])
|
||||
@@ -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',
|
||||
|
||||
@@ -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')
|
||||
]
|
||||
}
|
||||
])
|
||||
@@ -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()
|
||||
])
|
||||
|
||||
@@ -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()
|
||||
]
|
||||
|
||||
@@ -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({
|
||||
)}
|
||||
>
|
||||
<Timer className="size-2.5" />
|
||||
<span>
|
||||
{expired
|
||||
? translate('auto.components.sidebar.CacheTimer.07729cc155', 'expired')
|
||||
: label}
|
||||
</span>
|
||||
{/* When expired, the red icon alone conveys state — the countdown
|
||||
text is only meaningful while the cache is still alive. */}
|
||||
{!expired && <span>{label}</span>}
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="right" sideOffset={8}>
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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": "ナビゲーション",
|
||||
|
||||
@@ -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": "항해",
|
||||
|
||||
@@ -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": "导航",
|
||||
|
||||
Reference in New Issue
Block a user