mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
refactor: group shared native-chat session options (#34356)
This commit is contained in:
@@ -12574,10 +12574,10 @@
|
||||
"src/shared/native-chat-notice.test.ts": 101,
|
||||
"src/shared/native-chat-paste-bytes.test.ts": 35,
|
||||
"src/shared/native-chat/native-chat-scope-cache.test.ts": 28,
|
||||
"src/shared/native-chat-session-option-commands.test.ts": 114,
|
||||
"src/shared/native-chat-session-option-defaults.test.ts": 61,
|
||||
"src/shared/native-chat-session-option-snapshot.test.ts": 100,
|
||||
"src/shared/native-chat-session-option-state.test.ts": 52,
|
||||
"src/shared/native-chat/input/native-chat-session-option-commands.test.ts": 114,
|
||||
"src/shared/native-chat/input/native-chat-session-option-defaults.test.ts": 61,
|
||||
"src/shared/native-chat/input/native-chat-session-option-snapshot.test.ts": 100,
|
||||
"src/shared/native-chat/input/native-chat-session-option-state.test.ts": 52,
|
||||
"src/shared/native-chat/native-chat-shell-environment.test.ts": 30,
|
||||
"src/shared/native-chat/input/native-chat-slash-commands.omp.test.ts": 54,
|
||||
"src/shared/native-chat/input/native-chat-slash-commands.test.ts": 52,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
createNativeChatSessionOptionRecord,
|
||||
type NativeChatSessionOptionRecord
|
||||
} from '../../../src/shared/native-chat-session-option-state'
|
||||
} from '../../../src/shared/native-chat/input/native-chat-session-option-state'
|
||||
|
||||
// Bound per-tab records that outlive chat/terminal switches and remounts.
|
||||
const MOBILE_SESSION_OPTION_RECORD_CAP = 32
|
||||
|
||||
@@ -8,7 +8,7 @@ import { createStructuredAgentSessionOptionState } from '../../../../../src/shar
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionSelectChoice
|
||||
} from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
MobileNativeChatSessionOptionPickers,
|
||||
type MobileNativeChatPickerPresentation
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
sessionOptionDispatchUnconfirmed,
|
||||
type SessionOptionDescriptor,
|
||||
type SessionOptionValue
|
||||
} from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
mobileModelPillLabel,
|
||||
mobileOptionsPillLabel,
|
||||
@@ -43,7 +43,7 @@ import {
|
||||
SessionOptionSegments,
|
||||
showsSessionOptionAsSegments
|
||||
} from './MobileNativeChatSessionOptionSegments'
|
||||
import { sortNativeChatSessionOptions } from '../../../../../src/shared/native-chat-session-option-snapshot'
|
||||
import { sortNativeChatSessionOptions } from '../../../../../src/shared/native-chat/input/native-chat-session-option-snapshot'
|
||||
import {
|
||||
AGENT_CHAT_PERMISSION_MODE_ICON_NAMES,
|
||||
AGENT_CHAT_PERMISSION_MODE_OPTION_ID,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createElement } from 'react'
|
||||
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import type { SessionOptionDescriptor } from '../../../../../src/shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import { DescriptorRows } from './MobileNativeChatSessionOptionRows'
|
||||
import {
|
||||
findAllByHostType,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
type SessionOptionDescriptor,
|
||||
type SessionOptionValueMarker,
|
||||
type SessionOptionValue
|
||||
} from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
export function SessionOptionCaption({ children }: { children: string }): React.JSX.Element {
|
||||
return <Text style={styles.caption}>{children}</Text>
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
sessionOptionDispatchUnconfirmed,
|
||||
type SessionOptionDescriptor,
|
||||
type SessionOptionValue
|
||||
} from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import { SessionOptionCaption } from './MobileNativeChatSessionOptionRows'
|
||||
|
||||
// Five fit across a phone's sheet; more read better as a list on their own page.
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
type SessionOptionDescriptor,
|
||||
type SessionOptionDisabledReason,
|
||||
type SessionOptionSelectChoice
|
||||
} from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
export function mobileSessionOptionDisabledReason(
|
||||
reason: SessionOptionDisabledReason | undefined
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { describe, expect, it, vi } from 'vitest'
|
||||
import {
|
||||
applyNativeChatSessionOptionSettingsMutation,
|
||||
resolveStructuredLaunchSeedOptions
|
||||
} from '../../../../../src/shared/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import type { RpcClient } from '../../../transport/rpc-client'
|
||||
import { persistMobileStructuredOptionPicks } from './mobile-native-chat-session-option-persistence'
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionValue,
|
||||
SessionOptionsSurface
|
||||
} from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import { mobileNativeChatScopeKey } from '../mobile-native-chat-scope-key'
|
||||
import type { MobileNativeChatSendOutcome } from '../mobile-native-chat-send'
|
||||
import type { MobileNativeChatSessionOptionPickersProps } from './MobileNativeChatSessionOptionPickers'
|
||||
|
||||
@@ -11,16 +11,16 @@ import type {
|
||||
SessionOptionsSurface,
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionValue
|
||||
} from '../../../../../src/shared/native-chat-session-options'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import type { MobileNativeChatSendOutcome } from '../mobile-native-chat-send'
|
||||
import {
|
||||
buildNativeChatSessionOptionCommand,
|
||||
recordNativeChatSessionOptionCommand
|
||||
} from '../../../../../src/shared/native-chat-session-option-commands'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-option-commands'
|
||||
import {
|
||||
buildNativeChatSessionOptionSnapshot,
|
||||
withTrackedNativeChatModel
|
||||
} from '../../../../../src/shared/native-chat-session-option-snapshot'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-option-snapshot'
|
||||
import {
|
||||
applyNativeChatReportedSessionOptions,
|
||||
clearNativeChatSessionModel,
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
isFlipOnlyMidSession,
|
||||
matchNativeChatCatalogModelId,
|
||||
setTrackedSessionOption
|
||||
} from '../../../../../src/shared/native-chat-session-option-state'
|
||||
} from '../../../../../src/shared/native-chat/input/native-chat-session-option-state'
|
||||
|
||||
export type MobileNativeChatSessionOptionsController = {
|
||||
optionSurface?: SessionOptionsSurface
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createElement } from 'react'
|
||||
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import type { ConnectionState } from '../transport/types'
|
||||
import type { MobileNativeChatPrompts } from './native-chat/input/use-mobile-native-chat-prompts'
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
AgentSessionModelCatalogResult,
|
||||
AgentSessionOptionsResult
|
||||
} from '../../../src/shared/agent-session-wire'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { useMobileStructuredAgentOptions } from './use-mobile-structured-agent-options'
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
AgentSessionOptionResult,
|
||||
AgentSessionOptionsResult
|
||||
} from '../../../src/shared/agent-session-wire'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import type {
|
||||
StructuredAgentSessionMutate,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useCallback, useLayoutEffect, useMemo, useRef } from 'react'
|
||||
import { isAgentSessionHandleProvider } from '../../../src/shared/agent-session-provider-handle'
|
||||
import { structuredAgentSessionSeedCatalog } from '../../../src/shared/structured-agent-session-seed-catalog'
|
||||
import type { AgentSessionOptionResult } from '../../../src/shared/agent-session-wire'
|
||||
import type { SessionOptionValue } from '../../../src/shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
canSetStructuredAgentSessionOption,
|
||||
commitStructuredAgentSessionOption,
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
AgentJournalRenderItem,
|
||||
AgentJournalResolution
|
||||
} from '../../../src/shared/agent-session-journal-types'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
import type { RpcClient } from '../transport/rpc-client'
|
||||
import { markRpcDeliveryUnknown } from '../transport/rpc-delivery-ambiguity'
|
||||
import { formatQuestionFreeTextAnswer } from './native-chat/input/mobile-native-chat-question'
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionsSurface,
|
||||
SessionOptionValue
|
||||
} from '../../../src/shared/native-chat-session-options'
|
||||
} from '../../../src/shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
export function useMobileStructuredOptionSurface(args: {
|
||||
demandModelCatalog: () => void
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from '../../shared/structured-agent-session-options'
|
||||
import { CLAUDE_SESSION_OPTION_CATALOG } from '../../shared/agent-session-option-catalog-claude-codex'
|
||||
import type { AgentSessionOptionsResult } from '../../shared/agent-session-wire'
|
||||
import type { SessionOptionDescriptor } from '../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../shared/native-chat/input/native-chat-session-options'
|
||||
import { setClaudeStructuredOption } from './claude-structured-options'
|
||||
import type { ClaudeSession } from './claude-structured-session-state'
|
||||
import { PROVIDER_SESSION_ID, acquired, fakeClaude } from './claude-structured-session-test-support'
|
||||
|
||||
@@ -18,7 +18,7 @@ import type { RuntimeClientSettingsUpdate } from '../runtime-client-settings-sha
|
||||
import type { AgentLaunchSettingsMutation } from '../../../shared/agent-launch-settings'
|
||||
import type { TerminalQuickCommand } from '../../../shared/terminal-quick-command-types'
|
||||
import type { TerminalQuickCommandMutation } from '../../../shared/terminal-quick-commands'
|
||||
import type { NativeChatSessionOptionSettingsMutation } from '../../../shared/native-chat-session-options'
|
||||
import type { NativeChatSessionOptionSettingsMutation } from '../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { WorktreeTerminalStopOptions } from '../terminal/stop/worktree-terminal-stop-options'
|
||||
import type { PtyLivenessVerdict } from '../../../shared/pty-liveness-verdict'
|
||||
import type { Automation } from '../../../shared/automations-types'
|
||||
|
||||
@@ -3,7 +3,7 @@ import { terminalImageViewerSupported } from '../../terminal-image-viewer-env'
|
||||
* The executor selects surface and prompt delivery; this factory supplies the wire-shaped runtime calls. */
|
||||
|
||||
import { randomUUID } from 'node:crypto'
|
||||
import { narrowStructuredLaunchSeedOptions } from '../../../../shared/native-chat-session-option-defaults'
|
||||
import { narrowStructuredLaunchSeedOptions } from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import { createStructuredAgentSessionOperationId } from '../../../../shared/structured-agent-session-mutation'
|
||||
import { structuredAgentSessionTabId } from '../../../../shared/structured-agent-session-projection'
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentLaunchPreferences } from '../../../../../../shared/agent-session-host-authority'
|
||||
import { narrowStructuredLaunchSeedOptions } from '../../../../../../shared/native-chat-session-option-defaults'
|
||||
import { narrowStructuredLaunchSeedOptions } from '../../../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type { TuiAgent } from '../../../../../../shared/tui-agent'
|
||||
import type { OrcaRuntimeService } from '../../../../orca-runtime'
|
||||
import type { OrchestrationDb } from '../../../../orchestration/db'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { seededPermissionMode } from '../../../../shared/native-chat-session-option-defaults'
|
||||
import { seededPermissionMode } from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
// Resolve the host launch identity, then commit an at-rest create or the compatible acquired path.
|
||||
|
||||
import { assertAgentPromptRequestActive } from '../../orca-runtime-core'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SessionOptionValue } from '../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { TuiAgent } from '../../shared/tui-agent'
|
||||
import type { AgentLaunchPreferences } from '../../shared/agent-session-host-authority'
|
||||
import {
|
||||
|
||||
@@ -14,8 +14,8 @@ import { normalizeSourceControlAiSettings } from '../../shared/source-control-ai
|
||||
import { normalizeSourceControlGroupOrder } from '../../shared/source-control-group-order'
|
||||
import { SOURCE_CONTROL_LAUNCH_ACTION_IDS } from '../../shared/source-control-ai-actions'
|
||||
import type { GlobalSettings } from '../../shared/global-settings-types'
|
||||
import { applyNativeChatSessionOptionSettingsMutation } from '../../shared/native-chat-session-option-defaults'
|
||||
import type { NativeChatSessionOptionSettingsMutation } from '../../shared/native-chat-session-options'
|
||||
import { applyNativeChatSessionOptionSettingsMutation } from '../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type { NativeChatSessionOptionSettingsMutation } from '../../shared/native-chat/input/native-chat-session-options'
|
||||
import { getHostDisplayLabelOverrides } from '../../shared/host-setting-overrides'
|
||||
import type { TerminalQuickCommand } from '../../shared/terminal-quick-command-types'
|
||||
import { recordManagedHookInstallFailure } from '../agent-hooks/install-telemetry'
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
} from '../structured-agent-launch-support'
|
||||
import { structuredAgentRuntimeMetadata } from '../structured-agent-runtime-metadata'
|
||||
import { structuredAgentChatProgramNeedsInstall } from '../structured-agent-availability'
|
||||
import { structuredLaunchSeedOptions } from '../../../shared/native-chat-session-option-defaults'
|
||||
import { structuredLaunchSeedOptions } from '../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import { hasPersistedStructuredAgentSessionStore as hasPersistedStructuredAgentSessionStoreOnDisk } from '../structured-agent-session-runtime'
|
||||
import { ensureStructuredAgentSessionHostUnlessRefused } from '../structured-agent-session-host-refusal'
|
||||
import { getProfileUserDataPath } from '../../orca-profiles/profile-storage-paths'
|
||||
|
||||
@@ -5,7 +5,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionsSurface
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { clearNativeChatSessionOptionCacheForTests } from './native-chat-session-option-cache'
|
||||
import { clearNativeChatModelEnrichmentForTests } from './native-chat-session-option-enrichment'
|
||||
import type * as RemoteRuntimePtyIdModule from '../../../../shared/remote-runtime/remote-runtime-pty-id'
|
||||
|
||||
@@ -5,7 +5,7 @@ import { translate } from '@/i18n/i18n'
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionsSurface
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { NativeChatSessionOptionPickers } from './NativeChatSessionOptionPickers'
|
||||
import { NativeChatComposerPermissionPicker } from './NativeChatPermissionModePicker'
|
||||
import { NativeChatComposerGoalChip } from './NativeChatComposerGoalChip'
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionsSurface
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { NativeChatOptionPickerRequest } from './native-chat-composer-types'
|
||||
import { NativeChatImageAttachmentPreview } from './NativeChatImageAttachmentPreview'
|
||||
import type { NativeChatComposerGoalMode } from './use-native-chat-composer-submit'
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
CommandList
|
||||
} from '@/components/ui/command'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import type { SessionOptionSelectChoice } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionSelectChoice } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { nativeChatSessionChoiceLabel } from './native-chat-session-option-labels'
|
||||
import { NativeChatSessionOptionChoiceBody } from './NativeChatSessionOptionChoiceBody'
|
||||
import { NativeChatSessionOptionWriteGroup } from './NativeChatSessionOptionWriteGroup'
|
||||
|
||||
@@ -84,7 +84,7 @@ vi.mock('@/components/ui/dropdown-menu', async () => {
|
||||
|
||||
import { structuredAgentSessionPermissionDescriptor } from '../../../../shared/structured-agent-session-permission-option'
|
||||
import { createStructuredAgentSessionOptionState } from '../../../../shared/structured-agent-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
NativeChatComposerPermissionPicker,
|
||||
NativeChatPermissionModePicker,
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionsSurface
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
NATIVE_CHAT_PERMISSION_MODE_ICONS,
|
||||
nativeChatPermissionModeDescription,
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ vi.mock('@/i18n/i18n', () => ({
|
||||
}))
|
||||
|
||||
import { TooltipProvider } from '@/components/ui/tooltip'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { NativeChatOptionPickerRequest } from './native-chat-composer-types'
|
||||
import { NativeChatSessionOptionPickers } from './NativeChatSessionOptionPickers'
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
createStructuredAgentSessionOptionState,
|
||||
structuredAgentSessionOptionSnapshot
|
||||
} from '../../../../shared/structured-agent-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { RuntimeRpcCallError } from '@/runtime/runtime-rpc-result'
|
||||
|
||||
const toastError = vi.hoisted(() => vi.fn())
|
||||
|
||||
@@ -4,13 +4,13 @@ import { Button } from '@/components/ui/button'
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { sortNativeChatSessionOptions } from '../../../../shared/native-chat-session-option-snapshot'
|
||||
import { sortNativeChatSessionOptions } from '../../../../shared/native-chat/input/native-chat-session-option-snapshot'
|
||||
import {
|
||||
sessionOptionDispatchUnconfirmed,
|
||||
type SessionOptionDescriptor,
|
||||
type SessionOptionsSurface,
|
||||
type SessionOptionValue
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
nativeChatModelPillLabel,
|
||||
nativeChatOptionValuesLabel,
|
||||
|
||||
@@ -3,13 +3,13 @@ import { Button } from '@/components/ui/button'
|
||||
import { Switch } from '@/components/ui/switch'
|
||||
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { sortNativeChatSessionOptions } from '../../../../shared/native-chat-session-option-snapshot'
|
||||
import { sortNativeChatSessionOptions } from '../../../../shared/native-chat/input/native-chat-session-option-snapshot'
|
||||
import {
|
||||
isReadOnlySessionOptionValue,
|
||||
type SessionOptionDescriptor,
|
||||
type SessionOptionSelectChoice,
|
||||
type SessionOptionValue
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
nativeChatSessionChoiceLabel,
|
||||
nativeChatSessionChoiceShortLabel,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import type { StructuredAgentSessionLaunchLifecycle } from '@/lib/structured-age
|
||||
import type {
|
||||
SessionOptionSetResult,
|
||||
SessionOptionValue
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { absent, nullable, widened } from './native-chat-mock-slot-types.test-support'
|
||||
|
||||
type StopBackgroundTaskSpy = (sessionId: string, taskId?: string) => unknown
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
getAgentSessionOptionCatalog,
|
||||
type CatalogModel
|
||||
} from '../../../../shared/agent-session-option-catalog'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { stripScrollbackAnsi } from './native-chat-scrape-fallback'
|
||||
|
||||
const EFFORT_ID_BY_LABEL: Record<string, string> = {
|
||||
|
||||
@@ -12,7 +12,7 @@ import type {
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionsSurface
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { NativeChatLaunchDraft } from '@/lib/native-chat-launch-prompt'
|
||||
import type { NativeChatComposerImageAttachment } from './NativeChatComposerField'
|
||||
import type { NativeChatAfterStopSend } from './native-chat-composer-target'
|
||||
|
||||
@@ -7,11 +7,11 @@ import { createNativeChatPtySessionOptions } from './native-chat-pty-session-opt
|
||||
import {
|
||||
resolveNativeChatSessionOptionDefaults,
|
||||
updateNativeChatSessionOptionDefaults
|
||||
} from '../../../../shared/native-chat-session-option-defaults'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type {
|
||||
PersistedNativeChatSessionOptions,
|
||||
SessionOptionValue
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
describe('native chat launch-default adoption', () => {
|
||||
beforeEach(() => clearNativeChatSessionOptionCacheForTests())
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { mergeDiscoveredAuthoritativeModels } from '../../../../shared/agent-session-option-catalog'
|
||||
import { GROK_SESSION_OPTION_CATALOG } from '../../../../shared/agent-session-option-catalog-grok'
|
||||
import { updateNativeChatSessionOptionDefaults } from '../../../../shared/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../shared/native-chat-session-options'
|
||||
import { updateNativeChatSessionOptionDefaults } from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
clearNativeChatSessionOptionCacheForTests,
|
||||
readNativeChatSessionOptionCache,
|
||||
|
||||
@@ -10,8 +10,8 @@ import { GROK_SESSION_OPTION_CATALOG } from '../../../../shared/agent-session-op
|
||||
import {
|
||||
resolveNativeChatSessionOptionDefaults,
|
||||
updateNativeChatSessionOptionDefaults
|
||||
} from '../../../../shared/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
describe('native chat PTY session options', () => {
|
||||
beforeEach(() => clearNativeChatSessionOptionCacheForTests())
|
||||
|
||||
@@ -7,25 +7,25 @@ import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionsSurface,
|
||||
SessionOptionValue
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
import { recordNativeChatSessionOptionCommand } from '../../../../shared/native-chat-session-option-commands'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { recordNativeChatSessionOptionCommand } from '../../../../shared/native-chat/input/native-chat-session-option-commands'
|
||||
import {
|
||||
applyNativeChatReportedSessionOptions,
|
||||
clearNativeChatSessionModel,
|
||||
createNativeChatSessionOptionRecord,
|
||||
setTrackedSessionOption
|
||||
} from '../../../../shared/native-chat-session-option-state'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-state'
|
||||
import {
|
||||
readNativeChatSessionOptionCache,
|
||||
writeNativeChatSessionOptionCache
|
||||
} from './native-chat-session-option-cache'
|
||||
import { createSessionOptionAppliers } from './native-chat-session-option-apply'
|
||||
import { buildNativeChatSessionOptionSnapshot } from './native-chat-session-option-snapshot'
|
||||
import {
|
||||
buildNativeChatSessionOptionSnapshot,
|
||||
resolveEffectiveNativeChatModelId,
|
||||
withTrackedNativeChatModel,
|
||||
type NativeChatSessionOptionMode
|
||||
} from './native-chat-session-option-snapshot'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-snapshot'
|
||||
import type { NativeChatSessionOptionDispatchCommand } from './native-chat-session-option-command-dispatch'
|
||||
|
||||
type PersistSelection = (args: {
|
||||
|
||||
@@ -10,22 +10,23 @@ import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionSetResult,
|
||||
SessionOptionValue
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
import { buildNativeChatSessionOptionCommand } from '../../../../shared/native-chat-session-option-commands'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { buildNativeChatSessionOptionCommand } from '../../../../shared/native-chat/input/native-chat-session-option-commands'
|
||||
import {
|
||||
getTrackedSessionOption as getTrackedOption,
|
||||
isFlipOnlyMidSession,
|
||||
type NativeChatSessionOptionRecord
|
||||
} from '../../../../shared/native-chat-session-option-state'
|
||||
type NativeChatSessionOptionRecord,
|
||||
flattenNativeChatSessionOptionRecord
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-state'
|
||||
import type {
|
||||
NativeChatSessionOptionDispatchCommand,
|
||||
NativeChatSessionOptionDispatchResult
|
||||
} from './native-chat-session-option-command-dispatch'
|
||||
|
||||
import {
|
||||
flattenNativeChatSessionOptionRecord,
|
||||
resolveEffectiveNativeChatModelId,
|
||||
type NativeChatSessionOptionMode
|
||||
} from './native-chat-session-option-snapshot'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-snapshot'
|
||||
|
||||
type SessionOptionApplyContext = {
|
||||
mode: NativeChatSessionOptionMode
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { AgentType } from '../../../../shared/agent-status-types'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
cloneNativeChatSessionOptionRecord,
|
||||
createNativeChatSessionOptionRecord,
|
||||
type NativeChatSessionOptionRecord,
|
||||
type TrackedNativeChatSessionOption
|
||||
} from '../../../../shared/native-chat-session-option-state'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-state'
|
||||
import { setBoundedScopeCacheEntry } from '../../../../shared/native-chat/native-chat-scope-cache'
|
||||
|
||||
const sessionOptionCache = new Map<string, NativeChatSessionOptionRecord>()
|
||||
|
||||
@@ -5,11 +5,11 @@ import {
|
||||
mergeDiscoveredAuthoritativeModels,
|
||||
type CatalogModel
|
||||
} from '../../../../shared/agent-session-option-catalog'
|
||||
import { resolveNativeChatSessionOptionDefaults } from '../../../../shared/native-chat-session-option-defaults'
|
||||
import { resolveNativeChatSessionOptionDefaults } from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type {
|
||||
PersistedNativeChatSessionOptions,
|
||||
SessionOptionValue
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
type CatalogEnrichmentEntry = {
|
||||
agent: AgentType
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import { nativeChatModelPillLabel } from './native-chat-session-option-labels'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
vi.mock('@/i18n/i18n', () => ({
|
||||
translate: vi.fn((_key: string, fallback: string) => fallback)
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
type SessionOptionDescriptor,
|
||||
type SessionOptionDisabledReason,
|
||||
type SessionOptionSelectChoice
|
||||
} from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
|
||||
export function nativeChatSessionOptionLabel(descriptor: SessionOptionDescriptor): string {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { NativeChatSessionOptionSettingsMutation } from '../../../../shared/native-chat-session-options'
|
||||
import type { NativeChatSessionOptionSettingsMutation } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { callRuntimeRpc } from '@/runtime/runtime-rpc-client'
|
||||
import type { RuntimeClientTarget } from '../../../../shared/runtime-client-target'
|
||||
|
||||
|
||||
@@ -2,26 +2,17 @@ import type {
|
||||
AgentSessionOptionCatalog,
|
||||
CatalogModel
|
||||
} from '../../../../shared/agent-session-option-catalog'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
NativeChatLiveOptionTransport
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
buildNativeChatSessionOptionSnapshot as buildSharedSnapshot,
|
||||
resolveEffectiveNativeChatModelId,
|
||||
withTrackedNativeChatModel,
|
||||
type NativeChatLiveOptionTransport,
|
||||
type NativeChatSessionOptionMode
|
||||
} from '../../../../shared/native-chat-session-option-snapshot'
|
||||
import {
|
||||
flattenNativeChatSessionOptionRecord,
|
||||
type NativeChatSessionOptionRecord
|
||||
} from '../../../../shared/native-chat-session-option-state'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-snapshot'
|
||||
|
||||
export type { NativeChatLiveOptionTransport, NativeChatSessionOptionMode }
|
||||
export {
|
||||
flattenNativeChatSessionOptionRecord,
|
||||
resolveEffectiveNativeChatModelId,
|
||||
withTrackedNativeChatModel
|
||||
}
|
||||
import type { NativeChatSessionOptionRecord } from '../../../../shared/native-chat/input/native-chat-session-option-state'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
|
||||
export function buildNativeChatSessionOptionSnapshot(args: {
|
||||
catalog: AgentSessionOptionCatalog
|
||||
|
||||
@@ -3,7 +3,7 @@ import { act, cleanup, fireEvent, render, renderHook } from '@testing-library/re
|
||||
import { afterEach, expect, it, vi } from 'vitest'
|
||||
import { useRef } from 'react'
|
||||
import type { NativeChatStructuredComposerTransport } from './native-chat-composer-types'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { dispatchStructuredAgentSessionComposerCommand } from '../../../../shared/structured-agent-session-composer'
|
||||
import { useNativeChatStructuredComposerSend } from './use-native-chat-structured-composer-send'
|
||||
import { useNativeChatComposerSubmit } from './use-native-chat-composer-submit'
|
||||
|
||||
@@ -20,7 +20,7 @@ vi.mock('@/lib/structured-agent-session-launch-options', () => ({
|
||||
getStructuredAgentSessionLaunchSelection: () => null
|
||||
}))
|
||||
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { StructuredAgentSessionMutate } from './use-structured-agent-session-mutate'
|
||||
import { useStructuredAgentSessionOptions } from './use-structured-agent-session-options'
|
||||
import { resetHostModelCatalogSnapshotsForTests } from '@/runtime/host-model-catalog-snapshots'
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ vi.mock('@/lib/structured-agent-session-launch-options', () => ({
|
||||
getStructuredAgentSessionLaunchSelection: () => null
|
||||
}))
|
||||
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { StructuredAgentSessionMutate } from './use-structured-agent-session-mutate'
|
||||
import { useStructuredAgentSessionOptions } from './use-structured-agent-session-options'
|
||||
import { resetHostModelCatalogSnapshotsForTests } from '@/runtime/host-model-catalog-snapshots'
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
getAgentSessionOptionCatalog,
|
||||
type CatalogModel
|
||||
} from '../../../../shared/agent-session-option-catalog'
|
||||
import { matchNativeChatCatalogModelId } from '../../../../shared/native-chat-session-option-state'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import { matchNativeChatCatalogModelId } from '../../../../shared/native-chat/input/native-chat-session-option-state'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { useAppStore } from '../../store'
|
||||
import {
|
||||
createNativeChatPtySessionOptions,
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import type {
|
||||
AgentSessionModelCatalogResult,
|
||||
AgentSessionOptionsResult
|
||||
} from '../../../../shared/agent-session-wire'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { RuntimeClientTarget } from '../../../../shared/runtime-client-target'
|
||||
import {
|
||||
preloadHostModelCatalogSnapshots,
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import type {
|
||||
AgentSessionModelOption,
|
||||
AgentSessionOptionsResult
|
||||
} from '../../../../shared/agent-session-wire'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { resetHostModelCatalogSnapshotsForTests } from '@/runtime/host-model-catalog-snapshots'
|
||||
import type { StructuredAgentSessionMutate } from './use-structured-agent-session-mutate'
|
||||
import { useStructuredAgentSessionOptions } from './use-structured-agent-session-options'
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ vi.mock('@/lib/structured-agent-session-launch-options', () => ({
|
||||
getStructuredAgentSessionLaunchSelection: () => null
|
||||
}))
|
||||
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { StructuredAgentSessionMutate } from './use-structured-agent-session-mutate'
|
||||
import { useStructuredAgentSessionOptions } from './use-structured-agent-session-options'
|
||||
import { resetHostModelCatalogSnapshotsForTests } from '@/runtime/host-model-catalog-snapshots'
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ vi.mock('@/lib/structured-agent-session-launch-options', () => ({
|
||||
}))
|
||||
|
||||
import type { AgentSessionModelCatalogResult } from '../../../../shared/agent-session-wire'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { getDefaultSettings } from '../../../../shared/constants'
|
||||
import { useAppStore } from '@/store'
|
||||
import { resetHostModelCatalogSnapshotsForTests } from '@/runtime/host-model-catalog-snapshots'
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ vi.mock('@/lib/structured-agent-session-launch-options', () => ({
|
||||
getStructuredAgentSessionLaunchSelection: () => null
|
||||
}))
|
||||
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { StructuredAgentSessionMutate } from './use-structured-agent-session-mutate'
|
||||
import { useStructuredAgentSessionOptions } from './use-structured-agent-session-options'
|
||||
import { structuredAgentSessionSendSelection } from '../../../../shared/structured-agent-session-option-view'
|
||||
|
||||
@@ -6,7 +6,7 @@ import { toast } from 'sonner'
|
||||
import { useCallback, useLayoutEffect, useMemo, useRef } from 'react'
|
||||
import type { AgentSessionOptionResult } from '../../../../shared/agent-session-wire'
|
||||
import { structuredAgentSessionSeedCatalog } from '../../../../shared/structured-agent-session-seed-catalog'
|
||||
import type { SessionOptionsSurface } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionsSurface } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../../../shared/agent-chat-permission-mode'
|
||||
import {
|
||||
canSetStructuredAgentSessionOption,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { structuredLaunchRequestedOptions } from '../../../../shared/native-chat-session-option-defaults'
|
||||
import { structuredLaunchRequestedOptions } from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import { useCallback } from 'react'
|
||||
import { structuredAgentSessionSendSelection } from '../../../../shared/structured-agent-session-option-view'
|
||||
import { getStructuredAgentSessionLaunchSelection } from '@/lib/structured-agent-session-launch-options'
|
||||
|
||||
@@ -62,8 +62,8 @@ import type {
|
||||
import {
|
||||
applyNativeChatSessionOptionSettingsMutation,
|
||||
resolveStructuredLaunchSeedOptions
|
||||
} from '../../../../shared/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../shared/native-chat-session-options'
|
||||
} from '../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import type { PersistedNativeChatSessionOptions } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import { useStructuredAgentSession } from './use-structured-agent-session'
|
||||
|
||||
/** Replay every host mutation in order, exactly as the runtime does. */
|
||||
|
||||
@@ -16,7 +16,7 @@ import type {
|
||||
SleepingAgentLaunchConfig
|
||||
} from '../../../../shared/agent-session-resume'
|
||||
import type { TerminalKittyKeyboardModeTracker } from '../../../../shared/terminal-kitty-keyboard-mode-tracker'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { PtyPreconnectInputEntry } from './pty-preconnect-input-buffer'
|
||||
import type { AgentPaneLaunchRequest } from '../../../../shared/agent-pane-launch-request'
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { isNativeChatEnabled } from '../../../shared/structured-native-chat-laun
|
||||
import type { TuiAgent } from '../../../shared/tui-agent'
|
||||
import type { LaunchSource } from '../../../shared/telemetry-events'
|
||||
import type { Tab } from '../../../shared/tab-types'
|
||||
import type { SessionOptionValue } from '../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
export type HostAgentLaunchArgs = {
|
||||
agent: TuiAgent
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import {
|
||||
type StructuredAgentLaunchPersistedRecord
|
||||
} from './structured-agent-session-launch-record'
|
||||
|
||||
import { parseStructuredLaunchSeedOptions } from '../../../../../shared/native-chat-session-option-defaults'
|
||||
import { parseStructuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import {
|
||||
LOCAL_EXECUTION_HOST_ID,
|
||||
parseExecutionHostId,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
type StructuredAgentSessionFirstMessage,
|
||||
type StructuredAgentSessionResumeSource
|
||||
} from '../../../shared/structured-agent-session-create'
|
||||
import { structuredLaunchSeedOptions } from '../../../shared/native-chat-session-option-defaults'
|
||||
import { structuredLaunchSeedOptions } from '../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import { toRuntimeWorktreeSelector } from '@/runtime/runtime-worktree-selector'
|
||||
import { useAppStore } from '@/store'
|
||||
import {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { buildDefaultTerminalOptions } from '@/lib/pane-manager/pane-terminal-op
|
||||
import { createAgentSessionKeyboardOptions } from '@/runtime/agent-session-keyboard-capability'
|
||||
import type { SleepingAgentLaunchConfig } from '../../../shared/agent-session-resume'
|
||||
import type { StartupCommandDelivery } from '../../../shared/codex-startup-delivery'
|
||||
import type { SessionOptionValue } from '../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { RuntimeTerminalCreate } from '../../../shared/runtime-types'
|
||||
import type { TuiAgent } from '../../../shared/tui-agent'
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { TuiAgent } from '../../../shared/tui-agent'
|
||||
import { isDefinitiveAgentSessionCreateRefusal } from '../../../shared/agent-session-definitive-refusal'
|
||||
import { parseStructuredLaunchSeedOptions } from '../../../shared/native-chat-session-option-defaults'
|
||||
import { parseStructuredLaunchSeedOptions } from '../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import { hasRuntimeRpcErrorCode } from '../../../shared/runtime-rpc-error-code'
|
||||
import type { RuntimeClientTarget } from '../../../shared/runtime-client-target'
|
||||
import { callStructuredAgentSession } from '@/runtime/structured-agent-session-client'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
structuredLaunchCompatibleOptions,
|
||||
structuredLaunchRequestedOptions
|
||||
} from '../../../shared/native-chat-session-option-defaults'
|
||||
} from '../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import { structuredAgentSessionCreateFingerprint } from '../../../shared/structured-agent-session-mutation'
|
||||
import type { StructuredAgentSessionCreateParams } from '../../../shared/structured-agent-session-create'
|
||||
import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../../shared/agent-chat-permission-mode'
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
STRUCTURED_LAUNCH_OPTION_IDS,
|
||||
structuredLaunchCompatibleOptions,
|
||||
structuredLaunchRequestedOptions
|
||||
} from '../../../shared/native-chat-session-option-defaults'
|
||||
} from '../../../shared/native-chat/input/native-chat-session-option-defaults'
|
||||
import {
|
||||
createStructuredAgentSessionOperationId,
|
||||
structuredAgentSessionPayloadFingerprint
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
AgentProviderSessionMetadata,
|
||||
SleepingAgentLaunchConfig
|
||||
} from '../../../shared/agent-session-resume'
|
||||
import type { SessionOptionValue } from '../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../shared/native-chat/input/native-chat-session-options'
|
||||
|
||||
/** Telemetry threaded from the launch site to `pty:spawn`; main fires `agent_started`
|
||||
* only after the spawn succeeds. See telemetry-plan.md§Agent launch semantics. */
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
SleepingAgentSessionRecord
|
||||
} from '../../../../shared/agent-session-resume'
|
||||
import type { StartupCommandDelivery } from '../../../../shared/codex-startup-delivery'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { AgentStartedTelemetry } from '../../lib/worktree-startup-payload'
|
||||
import type { AiVaultSessionTitle } from '../../../../shared/ai-vault-session-title'
|
||||
import type {
|
||||
|
||||
@@ -12,7 +12,7 @@ import type {
|
||||
} from '../../../../shared/agent-session-resume'
|
||||
import type { ExecutionHostId } from '../../../../shared/execution-host'
|
||||
import type { StartupCommandDelivery } from '../../../../shared/codex-startup-delivery'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat-session-options'
|
||||
import type { SessionOptionValue } from '../../../../shared/native-chat/input/native-chat-session-options'
|
||||
import type { AgentStartedTelemetry } from '../../lib/worktree-startup-payload'
|
||||
import type { NativeChatLaunchDraft, NativeChatLaunchPrompt } from '@/lib/native-chat-launch-prompt'
|
||||
import type { HostSessionSlices } from '@/lib/workspace-session-host-split'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { expect, it } from 'vitest'
|
||||
import { agentLaunchSettingsMutationUpdates } from './agent-launch-settings'
|
||||
import { structuredLaunchSeedOptions } from './native-chat-session-option-defaults'
|
||||
import { structuredLaunchSeedOptions } from './native-chat/input/native-chat-session-option-defaults'
|
||||
|
||||
it.each([
|
||||
['yolo', 'full-access'],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { agentLaunchSettingsMutationUpdates } from './agent-launch-settings'
|
||||
import { structuredLaunchSeedOptions } from './native-chat-session-option-defaults'
|
||||
import { structuredLaunchSeedOptions } from './native-chat/input/native-chat-session-option-defaults'
|
||||
import { resolveTuiAgentLaunchArgs } from './tui-agent-launch-defaults'
|
||||
import { AgentLaunchSettingsMutation } from './rpc-contract/agent-launch-settings-params'
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from './agent-session-option-catalog'
|
||||
import { GROK_SESSION_OPTION_CATALOG } from './agent-session-option-catalog-grok'
|
||||
import { resolveAgentSessionOptionLaunch } from './agent-session-option-launch'
|
||||
import { parseBuiltSessionOptionCommand } from './native-chat-session-option-commands'
|
||||
import { parseBuiltSessionOptionCommand } from './native-chat/input/native-chat-session-option-commands'
|
||||
|
||||
function grokEffortOption(modelId = 'grok-4.7'): CatalogOption {
|
||||
const model = GROK_SESSION_OPTION_CATALOG.models.find((candidate) => candidate.id === modelId)!
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { OMP_SESSION_OPTION_CATALOG } from './agent-session-option-catalog-omp'
|
||||
import { resolveAgentSessionOptionLaunch } from './agent-session-option-launch'
|
||||
import { parseBuiltSessionOptionCommand } from './native-chat-session-option-commands'
|
||||
import { parseBuiltSessionOptionCommand } from './native-chat/input/native-chat-session-option-commands'
|
||||
import { parseOmpModelList } from './omp-model-list-probe'
|
||||
|
||||
const LISTING = JSON.stringify({
|
||||
|
||||
@@ -3,7 +3,7 @@ import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionSelectChoice,
|
||||
SessionOptionValue
|
||||
} from './native-chat-session-options'
|
||||
} from './native-chat/input/native-chat-session-options'
|
||||
|
||||
export type CatalogAgentInteractionDetection = 'claude-model-switch-confirmation'
|
||||
export type CatalogCommandDelivery = 'type'
|
||||
|
||||
@@ -4,7 +4,7 @@ import { resolveAgentSessionOptionLaunch } from './agent-session-option-launch'
|
||||
import {
|
||||
resolveNativeChatSessionOptionDefaults,
|
||||
updateNativeChatSessionOptionDefaults
|
||||
} from './native-chat-session-option-defaults'
|
||||
} from './native-chat/input/native-chat-session-option-defaults'
|
||||
|
||||
describe('agent session option catalog', () => {
|
||||
it('returns no catalog for unknown agents', () => {
|
||||
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
CatalogModel,
|
||||
CatalogOption
|
||||
} from './agent-session-option-catalog-types'
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import type { SessionOptionValue } from './native-chat/input/native-chat-session-options'
|
||||
|
||||
export type {
|
||||
AgentSessionOptionCatalog,
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
CatalogOption,
|
||||
CatalogOptionApply
|
||||
} from './agent-session-option-catalog-types'
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import type { SessionOptionValue } from './native-chat/input/native-chat-session-options'
|
||||
import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from './agent-chat-permission-mode'
|
||||
import { agentPermissionArgsForLaunch } from './tui-agent-launch-defaults'
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Exact function from660243e61ff:agent-startup-plan-inputs.ts; only export/import paths differ.
|
||||
// Full-source SHA256573ec1fd98d1859f983e625cd593a1e636a53eb67e43871168e0bfc14e84130c.
|
||||
import type { AgentStartupSettings, AgentStartupPlanInputs } from './agent-startup-plan-inputs'
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import type { SessionOptionValue } from './native-chat/input/native-chat-session-options'
|
||||
import type { TuiAgent } from './tui-agent'
|
||||
import { resolveTuiAgentLaunchArgs, resolveTuiAgentLaunchEnv } from './tui-agent-launch-defaults'
|
||||
import { resolveStartupShell, type AgentStartupShell } from './tui-agent-startup-shell'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { readLaunchPermissionChoice } from './tui-agent-permission-choice'
|
||||
import type { GlobalSettings } from './global-settings-types'
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import type { SessionOptionValue } from './native-chat/input/native-chat-session-options'
|
||||
import type { TuiAgent } from './tui-agent'
|
||||
import {
|
||||
agentLaunchPermissionSettings,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AgentStartupPlan } from './tui-agent-startup'
|
||||
import type { SleepingAgentLaunchConfig } from './agent-session-resume'
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import type { SessionOptionValue } from './native-chat/input/native-chat-session-options'
|
||||
import type { TuiAgent } from './tui-agent'
|
||||
import { TUI_AGENT_CONFIG } from './tui-agent-config'
|
||||
import { tokenizeStartupCommand, type AgentStartupShell } from './tui-agent-startup-shell'
|
||||
|
||||
@@ -15,7 +15,7 @@ import type { ClaudeAgentTeamsMode } from './claude-agent-teams-tmux-compat'
|
||||
import type { TerminalCustomTheme } from './terminal-custom-themes'
|
||||
import type { UiLanguage } from './ui-language'
|
||||
import type { GlobalWindowsRuntimeDefault } from './project-execution-runtime'
|
||||
import type { PersistedNativeChatSessionOptions } from './native-chat-session-options'
|
||||
import type { PersistedNativeChatSessionOptions } from './native-chat/input/native-chat-session-options'
|
||||
import type { AgentChatPermissionMode } from './agent-chat-permission-mode'
|
||||
import type { ComputerAwakeMode } from './computer-awake-mode'
|
||||
import type { CommitMessageAiSettings } from './commit-message-ai-types'
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { describe, expect, it, vi } from 'vitest'
|
||||
import {
|
||||
CLAUDE_SESSION_OPTION_CATALOG,
|
||||
CODEX_SESSION_OPTION_CATALOG
|
||||
} from './agent-session-option-catalog-claude-codex'
|
||||
import { GROK_SESSION_OPTION_CATALOG } from './agent-session-option-catalog-grok'
|
||||
} from '../../agent-session-option-catalog-claude-codex'
|
||||
import { GROK_SESSION_OPTION_CATALOG } from '../../agent-session-option-catalog-grok'
|
||||
import {
|
||||
buildNativeChatSessionOptionCommand,
|
||||
parseBuiltSessionOptionCommand,
|
||||
+1
-1
@@ -3,7 +3,7 @@ import type {
|
||||
CatalogMidSessionApply,
|
||||
CatalogModel,
|
||||
CatalogOptionApply
|
||||
} from './agent-session-option-catalog'
|
||||
} from '../../agent-session-option-catalog-types'
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import {
|
||||
clearNativeChatSessionModel,
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
import type { AgentType } from './agent-status-types'
|
||||
import type { AgentType } from '../../agent-status-types'
|
||||
import {
|
||||
AGENT_CHAT_PERMISSION_MODE_OPTION_ID,
|
||||
isAgentChatPermissionChoice,
|
||||
newChatPermissionModeForSettings,
|
||||
type NewChatPermissionSettings
|
||||
} from './agent-chat-permission-mode'
|
||||
import type { GlobalSettings } from './global-settings-types'
|
||||
} from '../../agent-chat-permission-mode'
|
||||
import type { GlobalSettings } from '../../global-settings-types'
|
||||
import {
|
||||
findCatalogModel,
|
||||
getAgentSessionOptionCatalog,
|
||||
sessionOptionValueIsValid
|
||||
} from './agent-session-option-catalog'
|
||||
} from '../../agent-session-option-catalog'
|
||||
import type {
|
||||
NativeChatSessionOptionSettingsMutation,
|
||||
PersistedNativeChatSessionOptions,
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
import {
|
||||
decodeStructuredAgentSessionOptionValue,
|
||||
encodeStructuredAgentSessionOptionValue
|
||||
} from './structured-agent-session-option-codec'
|
||||
} from '../../structured-agent-session-option-codec'
|
||||
|
||||
export function resolveNativeChatSessionOptionDefaults(
|
||||
persisted: PersistedNativeChatSessionOptions | null | undefined,
|
||||
+5
-5
@@ -3,14 +3,14 @@ import {
|
||||
sessionOptionDispatchUnconfirmed,
|
||||
type SessionOptionDescriptor
|
||||
} from './native-chat-session-options'
|
||||
import { mergeDiscoveredAuthoritativeModels } from './agent-session-option-catalog'
|
||||
import { mergeDiscoveredAuthoritativeModels } from '../../agent-session-option-catalog'
|
||||
import {
|
||||
CLAUDE_SESSION_OPTION_CATALOG,
|
||||
CODEX_SESSION_OPTION_CATALOG
|
||||
} from './agent-session-option-catalog-claude-codex'
|
||||
import { CURSOR_SESSION_OPTION_CATALOG } from './agent-session-option-catalog-gemini-cursor'
|
||||
import { GROK_SESSION_OPTION_CATALOG } from './agent-session-option-catalog-grok'
|
||||
import { resolveAgentSessionOptionLaunch } from './agent-session-option-launch'
|
||||
} from '../../agent-session-option-catalog-claude-codex'
|
||||
import { CURSOR_SESSION_OPTION_CATALOG } from '../../agent-session-option-catalog-gemini-cursor'
|
||||
import { GROK_SESSION_OPTION_CATALOG } from '../../agent-session-option-catalog-grok'
|
||||
import { resolveAgentSessionOptionLaunch } from '../../agent-session-option-launch'
|
||||
import {
|
||||
createNativeChatSessionOptionRecord,
|
||||
type NativeChatSessionOptionRecord
|
||||
+2
-3
@@ -1,10 +1,10 @@
|
||||
import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from './agent-chat-permission-mode'
|
||||
import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../agent-chat-permission-mode'
|
||||
import type {
|
||||
AgentSessionOptionCatalog,
|
||||
CatalogMidSessionApply,
|
||||
CatalogModel,
|
||||
CatalogOption
|
||||
} from './agent-session-option-catalog'
|
||||
} from '../../agent-session-option-catalog-types'
|
||||
import type {
|
||||
NativeChatLiveOptionTransport,
|
||||
SessionOptionDescriptor,
|
||||
@@ -18,7 +18,6 @@ import {
|
||||
} from './native-chat-session-option-state'
|
||||
|
||||
export type NativeChatSessionOptionMode = 'draft' | 'live'
|
||||
export type { NativeChatLiveOptionTransport }
|
||||
|
||||
function choiceWithCurrent(
|
||||
choices: readonly SessionOptionSelectChoice[],
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest'
|
||||
import {
|
||||
CLAUDE_SESSION_OPTION_CATALOG,
|
||||
CODEX_SESSION_OPTION_CATALOG
|
||||
} from './agent-session-option-catalog-claude-codex'
|
||||
} from '../../agent-session-option-catalog-claude-codex'
|
||||
import {
|
||||
applyNativeChatReportedSessionOptions,
|
||||
createNativeChatSessionOptionRecord,
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import type { AgentType } from './agent-status-types'
|
||||
import type { AgentType } from '../../agent-status-types'
|
||||
import type {
|
||||
CatalogMidSessionApply,
|
||||
AgentSessionOptionCatalog
|
||||
} from './agent-session-option-catalog'
|
||||
} from '../../agent-session-option-catalog-types'
|
||||
import type { SessionOptionValue, SessionOptionValueSource } from './native-chat-session-options'
|
||||
|
||||
export type TrackedNativeChatSessionOption = {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { AgentType } from './agent-status-types'
|
||||
import type { AgentType } from '../../agent-status-types'
|
||||
|
||||
export type SessionOptionValue = string | boolean
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
import { isTuiAgent } from './tui-agent-config'
|
||||
import type { TuiAgent } from './tui-agent'
|
||||
import { isAgentSessionHandleProvider } from './agent-session-provider-handle'
|
||||
import { STRUCTURED_LAUNCH_SEED_OPTION_IDS } from './native-chat-session-option-defaults'
|
||||
import { STRUCTURED_LAUNCH_SEED_OPTION_IDS } from './native-chat/input/native-chat-session-option-defaults'
|
||||
import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from './agent-chat-permission-mode'
|
||||
import {
|
||||
agentPermissionHasTerminalChoice,
|
||||
|
||||
@@ -3,7 +3,10 @@ import {
|
||||
getTextDrivenNativeChatCommands
|
||||
} from './native-chat-agent-profiles'
|
||||
import type { AgentType } from './agent-status-types'
|
||||
import type { SessionOptionDescriptor, SessionOptionValue } from './native-chat-session-options'
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionValue
|
||||
} from './native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
sessionSlashCommandSuggestions,
|
||||
type SlashCommandSuggestion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import type { SessionOptionValue } from './native-chat/input/native-chat-session-options'
|
||||
|
||||
const STRUCTURED_BOOLEAN_OPTION_IDS = new Set(['fastMode'])
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@ import {
|
||||
applyNativeChatSessionOptionPicks,
|
||||
resolveStructuredLaunchSeedOptions,
|
||||
updateNativeChatSessionOptionDefaults
|
||||
} from './native-chat-session-option-defaults'
|
||||
} from './native-chat/input/native-chat-session-option-defaults'
|
||||
import type {
|
||||
PersistedNativeChatSessionOptions,
|
||||
SessionOptionValue
|
||||
} from './native-chat-session-options'
|
||||
} from './native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
applyStructuredAgentSessionOptions,
|
||||
createStructuredAgentSessionOptionState,
|
||||
|
||||
@@ -7,9 +7,12 @@ import {
|
||||
nativeChatSessionOptionDescriptors,
|
||||
withTrackedNativeChatModel,
|
||||
type NativeChatShownModel
|
||||
} from './native-chat-session-option-snapshot'
|
||||
import type { SessionOptionDescriptor, SessionOptionValue } from './native-chat-session-options'
|
||||
import type { TrackedNativeChatSessionOption } from './native-chat-session-option-state'
|
||||
} from './native-chat/input/native-chat-session-option-snapshot'
|
||||
import type {
|
||||
SessionOptionDescriptor,
|
||||
SessionOptionValue
|
||||
} from './native-chat/input/native-chat-session-options'
|
||||
import type { TrackedNativeChatSessionOption } from './native-chat/input/native-chat-session-option-state'
|
||||
import { effectiveServiceTier } from './structured-agent-session-effective-tier'
|
||||
import { serviceTierOption } from './structured-agent-session-discovered-model'
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AgentType } from './agent-status-types'
|
||||
import type { SessionOptionValue } from './native-chat-session-options'
|
||||
import type { TrackedNativeChatSessionOption } from './native-chat-session-option-state'
|
||||
import type { SessionOptionValue } from './native-chat/input/native-chat-session-options'
|
||||
import type { TrackedNativeChatSessionOption } from './native-chat/input/native-chat-session-option-state'
|
||||
|
||||
/** Independent host-held values need no model parent. Mutate the record in place so session identity stays stable across picker fences. */
|
||||
export type StructuredAgentSessionOptionRecord = {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { structuredLaunchRequestedOptions } from './native-chat-session-option-defaults'
|
||||
import { structuredLaunchRequestedOptions } from './native-chat/input/native-chat-session-option-defaults'
|
||||
import {
|
||||
commitStructuredAgentSessionOptionValues,
|
||||
structuredAgentSessionOptionSnapshot,
|
||||
type StructuredAgentSessionOptionState
|
||||
} from './structured-agent-session-options'
|
||||
import type { SessionOptionDescriptor } from './native-chat-session-options'
|
||||
import type { SessionOptionDescriptor } from './native-chat/input/native-chat-session-options'
|
||||
import {
|
||||
cloneStructuredAgentSessionOptionRecord,
|
||||
createStructuredAgentSessionOptionRecord,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user