From 51cb2f189c13bd5bcd8370d3fd555e53a528d74d Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Mon, 2 Nov 2026 03:14:58 -0800 Subject: [PATCH] refactor: organize native chat input and transcript owners (#37334) --- config/scripts/ci-shard-timings.json | 4 +-- .../__mocks__/mobile-prompt-controller.ts | 2 +- ...mobile-native-chat-follow-up-preference.ts | 2 +- .../mobile-native-chat-picker-scaling.test.ts | 2 +- .../mobile-structured-agent-prompts.ts | 2 +- ...obile-structured-agent-session-contract.ts | 2 +- .../native-chat/MobileNativeChatView.tsx | 2 +- .../composer/MobileNativeChatComposer.tsx | 2 +- .../composer/MobileNativeChatSendButton.tsx | 2 +- .../mobile-native-chat-composer-menu.test.ts | 2 +- .../mobile-native-chat-composer-menu.ts | 4 +-- .../mobile-native-chat-draft-reconcile.ts | 4 +-- .../composer/mobile-native-chat-image-send.ts | 2 +- .../use-mobile-native-chat-composer-menu.ts | 4 +-- ...se-mobile-native-chat-launch-draft-seed.ts | 2 +- .../composer/use-mobile-native-chat-skills.ts | 2 +- .../native-chat/input/MobileNativeChatAsk.tsx | 4 +-- .../input/MobileNativeChatPromptCard.test.tsx | 2 +- .../input/MobileNativeChatPromptCard.tsx | 2 +- .../MobileNativeChatSessionOptionPickers.tsx | 2 +- .../MobileNativeChatSessionOptionRows.tsx | 2 +- .../MobileNativeChatSessionOptionSegments.tsx | 2 +- .../input/mobile-native-chat-permission.ts | 2 +- ...obile-native-chat-session-option-labels.ts | 2 +- .../input/native-chat-session-option-copy.ts | 2 +- ...use-mobile-native-chat-answer-send.test.ts | 2 +- .../use-mobile-native-chat-answer-send.ts | 6 ++-- .../use-mobile-native-chat-prompt-dismiss.ts | 4 +-- .../input/use-mobile-native-chat-prompts.ts | 4 +-- .../use-mobile-native-chat-session-options.ts | 4 +-- .../mobile-native-chat-controller-contract.ts | 4 +-- .../mobile-native-chat-eligibility.ts | 2 +- .../mobile-native-chat-pending-echo.ts | 4 +-- .../transcript/MobileNativeChatMessage.tsx | 2 +- .../mobile-native-chat-display-copy.ts | 2 +- .../use-mobile-native-chat-message-send.ts | 2 +- .../use-mobile-native-chat-turn-disclosure.ts | 2 +- .../use-mobile-native-chat-model-discovery.ts | 2 +- ...se-mobile-native-chat-prompt-controller.ts | 2 +- ...use-mobile-native-chat-queue-follow-ups.ts | 2 +- .../use-mobile-structured-async-question.ts | 4 +-- .../use-mobile-structured-turn-indicator.ts | 2 +- .../persistence-settings-ui-defaults.test.ts | 2 +- .../native-chat-rpc-block-sanitize.test.ts | 2 +- .../agent-message-command-contract.test.ts | 2 +- src/main/runtime/runtime-client-settings.ts | 2 +- .../runtime-native-chat-follow-up-events.ts | 2 +- .../native-chat/NativeChatApprovalCard.tsx | 2 +- .../NativeChatAutocompleteMenus.test.tsx | 2 +- .../NativeChatAutocompleteMenus.tsx | 6 ++-- .../native-chat/NativeChatComposerActions.tsx | 2 +- .../native-chat/NativeChatComposerField.tsx | 8 ++--- .../NativeChatImageAttachmentPreview.tsx | 2 +- .../native-chat/NativeChatInteractiveCard.tsx | 4 +-- .../native-chat/NativeChatModelCombobox.tsx | 2 +- .../native-chat/NativeChatPromptCollapse.tsx | 2 +- .../NativeChatQuestionCard.test.tsx | 2 +- .../native-chat/NativeChatQuestionCard.tsx | 4 +-- .../native-chat/NativeChatResolvedView.tsx | 2 +- .../NativeChatSessionOptionPickers.tsx | 2 +- .../NativeChatSessionOptionRows.tsx | 2 +- .../NativeChatStructuredAsyncQuestion.tsx | 6 ++-- .../NativeChatStructuredSession.tsx | 4 +-- .../NativeChatTranscriptChrome.tsx | 2 +- .../NativeChatUsageLimitActions.tsx | 2 +- .../claude-model-switch-confirmation.ts | 4 +-- .../native-chat-composer-draft-persistence.ts | 2 +- .../native-chat-composer-send-state.ts | 2 +- .../native-chat/native-chat-composer-types.ts | 2 +- .../native-chat-context-command.test.tsx | 2 +- .../native-chat/native-chat-image-label.ts | 2 +- .../native-chat/native-chat-image-paste.ts | 2 +- .../native-chat-interactive-prompt.test.ts | 4 +-- .../native-chat-interactive-prompt.ts | 2 +- ...ative-chat-launch-default-adoption.test.ts | 2 +- .../native-chat-message-copy-text.ts | 2 +- .../native-chat-pane-resolution.ts | 2 +- .../native-chat/native-chat-pending.test.ts | 2 +- .../native-chat/native-chat-pending.ts | 4 +-- .../native-chat-pty-retired-model.test.ts | 2 +- .../native-chat-runtime-image-send.ts | 2 +- ...ive-chat-runtime-send-launch-draft.test.ts | 2 +- .../native-chat-runtime-send.test.ts | 2 +- .../native-chat/native-chat-runtime-send.ts | 4 +-- .../native-chat-session-assembler.ts | 2 +- ...ve-chat-session-option-apply-error-text.ts | 2 +- .../native-chat-session-option-cache.ts | 2 +- .../native-chat-session-option-discovery.ts | 2 +- .../native-chat-session-option-enrichment.ts | 2 +- .../native-chat-session-option-labels-text.ts | 2 +- ...native-chat-session-option-surface-call.ts | 2 +- .../native-chat-transcript-slots.ts | 2 +- .../omp-model-switch-capability.test.ts | 2 +- ...ctured-agent-session-queue-request.test.ts | 2 +- .../use-native-chat-composer-catalog.ts | 2 +- .../use-native-chat-composer-keydown.test.tsx | 4 +-- .../use-native-chat-composer-keydown.ts | 6 ++-- ...use-native-chat-interactive-prompt-card.ts | 4 +-- .../use-native-chat-interactive-send.ts | 2 +- .../use-native-chat-launch-draft-adoption.ts | 2 +- .../use-native-chat-local-command-answer.ts | 2 +- .../use-native-chat-pending-delivery.ts | 2 +- ...use-native-chat-picker-command-dispatch.ts | 4 +-- .../use-native-chat-picker-state.ts | 23 ++++++------- ...tive-chat-prompt-card-presentation.test.ts | 2 +- ...se-native-chat-prompt-card-presentation.ts | 4 +-- .../use-native-chat-pty-composer-send.ts | 2 +- .../use-native-chat-resume-command.ts | 2 +- .../use-native-chat-reveal-latest.ts | 2 +- .../use-native-chat-session-option-command.ts | 2 +- .../use-native-chat-session-options.test.ts | 2 +- .../use-native-chat-session-options.ts | 4 +-- .../use-native-chat-skills.react.test.tsx | 2 +- .../native-chat/use-native-chat-skills.ts | 2 +- ...chat-toggle-shortcut.surface-owner.test.ts | 4 ++- .../use-native-chat-toggle-shortcut.ts | 2 +- .../use-native-chat-transcript-slots.ts | 2 +- .../use-structured-agent-session.ts | 2 +- .../settings/ChatBehaviorSetting.tsx | 2 +- .../tab-bar/tab-bar-item-surface.tsx | 2 +- .../use-terminal-pane-chat-state.ts | 2 +- src/shared/agent-pending-prompt.ts | 7 ++-- .../structured-agent-session-queued-cards.ts | 2 +- .../native-chat-approval-envelope.test.ts | 0 .../input}/native-chat-approval-envelope.ts | 2 +- .../input}/native-chat-ask-answer.ts | 2 +- .../input}/native-chat-ask-card-rules.ts | 4 +-- .../input}/native-chat-ask-dismiss-key.ts | 2 +- .../native-chat/input/native-chat-ask.test.ts | 2 +- .../native-chat/input/native-chat-ask.ts | 2 +- .../native-chat-composer-autocomplete.test.ts | 21 ++++++------ .../native-chat-composer-autocomplete.ts | 32 ++++--------------- .../native-chat-discovered-catalog-models.ts | 10 +++--- .../input}/native-chat-follow-up-behavior.ts | 0 .../native-chat-interactive-prompt.test.ts | 4 +-- .../input}/native-chat-interactive-prompt.ts | 10 +++--- .../input}/native-chat-paste-bytes.test.ts | 0 .../input}/native-chat-paste-bytes.ts | 4 +-- .../native-chat-prompt-dismiss-key.test.ts | 2 +- .../input}/native-chat-prompt-dismiss-key.ts | 0 .../native-chat-pty-session-options.test.ts | 8 ++--- .../input}/native-chat-pty-session-options.ts | 14 ++++---- ...ative-chat-session-option-apply-failure.ts | 0 .../native-chat-session-option-apply.ts | 12 +++---- .../native-chat-session-option-cache.ts | 8 ++--- .../native-chat-session-option-dispatch.ts | 2 +- .../native-chat-session-option-labels.ts | 2 +- .../native-chat-skill-visibility.test.ts | 2 +- .../input}/native-chat-skill-visibility.ts | 17 ++++------ .../native-chat-availability.ts | 8 ++--- .../native-chat-image-label.ts | 6 ++-- .../native-chat/native-chat-live-status.ts | 2 +- .../transcript}/native-chat-clock-skew.ts | 0 .../native-chat-continuation-send.ts | 2 +- ...ative-chat-launch-draft-resolution.test.ts | 2 +- .../native-chat-launch-draft-resolution.ts | 2 +- .../native-chat-live-turn-membership.ts | 4 +-- .../native-chat-message-copy-text.test.ts | 4 +-- .../native-chat-message-copy-text.ts | 8 ++--- .../native-chat-pending-occurrence.test.ts | 2 +- .../native-chat-pending-occurrence.ts | 4 +-- ...native-chat-pending-pasted-content.test.ts | 2 +- .../native-chat-pending-sends.test.ts | 2 +- .../transcript}/native-chat-pending-sends.ts | 2 +- .../native-chat-turn-membership.test.ts | 2 +- .../transcript/native-chat-turn-membership.ts | 2 +- src/shared/structured-agent-question-card.ts | 4 +-- .../e2e/native-chat-ssh-delivery.unit.test.ts | 2 +- 168 files changed, 272 insertions(+), 292 deletions(-) rename src/shared/{ => native-chat/input}/native-chat-approval-envelope.test.ts (100%) rename src/shared/{ => native-chat/input}/native-chat-approval-envelope.ts (93%) rename src/shared/{ => native-chat/input}/native-chat-ask-answer.ts (98%) rename src/shared/{ => native-chat/input}/native-chat-ask-card-rules.ts (90%) rename src/shared/{ => native-chat/input}/native-chat-ask-dismiss-key.ts (92%) rename src/shared/{ => native-chat/input}/native-chat-composer-autocomplete.test.ts (97%) rename src/shared/{ => native-chat/input}/native-chat-composer-autocomplete.ts (86%) rename src/shared/{ => native-chat/input}/native-chat-discovered-catalog-models.ts (83%) rename src/shared/{ => native-chat/input}/native-chat-follow-up-behavior.ts (100%) rename src/shared/{ => native-chat/input}/native-chat-interactive-prompt.test.ts (93%) rename src/shared/{ => native-chat/input}/native-chat-interactive-prompt.ts (93%) rename src/shared/{ => native-chat/input}/native-chat-paste-bytes.test.ts (100%) rename src/shared/{ => native-chat/input}/native-chat-paste-bytes.ts (93%) rename src/shared/{ => native-chat/input}/native-chat-prompt-dismiss-key.test.ts (96%) rename src/shared/{ => native-chat/input}/native-chat-prompt-dismiss-key.ts (100%) rename src/shared/{ => native-chat/input}/native-chat-pty-session-options.test.ts (98%) rename src/shared/{ => native-chat/input}/native-chat-pty-session-options.ts (93%) rename src/shared/{ => native-chat/input}/native-chat-session-option-apply-failure.ts (100%) rename src/shared/{ => native-chat/input}/native-chat-session-option-apply.ts (96%) rename src/shared/{ => native-chat/input}/native-chat-session-option-cache.ts (84%) rename src/shared/{ => native-chat/input}/native-chat-session-option-dispatch.ts (89%) rename src/shared/{ => native-chat/input}/native-chat-session-option-labels.ts (99%) rename src/shared/{ => native-chat/input}/native-chat-skill-visibility.test.ts (97%) rename src/shared/{ => native-chat/input}/native-chat-skill-visibility.ts (76%) rename src/shared/{ => native-chat}/native-chat-availability.ts (91%) rename src/shared/{ => native-chat}/native-chat-image-label.ts (80%) rename src/shared/{ => native-chat/transcript}/native-chat-clock-skew.ts (100%) rename src/shared/{ => native-chat/transcript}/native-chat-continuation-send.ts (69%) rename src/shared/{ => native-chat/transcript}/native-chat-launch-draft-resolution.test.ts (96%) rename src/shared/{ => native-chat/transcript}/native-chat-launch-draft-resolution.ts (95%) rename src/shared/{ => native-chat/transcript}/native-chat-live-turn-membership.ts (86%) rename src/shared/{ => native-chat/transcript}/native-chat-message-copy-text.test.ts (85%) rename src/shared/{ => native-chat/transcript}/native-chat-message-copy-text.ts (54%) rename src/shared/{ => native-chat/transcript}/native-chat-pending-occurrence.test.ts (97%) rename src/shared/{ => native-chat/transcript}/native-chat-pending-occurrence.ts (98%) rename src/shared/{ => native-chat/transcript}/native-chat-pending-pasted-content.test.ts (94%) rename src/shared/{ => native-chat/transcript}/native-chat-pending-sends.test.ts (99%) rename src/shared/{ => native-chat/transcript}/native-chat-pending-sends.ts (99%) diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json index 2b8ea076fbf..4adb9750612 100644 --- a/config/scripts/ci-shard-timings.json +++ b/config/scripts/ci-shard-timings.json @@ -12685,12 +12685,12 @@ "src/shared/model-id-label.test.ts": 47, "src/shared/modifier-double-tap-detector.test.ts": 49, "src/shared/muse-session-log.test.ts": 67, - "src/shared/native-chat-approval-envelope.test.ts": 55, + "src/shared/native-chat/input/native-chat-approval-envelope.test.ts": 55, "src/shared/native-chat-composer-autocomplete.test.ts": 252, "src/shared/native-chat-interactive-prompt.test.ts": 75, "src/shared/native-chat-launch-draft-resolution.test.ts": 54, "src/shared/native-chat-message-copy-text.test.ts": 162, - "src/shared/native-chat-paste-bytes.test.ts": 59, + "src/shared/native-chat/input/native-chat-paste-bytes.test.ts": 59, "src/shared/native-chat-pending-occurrence.test.ts": 68, "src/shared/native-chat-pending-pasted-content.test.ts": 65, "src/shared/native-chat-pending-sends.test.ts": 138, diff --git a/mobile/src/session/__mocks__/mobile-prompt-controller.ts b/mobile/src/session/__mocks__/mobile-prompt-controller.ts index a6be2e577e7..3191935af9f 100644 --- a/mobile/src/session/__mocks__/mobile-prompt-controller.ts +++ b/mobile/src/session/__mocks__/mobile-prompt-controller.ts @@ -12,7 +12,7 @@ import { vi } from 'vitest' import { useMobileNativeChatController } from '../native-chat/use-mobile-native-chat-controller' import { MobileNativeChatOverlay } from '../native-chat/MobileNativeChatOverlay' import { MobileNativeChatAsk } from '../native-chat/input/MobileNativeChatAsk' -import type { AskAnswerSelection } from '../../../../src/shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../src/shared/native-chat/input/native-chat-ask-answer' import { mobileNativeChatPromptDismissals } from '../native-chat/input/mobile-native-chat-prompt-dismissals' import { setMobileNativeChatDraftText } from '../native-chat/composer/mobile-native-chat-draft-store' export const visible = { value: true } diff --git a/mobile/src/session/mobile-native-chat-follow-up-preference.ts b/mobile/src/session/mobile-native-chat-follow-up-preference.ts index 4da6d8c5e7c..9df1e6b24ba 100644 --- a/mobile/src/session/mobile-native-chat-follow-up-preference.ts +++ b/mobile/src/session/mobile-native-chat-follow-up-preference.ts @@ -1,6 +1,6 @@ import { nativeChatQueueFollowUpsRead } from '../transport/settings-read-operations' import type { RpcClient } from '../transport/rpc-client' -import { nativeChatQueueFollowUps } from '../../../src/shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../src/shared/native-chat/input/native-chat-follow-up-behavior' const projections = new WeakMap() diff --git a/mobile/src/session/mobile-native-chat-picker-scaling.test.ts b/mobile/src/session/mobile-native-chat-picker-scaling.test.ts index 9985b99d088..8a3adb1e363 100644 --- a/mobile/src/session/mobile-native-chat-picker-scaling.test.ts +++ b/mobile/src/session/mobile-native-chat-picker-scaling.test.ts @@ -2,7 +2,7 @@ import { afterEach, expect, it, vi } from 'vitest' import capture from '../../../src/shared/__fixtures__/omp-native-commands.json' import * as catalog from '../../../src/shared/native-chat/input/native-chat-slash-commands' import type { NativeChatPickerItem } from '../../../src/shared/native-chat/input/native-chat-picker-items' -import { deriveComposerAutocomplete } from '../../../src/shared/native-chat-composer-autocomplete' +import { deriveComposerAutocomplete } from '../../../src/shared/native-chat/input/native-chat-composer-autocomplete' import { mobileComposerCatalog, boundedMenuItems diff --git a/mobile/src/session/mobile-structured-agent-prompts.ts b/mobile/src/session/mobile-structured-agent-prompts.ts index aa8904292bc..93a3bb5d7ed 100644 --- a/mobile/src/session/mobile-structured-agent-prompts.ts +++ b/mobile/src/session/mobile-structured-agent-prompts.ts @@ -3,7 +3,7 @@ import { agentSessionPromptQuestions, type AgentSessionQuestionAnswer } from '../../../src/shared/agent-session/agent-session-question-answer' -import { chatApprovalFromJournal } from '../../../src/shared/native-chat-interactive-prompt' +import { chatApprovalFromJournal } from '../../../src/shared/native-chat/input/native-chat-interactive-prompt' import type { MobileChatPermission } from './native-chat/input/mobile-native-chat-permission' import type { MobileChatQuestion } from './native-chat/input/mobile-native-chat-question' diff --git a/mobile/src/session/mobile-structured-agent-session-contract.ts b/mobile/src/session/mobile-structured-agent-session-contract.ts index 867fa7c4513..294a28028af 100644 --- a/mobile/src/session/mobile-structured-agent-session-contract.ts +++ b/mobile/src/session/mobile-structured-agent-session-contract.ts @@ -1,5 +1,5 @@ import type { AgentSessionSlashCommand } from '../../../src/shared/agent-session/agent-session-wire' -import type { NativeChatSendFollowUp } from '../../../src/shared/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../src/shared/native-chat/input/native-chat-follow-up-behavior' import type { RpcClient } from '../transport/rpc-client' import type { StructuredAgentSessionHostSupport } from './mobile-structured-agent-session-host-support' import type { diff --git a/mobile/src/session/native-chat/MobileNativeChatView.tsx b/mobile/src/session/native-chat/MobileNativeChatView.tsx index ae56997efbc..590ba52d326 100644 --- a/mobile/src/session/native-chat/MobileNativeChatView.tsx +++ b/mobile/src/session/native-chat/MobileNativeChatView.tsx @@ -9,7 +9,7 @@ import { import { type NativeScrollEvent, type NativeSyntheticEvent, Text, View } from 'react-native' import { useSafeAreaInsets } from 'react-native-safe-area-context' import { GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler' -import type { AskAnswerSelection } from '../../../../src/shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../src/shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../src/shared/native-chat/input/native-chat-ask-types' import type { NativeChatMessage } from '../../../../src/shared/native-chat/native-chat-types' import type { diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx index 82d4266c2b1..cfdedf474bc 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx @@ -1,5 +1,5 @@ import { getNativeChatAgentProfile } from '../../../../../src/shared/native-chat/native-chat-agent-profiles' -import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' import { recordMobileNativeChatSkillPick, useMobileNativeChatDraft diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx index 00f102017ce..8a37a902fca 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx @@ -3,7 +3,7 @@ import { CornerDownRight, ListEnd } from 'lucide-react-native' import type { NativeChatFollowUpBehavior, NativeChatSendFollowUp -} from '../../../../../src/shared/native-chat-follow-up-behavior' +} from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' import { ActionSheetModal } from '../../../components/ActionSheetModal' import { ComposerSendButton } from '../../../components/composer-input/ComposerSendButton' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.test.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.test.ts index 83cfd0f288f..b78fd07f183 100644 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.test.ts +++ b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.test.ts @@ -1,6 +1,6 @@ import { prepareQueuedMessageEditText } from '../../../../../src/shared/queued-message-edit-command' import { describe, expect, it } from 'vitest' -import { deriveComposerAutocomplete } from '../../../../../src/shared/native-chat-composer-autocomplete' +import { deriveComposerAutocomplete } from '../../../../../src/shared/native-chat/input/native-chat-composer-autocomplete' import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' import { boundedMenuItems, diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.ts index ca0c55fd36e..031a3207eb6 100644 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.ts +++ b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-menu.ts @@ -4,7 +4,7 @@ import { getNativeChatAgentProfile, type NativeChatAgentProfile } from '../../../../../src/shared/native-chat/native-chat-agent-profiles' -import { nativeChatPickerScannedSkills } from '../../../../../src/shared/native-chat-composer-autocomplete' +import { nativeChatPickerScannedSkills } from '../../../../../src/shared/native-chat/input/native-chat-composer-autocomplete' import { buildNativeChatPickerItems, type NativeChatPickerItem, @@ -13,7 +13,7 @@ import { import { nativeChatPickerCommands, nativeChatSessionSkills -} from '../../../../../src/shared/native-chat-skill-visibility' +} from '../../../../../src/shared/native-chat/input/native-chat-skill-visibility' import type { NativeChatSessionSkill, SlashCommandSuggestion diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-draft-reconcile.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-draft-reconcile.ts index 9c65646f3fa..8ecab906278 100644 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-draft-reconcile.ts +++ b/mobile/src/session/native-chat/composer/mobile-native-chat-draft-reconcile.ts @@ -9,8 +9,8 @@ import { normalizeNativeChatUserText, normalizedNativeChatUserMessageText } from '../../../../../src/shared/native-chat/transcript/native-chat-image-transcript-markers' -import { nativeChatPendingOccurrence } from '../../../../../src/shared/native-chat-pending-occurrence' -import type { NativeChatPendingSend } from '../../../../../src/shared/native-chat-pending-sends' +import { nativeChatPendingOccurrence } from '../../../../../src/shared/native-chat/transcript/native-chat-pending-occurrence' +import type { NativeChatPendingSend } from '../../../../../src/shared/native-chat/transcript/native-chat-pending-sends' export type UnconfirmedSend = { draftKey: string diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-image-send.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-image-send.ts index 0445a808489..949296695f2 100644 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-image-send.ts +++ b/mobile/src/session/native-chat/composer/mobile-native-chat-image-send.ts @@ -1,6 +1,6 @@ import { agentImagePasteWrites } from '../../../../../src/shared/agent-image-paste' import { agentImagePastePath } from '../../../../../src/shared/agent-image-paste-path' -import { buildNativeChatImagePasteBytes } from '../../../../../src/shared/native-chat-paste-bytes' +import { buildNativeChatImagePasteBytes } from '../../../../../src/shared/native-chat/input/native-chat-paste-bytes' import { MOBILE_NATIVE_CHAT_MIN_WRITE_TIMEOUT_MS, openMobileNativeChatSendBudget diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-menu.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-menu.ts index 8b6bdd7aabe..dc93916973c 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-menu.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-menu.ts @@ -2,10 +2,10 @@ import { prepareQueuedMessageEditText } from '../../../../../src/shared/queued-m import { useCallback, useEffect, useMemo, useState } from 'react' import { applyMentionSuggestion, - applyPickerSuggestion, deriveComposerAutocomplete, isSkillPickerTriggered -} from '../../../../../src/shared/native-chat-composer-autocomplete' +} from '../../../../../src/shared/native-chat/input/native-chat-composer-autocomplete' +import { applyPickerSuggestion } from '../../../../../src/shared/native-chat/input/native-chat-picker-triggers' import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' import { boundedMenuItems, diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-launch-draft-seed.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-launch-draft-seed.ts index 7a79854fce9..acb46ca7679 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-launch-draft-seed.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-launch-draft-seed.ts @@ -4,7 +4,7 @@ import { launchDraftResolvedByTranscript, nativeChatLaunchDraftTurnBaseline, type NativeChatLaunchDraftTurnBaseline -} from '../../../../../src/shared/native-chat-launch-draft-resolution' +} from '../../../../../src/shared/native-chat/transcript/native-chat-launch-draft-resolution' import { normalizedUserText } from './mobile-native-chat-draft-reconcile' import { mobileNativeChatLaunchDraftSeeds } from './mobile-native-chat-draft-store' import { mobileNativeChatDraftDestination } from './mobile-native-chat-draft-inputs' diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-skills.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-skills.ts index 283a807eb3f..4deca69658b 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-skills.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-skills.ts @@ -1,7 +1,7 @@ import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react' import type { z } from 'zod' import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' -import { isNativeChatSkillForAgent } from '../../../../../src/shared/native-chat-skill-visibility' +import { isNativeChatSkillForAgent } from '../../../../../src/shared/native-chat/input/native-chat-skill-visibility' import type { RpcClient } from '../../../transport/rpc-client' import { nativeChatSkillDiscoveryRead } from '../../mobile-session-read-operations' import type { skillDiscoveryReplySchema } from '../../session-read-reply-schema' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx b/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx index d218ecccad2..68513edc6ff 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx @@ -1,7 +1,7 @@ import { useRef, useState } from 'react' import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native' import { Check } from 'lucide-react-native' -import type { AskAnswerSelection } from '../../../../../src/shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../../src/shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' import type { AgentJournalFreeTextInput } from '../../../../../src/shared/agent-session/journal/agent-session-journal-types' import { @@ -10,7 +10,7 @@ import { askConfirmLabel, askTypedText, toggleAskOption -} from '../../../../../src/shared/native-chat-ask-card-rules' +} from '../../../../../src/shared/native-chat/input/native-chat-ask-card-rules' import { colors, radii, spacing, typography, pressedStyle } from '../../../theme/mobile-theme' import { themedStyleSheet } from '../../../theme/themed-styles' import { useMobileColorScheme } from '../../../theme/use-mobile-color-scheme' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.test.tsx b/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.test.tsx index 288793ecf15..84bed36c69c 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.test.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.test.tsx @@ -4,7 +4,7 @@ import { act, create, type ReactTestInstance, type ReactTestRenderer } from 'rea import { Pressable, TextInput } from 'react-native' import { describe, expect, it, vi } from 'vitest' import { useMobileNativeChatAskDismiss } from './use-mobile-native-chat-ask-dismiss' -import { nativeChatAskDismissKey } from '../../../../../src/shared/native-chat-ask-dismiss-key' +import { nativeChatAskDismissKey } from '../../../../../src/shared/native-chat/input/native-chat-ask-dismiss-key' import { MobileNativeChatPromptCard } from './MobileNativeChatPromptCard' vi.mock('react-native', async () => ({ diff --git a/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx b/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx index 718007c9dfd..35217d61fac 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx @@ -15,7 +15,7 @@ import { colors, pressedStyle, radii, spacing, typography } from '../../../theme import { themedStyleSheet } from '../../../theme/themed-styles' import { useMobileColorScheme } from '../../../theme/use-mobile-color-scheme' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' -import type { AskAnswerSelection } from '../../../../../src/shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../../src/shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' import { MobileNativeChatAsk } from './MobileNativeChatAsk' import { MobileNativeChatPermission } from './MobileNativeChatPermission' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx index 66a359e71b4..d8d3d9cd200 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx @@ -28,7 +28,7 @@ import { nativeChatOptionValuesLabel, nativeChatSessionOptionDisabledReason, nativeChatSessionOptionLabel -} from '../../../../../src/shared/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' import { sayMobileNativeChatSessionOption as say } from './native-chat-session-option-copy' import { mobileSessionOptionSummaryValue } from './mobile-native-chat-session-option-labels' import { diff --git a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx index cd1cab352fb..437782b2977 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx @@ -16,7 +16,7 @@ import { nativeChatSessionChoiceLabel, nativeChatSessionOptionActionLabel, nativeChatSessionOptionLabel -} from '../../../../../src/shared/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' import { sayMobileNativeChatSessionOption as say } from './native-chat-session-option-copy' import { MobileSwitch } from '../../../components/MobileSwitch' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionSegments.tsx b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionSegments.tsx index 9a602e89b81..15488498d42 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionSegments.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionSegments.tsx @@ -10,7 +10,7 @@ import { import { nativeChatSessionChoiceShortLabel, nativeChatSessionOptionLabel -} from '../../../../../src/shared/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' import { sayMobileNativeChatSessionOption as say } from './native-chat-session-option-copy' import { SessionOptionCaption } from './MobileNativeChatSessionOptionRows' diff --git a/mobile/src/session/native-chat/input/mobile-native-chat-permission.ts b/mobile/src/session/native-chat/input/mobile-native-chat-permission.ts index 6f5936c7242..b4223c4d833 100644 --- a/mobile/src/session/native-chat/input/mobile-native-chat-permission.ts +++ b/mobile/src/session/native-chat/input/mobile-native-chat-permission.ts @@ -1,4 +1,4 @@ -import type { ChatApproval } from '../../../../../src/shared/native-chat-interactive-prompt' +import type { ChatApproval } from '../../../../../src/shared/native-chat/input/native-chat-interactive-prompt' export type MobileChatPermission = ChatApproval & { /** Structured prompt identity, present only when the host can cancel it exactly. */ diff --git a/mobile/src/session/native-chat/input/mobile-native-chat-session-option-labels.ts b/mobile/src/session/native-chat/input/mobile-native-chat-session-option-labels.ts index f7c1b35ac3c..7bb0b0663d2 100644 --- a/mobile/src/session/native-chat/input/mobile-native-chat-session-option-labels.ts +++ b/mobile/src/session/native-chat/input/mobile-native-chat-session-option-labels.ts @@ -3,7 +3,7 @@ import type { SessionOptionDescriptor } from '../../../../../src/shared/native-c import { nativeChatSessionChoiceLabel, selectedNativeChatChoice -} from '../../../../../src/shared/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' import { sayMobileNativeChatSessionOption as say } from './native-chat-session-option-copy' /** The value a drill-in row shows beside its label; desktop lists the choices in place instead. */ diff --git a/mobile/src/session/native-chat/input/native-chat-session-option-copy.ts b/mobile/src/session/native-chat/input/native-chat-session-option-copy.ts index 57674e8329e..dd7792834db 100644 --- a/mobile/src/session/native-chat/input/native-chat-session-option-copy.ts +++ b/mobile/src/session/native-chat/input/native-chat-session-option-copy.ts @@ -1,4 +1,4 @@ -import type { NativeChatSessionOptionSay } from '../../../../../src/shared/native-chat-session-option-labels' +import type { NativeChatSessionOptionSay } from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' import { translate } from '../../../i18n/mobile-i18n' export const sayMobileNativeChatSessionOption: NativeChatSessionOptionSay = (id, values) => { diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.test.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.test.ts index d0370f6df62..3831a4fa392 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.test.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.test.ts @@ -3,7 +3,7 @@ import { act, create, type ReactTestRenderer } from 'react-test-renderer' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' import type { AgentType } from '../../../../../src/shared/agent-status-types' -import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat-paste-bytes' +import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat/input/native-chat-paste-bytes' import type { RpcClient } from '../../../transport/rpc-client' import { markRpcDeliveryUnknown } from '../../../transport/rpc-delivery-ambiguity' import { MOBILE_NATIVE_CHAT_QUESTION_STEP_MS } from './mobile-native-chat-answer-stepping' diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.ts index 380eb679126..225b6315f8f 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.ts @@ -4,8 +4,8 @@ import { buildCodexAskAnswerKeys, formatAskAnswer, hasAskAnswer -} from '../../../../../src/shared/native-chat-ask-answer' -import type { AskAnswerSelection } from '../../../../../src/shared/native-chat-ask-answer' +} from '../../../../../src/shared/native-chat/input/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../../src/shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' import type { RpcClient } from '../../../transport/rpc-client' import { MOBILE_NATIVE_CHAT_QUESTION_STEP_MS } from './mobile-native-chat-answer-stepping' @@ -23,7 +23,7 @@ import { resolveNativeChatTranscriptAgent, shouldStepNativeChatAskAnswer } from '../../../../../src/shared/native-chat/native-chat-agent-support' -import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat-paste-bytes' +import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat/input/native-chat-paste-bytes' export type MobileNativeChatAnswerSend = { answerAsk: (prompt: AskPrompt, selections: AskAnswerSelection[]) => Promise diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-dismiss.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-dismiss.ts index 10aec35f867..0184ad786a5 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-dismiss.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-dismiss.ts @@ -1,10 +1,10 @@ import { useEffect, useLayoutEffect, useMemo, useRef, useSyncExternalStore } from 'react' -import type { InteractivePromptCard } from '../../../../../src/shared/native-chat-interactive-prompt' +import type { InteractivePromptCard } from '../../../../../src/shared/native-chat/input/native-chat-interactive-prompt' import { nativeChatCardDismissKey, nativeChatPromptDismissalMatches, nativeChatPromptOccurrenceKey -} from '../../../../../src/shared/native-chat-prompt-dismiss-key' +} from '../../../../../src/shared/native-chat/input/native-chat-prompt-dismiss-key' import { mobileNativeChatPromptDismissals as dismissals, type MobileNativeChatPromptDismissal diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompts.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompts.ts index 34d64d5ff9e..6cf68d5357b 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompts.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompts.ts @@ -8,8 +8,8 @@ import type { AskPrompt } from '../../../../../src/shared/native-chat/input/nati import { resolveNativeChatInteractivePromptCard, type ChatApproval -} from '../../../../../src/shared/native-chat-interactive-prompt' -import { nativeChatPromptWaitStartedAt } from '../../../../../src/shared/native-chat-prompt-dismiss-key' +} from '../../../../../src/shared/native-chat/input/native-chat-interactive-prompt' +import { nativeChatPromptWaitStartedAt } from '../../../../../src/shared/native-chat/input/native-chat-prompt-dismiss-key' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' import { useMobileStructuredAsyncQuestion, diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-session-options.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-session-options.ts index 845012cb3e1..028f74a2d85 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-session-options.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-session-options.ts @@ -23,12 +23,12 @@ import type { MobileNativeChatSendOutcome } from '../mobile-native-chat-send' import { createNativeChatPtySessionOptions, type NativeChatPtySessionOptionsSurface -} from '../../../../../src/shared/native-chat-pty-session-options' +} from '../../../../../src/shared/native-chat/input/native-chat-pty-session-options' import { clearNativeChatSessionOptionCacheForTests, readNativeChatSessionOptionCache, writeNativeChatSessionOptionCache -} from '../../../../../src/shared/native-chat-session-option-cache' +} from '../../../../../src/shared/native-chat/input/native-chat-session-option-cache' import { createNativeChatSessionOptionRecord, matchNativeChatCatalogModelId diff --git a/mobile/src/session/native-chat/mobile-native-chat-controller-contract.ts b/mobile/src/session/native-chat/mobile-native-chat-controller-contract.ts index 248b648412e..780dcdd4d65 100644 --- a/mobile/src/session/native-chat/mobile-native-chat-controller-contract.ts +++ b/mobile/src/session/native-chat/mobile-native-chat-controller-contract.ts @@ -1,9 +1,9 @@ import type { NativeChatSkillDiscoverySnapshot } from '../../../../src/shared/native-chat/input/native-chat-picker-items' -import type { NativeChatSendFollowUp } from '../../../../src/shared/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' import type { StructuredMobileSendAttachment } from '../use-mobile-structured-send-with-outcome' import type { MobileSessionView } from '../../storage/session-view-preferences' import type { Dispatch, MutableRefObject, SetStateAction } from 'react' -import type { AskAnswerSelection } from '../../../../src/shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../src/shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../src/shared/native-chat/input/native-chat-ask-types' import type { MobileChatPermission } from './input/mobile-native-chat-permission' import type { MobileChatQuestion } from './input/mobile-native-chat-question' diff --git a/mobile/src/session/native-chat/mobile-native-chat-eligibility.ts b/mobile/src/session/native-chat/mobile-native-chat-eligibility.ts index 145f2a0f20d..1c32d2e01dc 100644 --- a/mobile/src/session/native-chat/mobile-native-chat-eligibility.ts +++ b/mobile/src/session/native-chat/mobile-native-chat-eligibility.ts @@ -3,7 +3,7 @@ import type { AgentStatusEntry } from '../../../../src/shared/agent-status-types import { isNativeChatAgentAvailable, nativeChatAvailabilityAgent -} from '../../../../src/shared/native-chat-availability' +} from '../../../../src/shared/native-chat/native-chat-availability' import { isNativeChatTranscriptLocalReadable } from '../../../../src/shared/native-chat/transcript/native-chat-transcript-readability' export type MobileNativeChatResolution = { diff --git a/mobile/src/session/native-chat/mobile-native-chat-pending-echo.ts b/mobile/src/session/native-chat/mobile-native-chat-pending-echo.ts index d102651712b..10b3cf3dd83 100644 --- a/mobile/src/session/native-chat/mobile-native-chat-pending-echo.ts +++ b/mobile/src/session/native-chat/mobile-native-chat-pending-echo.ts @@ -3,13 +3,13 @@ import type { MobileNativeChatDraftDestination } from './composer/mobile-native- import { assignNativeChatPendingOccurrence, nativeChatPendingContentKey -} from '../../../../src/shared/native-chat-pending-occurrence' +} from '../../../../src/shared/native-chat/transcript/native-chat-pending-occurrence' import { NATIVE_CHAT_PENDING_SEND_LIMIT, prunePendingSends, visibleNativeChatPendingSends, type NativeChatPendingSend -} from '../../../../src/shared/native-chat-pending-sends' +} from '../../../../src/shared/native-chat/transcript/native-chat-pending-sends' export type MobileNativeChatPendingMessage = NativeChatPendingSend & { // Phone-local preview URIs; these echoes retire only once their preview binds to a transcript row. diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx index b32b6adedae..9d4b08fb262 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx @@ -20,7 +20,7 @@ import type { NativeChatToolCallBlock } from '../../../../../src/shared/native-chat/native-chat-types' import { MobileSourceCopyButton } from '../../../components/MobileSourceCopyButton' -import { nativeChatMessageCopyText } from '../../../../../src/shared/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../../src/shared/native-chat/transcript/native-chat-message-copy-text' import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/native-chat-row-content' import { MobileNativeChatGroupedThought, diff --git a/mobile/src/session/native-chat/transcript/mobile-native-chat-display-copy.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-display-copy.ts index 9020c4d8f27..83bc26d135a 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-display-copy.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-display-copy.ts @@ -1,6 +1,6 @@ import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' import { agentMessageTranscriptText } from '../../../../../src/shared/agent-session/agent-message-display-text' -import { nativeChatMessageCopyText } from '../../../../../src/shared/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../../src/shared/native-chat/transcript/native-chat-message-copy-text' export function mobileNativeChatDisplayCopyText(message: NativeChatMessage): string { return message.role === 'user' && message.from diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-message-send.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-message-send.ts index 417efd32a17..7e4efb8d168 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-message-send.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-message-send.ts @@ -23,7 +23,7 @@ import { AGENT_TUI_CLEAR_INPUT_LINE, buildAgentTuiClearInputForText } from '../../../../../src/shared/agent-tui-input-clear' -import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat-paste-bytes' +import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat/input/native-chat-paste-bytes' export type MobileNativeChatMessageSend = { send: (text: string, images?: string[]) => Promise diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.ts index cc13c490dfe..332746f5852 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.ts @@ -12,7 +12,7 @@ import type { NativeChatSettledTurns, NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' -import { isNativeChatRowInLiveWorkingTurn } from '../../../../../src/shared/native-chat-live-turn-membership' +import { isNativeChatRowInLiveWorkingTurn } from '../../../../../src/shared/native-chat/transcript/native-chat-live-turn-membership' import { nativeChatTurnMembership, type NativeChatTurnJournal diff --git a/mobile/src/session/use-mobile-native-chat-model-discovery.ts b/mobile/src/session/use-mobile-native-chat-model-discovery.ts index b3b8914ea49..5686acd491a 100644 --- a/mobile/src/session/use-mobile-native-chat-model-discovery.ts +++ b/mobile/src/session/use-mobile-native-chat-model-discovery.ts @@ -5,7 +5,7 @@ import type { CatalogModel } from '../../../src/shared/agent-session/options/age import { catalogModelsFromModelDiscovery, mergeDiscoveredCatalogModels -} from '../../../src/shared/native-chat-discovered-catalog-models' +} from '../../../src/shared/native-chat/input/native-chat-discovered-catalog-models' import { defineRpcOperation, runRpcOperation } from '../transport/rpc-operation' const discoveredModel = z.object({ diff --git a/mobile/src/session/use-mobile-native-chat-prompt-controller.ts b/mobile/src/session/use-mobile-native-chat-prompt-controller.ts index 61d73ed2bb4..2c7ed37af75 100644 --- a/mobile/src/session/use-mobile-native-chat-prompt-controller.ts +++ b/mobile/src/session/use-mobile-native-chat-prompt-controller.ts @@ -1,6 +1,6 @@ import { useMobileAsyncQuestionHides } from './native-chat/input/use-mobile-native-chat-prompt-dismiss' import type { AskPrompt } from '../../../src/shared/native-chat/input/native-chat-ask-types' -import type { AskAnswerSelection } from '../../../src/shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../src/shared/native-chat/input/native-chat-ask-answer' import type { AgentStatusEntry } from '../../../src/shared/agent-status-types' import type { MobileNativeChatController } from './native-chat/mobile-native-chat-controller-contract' import type { useMobileBridgeChatPromptWrites } from './use-mobile-bridge-chat-prompt-writes' diff --git a/mobile/src/session/use-mobile-native-chat-queue-follow-ups.ts b/mobile/src/session/use-mobile-native-chat-queue-follow-ups.ts index 22e98ee5b80..291672a3c81 100644 --- a/mobile/src/session/use-mobile-native-chat-queue-follow-ups.ts +++ b/mobile/src/session/use-mobile-native-chat-queue-follow-ups.ts @@ -1,5 +1,5 @@ import { useCallback, useSyncExternalStore } from 'react' -import { nativeChatQueueFollowUps } from '../../../src/shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../src/shared/native-chat/input/native-chat-follow-up-behavior' import type { RpcClient } from '../transport/rpc-client' import { mobileNativeChatFollowUpPreference } from './mobile-native-chat-follow-up-preference' diff --git a/mobile/src/session/use-mobile-structured-async-question.ts b/mobile/src/session/use-mobile-structured-async-question.ts index 256fa9734e3..7e7df473df9 100644 --- a/mobile/src/session/use-mobile-structured-async-question.ts +++ b/mobile/src/session/use-mobile-structured-async-question.ts @@ -2,8 +2,8 @@ import { useCallback } from 'react' import { formatAskAnswer, type AskAnswerSelection -} from '../../../src/shared/native-chat-ask-answer' -import { nativeChatAnswerSendIntent } from '../../../src/shared/native-chat-follow-up-behavior' +} from '../../../src/shared/native-chat/input/native-chat-ask-answer' +import { nativeChatAnswerSendIntent } from '../../../src/shared/native-chat/input/native-chat-follow-up-behavior' import type { AskPrompt } from '../../../src/shared/native-chat/input/native-chat-ask-types' import type { QueuedMessageCard } from '../../../src/shared/agent-session/view/structured-agent-session-queued-cards' import type { useMobileStructuredAgentSession } from './use-mobile-structured-agent-session' diff --git a/mobile/src/session/use-mobile-structured-turn-indicator.ts b/mobile/src/session/use-mobile-structured-turn-indicator.ts index bb77de76d69..65a7059d920 100644 --- a/mobile/src/session/use-mobile-structured-turn-indicator.ts +++ b/mobile/src/session/use-mobile-structured-turn-indicator.ts @@ -8,7 +8,7 @@ import { mobileStructuredSendQueues } from './use-mobile-structured-send-with-ou import { nativeChatSendFollowUp, type NativeChatSendFollowUp -} from '../../../src/shared/native-chat-follow-up-behavior' +} from '../../../src/shared/native-chat/input/native-chat-follow-up-behavior' export function useMobileStructuredTurnIndicator(input: { state: StructuredAgentSessionState diff --git a/src/main/persistence/applying-settings/persistence-settings-ui-defaults.test.ts b/src/main/persistence/applying-settings/persistence-settings-ui-defaults.test.ts index 9daeda90e39..274cdb30a8e 100644 --- a/src/main/persistence/applying-settings/persistence-settings-ui-defaults.test.ts +++ b/src/main/persistence/applying-settings/persistence-settings-ui-defaults.test.ts @@ -13,7 +13,7 @@ import { tmpdir } from 'node:os' import type { GlobalSettings } from '../../../shared/global-settings-types' import type { PersistedState } from '../../../shared/persisted-state-types' import { getDefaultPersistedState } from '../../../shared/constants' -import { nativeChatQueueFollowUps } from '../../../shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../shared/native-chat/input/native-chat-follow-up-behavior' import { ONBOARDING_FINAL_STEP, ONBOARDING_FLOW_VERSION } from '../../../shared/onboarding-defaults' const { loadUserSshConfigMock, sshConfigHostsToTargetsMock } = vi.hoisted(() => ({ diff --git a/src/main/runtime/rpc/methods/native-chat-rpc-block-sanitize.test.ts b/src/main/runtime/rpc/methods/native-chat-rpc-block-sanitize.test.ts index 70d62c5481a..ae2fe5c3615 100644 --- a/src/main/runtime/rpc/methods/native-chat-rpc-block-sanitize.test.ts +++ b/src/main/runtime/rpc/methods/native-chat-rpc-block-sanitize.test.ts @@ -3,7 +3,7 @@ import { AGENT_STATUS_INTERACTIVE_PROMPT_MAX_LENGTH, parseAgentStatusPayload } from '../../../../shared/agent-status-types' -import { nativeChatAskDismissKey } from '../../../../shared/native-chat-ask-dismiss-key' +import { nativeChatAskDismissKey } from '../../../../shared/native-chat/input/native-chat-ask-dismiss-key' import { parseAskFromStatus, parseAskFromToolInput diff --git a/src/main/runtime/rpc/methods/orchestration/agent-message-command-contract.test.ts b/src/main/runtime/rpc/methods/orchestration/agent-message-command-contract.test.ts index 64d75e9d436..51d252e03fb 100644 --- a/src/main/runtime/rpc/methods/orchestration/agent-message-command-contract.test.ts +++ b/src/main/runtime/rpc/methods/orchestration/agent-message-command-contract.test.ts @@ -28,7 +28,7 @@ import { import { testOrcaSessionId } from '../../../../../shared/orca-session-address-test-fixture' import { agentMessageDisplayText } from '../../../../../shared/agent-session/agent-message-display-text' import { readAgentMessageSource } from '../../../../../shared/agent-session/agent-session-message-source' -import { nativeChatMessageCopyText } from '../../../../../shared/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../../shared/native-chat/transcript/native-chat-message-copy-text' import { projectQueuedMessageCards, queuedMessageCardLine diff --git a/src/main/runtime/runtime-client-settings.ts b/src/main/runtime/runtime-client-settings.ts index 4fa82e0e0a6..a87f9e0cc94 100644 --- a/src/main/runtime/runtime-client-settings.ts +++ b/src/main/runtime/runtime-client-settings.ts @@ -17,7 +17,7 @@ import type { GlobalSettings } from '../../shared/global-settings-types' 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 { nativeChatQueueFollowUps } from '../../shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../shared/native-chat/input/native-chat-follow-up-behavior' import type { TerminalQuickCommand } from '../../shared/terminal-quick-command-types' import { recordManagedHookInstallFailure } from '../agent-hooks/install-telemetry' import { applyAgentStatusHooksEnabled } from '../agent-hooks/managed-agent-hook-controls' diff --git a/src/main/runtime/runtime-native-chat-follow-up-events.ts b/src/main/runtime/runtime-native-chat-follow-up-events.ts index 878f5704a28..d0cb5e05de6 100644 --- a/src/main/runtime/runtime-native-chat-follow-up-events.ts +++ b/src/main/runtime/runtime-native-chat-follow-up-events.ts @@ -1,4 +1,4 @@ -import { nativeChatQueueFollowUps } from '../../shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../shared/native-chat/input/native-chat-follow-up-behavior' import type { RuntimeClientEvent } from '../../shared/runtime-client-events' import type { RuntimeStore } from './runtime-store-contract' diff --git a/src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx b/src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx index 924b7d8c047..6ffcaf29c0f 100644 --- a/src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx +++ b/src/renderer/src/components/native-chat/NativeChatApprovalCard.tsx @@ -11,7 +11,7 @@ import { isPlanApprovalSubject } from '../../../../shared/agent-session/agent-session-approval-subject' import { NativeChatCodeBlock } from './NativeChatCodeBlock' -import type { ChatApproval } from '../../../../shared/native-chat-interactive-prompt' +import type { ChatApproval } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' import { NativeChatPromptCollapseToggle } from './NativeChatPromptCollapse' import { useNativeChatPromptCardFocus } from './use-native-chat-prompt-card-focus' diff --git a/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.test.tsx b/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.test.tsx index 396af8892b6..cf959b4b4ee 100644 --- a/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.test.tsx +++ b/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.test.tsx @@ -6,7 +6,7 @@ import { NativeChatMentionMenu, NativeChatPickerMenu } from './NativeChatAutocom import { Popover, PopoverAnchor, PopoverContent } from '@/components/ui/popover' import { buildNativeChatPickerItems } from '../../../../shared/native-chat/input/native-chat-picker-items' import { sessionSlashCommandSuggestions } from '../../../../shared/native-chat/input/native-chat-slash-commands' -import type { ComposerAutocomplete } from '../../../../shared/native-chat-composer-autocomplete' +import type { ComposerAutocomplete } from '../../../../shared/native-chat/input/native-chat-composer-autocomplete' function autocomplete( overrides: Partial> = {} diff --git a/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx b/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx index 3d6803d5048..f437ca1dce0 100644 --- a/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx +++ b/src/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsx @@ -7,10 +7,8 @@ import { cn } from '@/lib/utils' import type { SkillSourceKind } from '../../../../shared/skills' import { FilenameFirstPath } from '@/components/file-path-cursor-tooltip' import { FileTypeIcon } from '@/components/FileTypeIcon' -import type { - ComposerAutocomplete, - NativeChatPickerItem -} from '../../../../shared/native-chat-composer-autocomplete' +import type { ComposerAutocomplete } from '../../../../shared/native-chat/input/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../shared/native-chat/input/native-chat-picker-items' import type { NativeChatMentionFiles } from './use-native-chat-mention-files' import { LoadingSpinner } from '@/components/LoadingSpinner' import { localizeSlashCommandDescription } from './native-chat-slash-command-descriptions' diff --git a/src/renderer/src/components/native-chat/NativeChatComposerActions.tsx b/src/renderer/src/components/native-chat/NativeChatComposerActions.tsx index ab48d9a9e14..1df83c8f69d 100644 --- a/src/renderer/src/components/native-chat/NativeChatComposerActions.tsx +++ b/src/renderer/src/components/native-chat/NativeChatComposerActions.tsx @@ -5,7 +5,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip import { translate } from '@/i18n/i18n' import { getScreenSubmitShortcutLabel } from '@/lib/screen-submit-shortcut' import { useUiLanguageRevision } from '@/i18n/use-ui-language-revision' -import type { NativeChatFollowUpBehavior } from '../../../../shared/native-chat-follow-up-behavior' +import type { NativeChatFollowUpBehavior } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' import type { SessionOptionDescriptor, SessionOptionsSurface diff --git a/src/renderer/src/components/native-chat/NativeChatComposerField.tsx b/src/renderer/src/components/native-chat/NativeChatComposerField.tsx index 0dc8012f22c..40f76935a6b 100644 --- a/src/renderer/src/components/native-chat/NativeChatComposerField.tsx +++ b/src/renderer/src/components/native-chat/NativeChatComposerField.tsx @@ -7,10 +7,8 @@ import { flushSync } from 'react-dom' import type { useImeEnterGestureOwnership } from '@/lib/ime-composition-keyboard-event' import { cn } from '@/lib/utils' import { useNotificationCardComposerClearance } from '@/lib/notification-card-composer-clearance' -import type { - ComposerAutocomplete, - NativeChatPickerItem -} from '../../../../shared/native-chat-composer-autocomplete' +import type { ComposerAutocomplete } from '../../../../shared/native-chat/input/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../shared/native-chat/input/native-chat-picker-items' import { NativeChatMentionMenu, NativeChatPickerMenu } from './NativeChatAutocompleteMenus' import type { NativeChatMentionFiles } from './use-native-chat-mention-files' import { NativeChatComposerActions } from './NativeChatComposerActions' @@ -31,7 +29,7 @@ import type { NativeChatComposerGoalMode } from './use-native-chat-composer-subm import { translate } from '@/i18n/i18n' import { useNativeChatComposerDraftUnsaved } from './use-native-chat-draft-unsaved' import { useLatestHandler } from '@/lib/use-latest-handler' -import type { NativeChatFollowUpBehavior } from '../../../../shared/native-chat-follow-up-behavior' +import type { NativeChatFollowUpBehavior } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' function noop(): void {} diff --git a/src/renderer/src/components/native-chat/NativeChatImageAttachmentPreview.tsx b/src/renderer/src/components/native-chat/NativeChatImageAttachmentPreview.tsx index a4aa687f801..f2450ab2ff4 100644 --- a/src/renderer/src/components/native-chat/NativeChatImageAttachmentPreview.tsx +++ b/src/renderer/src/components/native-chat/NativeChatImageAttachmentPreview.tsx @@ -6,7 +6,7 @@ import { useLocalImageSrc } from '@/components/editor/useLocalImageSrc' import { PanZoomImageDialog } from '@/components/editor/PanZoomImageDialog' import { copyableNativeChatImageSrc, keepPreviewOpenForChatMenu } from './native-chat-image-copy' import { isNativeChatImageAttachmentPath } from './native-chat-image-paste' -import { isNativeChatPastedImagePath } from '../../../../shared/native-chat-image-label' +import { isNativeChatPastedImagePath } from '../../../../shared/native-chat/native-chat-image-label' import type { NativeChatComposerImageAttachment } from './NativeChatComposerField' import { isAgentSessionAttachmentStorePath } from '../../../../shared/agent-session/agent-session-attachments' import { chatImageAccess } from '@/lib/local-file-access' diff --git a/src/renderer/src/components/native-chat/NativeChatInteractiveCard.tsx b/src/renderer/src/components/native-chat/NativeChatInteractiveCard.tsx index e93d2355575..e6e68e4ac7a 100644 --- a/src/renderer/src/components/native-chat/NativeChatInteractiveCard.tsx +++ b/src/renderer/src/components/native-chat/NativeChatInteractiveCard.tsx @@ -1,6 +1,6 @@ -import { nativeChatAskDismissKey } from '../../../../shared/native-chat-ask-dismiss-key' +import { nativeChatAskDismissKey } from '../../../../shared/native-chat/input/native-chat-ask-dismiss-key' import { useCallback, useLayoutEffect, useRef, useState } from 'react' -import type { InteractivePromptCard } from '../../../../shared/native-chat-interactive-prompt' +import type { InteractivePromptCard } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' import { NativeChatQuestionCard } from './NativeChatQuestionCard' import { NativeChatApprovalCard } from './NativeChatApprovalCard' import type { NativeChatInteractiveSend } from './use-native-chat-interactive-send' diff --git a/src/renderer/src/components/native-chat/NativeChatModelCombobox.tsx b/src/renderer/src/components/native-chat/NativeChatModelCombobox.tsx index 690ba8b771a..cde8e4f57c6 100644 --- a/src/renderer/src/components/native-chat/NativeChatModelCombobox.tsx +++ b/src/renderer/src/components/native-chat/NativeChatModelCombobox.tsx @@ -11,7 +11,7 @@ import { import { nativeChatModelDescription } from './native-chat-model-description' import { translate } from '@/i18n/i18n' import type { SessionOptionSelectChoice } from '../../../../shared/native-chat/input/native-chat-session-options' -import { nativeChatSessionChoiceLabel } from '../../../../shared/native-chat-session-option-labels' +import { nativeChatSessionChoiceLabel } from '../../../../shared/native-chat/input/native-chat-session-option-labels' import { sayNativeChatSessionOptionTranslated as say } from './native-chat-session-option-labels-text' import { NativeChatSessionOptionChoiceBody } from './NativeChatSessionOptionChoiceBody' import { NativeChatSessionOptionWriteGroup } from './NativeChatSessionOptionWriteGroup' diff --git a/src/renderer/src/components/native-chat/NativeChatPromptCollapse.tsx b/src/renderer/src/components/native-chat/NativeChatPromptCollapse.tsx index e4e9e8da0f8..f558e8282c5 100644 --- a/src/renderer/src/components/native-chat/NativeChatPromptCollapse.tsx +++ b/src/renderer/src/components/native-chat/NativeChatPromptCollapse.tsx @@ -3,7 +3,7 @@ import { Button } from '@/components/ui/button' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' import { ShortcutKeyCombo } from '@/components/ShortcutKeyCombo' import { translate } from '@/i18n/i18n' -import type { InteractivePromptCard } from '../../../../shared/native-chat-interactive-prompt' +import type { InteractivePromptCard } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' /** A prompt card's one collapse affordance; folding or unfolding writes nothing to the agent. */ export function NativeChatPromptCollapseToggle({ diff --git a/src/renderer/src/components/native-chat/NativeChatQuestionCard.test.tsx b/src/renderer/src/components/native-chat/NativeChatQuestionCard.test.tsx index abb6c25c28d..0ab705ea82b 100644 --- a/src/renderer/src/components/native-chat/NativeChatQuestionCard.test.tsx +++ b/src/renderer/src/components/native-chat/NativeChatQuestionCard.test.tsx @@ -4,7 +4,7 @@ import { act } from 'react' import { createRoot } from 'react-dom/client' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { NativeChatQuestionCard } from './NativeChatQuestionCard' -import type { AskAnswerSelection } from '../../../../shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../shared/native-chat/input/native-chat-ask-types' import { NATIVE_CHAT_QUESTION_AUTO_ADVANCE_MS } from '../../../../shared/native-chat/input/native-chat-question-auto-advance' diff --git a/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx b/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx index 2ad3859c8fb..c42f7f7b40c 100644 --- a/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx +++ b/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx @@ -4,7 +4,7 @@ import { useRef, useState, type RefObject } from 'react' import { Check, Pencil, X } from 'lucide-react' import { cn } from '@/lib/utils' import { translate } from '@/i18n/i18n' -import type { AskAnswerSelection } from '../../../../shared/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../shared/native-chat/input/native-chat-ask-types' import { NativeChatPromptCollapseToggle } from './NativeChatPromptCollapse' import { useNativeChatPromptCardFocus } from './use-native-chat-prompt-card-focus' @@ -18,7 +18,7 @@ import { askConfirmLabel, askTypedText, toggleAskOption -} from '../../../../shared/native-chat-ask-card-rules' +} from '../../../../shared/native-chat/input/native-chat-ask-card-rules' export type NativeChatQuestionCardProps = { prompt: AskPrompt diff --git a/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx b/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx index b8575480c93..c5f2b0289dc 100644 --- a/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx +++ b/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx @@ -29,7 +29,7 @@ import { shouldClearNativeChatWorkingSuppression } from '../../../../shared/nati import { resolveNativeChatTerminalTurn } from '../../../../shared/native-chat/native-chat-terminal-turn' import { useNativeChatTerminalTurnTiming } from './use-native-chat-terminal-turn-timing' import { launchPromptAsMessage, shouldPruneLaunchPrompt } from './native-chat-pending' -import { pendingSendsAsMessages } from '../../../../shared/native-chat-pending-sends' +import { pendingSendsAsMessages } from '../../../../shared/native-chat/transcript/native-chat-pending-sends' import { useNativeChatPendingDelivery } from './use-native-chat-pending-delivery' import { appendCommandMarkerCache, diff --git a/src/renderer/src/components/native-chat/NativeChatSessionOptionPickers.tsx b/src/renderer/src/components/native-chat/NativeChatSessionOptionPickers.tsx index 7f1c7f87832..35c99b95c93 100644 --- a/src/renderer/src/components/native-chat/NativeChatSessionOptionPickers.tsx +++ b/src/renderer/src/components/native-chat/NativeChatSessionOptionPickers.tsx @@ -18,7 +18,7 @@ import { nativeChatOptionsPillTitle, nativeChatSessionOptionActionLabel, nativeChatSessionOptionDisabledReason -} from '../../../../shared/native-chat-session-option-labels' +} from '../../../../shared/native-chat/input/native-chat-session-option-labels' import { sayNativeChatSessionOptionTranslated as say } from './native-chat-session-option-labels-text' import type { NativeChatOptionPickerRequest } from './native-chat-composer-types' import { runSessionOptionSurfaceCall } from './native-chat-session-option-surface-call' diff --git a/src/renderer/src/components/native-chat/NativeChatSessionOptionRows.tsx b/src/renderer/src/components/native-chat/NativeChatSessionOptionRows.tsx index b1243b210ee..60f8b86eb06 100644 --- a/src/renderer/src/components/native-chat/NativeChatSessionOptionRows.tsx +++ b/src/renderer/src/components/native-chat/NativeChatSessionOptionRows.tsx @@ -17,7 +17,7 @@ import { nativeChatSessionOptionActionLabel, nativeChatSessionOptionDisabledReason, nativeChatSessionOptionLabel -} from '../../../../shared/native-chat-session-option-labels' +} from '../../../../shared/native-chat/input/native-chat-session-option-labels' import { sayNativeChatSessionOptionTranslated as say } from './native-chat-session-option-labels-text' import { NativeChatSessionOptionWriteGroup } from './NativeChatSessionOptionWriteGroup' diff --git a/src/renderer/src/components/native-chat/NativeChatStructuredAsyncQuestion.tsx b/src/renderer/src/components/native-chat/NativeChatStructuredAsyncQuestion.tsx index 3f9bb594c37..149130aa3ff 100644 --- a/src/renderer/src/components/native-chat/NativeChatStructuredAsyncQuestion.tsx +++ b/src/renderer/src/components/native-chat/NativeChatStructuredAsyncQuestion.tsx @@ -3,11 +3,11 @@ import { structuredAgentSessionPaneKey } from '../../../../shared/agent-session/ import { structuredAgentSessionHostKey } from '../../runtime/structured-agent-session-host-capability' import type { NativeChatStructuredViewProps } from './native-chat-view-types' import type { useStructuredAgentSession } from './use-structured-agent-session' -import { nativeChatAskDismissKey } from '../../../../shared/native-chat-ask-dismiss-key' +import { nativeChatAskDismissKey } from '../../../../shared/native-chat/input/native-chat-ask-dismiss-key' import { useMemo, useState } from 'react' import type { QueuedMessageCard } from '../../../../shared/agent-session/view/structured-agent-session-queued-cards' -import { formatAskAnswer } from '../../../../shared/native-chat-ask-answer' -import { nativeChatAnswerSendIntent } from '../../../../shared/native-chat-follow-up-behavior' +import { formatAskAnswer } from '../../../../shared/native-chat/input/native-chat-ask-answer' +import { nativeChatAnswerSendIntent } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' import type { NativeChatStructuredComposerTransport } from './native-chat-composer-types' import { NativeChatQuestionCard } from './NativeChatQuestionCard' import type { NativeChatLiveSession } from './use-native-chat-live-session' diff --git a/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx b/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx index 188a12849d1..bad24d4707b 100644 --- a/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx +++ b/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx @@ -26,7 +26,7 @@ import { useNativeChatRootInputRouting } from './use-native-chat-root-input-rout import { useNativeChatFontSize } from './use-native-chat-font-size' import { useNativeChatFind } from './use-native-chat-find' import { NativeChatFindBar } from './NativeChatFindBar' -import { nativeChatQueueFollowUps } from '../../../../shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' import { LinkActionPopover } from '@/components/link-actions/LinkActionPopover' import { useNativeChatLinkActions } from './use-native-chat-link-actions' import { useNativeChatFileLinkContext } from './use-native-chat-file-link-context' @@ -51,7 +51,7 @@ import { cancelStructuredPrompt, nativeChatStructuredStopControls } from './native-chat-structured-stop-controls' -import { chatApprovalFromJournal } from '../../../../shared/native-chat-interactive-prompt' +import { chatApprovalFromJournal } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' import { useAppStore } from '../../store' import { structuredAgentLabel } from '@/lib/agent-session/launch/structured-agent-session-launch-label' import { useNativeChatStructuredComposerTransport } from './use-native-chat-structured-composer-transport' diff --git a/src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx b/src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx index dd71e99ee84..5f1ae80f1cb 100644 --- a/src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx +++ b/src/renderer/src/components/native-chat/NativeChatTranscriptChrome.tsx @@ -17,7 +17,7 @@ import { } from '@/components/editor/useLocalImageSrc' import type { RuntimeFileOperationArgs } from '@/runtime/runtime-file-client-types' import { copyableNativeChatImageSrc, keepPreviewOpenForChatMenu } from './native-chat-image-copy' -import { isNativeChatPastedImagePath } from '../../../../shared/native-chat-image-label' +import { isNativeChatPastedImagePath } from '../../../../shared/native-chat/native-chat-image-label' import { nativeChatImageLabel } from './native-chat-image-label' import { chatImageAccess } from '@/lib/local-file-access' diff --git a/src/renderer/src/components/native-chat/NativeChatUsageLimitActions.tsx b/src/renderer/src/components/native-chat/NativeChatUsageLimitActions.tsx index 2a2c7d4e2e7..d63a5896965 100644 --- a/src/renderer/src/components/native-chat/NativeChatUsageLimitActions.tsx +++ b/src/renderer/src/components/native-chat/NativeChatUsageLimitActions.tsx @@ -32,7 +32,7 @@ import { import type { NativeChatMessage } from '../../../../shared/native-chat/native-chat-types' import type { NativeChatStructuredViewProps } from './native-chat-view-types' import type { NativeChatFileLinkContext } from './native-chat-file-link' -import { nativeChatMessageCopyText } from '../../../../shared/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../shared/native-chat/transcript/native-chat-message-copy-text' type UsageLimitActions = { account: ReactNode diff --git a/src/renderer/src/components/native-chat/claude-model-switch-confirmation.ts b/src/renderer/src/components/native-chat/claude-model-switch-confirmation.ts index 4991eeb1d25..4bb7e70b17e 100644 --- a/src/renderer/src/components/native-chat/claude-model-switch-confirmation.ts +++ b/src/renderer/src/components/native-chat/claude-model-switch-confirmation.ts @@ -2,9 +2,9 @@ import { subscribeToPtyData } from '../terminal-pane/pty-data-sidecar-subscripti import { isRemoteRuntimePtyId } from '../../../../shared/remote-runtime/remote-runtime-pty-id' import { sendRuntimePtyInput } from '@/runtime/runtime-terminal-inspection' import { subscribeToRuntimeTerminalData } from '@/runtime/runtime-terminal-stream' -import { NATIVE_CHAT_SUBMIT } from '../../../../shared/native-chat-paste-bytes' +import { NATIVE_CHAT_SUBMIT } from '../../../../shared/native-chat/input/native-chat-paste-bytes' import { stripScrollbackAnsi } from './native-chat-scrape-fallback' -import type { ClaudeModelSwitchOutcome } from '../../../../shared/native-chat-session-option-dispatch' +import type { ClaudeModelSwitchOutcome } from '../../../../shared/native-chat/input/native-chat-session-option-dispatch' const DETECTION_TIMEOUT_MS = 5_000 const MAX_OBSERVED_BYTES = 64 * 1024 diff --git a/src/renderer/src/components/native-chat/native-chat-composer-draft-persistence.ts b/src/renderer/src/components/native-chat/native-chat-composer-draft-persistence.ts index 730c99a0666..0378ed8a570 100644 --- a/src/renderer/src/components/native-chat/native-chat-composer-draft-persistence.ts +++ b/src/renderer/src/components/native-chat/native-chat-composer-draft-persistence.ts @@ -2,7 +2,7 @@ import { basename } from '@/lib/path' import { isNativeChatKeptPastePath } from './native-chat-image-paste' -import { isNativeChatPastedImagePath } from '../../../../shared/native-chat-image-label' +import { isNativeChatPastedImagePath } from '../../../../shared/native-chat/native-chat-image-label' import { isAgentSessionAttachmentStorePath } from '../../../../shared/agent-session/agent-session-attachments' import { dirtyScopes, diff --git a/src/renderer/src/components/native-chat/native-chat-composer-send-state.ts b/src/renderer/src/components/native-chat/native-chat-composer-send-state.ts index be104967d53..9fcb7d675d9 100644 --- a/src/renderer/src/components/native-chat/native-chat-composer-send-state.ts +++ b/src/renderer/src/components/native-chat/native-chat-composer-send-state.ts @@ -1,4 +1,4 @@ -import type { NativeChatFollowUpBehavior } from '../../../../shared/native-chat-follow-up-behavior' +import type { NativeChatFollowUpBehavior } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' import type { NativeChatComposerImageAttachment } from './NativeChatComposerField' import type { NativeChatStructuredComposerTransport } from './native-chat-composer-types' import { nativeChatImageSendBlock } from './native-chat-image-reattach' diff --git a/src/renderer/src/components/native-chat/native-chat-composer-types.ts b/src/renderer/src/components/native-chat/native-chat-composer-types.ts index 848c5b9215f..2893e187f50 100644 --- a/src/renderer/src/components/native-chat/native-chat-composer-types.ts +++ b/src/renderer/src/components/native-chat/native-chat-composer-types.ts @@ -19,7 +19,7 @@ import type { NativeChatComposerImageAttachment } from './NativeChatComposerFiel import type { NativeChatAfterStopSend } from './native-chat-composer-target' import type { NativeChatLocalCommandAnswer } from './use-native-chat-local-command-answer' import type { NativeChatRecallSource } from './native-chat-sent-prompt-history' -import type { NativeChatSendFollowUp } from '../../../../shared/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' export type NativeChatComposerErrorDetail = { /** Error text Orca did not write, shown apart and copyable. */ diff --git a/src/renderer/src/components/native-chat/native-chat-context-command.test.tsx b/src/renderer/src/components/native-chat/native-chat-context-command.test.tsx index 181563d54a7..54167b687ba 100644 --- a/src/renderer/src/components/native-chat/native-chat-context-command.test.tsx +++ b/src/renderer/src/components/native-chat/native-chat-context-command.test.tsx @@ -3,7 +3,7 @@ import { renderHook } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' import type { CatalogModel } from '../../../../shared/agent-session/options/agent-session-option-catalog-types' import type { NativeChatMessage } from '../../../../shared/native-chat/native-chat-types' -import { createNativeChatPtySessionOptions } from '../../../../shared/native-chat-pty-session-options' +import { createNativeChatPtySessionOptions } from '../../../../shared/native-chat/input/native-chat-pty-session-options' import { clearNativeChatSessionOptionCacheForTests } from './native-chat-session-option-cache' import { answerNativeChatLocalCommand, diff --git a/src/renderer/src/components/native-chat/native-chat-image-label.ts b/src/renderer/src/components/native-chat/native-chat-image-label.ts index c989238250c..399e897e1c1 100644 --- a/src/renderer/src/components/native-chat/native-chat-image-label.ts +++ b/src/renderer/src/components/native-chat/native-chat-image-label.ts @@ -3,7 +3,7 @@ import type { NativeChatImageRefBlock } from '../../../../shared/native-chat/nat import { nativeChatImageLabel as sharedNativeChatImageLabel, type NativeChatImageLabelCopy -} from '../../../../shared/native-chat-image-label' +} from '../../../../shared/native-chat/native-chat-image-label' export function nativeChatImageLabelCopy(): NativeChatImageLabelCopy { return { diff --git a/src/renderer/src/components/native-chat/native-chat-image-paste.ts b/src/renderer/src/components/native-chat/native-chat-image-paste.ts index 3164736b4a2..442613d03f8 100644 --- a/src/renderer/src/components/native-chat/native-chat-image-paste.ts +++ b/src/renderer/src/components/native-chat/native-chat-image-paste.ts @@ -1,6 +1,6 @@ import { isImageDropPath } from '../terminal-pane/terminal-drop-image-path' import { NATIVE_CHAT_PASTE_FOLDER } from '../../../../shared/native-chat/input/native-chat-paste-folder' -import { isNativeChatPastedImagePath } from '../../../../shared/native-chat-image-label' +import { isNativeChatPastedImagePath } from '../../../../shared/native-chat/native-chat-image-label' export { getAgentImageHandling, type AgentImageHandling diff --git a/src/renderer/src/components/native-chat/native-chat-interactive-prompt.test.ts b/src/renderer/src/components/native-chat/native-chat-interactive-prompt.test.ts index da4ccf2093f..140ba1bc96c 100644 --- a/src/renderer/src/components/native-chat/native-chat-interactive-prompt.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-interactive-prompt.test.ts @@ -5,11 +5,11 @@ import { buildCodexAskAnswerKeys, formatAskAnswer, hasAskAnswer -} from '../../../../shared/native-chat-ask-answer' +} from '../../../../shared/native-chat/input/native-chat-ask-answer' import { parseAskFromStatus } from '../../../../shared/native-chat/input/native-chat-ask' import { sayNativeChatApprovalTranslated } from './native-chat-interactive-prompt' import type { AskPrompt } from '../../../../shared/native-chat/input/native-chat-ask-types' -import { parseApprovalFromStatus } from '../../../../shared/native-chat-interactive-prompt' +import { parseApprovalFromStatus } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' const ESC = String.fromCharCode(27) diff --git a/src/renderer/src/components/native-chat/native-chat-interactive-prompt.ts b/src/renderer/src/components/native-chat/native-chat-interactive-prompt.ts index a11a0ac3d18..538d2ebdba1 100644 --- a/src/renderer/src/components/native-chat/native-chat-interactive-prompt.ts +++ b/src/renderer/src/components/native-chat/native-chat-interactive-prompt.ts @@ -3,7 +3,7 @@ import { translate } from '@/i18n/i18n' import { NATIVE_CHAT_APPROVAL_COPY as COPY, type NativeChatApprovalSay -} from '../../../../shared/native-chat-interactive-prompt' +} from '../../../../shared/native-chat/input/native-chat-interactive-prompt' const PIECES: Record string> = { title: (values) => translate('components.native-chat.approval.title', COPY.title, values), diff --git a/src/renderer/src/components/native-chat/native-chat-launch-default-adoption.test.ts b/src/renderer/src/components/native-chat/native-chat-launch-default-adoption.test.ts index 9c5793fef0d..74d37132ae2 100644 --- a/src/renderer/src/components/native-chat/native-chat-launch-default-adoption.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-launch-default-adoption.test.ts @@ -3,7 +3,7 @@ import { clearNativeChatSessionOptionCacheForTests, seedNativeChatAppliedSessionOptions } from './native-chat-session-option-cache' -import { createNativeChatPtySessionOptions } from '../../../../shared/native-chat-pty-session-options' +import { createNativeChatPtySessionOptions } from '../../../../shared/native-chat/input/native-chat-pty-session-options' import { resolveNativeChatSessionOptionDefaults, updateNativeChatSessionOptionDefaults diff --git a/src/renderer/src/components/native-chat/native-chat-message-copy-text.ts b/src/renderer/src/components/native-chat/native-chat-message-copy-text.ts index a62a46cdaae..4311b94e749 100644 --- a/src/renderer/src/components/native-chat/native-chat-message-copy-text.ts +++ b/src/renderer/src/components/native-chat/native-chat-message-copy-text.ts @@ -1,5 +1,5 @@ import { agentMessageTranscriptText } from '../../../../shared/agent-session/agent-message-display-text' -import { nativeChatMessageCopyText } from '../../../../shared/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../shared/native-chat/transcript/native-chat-message-copy-text' import { nativeChatStoppedBeforeStartLabel } from './native-chat-stopped-before-start-row' import type { NativeChatTranscriptSlot } from './native-chat-transcript-slots' diff --git a/src/renderer/src/components/native-chat/native-chat-pane-resolution.ts b/src/renderer/src/components/native-chat/native-chat-pane-resolution.ts index c201b650abb..1f4d9512e6f 100644 --- a/src/renderer/src/components/native-chat/native-chat-pane-resolution.ts +++ b/src/renderer/src/components/native-chat/native-chat-pane-resolution.ts @@ -1,7 +1,7 @@ import type { AgentStatusEntry, AgentType } from '../../../../shared/agent-status-types' import type { TuiAgent } from '../../../../shared/tui-agent' import { isNativeChatSupportedAgent } from '../../../../shared/native-chat/native-chat-agent-support' -import { nativeChatAvailabilityAgent } from '../../../../shared/native-chat-availability' +import { nativeChatAvailabilityAgent } from '../../../../shared/native-chat/native-chat-availability' export type NativeChatPaneResolutionInput = { /** Composite `${tabId}:${leafId}` key of the active leaf. */ diff --git a/src/renderer/src/components/native-chat/native-chat-pending.test.ts b/src/renderer/src/components/native-chat/native-chat-pending.test.ts index c89c7b627d8..d15f2e75e75 100644 --- a/src/renderer/src/components/native-chat/native-chat-pending.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-pending.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import type { NativeChatMessage } from '../../../../shared/native-chat/native-chat-types' -import type { NativeChatPendingSend } from '../../../../shared/native-chat-pending-sends' +import type { NativeChatPendingSend } from '../../../../shared/native-chat/transcript/native-chat-pending-sends' import { appendPendingSendCache, clearPendingSendCacheForTests, diff --git a/src/renderer/src/components/native-chat/native-chat-pending.ts b/src/renderer/src/components/native-chat/native-chat-pending.ts index 420b43d77b1..a66d72ed52c 100644 --- a/src/renderer/src/components/native-chat/native-chat-pending.ts +++ b/src/renderer/src/components/native-chat/native-chat-pending.ts @@ -3,14 +3,14 @@ import { setBoundedScopeCacheEntry } from '../../../../shared/native-chat/native import { NATIVE_CHAT_PENDING_SEND_LIMIT, type NativeChatPendingSend -} from '../../../../shared/native-chat-pending-sends' +} from '../../../../shared/native-chat/transcript/native-chat-pending-sends' import type { NativeChatLaunchPrompt } from '@/lib/native-chat-launch-prompt' import { advancedNativeChatUserContentCounts, assignNativeChatPendingOccurrence, matchingNativeChatUserContentCounts, nativeChatPendingContentKey -} from '../../../../shared/native-chat-pending-occurrence' +} from '../../../../shared/native-chat/transcript/native-chat-pending-occurrence' export type NativeChatPendingSendScope = { paneKey: string diff --git a/src/renderer/src/components/native-chat/native-chat-pty-retired-model.test.ts b/src/renderer/src/components/native-chat/native-chat-pty-retired-model.test.ts index 79f6df43d89..95620885cd0 100644 --- a/src/renderer/src/components/native-chat/native-chat-pty-retired-model.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-pty-retired-model.test.ts @@ -15,7 +15,7 @@ import { createNativeChatPtySessionOptions, type CreateNativeChatPtySessionOptionsArgs, type NativeChatPtySessionOptionsSurface -} from '../../../../shared/native-chat-pty-session-options' +} from '../../../../shared/native-chat/input/native-chat-pty-session-options' const discoveredGrok5 = (): ReturnType => mergeDiscoveredAuthoritativeModels(GROK_SESSION_OPTION_CATALOG.models, [ diff --git a/src/renderer/src/components/native-chat/native-chat-runtime-image-send.ts b/src/renderer/src/components/native-chat/native-chat-runtime-image-send.ts index 1567cdf0825..05c17b94d0a 100644 --- a/src/renderer/src/components/native-chat/native-chat-runtime-image-send.ts +++ b/src/renderer/src/components/native-chat/native-chat-runtime-image-send.ts @@ -8,7 +8,7 @@ import { buildNativeChatImagePasteBytes, buildNativeChatPasteBytes, NATIVE_CHAT_SUBMIT -} from '../../../../shared/native-chat-paste-bytes' +} from '../../../../shared/native-chat/input/native-chat-paste-bytes' import { enqueueNativeChatPtySend } from './native-chat-pty-send-queue' import { clearConfirmDurationMs, diff --git a/src/renderer/src/components/native-chat/native-chat-runtime-send-launch-draft.test.ts b/src/renderer/src/components/native-chat/native-chat-runtime-send-launch-draft.test.ts index f5dae9f0ba3..d956a67f933 100644 --- a/src/renderer/src/components/native-chat/native-chat-runtime-send-launch-draft.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-runtime-send-launch-draft.test.ts @@ -25,7 +25,7 @@ import { import { buildNativeChatPasteBytes, NATIVE_CHAT_SUBMIT -} from '../../../../shared/native-chat-paste-bytes' +} from '../../../../shared/native-chat/input/native-chat-paste-bytes' import { AGENT_TUI_CLEAR_INPUT_MAX, buildAgentTuiClearInputForText diff --git a/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts b/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts index a24a6f10c97..7dbeae7a31a 100644 --- a/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-runtime-send.test.ts @@ -34,7 +34,7 @@ import { import { buildNativeChatPasteBytes, NATIVE_CHAT_SUBMIT -} from '../../../../shared/native-chat-paste-bytes' +} from '../../../../shared/native-chat/input/native-chat-paste-bytes' const PTY = 'pty-1' diff --git a/src/renderer/src/components/native-chat/native-chat-runtime-send.ts b/src/renderer/src/components/native-chat/native-chat-runtime-send.ts index 2a44d07372d..aa730a09def 100644 --- a/src/renderer/src/components/native-chat/native-chat-runtime-send.ts +++ b/src/renderer/src/components/native-chat/native-chat-runtime-send.ts @@ -1,7 +1,7 @@ import { sendNativeChatObservedWrites } from './native-chat-observed-send' import { sendRuntimePtyInput } from '@/runtime/runtime-terminal-inspection' import { sendRuntimePtyInputVerified } from '@/runtime/runtime-terminal-verified-input' -import type { AskAnswerKeyGroup } from '../../../../shared/native-chat-ask-answer' +import type { AskAnswerKeyGroup } from '../../../../shared/native-chat/input/native-chat-ask-answer' import { clearConfirmDurationMs, clearThenWrite, @@ -16,7 +16,7 @@ import { import { buildNativeChatPasteBytes, NATIVE_CHAT_SUBMIT -} from '../../../../shared/native-chat-paste-bytes' +} from '../../../../shared/native-chat/input/native-chat-paste-bytes' import { AGENT_TUI_COMMAND_KEY_INTERVAL_MS, typeAgentTuiCommand diff --git a/src/renderer/src/components/native-chat/native-chat-session-assembler.ts b/src/renderer/src/components/native-chat/native-chat-session-assembler.ts index a559feb082e..c3d7bdf8bf0 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-assembler.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-assembler.ts @@ -17,7 +17,7 @@ import { normalizeImageTranscriptMessages } from '../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' import { isLaunchPromptMessageId } from './native-chat-pending' -import { isPendingMessageId } from '../../../../shared/native-chat-pending-sends' +import { isPendingMessageId } from '../../../../shared/native-chat/transcript/native-chat-pending-sends' /** For the same turn, prefer transcript over hook over scrape. */ export type NativeChatSources = { diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-apply-error-text.ts b/src/renderer/src/components/native-chat/native-chat-session-option-apply-error-text.ts index b3f5d228ff8..545cc4a8c13 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-apply-error-text.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-apply-error-text.ts @@ -3,7 +3,7 @@ import { SESSION_OPTION_APPLY_FAILURE_COPY as EN, type SessionOptionApplyError, type SessionOptionApplyFailureCode -} from '../../../../shared/native-chat-session-option-apply-failure' +} from '../../../../shared/native-chat/input/native-chat-session-option-apply-failure' const COPY: Record string> = { startOnly: () => translate('components.native-chat.sessionOptionErrors.startOnly', EN.startOnly), diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-cache.ts b/src/renderer/src/components/native-chat/native-chat-session-option-cache.ts index 6b21c830bfc..46dbc492dcc 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-cache.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-cache.ts @@ -1,2 +1,2 @@ // Re-exported so the many renderer launch paths and their mocks keep one import path. -export * from '../../../../shared/native-chat-session-option-cache' +export * from '../../../../shared/native-chat/input/native-chat-session-option-cache' diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts b/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts index 89cbe4f5541..62c87b315b7 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-discovery.ts @@ -1,7 +1,7 @@ import type { AgentType } from '../../../../shared/agent-status-types' import { createClaudeCatalogOptions } from '../../../../shared/agent-session/options/agent-session-option-catalog-claude-codex' import type { CatalogModel } from '../../../../shared/agent-session/options/agent-session-option-catalog-types' -import { catalogModelsFromModelDiscovery } from '../../../../shared/native-chat-discovered-catalog-models' +import { catalogModelsFromModelDiscovery } from '../../../../shared/native-chat/input/native-chat-discovered-catalog-models' import { getCommitMessageModelDiscoveryHostKeyForLocalRuntime, getCommitMessageModelDiscoveryHostKeyForScope, diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.ts b/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.ts index 9da2abbe991..e52a79a6a2a 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-enrichment.ts @@ -1,7 +1,7 @@ import type { AgentType } from '../../../../shared/agent-status-types' import { getAgentSessionOptionCatalog } from '../../../../shared/agent-session/options/agent-session-option-catalog' import type { CatalogModel } from '../../../../shared/agent-session/options/agent-session-option-catalog-types' -import { mergeDiscoveredCatalogModels } from '../../../../shared/native-chat-discovered-catalog-models' +import { mergeDiscoveredCatalogModels } from '../../../../shared/native-chat/input/native-chat-discovered-catalog-models' type CatalogEnrichmentEntry = { state: 'idle' | 'pending' | 'settled' diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-labels-text.ts b/src/renderer/src/components/native-chat/native-chat-session-option-labels-text.ts index df99007ec3c..391bc324f8f 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-labels-text.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-labels-text.ts @@ -2,7 +2,7 @@ import { translate } from '@/i18n/i18n' import type { NativeChatSessionOptionCopyId, NativeChatSessionOptionSay -} from '../../../../shared/native-chat-session-option-labels' +} from '../../../../shared/native-chat/input/native-chat-session-option-labels' // Literal English defaults: the localization gate only reads string literals at the call site. diff --git a/src/renderer/src/components/native-chat/native-chat-session-option-surface-call.ts b/src/renderer/src/components/native-chat/native-chat-session-option-surface-call.ts index 3931636c238..13dde01ef2e 100644 --- a/src/renderer/src/components/native-chat/native-chat-session-option-surface-call.ts +++ b/src/renderer/src/components/native-chat/native-chat-session-option-surface-call.ts @@ -3,7 +3,7 @@ import { translate } from '@/i18n/i18n' import { agentSessionThrownFailure } from '../../../../shared/agent-session/failures/agent-session-write-failure' import { RuntimeRpcCallError } from '@/runtime/runtime-rpc-result' import { agentSessionWriteFailureText } from './agent-session-write-notice-text' -import { SessionOptionApplyError } from '../../../../shared/native-chat-session-option-apply-failure' +import { SessionOptionApplyError } from '../../../../shared/native-chat/input/native-chat-session-option-apply-failure' import { sessionOptionApplyErrorText } from './native-chat-session-option-apply-error-text' /** Translate host log errors through the failure table; local errors are already user-facing. */ diff --git a/src/renderer/src/components/native-chat/native-chat-transcript-slots.ts b/src/renderer/src/components/native-chat/native-chat-transcript-slots.ts index 809355bb4e7..20dbbd7e625 100644 --- a/src/renderer/src/components/native-chat/native-chat-transcript-slots.ts +++ b/src/renderer/src/components/native-chat/native-chat-transcript-slots.ts @@ -6,7 +6,7 @@ import type { } from '../../../../shared/agent-session/journal/agent-session-journal-types' import type { NativeChatMessage } from '../../../../shared/native-chat/native-chat-types' import type { NativeChatTurnStatus } from '../../../../shared/native-chat/transcript/native-chat-turn-status' -import { isNativeChatRowInLiveWorkingTurn } from '../../../../shared/native-chat-live-turn-membership' +import { isNativeChatRowInLiveWorkingTurn } from '../../../../shared/native-chat/transcript/native-chat-live-turn-membership' import { nativeChatMessagesWaitingBehindLiveTurn } from '../../../../shared/native-chat/transcript/native-chat-messages-waiting-behind-live-turn' import { nativeChatTurnBarRows } from '../../../../shared/native-chat/transcript/native-chat-turn-grouping' import { diff --git a/src/renderer/src/components/native-chat/omp-model-switch-capability.test.ts b/src/renderer/src/components/native-chat/omp-model-switch-capability.test.ts index 24f8a8ece49..2ba0800a7b1 100644 --- a/src/renderer/src/components/native-chat/omp-model-switch-capability.test.ts +++ b/src/renderer/src/components/native-chat/omp-model-switch-capability.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' import { clearNativeChatSessionOptionCacheForTests } from './native-chat-session-option-cache' -import { createNativeChatPtySessionOptions } from '../../../../shared/native-chat-pty-session-options' +import { createNativeChatPtySessionOptions } from '../../../../shared/native-chat/input/native-chat-pty-session-options' describe('OMP model command capability', () => { beforeEach(() => clearNativeChatSessionOptionCacheForTests()) diff --git a/src/renderer/src/components/native-chat/structured-agent-session-queue-request.test.ts b/src/renderer/src/components/native-chat/structured-agent-session-queue-request.test.ts index 06dc8b51678..36af374c994 100644 --- a/src/renderer/src/components/native-chat/structured-agent-session-queue-request.test.ts +++ b/src/renderer/src/components/native-chat/structured-agent-session-queue-request.test.ts @@ -1,4 +1,4 @@ -import { nativeChatQueueFollowUps } from '../../../../shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' import { describe, expect, it } from 'vitest' import type { AgentJournalItemBody } from '../../../../shared/agent-session/journal/agent-session-journal-types' import { isAdmissibleAgentJournalItemBody } from '../../../../shared/agent-session/journal/agent-session-journal-schemas' diff --git a/src/renderer/src/components/native-chat/use-native-chat-composer-catalog.ts b/src/renderer/src/components/native-chat/use-native-chat-composer-catalog.ts index 3a4c6db29bb..c1de29cc39b 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-composer-catalog.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-composer-catalog.ts @@ -5,7 +5,7 @@ import type { NativeChatSessionSkill, SlashCommandSuggestion } from '../../../../shared/native-chat/input/native-chat-slash-commands' -import { nativeChatSessionSkills } from '../../../../shared/native-chat-skill-visibility' +import { nativeChatSessionSkills } from '../../../../shared/native-chat/input/native-chat-skill-visibility' import { structuredSessionSlashCommands } from '../../../../shared/agent-session/view/structured-agent-session-composer' import { withNativeChatResumeCommand } from './use-native-chat-resume-command' import type { NativeChatStructuredComposerTransport } from './native-chat-composer-types' diff --git a/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.test.tsx b/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.test.tsx index 5b8e591b0f4..41ed87c52ab 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.test.tsx +++ b/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.test.tsx @@ -3,11 +3,11 @@ import { cleanup, fireEvent, render, renderHook, screen } from '@testing-library/react' import { useState, type KeyboardEventHandler } from 'react' import { describe, expect, it, vi } from 'vitest' +import { applyPickerSuggestion } from '../../../../shared/native-chat/input/native-chat-picker-triggers' import { - applyPickerSuggestion, deriveComposerAutocomplete, type ComposerAutocomplete -} from '../../../../shared/native-chat-composer-autocomplete' +} from '../../../../shared/native-chat/input/native-chat-composer-autocomplete' import { getNativeChatAgentProfile } from '../../../../shared/native-chat/native-chat-agent-profiles' import { useNativeChatRecallPosition } from './use-native-chat-composer-recall' import type { NativeChatMessage } from '../../../../shared/native-chat/native-chat-types' diff --git a/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.ts b/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.ts index d86c88d936d..fd5026b0b9c 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-composer-keydown.ts @@ -5,10 +5,8 @@ import { type KeyboardEventHandler, type SetStateAction } from 'react' -import type { - ComposerAutocomplete, - NativeChatPickerItem -} from '../../../../shared/native-chat-composer-autocomplete' +import type { ComposerAutocomplete } from '../../../../shared/native-chat/input/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../shared/native-chat/input/native-chat-picker-items' import { isMacPlatform } from './native-chat-shortcut' import type { NativeChatMentionFiles } from './use-native-chat-mention-files' import type { NativeChatComposerSendIntent } from './native-chat-composer-types' diff --git a/src/renderer/src/components/native-chat/use-native-chat-interactive-prompt-card.ts b/src/renderer/src/components/native-chat/use-native-chat-interactive-prompt-card.ts index 483e64f6086..a257c64958d 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-interactive-prompt-card.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-interactive-prompt-card.ts @@ -5,9 +5,9 @@ import { useMemo } from 'react' import { useAppStore } from '../../store' import type { AskPrompt } from '../../../../shared/native-chat/input/native-chat-ask-types' import type { NativeChatMessage } from '../../../../shared/native-chat/native-chat-types' -import { resolveNativeChatInteractivePromptCard } from '../../../../shared/native-chat-interactive-prompt' +import { resolveNativeChatInteractivePromptCard } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' import { sayNativeChatApprovalTranslated } from './native-chat-interactive-prompt' -import type { InteractivePromptCard } from '../../../../shared/native-chat-interactive-prompt' +import type { InteractivePromptCard } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' export function useNativeChatInteractivePromptCard({ paneKey, diff --git a/src/renderer/src/components/native-chat/use-native-chat-interactive-send.ts b/src/renderer/src/components/native-chat/use-native-chat-interactive-send.ts index 9b39409be84..73dfb87097b 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-interactive-send.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-interactive-send.ts @@ -15,7 +15,7 @@ import { formatAskAnswer, hasAskAnswer, type AskAnswerSelection -} from '../../../../shared/native-chat-ask-answer' +} from '../../../../shared/native-chat/input/native-chat-ask-answer' import type { AskPrompt } from '../../../../shared/native-chat/input/native-chat-ask-types' import { sendNativeChatAskAnswer, diff --git a/src/renderer/src/components/native-chat/use-native-chat-launch-draft-adoption.ts b/src/renderer/src/components/native-chat/use-native-chat-launch-draft-adoption.ts index cdb99c31834..1fcfcd8213b 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-launch-draft-adoption.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-launch-draft-adoption.ts @@ -6,7 +6,7 @@ import { launchDraftResolvedByTranscript, nativeChatLaunchDraftTurnBaseline, type NativeChatLaunchDraftTurnBaseline -} from '../../../../shared/native-chat-launch-draft-resolution' +} from '../../../../shared/native-chat/transcript/native-chat-launch-draft-resolution' import { isNativeChatTranscriptUnsettled, type ReadState diff --git a/src/renderer/src/components/native-chat/use-native-chat-local-command-answer.ts b/src/renderer/src/components/native-chat/use-native-chat-local-command-answer.ts index 2f9db2efb02..133187dacda 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-local-command-answer.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-local-command-answer.ts @@ -8,7 +8,7 @@ import { formatNativeChatContextUsageAnswer, formatNativeChatContextUsageUnreported } from './native-chat-context-usage-answer' -import type { NativeChatPtySessionOptionsSurface } from '../../../../shared/native-chat-pty-session-options' +import type { NativeChatPtySessionOptionsSurface } from '../../../../shared/native-chat/input/native-chat-pty-session-options' export type NativeChatModelContextWindow = (modelId: string) => number | null diff --git a/src/renderer/src/components/native-chat/use-native-chat-pending-delivery.ts b/src/renderer/src/components/native-chat/use-native-chat-pending-delivery.ts index e00546f1ec8..c71b13fb7e1 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-pending-delivery.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-pending-delivery.ts @@ -8,7 +8,7 @@ import { prunePendingSends, releaseEmptyTranscriptClaims, type NativeChatPendingSend -} from '../../../../shared/native-chat-pending-sends' +} from '../../../../shared/native-chat/transcript/native-chat-pending-sends' import { appendPendingSendCache, nextNativeChatPendingSendId, diff --git a/src/renderer/src/components/native-chat/use-native-chat-picker-command-dispatch.ts b/src/renderer/src/components/native-chat/use-native-chat-picker-command-dispatch.ts index 0e492b320a5..0d535cb5ac7 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-picker-command-dispatch.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-picker-command-dispatch.ts @@ -10,9 +10,9 @@ import { nativeChatComposerTargetIsRemote, type NativeChatResolvedTarget } from './native-chat-composer-target' -import type { NativeChatPickerItem } from '../../../../shared/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../shared/native-chat/input/native-chat-picker-items' import type { NativeChatSendLifecycle } from './use-native-chat-send-lifecycle' -import type { NativeChatPtySessionOptionsSurface } from '../../../../shared/native-chat-pty-session-options' +import type { NativeChatPtySessionOptionsSurface } from '../../../../shared/native-chat/input/native-chat-pty-session-options' import { answerNativeChatCommandInComposer, type NativeChatLocalCommandAnswer diff --git a/src/renderer/src/components/native-chat/use-native-chat-picker-state.ts b/src/renderer/src/components/native-chat/use-native-chat-picker-state.ts index ddb93f71e9b..f0238bbb3a0 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-picker-state.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-picker-state.ts @@ -16,22 +16,23 @@ import { } from 'react' import type { AgentType } from '../../../../shared/agent-status-types' import { getNativeChatAgentProfile } from '../../../../shared/native-chat/native-chat-agent-profiles' -import type { - NativeChatSessionSkill, - SlashCommandSuggestion -} from '../../../../shared/native-chat/input/native-chat-slash-commands' + import { applyMentionSuggestion, - applyPickerSuggestion, - classifyNativeChatSend, deriveComposerAutocomplete, editReplacesTriggerToken, isSkillPickerTriggered, - type ComposerAutocomplete, - type NativeChatPickerItem, - type NativeChatSendClassification -} from '../../../../shared/native-chat-composer-autocomplete' -import { nativeChatPickerCommands } from '../../../../shared/native-chat-skill-visibility' + type ComposerAutocomplete +} from '../../../../shared/native-chat/input/native-chat-composer-autocomplete' +import { applyPickerSuggestion } from '../../../../shared/native-chat/input/native-chat-picker-triggers' +import { + classifyNativeChatSend, + type NativeChatSendClassification, + type NativeChatSessionSkill, + type SlashCommandSuggestion +} from '../../../../shared/native-chat/input/native-chat-slash-commands' +import type { NativeChatPickerItem } from '../../../../shared/native-chat/input/native-chat-picker-items' +import { nativeChatPickerCommands } from '../../../../shared/native-chat/input/native-chat-skill-visibility' import { useNativeChatSkills } from './use-native-chat-skills' import { emitNativeChatPickerItemAccepted, diff --git a/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.test.ts b/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.test.ts index 40add63cfd4..41d1f9b9c90 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.test.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.test.ts @@ -8,7 +8,7 @@ import { nativeChatPromptDismissals, forgetNativeChatPromptDismissalsForTab } from './native-chat-prompt-dismissals' -import type { InteractivePromptCard } from '../../../../shared/native-chat-interactive-prompt' +import type { InteractivePromptCard } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' const PANE = 'tab-1:leaf-1' const question: InteractivePromptCard = { diff --git a/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.ts b/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.ts index 2550abfd74c..3ab329dece4 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-prompt-card-presentation.ts @@ -5,12 +5,12 @@ import { nativeChatPromptDismissalMatches, nativeChatPromptOccurrenceKey, nativeChatPromptWaitStartedAt -} from '../../../../shared/native-chat-prompt-dismiss-key' +} from '../../../../shared/native-chat/input/native-chat-prompt-dismiss-key' import { nativeChatPromptDismissals as dismissals, type NativeChatPromptDismissal } from './native-chat-prompt-dismissals' -import type { InteractivePromptCard } from '../../../../shared/native-chat-interactive-prompt' +import type { InteractivePromptCard } from '../../../../shared/native-chat/input/native-chat-interactive-prompt' export type NativeChatPromptCardPresentation = { /** The card that owns the input region now; null leaves it to the composer. */ diff --git a/src/renderer/src/components/native-chat/use-native-chat-pty-composer-send.ts b/src/renderer/src/components/native-chat/use-native-chat-pty-composer-send.ts index a1654d63611..da782012b53 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-pty-composer-send.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-pty-composer-send.ts @@ -19,7 +19,7 @@ import type { NativeChatResolvedTarget } from './native-chat-composer-target' import { isSlashCommandDraft } from '../../../../shared/native-chat/input/native-chat-slash-commands' import type { NativeChatPickerState } from './use-native-chat-picker-state' import type { NativeChatSendLifecycle } from './use-native-chat-send-lifecycle' -import type { NativeChatPtySessionOptionsSurface } from '../../../../shared/native-chat-pty-session-options' +import type { NativeChatPtySessionOptionsSurface } from '../../../../shared/native-chat/input/native-chat-pty-session-options' import type { NativeChatOptimisticSendOutcome } from './native-chat-composer-types' import { answerNativeChatCommandInComposer, diff --git a/src/renderer/src/components/native-chat/use-native-chat-resume-command.ts b/src/renderer/src/components/native-chat/use-native-chat-resume-command.ts index 91b72409467..7a0957c2571 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-resume-command.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-resume-command.ts @@ -6,7 +6,7 @@ import type { AgentType } from '../../../../shared/agent-status-types' import { isAiVaultAgent } from '../../../../shared/ai-vault-types' import { selectAiVaultPanelWorkspace } from '../right-sidebar/ai-vault-panel-workspace' import { openAgentSessionHistoryModal } from '../right-sidebar/agent-session-history-modal' -import type { NativeChatPickerItem } from '../../../../shared/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../shared/native-chat/input/native-chat-picker-items' import type { NativeChatPickerState } from './use-native-chat-picker-state' import { findNativeChatTabOwnerWorktreeId } from './native-chat-file-link' import type { NativeChatComposerInput } from './native-chat-composer-input' diff --git a/src/renderer/src/components/native-chat/use-native-chat-reveal-latest.ts b/src/renderer/src/components/native-chat/use-native-chat-reveal-latest.ts index ffb73f61a3e..a758a5915cf 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-reveal-latest.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-reveal-latest.ts @@ -1,5 +1,5 @@ import { useCallback, useImperativeHandle, useMemo, useRef } from 'react' -import { hasAskAnswer } from '../../../../shared/native-chat-ask-answer' +import { hasAskAnswer } from '../../../../shared/native-chat/input/native-chat-ask-answer' import { nativeChatSlotCopyText } from './native-chat-message-copy-text' import type { NativeChatTranscriptSlot } from './native-chat-transcript-slots' import type { NativeChatInteractiveSend } from './use-native-chat-interactive-send' diff --git a/src/renderer/src/components/native-chat/use-native-chat-session-option-command.ts b/src/renderer/src/components/native-chat/use-native-chat-session-option-command.ts index 90cf011b60b..a1b95043459 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-session-option-command.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-session-option-command.ts @@ -11,7 +11,7 @@ import { createClaudeModelSwitchConfirmationObserver, type ClaudeModelSwitchConfirmationObserver } from './claude-model-switch-confirmation' -import type { NativeChatSessionOptionDispatchCommand } from '../../../../shared/native-chat-session-option-dispatch' +import type { NativeChatSessionOptionDispatchCommand } from '../../../../shared/native-chat/input/native-chat-session-option-dispatch' import { translate } from '@/i18n/i18n' export function useNativeChatSessionOptionCommand(args: { diff --git a/src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts b/src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts index 38b3add258a..59aa18a5ee9 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-session-options.test.ts @@ -3,7 +3,7 @@ import { act, renderHook, waitFor } from '@testing-library/react' import { beforeEach, describe, expect, it, vi } from 'vitest' import type { CatalogModel } from '../../../../shared/agent-session/options/agent-session-option-catalog-types' -import type { NativeChatSessionOptionDispatchCommand } from '../../../../shared/native-chat-session-option-dispatch' +import type { NativeChatSessionOptionDispatchCommand } from '../../../../shared/native-chat/input/native-chat-session-option-dispatch' import { clearNativeChatModelEnrichmentForTests, ensureNativeChatModelEnrichment diff --git a/src/renderer/src/components/native-chat/use-native-chat-session-options.ts b/src/renderer/src/components/native-chat/use-native-chat-session-options.ts index 568f32fd516..f3b6b2b9047 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-session-options.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-session-options.ts @@ -8,8 +8,8 @@ import { sayNativeChatSessionOptionTranslated } from './native-chat-session-opti import { createNativeChatPtySessionOptions, type NativeChatPtySessionOptionsSurface -} from '../../../../shared/native-chat-pty-session-options' -import type { NativeChatSessionOptionDispatchCommand } from '../../../../shared/native-chat-session-option-dispatch' +} from '../../../../shared/native-chat/input/native-chat-pty-session-options' +import type { NativeChatSessionOptionDispatchCommand } from '../../../../shared/native-chat/input/native-chat-session-option-dispatch' import { ensureNativeChatModelEnrichment, readNativeChatEnrichedModels, diff --git a/src/renderer/src/components/native-chat/use-native-chat-skills.react.test.tsx b/src/renderer/src/components/native-chat/use-native-chat-skills.react.test.tsx index f718ac59970..af1a16209d3 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-skills.react.test.tsx +++ b/src/renderer/src/components/native-chat/use-native-chat-skills.react.test.tsx @@ -5,7 +5,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import type { NativeChatSkillDiscovery } from './use-native-chat-skills' import { getNativeChatAgentProfile } from '../../../../shared/native-chat/native-chat-agent-profiles' import { FLOATING_TERMINAL_WORKTREE_ID } from '../../../../shared/constants' -import { isSkillPickerTriggered } from '../../../../shared/native-chat-composer-autocomplete' +import { isSkillPickerTriggered } from '../../../../shared/native-chat/input/native-chat-composer-autocomplete' const mocks = vi.hoisted(() => ({ callRuntimeRpc: vi.fn(), diff --git a/src/renderer/src/components/native-chat/use-native-chat-skills.ts b/src/renderer/src/components/native-chat/use-native-chat-skills.ts index 5ddb8354fcd..49cfa5493fd 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-skills.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-skills.ts @@ -4,7 +4,7 @@ import { useAppStore } from '../../store' import type { AgentType } from '../../../../shared/agent-status-types' import type { DiscoveredSkill, SkillDiscoveryResult } from '../../../../shared/skills' import { getNativeChatAgentProfile } from '../../../../shared/native-chat/native-chat-agent-profiles' -import { isNativeChatSkillForAgent } from '../../../../shared/native-chat-skill-visibility' +import { isNativeChatSkillForAgent } from '../../../../shared/native-chat/input/native-chat-skill-visibility' import { callRuntimeRpc } from '@/runtime/runtime-rpc-client' import { emitNativeChatSkillDiscovery } from '@/lib/native-chat-telemetry' import { diff --git a/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.surface-owner.test.ts b/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.surface-owner.test.ts index 8a4d3c96eb4..7871b6da736 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.surface-owner.test.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.surface-owner.test.ts @@ -52,7 +52,9 @@ vi.mock('./native-chat-shortcut', () => ({ isMacPlatform: () => true, matchesNativeChatToggleShortcut: () => true })) -vi.mock('../../../../shared/native-chat-availability', () => ({ canToggleNativeChat: () => true })) +vi.mock('../../../../shared/native-chat/native-chat-availability', () => ({ + canToggleNativeChat: () => true +})) vi.mock('../../../../shared/native-chat/transcript/native-chat-transcript-readability', () => ({ isNativeChatTranscriptLocalReadable: () => true })) diff --git a/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.ts b/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.ts index 106c3bcd8f5..19e0f786121 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-toggle-shortcut.ts @@ -14,7 +14,7 @@ import { useAppStore } from '../../store' import type { AgentType } from '../../../../shared/agent-status-types' import type { TerminalLayoutSnapshot } from '../../../../shared/terminal-tab-types' import { resolveNativeChatTabAgentEvidence } from '../tab-bar/native-chat-tab-agent-evidence' -import { canToggleNativeChat } from '../../../../shared/native-chat-availability' +import { canToggleNativeChat } from '../../../../shared/native-chat/native-chat-availability' import { isNativeChatTranscriptLocalReadable } from '../../../../shared/native-chat/transcript/native-chat-transcript-readability' import { matchesNativeChatToggleShortcut } from './native-chat-shortcut' import { getShortcutPlatform } from '@/lib/shortcut-platform' diff --git a/src/renderer/src/components/native-chat/use-native-chat-transcript-slots.ts b/src/renderer/src/components/native-chat/use-native-chat-transcript-slots.ts index db577c317f5..2cf8e054e7d 100644 --- a/src/renderer/src/components/native-chat/use-native-chat-transcript-slots.ts +++ b/src/renderer/src/components/native-chat/use-native-chat-transcript-slots.ts @@ -3,7 +3,7 @@ import { nativeChatLiveLine, type NativeChatLiveLine } from '../../../../shared/native-chat/transcript/native-chat-live-line' -import { isNativeChatRowInLiveWorkingTurn } from '../../../../shared/native-chat-live-turn-membership' +import { isNativeChatRowInLiveWorkingTurn } from '../../../../shared/native-chat/transcript/native-chat-live-turn-membership' import { buildNativeChatTranscriptSlots, type NativeChatTranscriptSlot, diff --git a/src/renderer/src/components/native-chat/use-structured-agent-session.ts b/src/renderer/src/components/native-chat/use-structured-agent-session.ts index c6801db0d5c..0cc2f7cde9c 100644 --- a/src/renderer/src/components/native-chat/use-structured-agent-session.ts +++ b/src/renderer/src/components/native-chat/use-structured-agent-session.ts @@ -9,7 +9,7 @@ import { structuredAgentSessionSendQueues } from './structured-agent-session-que import { nativeChatQueueFollowUps, nativeChatSendFollowUp -} from '../../../../shared/native-chat-follow-up-behavior' +} from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' import type { AgentSessionCancelResult } from '../../../../shared/agent-session/agent-session-wire' import { structuredAgentLabel } from '@/lib/agent-session/launch/structured-agent-session-launch-label' import { useStructuredLegacyLaunchStop } from '@/lib/agent-session/launch/structured-agent-session-legacy-launch-stop' diff --git a/src/renderer/src/components/settings/ChatBehaviorSetting.tsx b/src/renderer/src/components/settings/ChatBehaviorSetting.tsx index 6bb09b37edf..515db8e58c5 100644 --- a/src/renderer/src/components/settings/ChatBehaviorSetting.tsx +++ b/src/renderer/src/components/settings/ChatBehaviorSetting.tsx @@ -12,7 +12,7 @@ import { Card, CardContent } from '../ui/card' import { ChatPermissionSetting } from './ChatPermissionSetting' import { NativeChatShellEnvironmentSetting } from './NativeChatShellEnvironmentSetting' import { SearchableSetting } from './SearchableSetting' -import { nativeChatQueueFollowUps } from '../../../../shared/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' import { SettingsSubsectionHeader, SettingsSwitchRow } from './SettingsFormControls' import { getChatBehaviorEntriesByKey, getChatBehaviorTitle } from './chat-behavior-search' import { getChatPermissionSearchEntry } from './chat-permission-search' diff --git a/src/renderer/src/components/tab-bar/tab-bar-item-surface.tsx b/src/renderer/src/components/tab-bar/tab-bar-item-surface.tsx index ad832aa2a98..f17eb103c55 100644 --- a/src/renderer/src/components/tab-bar/tab-bar-item-surface.tsx +++ b/src/renderer/src/components/tab-bar/tab-bar-item-surface.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { canToggleNativeChat } from '../../../../shared/native-chat-availability' +import { canToggleNativeChat } from '../../../../shared/native-chat/native-chat-availability' import { resolveNativeChatTabAgentEvidence } from './native-chat-tab-agent-evidence' import type { DropIndicator } from './drop-indicator' import { diff --git a/src/renderer/src/components/terminal-pane/use-terminal-pane-chat-state.ts b/src/renderer/src/components/terminal-pane/use-terminal-pane-chat-state.ts index c80253b1db0..8edb88518e1 100644 --- a/src/renderer/src/components/terminal-pane/use-terminal-pane-chat-state.ts +++ b/src/renderer/src/components/terminal-pane/use-terminal-pane-chat-state.ts @@ -8,7 +8,7 @@ import { sanitizeTerminalLayoutPaneTitles } from '../../../../shared/terminal-pa import { resolveNativeChatLeafTitleAgent } from './native-chat-leaf-title-agent' import { useTerminalPaneStoreActions } from './use-terminal-pane-store-actions' import { selectUnifiedTerminalTabFields } from './terminal-unified-tab-lookup' -import { canToggleNativeChat } from '../../../../shared/native-chat-availability' +import { canToggleNativeChat } from '../../../../shared/native-chat/native-chat-availability' import { nativeChatLaunchAgentForLeaf, resolveNativeChatLeafRoute, diff --git a/src/shared/agent-pending-prompt.ts b/src/shared/agent-pending-prompt.ts index 2f248f93cb2..29f4d305901 100644 --- a/src/shared/agent-pending-prompt.ts +++ b/src/shared/agent-pending-prompt.ts @@ -1,8 +1,11 @@ import type { AgentStatusIpcPayload } from './agent-status-ipc-payload' import { hookRowAgentPhase } from './agent-transitions' import { parseAskFromStatus } from './native-chat/input/native-chat-ask' -import { buildAskAnswerKeys, buildCodexAskAnswerKeys } from './native-chat-ask-answer' -import { parseNativeChatApprovalEnvelope } from './native-chat-approval-envelope' +import { + buildAskAnswerKeys, + buildCodexAskAnswerKeys +} from './native-chat/input/native-chat-ask-answer' +import { parseNativeChatApprovalEnvelope } from './native-chat/input/native-chat-approval-envelope' import { resolveNativeChatTranscriptAgent, shouldStepNativeChatAskAnswer diff --git a/src/shared/agent-session/view/structured-agent-session-queued-cards.ts b/src/shared/agent-session/view/structured-agent-session-queued-cards.ts index 8a51160b790..23d2b6a590d 100644 --- a/src/shared/agent-session/view/structured-agent-session-queued-cards.ts +++ b/src/shared/agent-session/view/structured-agent-session-queued-cards.ts @@ -28,7 +28,7 @@ import { NATIVE_CHAT_IMAGE_LABEL_ENGLISH, nativeChatImageLabel, type NativeChatImageLabelCopy -} from '../../native-chat-image-label' +} from '../../native-chat/native-chat-image-label' export type QueuedMessageCardHold = /** Plainly queued, also behind an open question: the question already says the agent waits. */ diff --git a/src/shared/native-chat-approval-envelope.test.ts b/src/shared/native-chat/input/native-chat-approval-envelope.test.ts similarity index 100% rename from src/shared/native-chat-approval-envelope.test.ts rename to src/shared/native-chat/input/native-chat-approval-envelope.test.ts diff --git a/src/shared/native-chat-approval-envelope.ts b/src/shared/native-chat/input/native-chat-approval-envelope.ts similarity index 93% rename from src/shared/native-chat-approval-envelope.ts rename to src/shared/native-chat/input/native-chat-approval-envelope.ts index 464046b9136..1a979c9af0b 100644 --- a/src/shared/native-chat-approval-envelope.ts +++ b/src/shared/native-chat/input/native-chat-approval-envelope.ts @@ -1,4 +1,4 @@ -import { nativeChatApprovalAcceptKey } from './native-chat/native-chat-agent-support' +import { nativeChatApprovalAcceptKey } from '../native-chat-agent-support' /** The facts in a status row's `{ approval: { tool, summary } }` envelope; callers own labels. */ export type NativeChatApprovalEnvelope = { diff --git a/src/shared/native-chat-ask-answer.ts b/src/shared/native-chat/input/native-chat-ask-answer.ts similarity index 98% rename from src/shared/native-chat-ask-answer.ts rename to src/shared/native-chat/input/native-chat-ask-answer.ts index 81d886012a4..c55aa6d4a8e 100644 --- a/src/shared/native-chat-ask-answer.ts +++ b/src/shared/native-chat/input/native-chat-ask-answer.ts @@ -1,6 +1,6 @@ // Deliver answers as pasted messages or Claude/Codex selector keystrokes. -import type { AskPrompt, AskQuestion } from './native-chat/input/native-chat-ask-types' +import type { AskPrompt, AskQuestion } from './native-chat-ask-types' /** Option indices in display order plus free text; selectors address stable numbers rather than labels. */ export type AskAnswerSelection = { indices: number[]; other?: string } diff --git a/src/shared/native-chat-ask-card-rules.ts b/src/shared/native-chat/input/native-chat-ask-card-rules.ts similarity index 90% rename from src/shared/native-chat-ask-card-rules.ts rename to src/shared/native-chat/input/native-chat-ask-card-rules.ts index dc7cab4c11f..98dab1c2ff8 100644 --- a/src/shared/native-chat-ask-card-rules.ts +++ b/src/shared/native-chat/input/native-chat-ask-card-rules.ts @@ -1,5 +1,5 @@ -import type { AgentJournalFreeTextInput } from './agent-session/journal/agent-session-journal-types' -import type { AskQuestion } from './native-chat/input/native-chat-ask-types' +import type { AgentJournalFreeTextInput } from '../../agent-session/journal/agent-session-journal-types' +import type { AskQuestion } from './native-chat-ask-types' // How a stepped question card picks, labels and confirms; desktop and mobile draw it differently. diff --git a/src/shared/native-chat-ask-dismiss-key.ts b/src/shared/native-chat/input/native-chat-ask-dismiss-key.ts similarity index 92% rename from src/shared/native-chat-ask-dismiss-key.ts rename to src/shared/native-chat/input/native-chat-ask-dismiss-key.ts index d9f4258b5d5..27be080a71a 100644 --- a/src/shared/native-chat-ask-dismiss-key.ts +++ b/src/shared/native-chat/input/native-chat-ask-dismiss-key.ts @@ -1,4 +1,4 @@ -import type { AskPrompt } from './native-chat/input/native-chat-ask-types' +import type { AskPrompt } from './native-chat-ask-types' // Live/status transcripts shorten question text differently; identity uses a prefix both retain. const ASK_DISMISS_KEY_TEXT_PREFIX = 200 diff --git a/src/shared/native-chat/input/native-chat-ask.test.ts b/src/shared/native-chat/input/native-chat-ask.test.ts index d5503d3403b..14721bb85a3 100644 --- a/src/shared/native-chat/input/native-chat-ask.test.ts +++ b/src/shared/native-chat/input/native-chat-ask.test.ts @@ -8,7 +8,7 @@ import { readAgentMessageSource, type AgentMessageSource } from '../../agent-session/agent-session-message-source' -import { nativeChatAskDismissKey } from '../../native-chat-ask-dismiss-key' +import { nativeChatAskDismissKey } from './native-chat-ask-dismiss-key' import { projectStructuredItemToNativeChat } from '../../agent-session/view/structured-agent-session-projection' import { extractPendingAsk, diff --git a/src/shared/native-chat/input/native-chat-ask.ts b/src/shared/native-chat/input/native-chat-ask.ts index be68e4e4878..c4fb244bb72 100644 --- a/src/shared/native-chat/input/native-chat-ask.ts +++ b/src/shared/native-chat/input/native-chat-ask.ts @@ -9,7 +9,7 @@ import { CODEX_ASYNC_QUESTION_TOOL, parseCodexAsyncQuestionsInput } from '../../codex-async-question-input' -import { askAnswerQuote } from '../../native-chat-ask-answer' +import { askAnswerQuote } from './native-chat-ask-answer' const QUESTION_TOOL_PARSERS = new Map() diff --git a/src/shared/native-chat-composer-autocomplete.test.ts b/src/shared/native-chat/input/native-chat-composer-autocomplete.test.ts similarity index 97% rename from src/shared/native-chat-composer-autocomplete.test.ts rename to src/shared/native-chat/input/native-chat-composer-autocomplete.test.ts index f09d233d538..d388e184ab5 100644 --- a/src/shared/native-chat-composer-autocomplete.test.ts +++ b/src/shared/native-chat/input/native-chat-composer-autocomplete.test.ts @@ -1,18 +1,21 @@ import { describe, expect, it } from 'vitest' import { applyMentionSuggestion, - applyPickerSuggestion, - buildNativeChatPickerItems, - classifyNativeChatSend, deriveComposerAutocomplete, editReplacesTriggerToken, - isSkillPickerTriggered, - type SlashCommandSuggestion + isSkillPickerTriggered } from './native-chat-composer-autocomplete' -import { sessionSlashCommandSuggestions } from './native-chat/input/native-chat-slash-commands' -import type { DiscoveredSkill } from './skills' -import { getNativeChatAgentProfile } from './native-chat/native-chat-agent-profiles' -import { pickedSkillsInText } from './agent-session/requests/structured-agent-session-send-mutation' +import { applyPickerSuggestion } from './native-chat-picker-triggers' +import { + classifyNativeChatSend, + type SlashCommandSuggestion, + sessionSlashCommandSuggestions +} from './native-chat-slash-commands' +import { buildNativeChatPickerItems } from './native-chat-picker-items' + +import type { DiscoveredSkill } from '../../skills' +import { getNativeChatAgentProfile } from '../native-chat-agent-profiles' +import { pickedSkillsInText } from '../../agent-session/requests/structured-agent-session-send-mutation' const COMMANDS: SlashCommandSuggestion[] = [ { name: 'clear' }, diff --git a/src/shared/native-chat-composer-autocomplete.ts b/src/shared/native-chat/input/native-chat-composer-autocomplete.ts similarity index 86% rename from src/shared/native-chat-composer-autocomplete.ts rename to src/shared/native-chat/input/native-chat-composer-autocomplete.ts index 2a354d4c1ea..51a96379a15 100644 --- a/src/shared/native-chat-composer-autocomplete.ts +++ b/src/shared/native-chat/input/native-chat-composer-autocomplete.ts @@ -1,37 +1,17 @@ -import type { DiscoveredSkill } from './skills' -import { formatNativeChatFileReference } from './agent-image-paste' -import type { NativeChatAgentProfile } from './native-chat/native-chat-agent-profiles' -import { - filterSlashCommands, - isSlashCommandDraft, - applySlashSuggestion, - slashCommandDispatchText, - type NativeChatSessionSkill, - type SlashCommandSuggestion -} from './native-chat/input/native-chat-slash-commands' +import type { DiscoveredSkill } from '../../skills' +import { formatNativeChatFileReference } from '../../agent-image-paste' +import type { NativeChatAgentProfile } from '../native-chat-agent-profiles' +import type { NativeChatSessionSkill, SlashCommandSuggestion } from './native-chat-slash-commands' import { buildNativeChatPickerItems, type NativeChatPickerItem, type NativeChatSkillDiscoverySnapshot -} from './native-chat/input/native-chat-picker-items' +} from './native-chat-picker-items' import { LEADING_SLASH_TRIGGER, MID_PROMPT_SLASH_TRIGGER, matchSkillSigil -} from './native-chat/input/native-chat-picker-triggers' - -export type { SlashCommandSuggestion } -export { filterSlashCommands, isSlashCommandDraft, applySlashSuggestion, slashCommandDispatchText } -export { - classifyNativeChatSend, - type NativeChatSendClassification -} from './native-chat/input/native-chat-slash-commands' -export { applyPickerSuggestion } from './native-chat/input/native-chat-picker-triggers' -export { - buildNativeChatPickerItems, - type NativeChatPickerItem, - type NativeChatSkillDiscoverySnapshot -} from './native-chat/input/native-chat-picker-items' +} from './native-chat-picker-triggers' type PickerAutocomplete = { query: string diff --git a/src/shared/native-chat-discovered-catalog-models.ts b/src/shared/native-chat/input/native-chat-discovered-catalog-models.ts similarity index 83% rename from src/shared/native-chat-discovered-catalog-models.ts rename to src/shared/native-chat/input/native-chat-discovered-catalog-models.ts index 33d65cdff24..7b775d7f439 100644 --- a/src/shared/native-chat-discovered-catalog-models.ts +++ b/src/shared/native-chat/input/native-chat-discovered-catalog-models.ts @@ -1,15 +1,15 @@ -import { createClaudeCatalogOptions } from './agent-session/options/agent-session-option-catalog-claude-codex' +import { createClaudeCatalogOptions } from '../../agent-session/options/agent-session-option-catalog-claude-codex' import { getAgentSessionOptionCatalog, mergeCatalogModels, mergeDiscoveredAuthoritativeModels -} from './agent-session/options/agent-session-option-catalog' +} from '../../agent-session/options/agent-session-option-catalog' import type { AgentSessionOptionCatalog, CatalogModel -} from './agent-session/options/agent-session-option-catalog-types' -import type { AgentType } from './agent-status-types' -import type { CommitMessageModelCapability } from './commit-message-agent-spec' +} from '../../agent-session/options/agent-session-option-catalog-types' +import type { AgentType } from '../../agent-status-types' +import type { CommitMessageModelCapability } from '../../commit-message-agent-spec' export type NativeChatModelDiscoveryResult = | { diff --git a/src/shared/native-chat-follow-up-behavior.ts b/src/shared/native-chat/input/native-chat-follow-up-behavior.ts similarity index 100% rename from src/shared/native-chat-follow-up-behavior.ts rename to src/shared/native-chat/input/native-chat-follow-up-behavior.ts diff --git a/src/shared/native-chat-interactive-prompt.test.ts b/src/shared/native-chat/input/native-chat-interactive-prompt.test.ts similarity index 93% rename from src/shared/native-chat-interactive-prompt.test.ts rename to src/shared/native-chat/input/native-chat-interactive-prompt.test.ts index b4220bb69d3..99ba0cc39b5 100644 --- a/src/shared/native-chat-interactive-prompt.test.ts +++ b/src/shared/native-chat/input/native-chat-interactive-prompt.test.ts @@ -3,8 +3,8 @@ import { parseApprovalFromStatus, resolveNativeChatInteractivePromptCard } from './native-chat-interactive-prompt' -import type { NativeChatMessage } from './native-chat/native-chat-types' -import { buildOmpPlanReviewAnswer } from './omp-plan-review-prompt' +import type { NativeChatMessage } from '../native-chat-types' +import { buildOmpPlanReviewAnswer } from '../../omp-plan-review-prompt' describe('parseApprovalFromStatus', () => { it('returns null for non-approval envelopes', () => { diff --git a/src/shared/native-chat-interactive-prompt.ts b/src/shared/native-chat/input/native-chat-interactive-prompt.ts similarity index 93% rename from src/shared/native-chat-interactive-prompt.ts rename to src/shared/native-chat/input/native-chat-interactive-prompt.ts index 18c064424e1..c542dcd430e 100644 --- a/src/shared/native-chat-interactive-prompt.ts +++ b/src/shared/native-chat/input/native-chat-interactive-prompt.ts @@ -2,11 +2,11 @@ import { parseNativeChatApprovalEnvelope } from './native-chat-approval-envelope import type { AgentJournalApprovalItem, AgentJournalApprovalSubject -} from './agent-session/journal/agent-session-journal-types' -import { parseAskFromStatus, resolveNativeChatAsk } from './native-chat/input/native-chat-ask' -import type { AskPrompt } from './native-chat/input/native-chat-ask-types' -import type { NativeChatMessage } from './native-chat/native-chat-types' -import { parseOmpPlanReviewPrompt } from './omp-plan-review-prompt' +} from '../../agent-session/journal/agent-session-journal-types' +import { parseAskFromStatus, resolveNativeChatAsk } from './native-chat-ask' +import type { AskPrompt } from './native-chat-ask-types' +import type { NativeChatMessage } from '../native-chat-types' +import { parseOmpPlanReviewPrompt } from '../../omp-plan-review-prompt' export type ChatApproval = { title: string diff --git a/src/shared/native-chat-paste-bytes.test.ts b/src/shared/native-chat/input/native-chat-paste-bytes.test.ts similarity index 100% rename from src/shared/native-chat-paste-bytes.test.ts rename to src/shared/native-chat/input/native-chat-paste-bytes.test.ts diff --git a/src/shared/native-chat-paste-bytes.ts b/src/shared/native-chat/input/native-chat-paste-bytes.ts similarity index 93% rename from src/shared/native-chat-paste-bytes.ts rename to src/shared/native-chat/input/native-chat-paste-bytes.ts index 8879ec20a98..7b9cd53f5f7 100644 --- a/src/shared/native-chat-paste-bytes.ts +++ b/src/shared/native-chat/input/native-chat-paste-bytes.ts @@ -4,8 +4,8 @@ import { sanitizeBracketedPasteText, UNFRAMED_AGENT_INPUT_MAX_BYTES, wrapTerminalBracketedPasteText -} from './terminal-bracketed-paste-text' -import { getTerminalInputByteLength } from './terminal-input' +} from '../../terminal-bracketed-paste-text' +import { getTerminalInputByteLength } from '../../terminal-input' // PTY Enter is carriage return, not newline. const SUBMIT = '\r' diff --git a/src/shared/native-chat-prompt-dismiss-key.test.ts b/src/shared/native-chat/input/native-chat-prompt-dismiss-key.test.ts similarity index 96% rename from src/shared/native-chat-prompt-dismiss-key.test.ts rename to src/shared/native-chat/input/native-chat-prompt-dismiss-key.test.ts index b8447bede95..93023c36ae7 100644 --- a/src/shared/native-chat-prompt-dismiss-key.test.ts +++ b/src/shared/native-chat/input/native-chat-prompt-dismiss-key.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { nativeChatCardDismissKey } from './native-chat-prompt-dismiss-key' -import type { AskQuestion } from './native-chat/input/native-chat-ask-types' +import type { AskQuestion } from './native-chat-ask-types' describe('nativeChatCardDismissKey', () => { it('distinguishes prompts whose later questions or options changed', () => { diff --git a/src/shared/native-chat-prompt-dismiss-key.ts b/src/shared/native-chat/input/native-chat-prompt-dismiss-key.ts similarity index 100% rename from src/shared/native-chat-prompt-dismiss-key.ts rename to src/shared/native-chat/input/native-chat-prompt-dismiss-key.ts diff --git a/src/shared/native-chat-pty-session-options.test.ts b/src/shared/native-chat/input/native-chat-pty-session-options.test.ts similarity index 98% rename from src/shared/native-chat-pty-session-options.test.ts rename to src/shared/native-chat/input/native-chat-pty-session-options.test.ts index f561265a558..8df526b12e0 100644 --- a/src/shared/native-chat-pty-session-options.test.ts +++ b/src/shared/native-chat/input/native-chat-pty-session-options.test.ts @@ -5,13 +5,13 @@ import { seedNativeChatAppliedSessionOptions } from './native-chat-session-option-cache' import { createNativeChatPtySessionOptions } from './native-chat-pty-session-options' -import { mergeDiscoveredAuthoritativeModels } from './agent-session/options/agent-session-option-catalog' -import { GROK_SESSION_OPTION_CATALOG } from './agent-session/options/agent-session-option-catalog-grok' +import { mergeDiscoveredAuthoritativeModels } from '../../agent-session/options/agent-session-option-catalog' +import { GROK_SESSION_OPTION_CATALOG } from '../../agent-session/options/agent-session-option-catalog-grok' import { resolveNativeChatSessionOptionDefaults, updateNativeChatSessionOptionDefaults -} from './native-chat/input/native-chat-session-option-defaults' -import type { PersistedNativeChatSessionOptions } from './native-chat/input/native-chat-session-options' +} from './native-chat-session-option-defaults' +import type { PersistedNativeChatSessionOptions } from './native-chat-session-options' describe('native chat PTY session options', () => { beforeEach(() => clearNativeChatSessionOptionCacheForTests()) diff --git a/src/shared/native-chat-pty-session-options.ts b/src/shared/native-chat/input/native-chat-pty-session-options.ts similarity index 93% rename from src/shared/native-chat-pty-session-options.ts rename to src/shared/native-chat/input/native-chat-pty-session-options.ts index 9ad9313e634..b634e774382 100644 --- a/src/shared/native-chat-pty-session-options.ts +++ b/src/shared/native-chat/input/native-chat-pty-session-options.ts @@ -1,18 +1,18 @@ -import { getAgentSessionOptionCatalog } from './agent-session/options/agent-session-option-catalog' -import type { CatalogModel } from './agent-session/options/agent-session-option-catalog-types' -import type { AgentType } from './agent-status-types' +import { getAgentSessionOptionCatalog } from '../../agent-session/options/agent-session-option-catalog' +import type { CatalogModel } from '../../agent-session/options/agent-session-option-catalog-types' +import type { AgentType } from '../../agent-status-types' import type { SessionOptionDescriptor, SessionOptionsSurface, SessionOptionValue -} from './native-chat/input/native-chat-session-options' -import { recordNativeChatSessionOptionCommand } from './native-chat/input/native-chat-session-option-commands' +} from './native-chat-session-options' +import { recordNativeChatSessionOptionCommand } from './native-chat-session-option-commands' import { applyNativeChatReportedSessionOptions, clearNativeChatSessionModel, createNativeChatSessionOptionRecord, setTrackedSessionOption -} from './native-chat/input/native-chat-session-option-state' +} from './native-chat-session-option-state' import { readNativeChatSessionOptionCache, writeNativeChatSessionOptionCache @@ -23,7 +23,7 @@ import { resolveEffectiveNativeChatModelId, withTrackedNativeChatModel, type NativeChatSessionOptionMode -} from './native-chat/input/native-chat-session-option-snapshot' +} from './native-chat-session-option-snapshot' import type { NativeChatSessionOptionDispatchCommand } from './native-chat-session-option-dispatch' type PersistSelection = (args: { diff --git a/src/shared/native-chat-session-option-apply-failure.ts b/src/shared/native-chat/input/native-chat-session-option-apply-failure.ts similarity index 100% rename from src/shared/native-chat-session-option-apply-failure.ts rename to src/shared/native-chat/input/native-chat-session-option-apply-failure.ts diff --git a/src/shared/native-chat-session-option-apply.ts b/src/shared/native-chat/input/native-chat-session-option-apply.ts similarity index 96% rename from src/shared/native-chat-session-option-apply.ts rename to src/shared/native-chat/input/native-chat-session-option-apply.ts index b71c9084dfb..66ffafaa8f3 100644 --- a/src/shared/native-chat-session-option-apply.ts +++ b/src/shared/native-chat/input/native-chat-session-option-apply.ts @@ -1,25 +1,25 @@ import { findCatalogModel, findCatalogOption -} from './agent-session/options/agent-session-option-catalog' +} from '../../agent-session/options/agent-session-option-catalog' import type { AgentSessionOptionCatalog, CatalogMidSessionApply, CatalogModel, CatalogOptionApply -} from './agent-session/options/agent-session-option-catalog-types' +} from '../../agent-session/options/agent-session-option-catalog-types' import type { SessionOptionDescriptor, SessionOptionSetResult, SessionOptionValue -} from './native-chat/input/native-chat-session-options' -import { buildNativeChatSessionOptionCommand } from './native-chat/input/native-chat-session-option-commands' +} from './native-chat-session-options' +import { buildNativeChatSessionOptionCommand } from './native-chat-session-option-commands' import { flattenNativeChatSessionOptionRecord, getTrackedSessionOption as getTrackedOption, isFlipOnlyMidSession, type NativeChatSessionOptionRecord -} from './native-chat/input/native-chat-session-option-state' +} from './native-chat-session-option-state' import type { NativeChatSessionOptionDispatchCommand, NativeChatSessionOptionDispatchResult @@ -28,7 +28,7 @@ import { SessionOptionApplyError } from './native-chat-session-option-apply-fail import { resolveEffectiveNativeChatModelId, type NativeChatSessionOptionMode -} from './native-chat/input/native-chat-session-option-snapshot' +} from './native-chat-session-option-snapshot' type SessionOptionApplyContext = { mode: NativeChatSessionOptionMode diff --git a/src/shared/native-chat-session-option-cache.ts b/src/shared/native-chat/input/native-chat-session-option-cache.ts similarity index 84% rename from src/shared/native-chat-session-option-cache.ts rename to src/shared/native-chat/input/native-chat-session-option-cache.ts index 549ff0f0a4f..8cca5b4d8b1 100644 --- a/src/shared/native-chat-session-option-cache.ts +++ b/src/shared/native-chat/input/native-chat-session-option-cache.ts @@ -1,12 +1,12 @@ -import type { AgentType } from './agent-status-types' -import type { SessionOptionValue } from './native-chat/input/native-chat-session-options' +import type { AgentType } from '../../agent-status-types' +import type { SessionOptionValue } from './native-chat-session-options' import { cloneNativeChatSessionOptionRecord, createNativeChatSessionOptionRecord, type NativeChatSessionOptionRecord, type TrackedNativeChatSessionOption -} from './native-chat/input/native-chat-session-option-state' -import { setBoundedScopeCacheEntry } from './native-chat/native-chat-scope-cache' +} from './native-chat-session-option-state' +import { setBoundedScopeCacheEntry } from '../native-chat-scope-cache' const sessionOptionCache = new Map() diff --git a/src/shared/native-chat-session-option-dispatch.ts b/src/shared/native-chat/input/native-chat-session-option-dispatch.ts similarity index 89% rename from src/shared/native-chat-session-option-dispatch.ts rename to src/shared/native-chat/input/native-chat-session-option-dispatch.ts index 433ff96058c..55d40441a44 100644 --- a/src/shared/native-chat-session-option-dispatch.ts +++ b/src/shared/native-chat/input/native-chat-session-option-dispatch.ts @@ -1,7 +1,7 @@ import type { CatalogAgentInteractionDetection, CatalogCommandDelivery -} from './agent-session/options/agent-session-option-catalog-types' +} from '../../agent-session/options/agent-session-option-catalog-types' export type ClaudeModelSwitchOutcome = 'applied' | 'rejected' | 'unknown' diff --git a/src/shared/native-chat-session-option-labels.ts b/src/shared/native-chat/input/native-chat-session-option-labels.ts similarity index 99% rename from src/shared/native-chat-session-option-labels.ts rename to src/shared/native-chat/input/native-chat-session-option-labels.ts index a2fdbab2ea3..ea3e08a5b14 100644 --- a/src/shared/native-chat-session-option-labels.ts +++ b/src/shared/native-chat/input/native-chat-session-option-labels.ts @@ -3,7 +3,7 @@ import { type SessionOptionDescriptor, type SessionOptionDisabledReason, type SessionOptionSelectChoice -} from './native-chat/input/native-chat-session-options' +} from './native-chat-session-options' // English pieces for the session option pickers; desktop translates each one, mobile shows them as is. export const NATIVE_CHAT_SESSION_OPTION_COPY = { diff --git a/src/shared/native-chat-skill-visibility.test.ts b/src/shared/native-chat/input/native-chat-skill-visibility.test.ts similarity index 97% rename from src/shared/native-chat-skill-visibility.test.ts rename to src/shared/native-chat/input/native-chat-skill-visibility.test.ts index 01942b4674f..94983c29d5c 100644 --- a/src/shared/native-chat-skill-visibility.test.ts +++ b/src/shared/native-chat/input/native-chat-skill-visibility.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { DiscoveredSkill, SkillDiscoveryResult } from './skills' +import type { DiscoveredSkill, SkillDiscoveryResult } from '../../skills' import { isNativeChatSkillForAgent } from './native-chat-skill-visibility' function skill(overrides: Partial): DiscoveredSkill { diff --git a/src/shared/native-chat-skill-visibility.ts b/src/shared/native-chat/input/native-chat-skill-visibility.ts similarity index 76% rename from src/shared/native-chat-skill-visibility.ts rename to src/shared/native-chat/input/native-chat-skill-visibility.ts index 8b302ec4379..735e2cdffa6 100644 --- a/src/shared/native-chat-skill-visibility.ts +++ b/src/shared/native-chat/input/native-chat-skill-visibility.ts @@ -1,17 +1,14 @@ -import type { AgentType } from './agent-status-types' -import type { AgentSessionSlashCommand } from './agent-session/agent-session-wire' -import type { DiscoveredSkill, SkillDiscoveryResult } from './skills' -import { - getNativeChatAgentProfile, - readsSkillSource -} from './native-chat/native-chat-agent-profiles' -import { classifyPickerCommands } from './native-chat/input/native-chat-picker-items' +import type { AgentType } from '../../agent-status-types' +import type { AgentSessionSlashCommand } from '../../agent-session/agent-session-wire' +import type { DiscoveredSkill, SkillDiscoveryResult } from '../../skills' +import { getNativeChatAgentProfile, readsSkillSource } from '../native-chat-agent-profiles' +import { classifyPickerCommands } from './native-chat-picker-items' import { sessionReportedSkills, type NativeChatSessionSkill, type SlashCommandSuggestion -} from './native-chat/input/native-chat-slash-commands' -import { isStructuredAgentSessionComposerCommand } from './agent-session/view/structured-agent-session-composer' +} from './native-chat-slash-commands' +import { isStructuredAgentSessionComposerCommand } from '../../agent-session/view/structured-agent-session-composer' export function isNativeChatSkillForAgent( agent: AgentType, diff --git a/src/shared/native-chat-availability.ts b/src/shared/native-chat/native-chat-availability.ts similarity index 91% rename from src/shared/native-chat-availability.ts rename to src/shared/native-chat/native-chat-availability.ts index 57dce73306e..43e38304443 100644 --- a/src/shared/native-chat-availability.ts +++ b/src/shared/native-chat/native-chat-availability.ts @@ -1,10 +1,10 @@ -import type { Tab } from './tab-types' -import type { TuiAgent } from './tui-agent' -import type { AgentType } from './agent-status-types' +import type { Tab } from '../tab-types' +import type { TuiAgent } from '../tui-agent' +import type { AgentType } from '../agent-status-types' import { isNativeChatSupportedAgent, nativeChatRequiresLocalTranscript -} from './native-chat/native-chat-agent-support' +} from './native-chat-agent-support' /** Resolve launched/detected identity from the tab and status before applying this pure toggle policy. */ export type NativeChatAvailabilityInput = { diff --git a/src/shared/native-chat-image-label.ts b/src/shared/native-chat/native-chat-image-label.ts similarity index 80% rename from src/shared/native-chat-image-label.ts rename to src/shared/native-chat/native-chat-image-label.ts index bcfe6ad373f..f70b9680bc1 100644 --- a/src/shared/native-chat-image-label.ts +++ b/src/shared/native-chat/native-chat-image-label.ts @@ -1,6 +1,6 @@ -import { AGENT_SESSION_PASTED_IMAGE_SUFFIX_SOURCE } from './agent-session/agent-session-attachments' -import { getRuntimePathBasename } from './cross-platform-path' -import type { NativeChatImageRefBlock } from './native-chat/native-chat-types' +import { AGENT_SESSION_PASTED_IMAGE_SUFFIX_SOURCE } from '../agent-session/agent-session-attachments' +import { getRuntimePathBasename } from '../cross-platform-path' +import type { NativeChatImageRefBlock } from './native-chat-types' export type NativeChatImageLabelCopy = { pastedImage: string diff --git a/src/shared/native-chat/native-chat-live-status.ts b/src/shared/native-chat/native-chat-live-status.ts index 76120ec9df0..1007bddf19a 100644 --- a/src/shared/native-chat/native-chat-live-status.ts +++ b/src/shared/native-chat/native-chat-live-status.ts @@ -8,7 +8,7 @@ import type { NativeChatSessionStatus, NativeChatTurnLifecycle } from './native-chat-types' -import { LIFECYCLE_CLOCK_SKEW_SLACK_MS } from '../native-chat-clock-skew' +import { LIFECYCLE_CLOCK_SKEW_SLACK_MS } from './transcript/native-chat-clock-skew' export type NativeChatLiveMergeInput = { /** Already deduped, ordered, and transcript-normalized by the live assembler. */ diff --git a/src/shared/native-chat-clock-skew.ts b/src/shared/native-chat/transcript/native-chat-clock-skew.ts similarity index 100% rename from src/shared/native-chat-clock-skew.ts rename to src/shared/native-chat/transcript/native-chat-clock-skew.ts diff --git a/src/shared/native-chat-continuation-send.ts b/src/shared/native-chat/transcript/native-chat-continuation-send.ts similarity index 69% rename from src/shared/native-chat-continuation-send.ts rename to src/shared/native-chat/transcript/native-chat-continuation-send.ts index 30b39514797..72cd0ac7a35 100644 --- a/src/shared/native-chat-continuation-send.ts +++ b/src/shared/native-chat/transcript/native-chat-continuation-send.ts @@ -1,4 +1,4 @@ -import { normalizeNativeChatUserText } from './native-chat/transcript/native-chat-image-transcript-markers' +import { normalizeNativeChatUserText } from './native-chat-image-transcript-markers' // Agent TUIs may consume the final backslash and join the next send into this turn. export function nativeChatContinuationSendText(text: string): string | null { diff --git a/src/shared/native-chat-launch-draft-resolution.test.ts b/src/shared/native-chat/transcript/native-chat-launch-draft-resolution.test.ts similarity index 96% rename from src/shared/native-chat-launch-draft-resolution.test.ts rename to src/shared/native-chat/transcript/native-chat-launch-draft-resolution.test.ts index d80631f3f97..94ad4a3dde9 100644 --- a/src/shared/native-chat-launch-draft-resolution.test.ts +++ b/src/shared/native-chat/transcript/native-chat-launch-draft-resolution.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from './native-chat/native-chat-types' +import type { NativeChatMessage } from '../native-chat-types' import { launchDraftResolvedByTranscript } from './native-chat-launch-draft-resolution' function userMessage(id: string, text: string): NativeChatMessage { diff --git a/src/shared/native-chat-launch-draft-resolution.ts b/src/shared/native-chat/transcript/native-chat-launch-draft-resolution.ts similarity index 95% rename from src/shared/native-chat-launch-draft-resolution.ts rename to src/shared/native-chat/transcript/native-chat-launch-draft-resolution.ts index 73cb39010aa..c02d5e8ed13 100644 --- a/src/shared/native-chat-launch-draft-resolution.ts +++ b/src/shared/native-chat/transcript/native-chat-launch-draft-resolution.ts @@ -1,4 +1,4 @@ -import type { NativeChatMessage } from './native-chat/native-chat-types' +import type { NativeChatMessage } from '../native-chat-types' import { LIFECYCLE_CLOCK_SKEW_SLACK_MS } from './native-chat-clock-skew' /** A new tail turn proves resolution without timestamps; older-history prepends cannot advance it. */ diff --git a/src/shared/native-chat-live-turn-membership.ts b/src/shared/native-chat/transcript/native-chat-live-turn-membership.ts similarity index 86% rename from src/shared/native-chat-live-turn-membership.ts rename to src/shared/native-chat/transcript/native-chat-live-turn-membership.ts index a3df74f2fdd..e1e2198b173 100644 --- a/src/shared/native-chat-live-turn-membership.ts +++ b/src/shared/native-chat/transcript/native-chat-live-turn-membership.ts @@ -1,5 +1,5 @@ -import type { NativeChatRole } from './native-chat/native-chat-types' -import type { AgentJournalTurnScope } from './agent-session/journal/agent-session-journal-turn-scope' +import type { NativeChatRole } from '../native-chat-types' +import type { AgentJournalTurnScope } from '../../agent-session/journal/agent-session-journal-turn-scope' export function unresolvedNativeChatRowIds( messages: readonly { id: string }[], diff --git a/src/shared/native-chat-message-copy-text.test.ts b/src/shared/native-chat/transcript/native-chat-message-copy-text.test.ts similarity index 85% rename from src/shared/native-chat-message-copy-text.test.ts rename to src/shared/native-chat/transcript/native-chat-message-copy-text.test.ts index 526f6054552..27e48226023 100644 --- a/src/shared/native-chat-message-copy-text.test.ts +++ b/src/shared/native-chat/transcript/native-chat-message-copy-text.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest' import { nativeChatMessageCopyText } from './native-chat-message-copy-text' -import { subagentGroupFallbackText } from './native-chat/transcript/native-chat-subagent-summary' -import type { NativeChatSubagentEntry } from './native-chat/native-chat-types' +import { subagentGroupFallbackText } from './native-chat-subagent-summary' +import type { NativeChatSubagentEntry } from '../native-chat-types' describe('nativeChatMessageCopyText', () => { it('leaves out the roster twin a drawn subagent group replaces', () => { diff --git a/src/shared/native-chat-message-copy-text.ts b/src/shared/native-chat/transcript/native-chat-message-copy-text.ts similarity index 54% rename from src/shared/native-chat-message-copy-text.ts rename to src/shared/native-chat/transcript/native-chat-message-copy-text.ts index e80682c268a..3ea8921a02a 100644 --- a/src/shared/native-chat-message-copy-text.ts +++ b/src/shared/native-chat/transcript/native-chat-message-copy-text.ts @@ -1,7 +1,7 @@ -import type { NativeChatMessage } from './native-chat/native-chat-types' -import { deriveNativeChatRowContent } from './native-chat/transcript/native-chat-row-content' -import { nativeChatBlocksInOwnWords } from './native-chat/native-chat-stopped-before-start' -import { withoutNativeChatVisualDirectiveLines } from './native-chat/native-chat-visual-directive' +import type { NativeChatMessage } from '../native-chat-types' +import { deriveNativeChatRowContent } from './native-chat-row-content' +import { nativeChatBlocksInOwnWords } from '../native-chat-stopped-before-start' +import { withoutNativeChatVisualDirectiveLines } from '../native-chat-visual-directive' /** What a message's Copy action copies: its words, less any agent visual lines. */ export function nativeChatMessageCopyText( diff --git a/src/shared/native-chat-pending-occurrence.test.ts b/src/shared/native-chat/transcript/native-chat-pending-occurrence.test.ts similarity index 97% rename from src/shared/native-chat-pending-occurrence.test.ts rename to src/shared/native-chat/transcript/native-chat-pending-occurrence.test.ts index c39548950b0..79ff232a823 100644 --- a/src/shared/native-chat-pending-occurrence.test.ts +++ b/src/shared/native-chat/transcript/native-chat-pending-occurrence.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from './native-chat/native-chat-types' +import type { NativeChatMessage } from '../native-chat-types' import { assignNativeChatPendingOccurrence } from './native-chat-pending-occurrence' import { pendingSendsAsMessages, diff --git a/src/shared/native-chat-pending-occurrence.ts b/src/shared/native-chat/transcript/native-chat-pending-occurrence.ts similarity index 98% rename from src/shared/native-chat-pending-occurrence.ts rename to src/shared/native-chat/transcript/native-chat-pending-occurrence.ts index 2aebc36b722..3d1b124c00b 100644 --- a/src/shared/native-chat-pending-occurrence.ts +++ b/src/shared/native-chat/transcript/native-chat-pending-occurrence.ts @@ -2,8 +2,8 @@ import { nativeChatContinuationSendText } from './native-chat-continuation-send' import { normalizeNativeChatUserText, normalizedNativeChatUserMessageText -} from './native-chat/transcript/native-chat-image-transcript-markers' -import { isImageRefBlock, type NativeChatMessage } from './native-chat/native-chat-types' +} from './native-chat-image-transcript-markers' +import { isImageRefBlock, type NativeChatMessage } from '../native-chat-types' export type NativeChatPendingOccurrence = { text: string diff --git a/src/shared/native-chat-pending-pasted-content.test.ts b/src/shared/native-chat/transcript/native-chat-pending-pasted-content.test.ts similarity index 94% rename from src/shared/native-chat-pending-pasted-content.test.ts rename to src/shared/native-chat/transcript/native-chat-pending-pasted-content.test.ts index 362278cc80f..551cadd274a 100644 --- a/src/shared/native-chat-pending-pasted-content.test.ts +++ b/src/shared/native-chat/transcript/native-chat-pending-pasted-content.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from './native-chat/native-chat-types' +import type { NativeChatMessage } from '../native-chat-types' import { pendingSendsAsMessages, prunePendingSends } from './native-chat-pending-sends' const prompt = 'Summarize the failing tests.\n\nThen propose a fix for each one.' diff --git a/src/shared/native-chat-pending-sends.test.ts b/src/shared/native-chat/transcript/native-chat-pending-sends.test.ts similarity index 99% rename from src/shared/native-chat-pending-sends.test.ts rename to src/shared/native-chat/transcript/native-chat-pending-sends.test.ts index 090140bf856..ff07a8225e4 100644 --- a/src/shared/native-chat-pending-sends.test.ts +++ b/src/shared/native-chat/transcript/native-chat-pending-sends.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from './native-chat/native-chat-types' +import type { NativeChatMessage } from '../native-chat-types' import { pendingSendsAsMessages, prunePendingSends, diff --git a/src/shared/native-chat-pending-sends.ts b/src/shared/native-chat/transcript/native-chat-pending-sends.ts similarity index 99% rename from src/shared/native-chat-pending-sends.ts rename to src/shared/native-chat/transcript/native-chat-pending-sends.ts index 1f06176b4f4..c595e82ff13 100644 --- a/src/shared/native-chat-pending-sends.ts +++ b/src/shared/native-chat/transcript/native-chat-pending-sends.ts @@ -1,5 +1,5 @@ import { nativeChatContinuationSendText } from './native-chat-continuation-send' -import type { NativeChatMessage } from './native-chat/native-chat-types' +import type { NativeChatMessage } from '../native-chat-types' import { advancedNativeChatUserContentCounts, advancedNativeChatUserRows, diff --git a/src/shared/native-chat/transcript/native-chat-turn-membership.test.ts b/src/shared/native-chat/transcript/native-chat-turn-membership.test.ts index a277154be54..13b83285e31 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-membership.test.ts +++ b/src/shared/native-chat/transcript/native-chat-turn-membership.test.ts @@ -11,7 +11,7 @@ import type { import type { AgentJournalTurnScope } from '../../agent-session/journal/agent-session-journal-turn-scope' import { nativeChatRowsInDrawOrder } from './native-chat-turn-grouping' import { nativeChatTurnMembership, structuredAgentTurnAnchors } from './native-chat-turn-membership' -import { isNativeChatRowInLiveWorkingTurn } from '../../native-chat-live-turn-membership' +import { isNativeChatRowInLiveWorkingTurn } from './native-chat-live-turn-membership' import { isAgentSessionRewindTarget } from '../../agent-session/lifecycle/agent-session-rewind' import { readAgentJournalTurn } from '../../agent-session/lifecycle/agent-session-turn-record' import type { NativeChatRole } from '../native-chat-types' diff --git a/src/shared/native-chat/transcript/native-chat-turn-membership.ts b/src/shared/native-chat/transcript/native-chat-turn-membership.ts index b7a49c7cccd..b44049d79ad 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-membership.ts +++ b/src/shared/native-chat/transcript/native-chat-turn-membership.ts @@ -1,7 +1,7 @@ import { unresolvedNativeChatRowIds, newestNativeChatUserTurnKey -} from '../../native-chat-live-turn-membership' +} from './native-chat-live-turn-membership' // Share desktop/mobile keys anchored on the opening user entry or provider-resumed turn record. // Explicit conversation/missing-turn scopes own no turn; legacy hosts fall back to journal order, then position. diff --git a/src/shared/structured-agent-question-card.ts b/src/shared/structured-agent-question-card.ts index e366c5386d5..3c98b68c5f2 100644 --- a/src/shared/structured-agent-question-card.ts +++ b/src/shared/structured-agent-question-card.ts @@ -3,9 +3,9 @@ import type { AgentJournalQuestion } from './agent-session/journal/agent-session-journal-types' import type { AgentSessionQuestionAnswer } from './agent-session/agent-session-question-answer' -import type { AskAnswerSelection } from './native-chat-ask-answer' +import type { AskAnswerSelection } from './native-chat/input/native-chat-ask-answer' import type { AskPrompt } from './native-chat/input/native-chat-ask-types' -import { askTypedText } from './native-chat-ask-card-rules' +import { askTypedText } from './native-chat/input/native-chat-ask-card-rules' /** A structured prompt drawn with the same stepped card as a terminal ask. */ type StructuredQuestionCard = { diff --git a/tests/e2e/native-chat-ssh-delivery.unit.test.ts b/tests/e2e/native-chat-ssh-delivery.unit.test.ts index edfd5435eb8..68b44f3e733 100644 --- a/tests/e2e/native-chat-ssh-delivery.unit.test.ts +++ b/tests/e2e/native-chat-ssh-delivery.unit.test.ts @@ -12,7 +12,7 @@ import { sendNativeChatMessageVerified, resetNativeChatPtySendQueuesForTests } from '../../src/renderer/src/components/native-chat/native-chat-runtime-send' -import { buildAskAnswerKeys } from '../../src/shared/native-chat-ask-answer' +import { buildAskAnswerKeys } from '../../src/shared/native-chat/input/native-chat-ask-answer' import { sendRuntimePtyInputVerified } from '@/runtime/runtime-terminal-verified-input' import { RpcDispatcher } from '../../src/main/runtime/rpc/dispatcher' import { TERMINAL_METHODS } from '../../src/main/runtime/rpc/methods/terminal'