From 574cea7ee54debf4e6e696f24f122d75124f672c Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sat, 14 Nov 2026 03:04:59 -0800 Subject: [PATCH] refactor(native-chat): group transcript and input modules by owner (#42362) --- .../native-chat-fold-benchmark.mjs | 2 +- .../__mocks__/mobile-prompt-controller.ts | 2 +- .../native-chat/MobileNativeChatOverlay.tsx | 2 +- .../native-chat/MobileNativeChatView.tsx | 8 +- ...obile-structured-agent-session-contract.ts | 4 +- .../composer/MobileNativeChatComposer.tsx | 4 +- .../composer/MobileNativeChatComposerMenu.tsx | 2 +- .../MobileNativeChatComposerSendSlot.tsx | 2 +- .../composer/MobileNativeChatSendButton.tsx | 4 +- .../mobile-native-chat-composer-menu.ts | 8 +- .../mobile-native-chat-composer-paste.ts | 4 +- .../mobile-native-chat-draft-reconcile.ts | 6 +- .../composer/mobile-native-chat-image-send.ts | 2 +- .../mobile-native-chat-send-classification.ts | 2 +- ...e-mobile-native-chat-composer-goal-mode.ts | 2 +- .../use-mobile-native-chat-composer-menu.ts | 6 +- .../use-mobile-native-chat-composer-tray.ts | 2 +- .../composer/use-mobile-native-chat-drafts.ts | 2 +- ...se-mobile-native-chat-launch-draft-seed.ts | 4 +- .../composer/use-mobile-native-chat-skills.ts | 4 +- ...-mobile-native-chat-steer-chord-preview.ts | 4 +- ...ile-native-chat-steer-chord-preview.web.ts | 2 +- .../composer/use-mobile-native-chat-stop.ts | 2 +- ...bile-structured-native-chat-send-bridge.ts | 2 +- .../MobileNativeChatAsk.previews.test.tsx | 2 +- .../native-chat/input/MobileNativeChatAsk.tsx | 6 +- .../input/MobileNativeChatDockedTaskList.tsx | 2 +- .../MobileNativeChatOptionPreviewSheet.tsx | 2 +- .../input/MobileNativeChatPromptCard.tsx | 4 +- .../MobileNativeChatSessionOptionPickers.tsx | 4 +- .../MobileNativeChatSessionOptionRows.tsx | 4 +- .../MobileNativeChatSessionOptionSegments.tsx | 2 +- .../input/MobileNativeChatTaskList.tsx | 2 +- ...obile-native-chat-session-option-labels.ts | 2 +- .../mobile-queued-message-composer-context.ts | 2 +- .../mobile-structured-queued-message-cards.ts | 2 +- .../input/native-chat-session-option-copy.ts | 2 +- .../use-mobile-native-chat-answer-send.ts | 10 +- ...use-mobile-native-chat-ask-auto-advance.ts | 2 +- .../use-mobile-native-chat-ask-dismiss.ts | 2 +- .../use-mobile-native-chat-model-discovery.ts | 2 +- ...se-mobile-native-chat-prompt-controller.ts | 4 +- .../use-mobile-native-chat-prompt-dismiss.ts | 2 +- ...e-mobile-native-chat-prompt-input-owner.ts | 2 +- .../input/use-mobile-native-chat-prompts.ts | 4 +- .../use-mobile-native-chat-session-options.ts | 6 +- .../use-mobile-structured-async-question.ts | 6 +- ...use-mobile-structured-held-option-picks.ts | 2 +- .../mobile-native-chat-controller-contract.ts | 12 +- .../mobile-native-chat-eligibility.ts | 2 +- .../mobile-native-chat-unsent-notices.ts | 2 +- .../mobile-native-chat-host-preference.ts | 2 +- ...use-mobile-native-chat-queue-follow-ups.ts | 2 +- .../MobileNativeChatAwaitingInputRow.tsx | 2 +- .../MobileNativeChatBackgroundTaskRun.tsx | 2 +- .../MobileNativeChatLiveLine.android.test.ts | 2 +- .../transcript/MobileNativeChatLiveLine.tsx | 2 +- .../transcript/MobileNativeChatMessage.tsx | 12 +- .../MobileNativeChatMessageMeta.tsx | 2 +- .../MobileNativeChatMessageTime.tsx | 2 +- .../transcript/MobileNativeChatPacedProse.tsx | 2 +- .../MobileNativeChatReasoningRow.tsx | 4 +- .../MobileNativeChatSubagentGroup.tsx | 8 +- .../transcript/MobileNativeChatToolRun.tsx | 2 +- .../transcript/MobileNativeChatTurnStatus.tsx | 2 +- .../MobileNativeChatUserMessageFold.tsx | 2 +- .../mobile-native-chat-display-copy.ts | 2 +- ...bile-native-chat-markdown-image-sources.ts | 2 +- .../mobile-native-chat-pending-echo.ts | 4 +- .../mobile-native-chat-projection-tail.ts | 6 +- .../mobile-native-chat-projection.ts | 6 +- .../mobile-native-chat-render-data.ts | 8 +- .../mobile-native-chat-reply-reveals.ts | 2 +- .../mobile-native-chat-run-descriptors.ts | 2 +- .../mobile-native-chat-transcript-store.ts | 2 +- .../native-chat-subagent-group-copy.ts | 2 +- .../native-chat-turn-status-copy.ts | 2 +- ...ile-native-chat-generated-image-answers.ts | 4 +- .../use-mobile-native-chat-message-send.ts | 4 +- .../use-mobile-native-chat-paced-text.ts | 2 +- .../use-mobile-native-chat-readability.ts | 2 +- .../use-mobile-native-chat-row-props.ts | 4 +- .../use-mobile-native-chat-row-renderer.tsx | 4 +- .../use-mobile-native-chat-terminal-turn.ts | 4 +- .../use-mobile-native-chat-transcript-rows.ts | 6 +- .../use-mobile-native-chat-transient-data.ts | 2 +- .../use-mobile-native-chat-turn-diffs.ts | 2 +- ...tive-chat-turn-disclosure-journal.test.tsx | 2 +- ...tive-chat-turn-disclosure.test-fixture.tsx | 4 +- ...obile-native-chat-turn-disclosure.test.tsx | 2 +- .../use-mobile-native-chat-turn-disclosure.ts | 14 +-- .../use-mobile-native-chat-turn-status.ts | 2 +- ...use-mobile-structured-agent-turn-timing.ts | 4 +- .../use-mobile-structured-transcript.ts | 4 +- .../use-mobile-structured-turn-indicator.ts | 6 +- ...se-mobile-native-chat-active-resolution.ts | 2 +- .../use-mobile-native-chat-controller.ts | 2 +- .../use-mobile-native-chat-fork.ts | 2 +- .../use-mobile-native-chat-session.ts | 2 +- .../acp/acp-dialects/grok-background-tasks.ts | 2 +- src/main/acp/history/acp-history-catch-up.ts | 2 +- .../acp-background-task-child-work.ts | 2 +- .../timeline/acp-background-task-timeline.ts | 2 +- src/main/acp/timeline/acp-subagents.ts | 2 +- .../claude-background-task-memory.ts | 2 +- .../claude-background-task-roster.ts | 2 +- .../claude-background-task-row-journal.ts | 2 +- .../claude-background-task-row-lifecycle.ts | 2 +- .../claude-background-task-rows.ts | 2 +- .../claude-background-task-start.ts | 2 +- .../journal/claude-structured-prompt-items.ts | 2 +- .../claude-subagent-journaled-identities.ts | 2 +- .../codex-subagent-executions.ts | 2 +- .../codex-generated-image-answer.test.ts | 2 +- ...tructured-journal-subagent-readers.test.ts | 2 +- .../item-lifecycle/journal-subagent-item.ts | 4 +- .../journal-subagent-liveness.ts | 6 +- ...rovider-timeline-assembler-test-support.ts | 2 +- .../provider-timeline-background-tasks.ts | 2 +- .../structured-agent-session-fork-snapshot.ts | 6 +- ...ssion-restart-interruption-test-harness.ts | 2 +- .../providers/provider-frame-activity.ts | 2 +- .../agent-session-history-page-bounds.ts | 2 +- .../agent-session-history-subagent-roster.ts | 2 +- .../paste-files/native-chat-paste-files.ts | 2 +- .../transcript-line-decoders-claude.ts | 2 +- .../runtime-native-chat-preference-events.ts | 2 +- .../settings/runtime-client-settings.ts | 4 +- ...worker-transcript-activity-block-bounds.ts | 4 +- .../agent-launch/agent-launch-surfaces.ts | 2 +- .../native-chat-rpc-block-sanitize.ts | 2 +- .../placement/worker-placement-topology.ts | 2 +- .../structured-agent-session-create.ts | 2 +- .../structured-session-create-support.ts | 2 +- .../terminal/output/startup-dialog-screen.ts | 2 +- .../agent-launch-picker-cli-model-catalog.ts | 2 +- .../agent/agent-launch-picker-host-reads.ts | 2 +- .../annotate/use-browser-annotation-images.ts | 2 +- .../runs/NativeChatResumeRunStatusIcon.tsx | 2 +- .../runs/NativeChatResumeRunSummary.tsx | 2 +- .../native-chat/NativeChatMessageList.tsx | 6 +- .../native-chat/NativeChatResolvedView.tsx | 2 +- .../NativeChatStructuredSession.tsx | 2 +- ...NativeChatComposer.resume-command.test.tsx | 2 +- .../controls/NativeChatComposerActions.tsx | 4 +- .../native-chat-composer-placeholder.ts | 2 +- .../use-native-chat-steer-chord-preview.ts | 4 +- .../editor/NativeChatComposerField.tsx | 8 +- .../use-native-chat-composer-keydown.ts | 4 +- .../pickers/NativeChatAutocompleteMenus.tsx | 4 +- .../pickers/native-chat-picker-empty-text.ts | 2 +- .../use-native-chat-composer-catalog.ts | 4 +- ...use-native-chat-picker-command-dispatch.ts | 4 +- .../pickers/use-native-chat-picker-state.ts | 10 +- .../use-native-chat-preferred-suggestion.ts | 4 +- .../pickers/use-native-chat-resume-command.ts | 4 +- .../use-native-chat-side-chat-command.ts | 6 +- .../pickers/use-native-chat-skills.ts | 2 +- .../submit/native-chat-composer-send-state.ts | 2 +- ...ative-chat-structured-composer-dispatch.ts | 2 +- ...tive-chat-structured-composer-transport.ts | 2 +- .../use-native-chat-composer-submit.test.tsx | 2 +- .../submit/use-native-chat-composer-submit.ts | 2 +- .../use-native-chat-pty-composer-send.ts | 4 +- .../native-chat-conversation-projection.ts | 4 +- .../native-chat-message-list-projection.ts | 8 +- .../native-chat-message-list-reuse.ts | 8 +- .../native-chat-message-list-turns.ts | 2 +- .../native-chat-message-list-units.ts | 4 +- .../native-chat-compaction-visibility.test.ts | 4 +- .../slots/native-chat-transcript-input.ts | 4 +- .../native-chat-transcript-slot-selection.ts | 2 +- .../native-chat-transcript-slots.test.ts | 2 +- .../slots/native-chat-transcript-slots.ts | 14 +-- .../slots/use-native-chat-transcript-slots.ts | 4 +- .../slots/use-native-chat-turn-membership.ts | 4 +- .../turns/NativeChatWorkingStatus.tsx | 2 +- .../turns/use-native-chat-elapsed-seconds.ts | 2 +- .../use-native-chat-terminal-turn-timing.ts | 2 +- .../turns/use-native-chat-turn-status.ts | 2 +- .../turns/use-structured-agent-turn-timing.ts | 2 +- .../drafts/native-chat-sent-prompt-history.ts | 6 +- .../use-native-chat-launch-draft-adoption.ts | 2 +- .../use-native-chat-terminal-draft-pickup.ts | 4 +- .../native-chat-markdown-image-sources.ts | 2 +- .../markdown/native-chat-reply-reveals.ts | 2 +- ...se-native-chat-paced-text.remount.test.tsx | 2 +- .../markdown/use-native-chat-paced-text.ts | 2 +- .../actions/native-chat-message-copy-text.ts | 2 +- .../actions/use-native-chat-reveal-latest.ts | 2 +- .../reasoning/NativeChatReasoningRow.tsx | 2 +- .../reasoning/NativeChatTurnActivityLine.tsx | 6 +- .../rows/NativeChatAgentMessageCard.test.tsx | 4 +- .../rows/NativeChatAssistantMessageRow.tsx | 2 +- .../messages/rows/NativeChatMessageRow.tsx | 2 +- .../rows/NativeChatMessageTimestamp.tsx | 2 +- .../messages/rows/NativeChatTranscriptRow.tsx | 2 +- .../rows/NativeChatUserMessageFold.tsx | 2 +- .../rows/NativeChatUserMessageRow.tsx | 2 +- .../rows/native-chat-message-row-words.ts | 4 +- .../use-native-chat-toggle-shortcut.ts | 2 +- .../paste/native-chat-clipboard-payload.ts | 2 +- .../paste/native-chat-image-paste.ts | 2 +- .../paste/use-native-chat-composer-paste.ts | 2 +- .../paste/use-native-chat-pasted-text-file.ts | 4 +- .../prompts/NativeChatAwaitingInputRow.tsx | 2 +- .../prompts/NativeChatInteractiveCard.tsx | 2 +- .../prompts/NativeChatQuestionCard.test.tsx | 2 +- .../prompts/NativeChatQuestionCard.tsx | 6 +- .../NativeChatStructuredAsyncQuestion.tsx | 8 +- ...use-native-chat-interactive-prompt-card.ts | 2 +- ...se-native-chat-prompt-card-presentation.ts | 2 +- .../use-native-chat-question-auto-advance.ts | 2 +- .../editing/native-chat-queued-edit-draft.ts | 2 +- .../native-chat-queued-edit-session.ts | 2 +- .../use-native-chat-composer-edit-session.ts | 2 +- .../native-chat-session-option-discovery.ts | 2 +- .../native-chat-session-option-enrichment.ts | 2 +- .../native-chat-session-option-snapshot.ts | 4 +- .../controls/NativeChatModelCombobox.tsx | 2 +- .../NativeChatSessionOptionPickers.tsx | 4 +- .../controls/NativeChatSessionOptionRows.tsx | 6 +- .../controls/NativeChatSessionSpeedButton.tsx | 4 +- ...ve-chat-session-option-apply-error-text.ts | 2 +- .../native-chat-session-option-labels-text.ts | 2 +- ...native-chat-session-option-surface-call.ts | 2 +- ...ed-session-option-defaults.test-fixture.ts | 2 +- .../claude-model-switch-confirmation.ts | 4 +- .../use-native-chat-local-command-answer.ts | 2 +- .../use-native-chat-session-option-command.ts | 2 +- .../use-native-chat-session-options.ts | 6 +- ...uctured-agent-session-message-hand-back.ts | 2 +- ...tructured-agent-session-transport-state.ts | 2 +- .../use-structured-agent-session.ts | 6 +- .../native-chat-incremental-assembler.ts | 4 +- .../native-chat-live-message-preparation.ts | 2 +- .../native-chat-message-grouping.test.ts | 2 +- .../assembly/native-chat-session-assembler.ts | 4 +- .../terminal/delivery/native-chat-pending.ts | 4 +- .../use-native-chat-pending-delivery.ts | 2 +- .../read/use-native-chat-retained-session.ts | 2 +- .../send/native-chat-runtime-image-send.ts | 4 +- .../terminal/send/native-chat-runtime-send.ts | 6 +- .../send/use-native-chat-interactive-send.ts | 4 +- .../subagents/NativeChatSubagentHead.tsx | 2 +- .../subagents/NativeChatSubagentRun.tsx | 8 +- .../subagents/NativeChatSubagentStatusBar.tsx | 4 +- .../subagents/NativeChatSubagentViewBar.tsx | 4 +- .../subagents/native-chat-subagent-ending.ts | 2 +- .../native-chat-subagent-group-words-text.ts | 2 +- .../subagents/native-chat-subagent-scope.ts | 2 +- .../native-chat-subagent-switcher-items.ts | 2 +- .../use-native-chat-subagent-scope.tsx | 2 +- .../tools/runs/NativeChatToolRun.tsx | 4 +- .../tools/runs/native-chat-tool-run-rows.ts | 2 +- .../tools/runs/use-native-chat-work-run.tsx | 2 +- .../NativeChatBackgroundTaskRun.test.tsx | 2 +- .../tasks/NativeChatBackgroundTaskRun.tsx | 2 +- .../tools/tasks/NativeChatDockedTaskList.tsx | 2 +- .../tools/tasks/NativeChatTaskList.tsx | 2 +- .../native-chat-row-height-estimate.test.ts | 4 +- .../native-chat-row-height-estimate.ts | 8 +- .../settings/chat/ChatBehaviorSetting.tsx | 2 +- .../sidebar/comment-markdown-word-fade.ts | 2 +- .../tab-bar/use-tab-bar-runtime-model.ts | 2 +- .../clipboard/terminal-clipboard-paste.ts | 2 +- .../host-state/terminal-pane-host-state.ts | 2 +- .../PendingNativeChatCreation.tsx | 2 +- .../use-pending-native-chat-options.ts | 2 +- .../launch/pane/agent-launch-through-host.ts | 2 +- .../prompt/agent-launch-prompt-delivery.ts | 2 +- .../routing/agent-launch-route-input.ts | 2 +- ...structured-agent-session-host-admission.ts | 2 +- ...red-agent-session-launch-create-message.ts | 2 +- .../structured-agent-session-launch-intent.ts | 2 +- ...ctured-agent-session-launch-persistence.ts | 2 +- ...ured-agent-session-launch-prerequisites.ts | 2 +- .../worktree-default-terminal-tabs.ts | 2 +- .../worktree-initial-terminal-seeding.ts | 2 +- .../creation/worktree-creation-agent-seeds.ts | 2 +- .../agent-launch-default-choices.test.ts | 2 +- .../agent-launch-legacy-publication.test.ts | 2 +- .../agent-launch-settings-permissions.test.ts | 2 +- .../picker/agent-launch-picker-defaults.ts | 2 +- .../agent-message-display-text.ts | 2 +- .../agent-session-conversation-outline.ts | 6 +- .../agent-session-option-catalog-grok.test.ts | 2 +- .../agent-session-option-catalog.test.ts | 2 +- ...tructured-agent-session-unlisted-effort.ts | 2 +- ...ed-agent-session-permission-option.test.ts | 2 +- .../structured-agent-session-option-state.ts | 2 +- ...uctured-agent-session-option-picks.test.ts | 2 +- ...ured-agent-session-selection-operations.ts | 2 +- .../structured-agent-session-options.ts | 2 +- ...tructured-agent-session-option-snapshot.ts | 4 +- .../structured-agent-session-option-view.ts | 2 +- .../structured-agent-session-first-prompt.ts | 2 +- .../view/structured-agent-session-composer.ts | 2 +- .../structured-agent-session-goal-mode.ts | 4 +- ...tructured-agent-session-subagent-roster.ts | 2 +- ...ructured-agent-session-turn-timing.test.ts | 2 +- .../structured-agent-session-turn-timing.ts | 4 +- .../contracts/agent-pending-prompt.ts | 4 +- src/shared/background-task-roster.ts | 2 +- src/shared/codex-async-question-input.ts | 2 +- .../native-chat-approval-envelope.test.ts | 0 .../native-chat-approval-envelope.ts | 2 +- .../native-chat-prompt-dismiss-key.ts | 4 +- .../native-chat-side-chat-command.ts | 0 .../native-chat-skill-visibility.test.ts | 2 +- .../native-chat-skill-visibility.ts | 12 +- .../native-chat-slash-commands.omp.test.ts | 0 .../native-chat-slash-commands.test.ts | 0 .../native-chat-slash-commands.ts | 4 +- .../native-chat-clipboard-event.ts | 0 .../native-chat-composer-autocomplete.test.ts | 6 +- .../native-chat-composer-autocomplete.ts | 11 +- .../native-chat-follow-up-behavior.ts | 0 .../native-chat-launch-draft-mirrorability.ts | 2 +- .../{ => composer}/native-chat-long-paste.ts | 2 +- .../native-chat-paste-bytes.test.ts | 0 .../{ => composer}/native-chat-paste-bytes.ts | 4 +- .../native-chat-paste-folder.ts | 0 .../native-chat-picker-items.ts | 24 ++-- .../native-chat-picker-triggers.ts | 0 .../use-native-chat-steer-chord-preview.ts | 0 .../native-chat/input/native-chat-ask.test.ts | 57 ++------- .../native-chat/input/native-chat-ask.ts | 9 +- .../input/native-chat-interactive-prompt.ts | 10 +- .../native-chat-prompt-dismiss-key.test.ts | 65 ---------- .../native-chat-side-chat-command.test.ts | 21 ---- .../native-chat-answer-stepping.ts | 0 .../{ => questions}/native-chat-ask-answer.ts | 10 +- .../native-chat-ask-card-rules.ts | 2 +- .../native-chat-ask-dismiss-key.ts | 0 .../native-chat-ask-option-preview.ts | 0 .../{ => questions}/native-chat-ask-order.ts | 4 +- .../native-chat-ask-row.spec.ts | 2 +- .../{ => questions}/native-chat-ask-row.ts | 10 +- .../{ => questions}/native-chat-ask-types.ts | 0 .../native-chat-question-auto-advance.ts | 0 .../native-chat-discovered-catalog-models.ts | 10 +- .../native-chat-pty-session-options.test.ts | 0 .../native-chat-pty-session-options.ts | 8 +- ...ative-chat-session-option-apply-failure.ts | 0 .../native-chat-session-option-apply.ts | 6 +- .../native-chat-session-option-cache.ts | 6 +- ...ative-chat-session-option-commands.test.ts | 22 +--- .../native-chat-session-option-commands.ts | 4 +- .../native-chat-session-option-defaults.ts | 18 +-- .../native-chat-session-option-dispatch.ts | 2 +- .../native-chat-session-option-labels.ts | 2 +- ...ative-chat-session-option-snapshot.test.ts | 46 +------ .../native-chat-session-option-snapshot.ts | 10 +- .../native-chat-session-option-state.test.ts | 2 +- .../native-chat-session-option-state.ts | 6 +- .../native-chat-session-speed-tiers.ts | 4 +- .../native-chat-background-task-row.test.ts | 2 +- .../native-chat-background-task-row.ts | 4 +- .../native-chat-task-list-frames.ts | 2 +- .../native-chat-task-list-history.test.ts | 4 +- .../native-chat-task-list-history.ts | 4 +- .../native-chat-task-list-state.ts | 4 +- .../native-chat-task-list.test.ts | 0 .../{ => task-lists}/native-chat-task-list.ts | 0 .../native-chat/native-chat-agent-profiles.ts | 2 +- .../native-chat/native-chat-fork-offer.ts | 4 +- .../native-chat/native-chat-live-status.ts | 2 +- .../native-chat-orca-stop-cut.test.ts | 2 +- .../native-chat/native-chat-reported-skill.ts | 4 +- .../native-chat-resolution-receipt.ts | 2 +- .../native-chat-stopped-before-start.ts | 2 +- .../native-chat/native-chat-terminal-turn.ts | 2 +- .../native-chat/native-chat-trailing-run.ts | 2 +- .../native-chat/native-chat-work-run.ts | 4 +- .../tools/native-chat-tool-identity.ts | 2 +- .../tools/native-chat-tool-run-header.ts | 2 +- ...t-turn-membership-derived-tool-row.test.ts | 4 +- .../{ => folding}/native-chat-fold-units.ts | 9 +- .../native-chat-turn-fold.test.ts | 2 +- .../{ => folding}/native-chat-turn-fold.ts | 18 +-- .../native-chat-user-message-fold.ts | 0 ...ative-chat-generated-image-answers.test.ts | 44 +++++++ .../native-chat-generated-image-answers.ts | 10 +- .../native-chat-image-transcript-markers.ts | 21 +--- .../native-chat-sent-image-prompt-markers.ts | 6 +- .../{ => messages}/native-chat-clock-skew.ts | 0 .../native-chat-message-copy-text.test.ts | 4 +- .../native-chat-message-copy-text.ts | 10 +- .../native-chat-message-order.test.ts | 52 ++++++++ .../native-chat-message-order.ts | 11 +- .../native-chat-message-preparation.ts | 12 +- .../native-chat-message-time.ts | 0 .../native-chat-transcript-readability.ts | 2 +- .../native-chat-transcript-retention.test.ts | 2 +- .../native-chat-transcript-retention.ts | 2 +- ...ative-chat-generated-image-answers.test.ts | 104 --------------- .../native-chat-message-order.test.ts | 119 ------------------ .../native-chat-transcript-contracts.test.ts | 8 +- .../native-chat-transcript-projection.ts | 7 +- .../native-chat-continuation-send.ts | 2 +- ...ative-chat-launch-draft-resolution.test.ts | 2 +- .../native-chat-launch-draft-resolution.ts | 4 +- .../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 +- .../native-chat-pending-sends.ts | 4 +- .../native-chat-live-line.spec.ts | 2 +- .../native-chat-live-line.ts | 2 +- .../{ => row-content}/native-chat-prose.ts | 2 +- .../native-chat-reasoning-row.spec.ts | 2 +- .../native-chat-reasoning-row.ts | 6 +- .../native-chat-reply-reveals.ts | 0 .../native-chat-row-content.ts | 13 +- .../native-chat-text-reveal.test.ts | 0 .../native-chat-text-reveal.ts | 0 .../native-chat-subagent-entry-detail.ts | 8 +- .../native-chat-subagent-group-header.ts | 4 +- .../native-chat-subagent-items.test.ts | 4 +- .../native-chat-subagent-items.ts | 2 +- .../native-chat-subagent-summary.test.ts | 13 +- .../native-chat-subagent-summary.ts | 2 +- .../native-chat-background-task-run.ts | 8 +- .../native-chat-cut-turn-notice.ts | 18 +-- .../native-chat-live-turn-membership.ts | 4 +- ...-chat-messages-waiting-behind-live-turn.ts | 14 +-- .../native-chat-thread-goal-rows.test.ts | 2 +- .../native-chat-thread-goal-rows.ts | 4 +- .../native-chat-turn-activity.test.ts | 2 +- .../{ => turns}/native-chat-turn-activity.ts | 15 ++- .../native-chat-turn-grouping.spec.ts | 2 +- .../{ => turns}/native-chat-turn-grouping.ts | 6 +- .../native-chat-turn-membership.ts | 20 +-- .../native-chat-turn-row-attribution.ts | 6 +- .../native-chat-turn-status.test.ts | 0 .../{ => turns}/native-chat-turn-status.ts | 2 +- ...tive-chat-unverifiable-turn-status.test.ts | 4 +- src/shared/queued-message-edit.ts | 2 +- .../recipes/source-control-action-options.ts | 2 +- src/shared/structured-agent-question-card.ts | 6 +- src/shared/terminal/input/agent-smart-keys.ts | 2 +- src/shared/worker-transcript-text.ts | 6 +- ...agent-launch-preferences-work.unit.test.ts | 2 +- 444 files changed, 866 insertions(+), 1185 deletions(-) rename src/shared/native-chat/input/{ => approvals}/native-chat-approval-envelope.test.ts (100%) rename src/shared/native-chat/input/{ => approvals}/native-chat-approval-envelope.ts (98%) rename src/shared/native-chat/input/{ => approvals}/native-chat-prompt-dismiss-key.ts (91%) rename src/shared/native-chat/input/{ => commands}/native-chat-side-chat-command.ts (100%) rename src/shared/native-chat/input/{ => commands}/native-chat-skill-visibility.test.ts (99%) rename src/shared/native-chat/input/{ => commands}/native-chat-skill-visibility.ts (83%) rename src/shared/native-chat/input/{ => commands}/native-chat-slash-commands.omp.test.ts (100%) rename src/shared/native-chat/input/{ => commands}/native-chat-slash-commands.test.ts (100%) rename src/shared/native-chat/input/{ => commands}/native-chat-slash-commands.ts (98%) rename src/shared/native-chat/input/{ => composer}/native-chat-clipboard-event.ts (100%) rename src/shared/native-chat/input/{ => composer}/native-chat-composer-autocomplete.test.ts (86%) rename src/shared/native-chat/input/{ => composer}/native-chat-composer-autocomplete.ts (95%) rename src/shared/native-chat/input/{ => composer}/native-chat-follow-up-behavior.ts (100%) rename src/shared/native-chat/input/{ => composer}/native-chat-launch-draft-mirrorability.ts (85%) rename src/shared/native-chat/input/{ => composer}/native-chat-long-paste.ts (86%) rename src/shared/native-chat/input/{ => composer}/native-chat-paste-bytes.test.ts (100%) rename src/shared/native-chat/input/{ => composer}/native-chat-paste-bytes.ts (91%) rename src/shared/native-chat/input/{ => composer}/native-chat-paste-folder.ts (100%) rename src/shared/native-chat/input/{ => composer}/native-chat-picker-items.ts (93%) rename src/shared/native-chat/input/{ => composer}/native-chat-picker-triggers.ts (100%) rename src/shared/native-chat/input/{ => composer}/use-native-chat-steer-chord-preview.ts (100%) delete mode 100644 src/shared/native-chat/input/native-chat-prompt-dismiss-key.test.ts delete mode 100644 src/shared/native-chat/input/native-chat-side-chat-command.test.ts rename src/shared/native-chat/input/{ => questions}/native-chat-answer-stepping.ts (100%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-answer.ts (96%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-card-rules.ts (95%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-dismiss-key.ts (100%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-option-preview.ts (100%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-order.ts (86%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-row.spec.ts (95%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-row.ts (87%) rename src/shared/native-chat/input/{ => questions}/native-chat-ask-types.ts (100%) rename src/shared/native-chat/input/{ => questions}/native-chat-question-auto-advance.ts (100%) rename src/shared/native-chat/input/{ => session-options}/native-chat-discovered-catalog-models.ts (81%) rename src/shared/native-chat/input/{ => session-options}/native-chat-pty-session-options.test.ts (100%) rename src/shared/native-chat/input/{ => session-options}/native-chat-pty-session-options.ts (95%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-apply-failure.ts (100%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-apply.ts (98%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-cache.ts (87%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-commands.test.ts (92%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-commands.ts (97%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-defaults.ts (93%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-dispatch.ts (86%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-labels.ts (99%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-snapshot.test.ts (83%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-snapshot.ts (96%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-state.test.ts (97%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-option-state.ts (96%) rename src/shared/native-chat/input/{ => session-options}/native-chat-session-speed-tiers.ts (86%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-background-task-row.test.ts (97%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-background-task-row.ts (97%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-task-list-frames.ts (95%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-task-list-history.test.ts (93%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-task-list-history.ts (96%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-task-list-state.ts (94%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-task-list.test.ts (100%) rename src/shared/native-chat/input/{ => task-lists}/native-chat-task-list.ts (100%) rename src/shared/native-chat/transcript/{ => folding}/native-chat-fold-units.ts (97%) rename src/shared/native-chat/transcript/{ => folding}/native-chat-turn-fold.test.ts (99%) rename src/shared/native-chat/transcript/{ => folding}/native-chat-turn-fold.ts (90%) rename src/shared/native-chat/transcript/{ => folding}/native-chat-user-message-fold.ts (100%) create mode 100644 src/shared/native-chat/transcript/images/native-chat-generated-image-answers.test.ts rename src/shared/native-chat/transcript/{ => images}/native-chat-generated-image-answers.ts (93%) rename src/shared/native-chat/transcript/{ => images}/native-chat-image-transcript-markers.ts (92%) rename src/shared/native-chat/transcript/{ => images}/native-chat-sent-image-prompt-markers.ts (97%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-clock-skew.ts (100%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-message-copy-text.test.ts (91%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-message-copy-text.ts (52%) create mode 100644 src/shared/native-chat/transcript/messages/native-chat-message-order.test.ts rename src/shared/native-chat/transcript/{ => messages}/native-chat-message-order.ts (82%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-message-preparation.ts (63%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-message-time.ts (100%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-transcript-readability.ts (79%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-transcript-retention.test.ts (95%) rename src/shared/native-chat/transcript/{ => messages}/native-chat-transcript-retention.ts (94%) delete mode 100644 src/shared/native-chat/transcript/native-chat-generated-image-answers.test.ts delete mode 100644 src/shared/native-chat/transcript/native-chat-message-order.test.ts rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-continuation-send.ts (72%) rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-launch-draft-resolution.test.ts (96%) rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-launch-draft-resolution.ts (90%) rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-pending-occurrence.test.ts (98%) rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-pending-occurrence.ts (98%) rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-pending-pasted-content.test.ts (95%) rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-pending-sends.test.ts (98%) rename src/shared/native-chat/transcript/{ => pending-sends}/native-chat-pending-sends.ts (98%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-live-line.spec.ts (95%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-live-line.ts (95%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-prose.ts (88%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-reasoning-row.spec.ts (97%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-reasoning-row.ts (93%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-reply-reveals.ts (100%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-row-content.ts (88%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-text-reveal.test.ts (100%) rename src/shared/native-chat/transcript/{ => row-content}/native-chat-text-reveal.ts (100%) rename src/shared/native-chat/transcript/{ => subagents}/native-chat-subagent-entry-detail.ts (88%) rename src/shared/native-chat/transcript/{ => subagents}/native-chat-subagent-group-header.ts (98%) rename src/shared/native-chat/transcript/{ => subagents}/native-chat-subagent-items.test.ts (96%) rename src/shared/native-chat/transcript/{ => subagents}/native-chat-subagent-items.ts (99%) rename src/shared/native-chat/transcript/{ => subagents}/native-chat-subagent-summary.test.ts (92%) rename src/shared/native-chat/transcript/{ => subagents}/native-chat-subagent-summary.ts (99%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-background-task-run.ts (87%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-cut-turn-notice.ts (89%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-live-turn-membership.ts (86%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-messages-waiting-behind-live-turn.ts (82%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-thread-goal-rows.test.ts (92%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-thread-goal-rows.ts (76%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-activity.test.ts (98%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-activity.ts (82%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-grouping.spec.ts (98%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-grouping.ts (95%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-membership.ts (93%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-row-attribution.ts (83%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-status.test.ts (100%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-turn-status.ts (99%) rename src/shared/native-chat/transcript/{ => turns}/native-chat-unverifiable-turn-status.test.ts (95%) diff --git a/config/scripts/performance/native-chat/native-chat-fold-benchmark.mjs b/config/scripts/performance/native-chat/native-chat-fold-benchmark.mjs index 0b84492683c..b5e4a1ef65b 100644 --- a/config/scripts/performance/native-chat/native-chat-fold-benchmark.mjs +++ b/config/scripts/performance/native-chat/native-chat-fold-benchmark.mjs @@ -25,7 +25,7 @@ const refs = { const entry = (ref) => ` export { foldToolMessages as fold } from '${ref ? './src/shared/native-chat-tool-fold' : './src/shared/native-chat/tools/native-chat-tool-fold'}' import { createNativeChatMessageListProjection } from '${ref ? './src/renderer/src/components/native-chat/native-chat-message-list-projection' : './src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-projection'}' - import { deriveNativeChatRowContent } from '${ref ? './src/shared/native-chat-row-content' : './src/shared/native-chat/transcript/native-chat-row-content'}' + import { deriveNativeChatRowContent } from '${ref ? './src/shared/native-chat-row-content' : './src/shared/native-chat/transcript/row-content/native-chat-row-content'}' import { pairNativeChatToolResults } from '${ref ? './src/shared/native-chat-tool-pairing' : './src/shared/native-chat/tools/native-chat-tool-pairing'}' export function createPipeline() { const project = createNativeChatMessageListProjection() diff --git a/mobile/src/session/__mocks__/mobile-prompt-controller.ts b/mobile/src/session/__mocks__/mobile-prompt-controller.ts index 5d374b386be..c6c1a467d7b 100644 --- a/mobile/src/session/__mocks__/mobile-prompt-controller.ts +++ b/mobile/src/session/__mocks__/mobile-prompt-controller.ts @@ -14,7 +14,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/input/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../src/shared/native-chat/input/questions/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/native-chat/MobileNativeChatOverlay.tsx b/mobile/src/session/native-chat/MobileNativeChatOverlay.tsx index 54c570d441f..8ea84811b7e 100644 --- a/mobile/src/session/native-chat/MobileNativeChatOverlay.tsx +++ b/mobile/src/session/native-chat/MobileNativeChatOverlay.tsx @@ -3,7 +3,7 @@ import { Activity, useCallback, useLayoutEffect, useMemo, useRef, useState } fro import { StyleSheet, View } from 'react-native' import { MobileNativeChatView, type MobileNativeChatInputLockReason } from './MobileNativeChatView' import { useMobileNativeChatProjection } from './transcript/use-mobile-native-chat-projection' -import { nativeChatDockedTaskList } from '../../../../src/shared/native-chat/input/native-chat-task-list-state' +import { nativeChatDockedTaskList } from '../../../../src/shared/native-chat/input/task-lists/native-chat-task-list-state' import type { MobileNativeChatImageAttachments } from './composer/use-mobile-native-chat-image-attachments' import type { MobileNativeChatController } from './mobile-native-chat-controller-contract' import type { MobileNativeChatStructuredComposer } from './composer/mobile-native-chat-structured-composer' diff --git a/mobile/src/session/native-chat/MobileNativeChatView.tsx b/mobile/src/session/native-chat/MobileNativeChatView.tsx index be474530871..38002b66e6d 100644 --- a/mobile/src/session/native-chat/MobileNativeChatView.tsx +++ b/mobile/src/session/native-chat/MobileNativeChatView.tsx @@ -1,7 +1,7 @@ -import type { NativeChatSkillDiscoverySnapshot } from '../../../../src/shared/native-chat/input/native-chat-picker-items' +import type { NativeChatSkillDiscoverySnapshot } from '../../../../src/shared/native-chat/input/composer/native-chat-picker-items' import { MobileStateView } from '../../components/MobileStateView' import { useCallback, useMemo, type ComponentProps } from 'react' -import { nativeChatTaskListPredecessors } from '../../../../src/shared/native-chat/input/native-chat-task-list-history' +import { nativeChatTaskListPredecessors } from '../../../../src/shared/native-chat/input/task-lists/native-chat-task-list-history' import { MobileNativeChatDisclosureContext, useMobileNativeChatDisclosures @@ -14,8 +14,8 @@ import type { NativeChatMessage } from '../../../../src/shared/native-chat/nativ import type { NativeChatLiveTurnIndicator, NativeChatSettledTurns -} from '../../../../src/shared/native-chat/transcript/native-chat-turn-status' -import type { NativeChatTurnJournal } from '../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +} from '../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' +import type { NativeChatTurnJournal } from '../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import type { NativeChatResolvedPrompt } from '../../../../src/shared/native-chat/native-chat-resolution-receipt' import type { NativeChatContextUsageSummary } from '../../../../src/shared/native-chat/native-chat-context-usage-summary' import { useMobileTranslation } from '../../i18n/use-mobile-translation' diff --git a/mobile/src/session/native-chat/agent-session/mobile-structured-agent-session-contract.ts b/mobile/src/session/native-chat/agent-session/mobile-structured-agent-session-contract.ts index d9c22fdefbb..53307f2ebbd 100644 --- a/mobile/src/session/native-chat/agent-session/mobile-structured-agent-session-contract.ts +++ b/mobile/src/session/native-chat/agent-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/input/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' import type { StructuredAgentSessionHostSupport } from './mobile-structured-agent-session-host-support' import type { @@ -10,7 +10,7 @@ import type { MobileNativeChatVisualSource } from '../visual/mobile-native-chat- import type { MobileChatPermission } from '../input/mobile-native-chat-permission' import type { MobileChatQuestion } from '../input/mobile-native-chat-question' import type { MobileNativeChatSession } from '../use-mobile-native-chat-session' -import type { NativeChatLiveTurnIndicator } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatLiveTurnIndicator } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import type { NativeChatResolvedPrompt } from '../../../../../src/shared/native-chat/native-chat-resolution-receipt' import type { useMobileStructuredAgentOptions } from '../input/use-mobile-structured-agent-options' import type { useMobileStructuredAgentTurnTiming } from '../transcript/use-mobile-structured-agent-turn-timing' diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx index 250325f4eae..fcfc467091f 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/input/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' import { recordMobileNativeChatSkillPick, useMobileNativeChatDraft @@ -9,7 +9,7 @@ import { focusMobileNativeChatTextDestination, pruneMobileNativeChatDraftSkills } from './mobile-native-chat-draft-inputs' -import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' +import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/composer/native-chat-picker-items' import { MobileNativeChatComposerAllocation } from './MobileNativeChatComposerAllocation' import { useEffect, useLayoutEffect, useRef, useState } from 'react' import { Keyboard, View, type HostInstance, type TextInputInstance } from 'react-native' diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposerMenu.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposerMenu.tsx index 9c47d049b80..7725dc9c8a2 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposerMenu.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposerMenu.tsx @@ -3,7 +3,7 @@ import type { RefObject } from 'react' import { MobileNativeChatComposerMenuLayer } from './MobileNativeChatComposerMenuLayer' import { Pressable, ScrollView, StyleSheet, Text, View, type HostInstance } from 'react-native' import { FileText, Package, Terminal } from 'lucide-react-native' -import type { NativeChatPickerItem } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' +import type { NativeChatPickerItem } from '../../../../../src/shared/native-chat/input/composer/native-chat-picker-items' import { colors, radii, spacing, typography } 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/composer/MobileNativeChatComposerSendSlot.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposerSendSlot.tsx index 1539497f1ea..3db3bc46032 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposerSendSlot.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposerSendSlot.tsx @@ -2,7 +2,7 @@ import type { RefObject } from 'react' import type { TextInputInstance } from 'react-native' import { isStructuredAgentSessionHostCommand } from '../../../../../src/shared/agent-session/view/structured-agent-session-composer' import { agentSessionInteractionCommand } from '../../../../../src/shared/agent-session/options/permissions/agent-session-interaction-mode' -import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { SessionOptionDescriptor } from '../../../../../src/shared/native-chat/input/native-chat-session-options' import { MobileNativeChatStopButton } from '../input/MobileNativeChatStopButton' import { MobileNativeChatControlSwap } from '../input/mobile-native-chat-control-swap' diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx index b2b3336b0cc..e2d1624f1de 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatSendButton.tsx @@ -4,8 +4,8 @@ import { CornerDownRight, ListEnd } from 'lucide-react-native' import type { NativeChatFollowUpBehavior, NativeChatSendFollowUp -} from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' -import type { NativeChatSteerChordPreview } from '../../../../../src/shared/native-chat/input/use-native-chat-steer-chord-preview' +} from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' +import type { NativeChatSteerChordPreview } from '../../../../../src/shared/native-chat/input/composer/use-native-chat-steer-chord-preview' import { ActionSheetModal } from '../../../components/ActionSheetModal' import { ComposerSendButton } from '../../../components/composer-input/ComposerSendButton' import { 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 ea5597fd311..09359ecbf2a 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 @@ -5,20 +5,20 @@ import { getNativeChatAgentProfile, type NativeChatAgentProfile } from '../../../../../src/shared/native-chat/native-chat-agent-profiles' -import { nativeChatPickerScannedSkills } from '../../../../../src/shared/native-chat/input/native-chat-composer-autocomplete' +import { nativeChatPickerScannedSkills } from '../../../../../src/shared/native-chat/input/composer/native-chat-composer-autocomplete' import { buildNativeChatPickerItems, type NativeChatPickerItem, type NativeChatSkillDiscoverySnapshot -} from '../../../../../src/shared/native-chat/input/native-chat-picker-items' +} from '../../../../../src/shared/native-chat/input/composer/native-chat-picker-items' import { nativeChatPickerCommands, nativeChatSessionSkills -} from '../../../../../src/shared/native-chat/input/native-chat-skill-visibility' +} from '../../../../../src/shared/native-chat/input/commands/native-chat-skill-visibility' import type { NativeChatSessionSkill, SlashCommandSuggestion -} from '../../../../../src/shared/native-chat/input/native-chat-slash-commands' +} from '../../../../../src/shared/native-chat/input/commands/native-chat-slash-commands' import { structuredSessionSlashCommands } from '../../../../../src/shared/agent-session/view/structured-agent-session-composer' // Why: the menu is a plain ScrollView right above a streaming transcript, so it mounts a bounded diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-paste.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-paste.ts index ff4d644b36f..312f09b7f3d 100644 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-paste.ts +++ b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-paste.ts @@ -2,8 +2,8 @@ import { clipboardEventImageFile, clipboardEventPromptText, type ClipboardEventDataLike -} from '../../../../../src/shared/native-chat/input/native-chat-clipboard-event' -import { isNativeChatLongPaste } from '../../../../../src/shared/native-chat/input/native-chat-long-paste' +} from '../../../../../src/shared/native-chat/input/composer/native-chat-clipboard-event' +import { isNativeChatLongPaste } from '../../../../../src/shared/native-chat/input/composer/native-chat-long-paste' import type { ClipboardReader } from '../../../platform/clipboard/clipboard' import type { PickedMobileImage } from '../../../platform/media-picking/media-picker-contract' import { encodeBase64Bytes } from '../../../transport/encryption/base64-byte-codec' 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 5c5a85fad74..0ea4bc61c07 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 @@ -8,9 +8,9 @@ import { normalizeImageTranscriptMessages, normalizeNativeChatUserText, normalizedNativeChatUserMessageText -} from '../../../../../src/shared/native-chat/transcript/native-chat-image-transcript-markers' -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' +} from '../../../../../src/shared/native-chat/transcript/images/native-chat-image-transcript-markers' +import { nativeChatPendingOccurrence } from '../../../../../src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence' +import type { NativeChatPendingSend } from '../../../../../src/shared/native-chat/transcript/pending-sends/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 f94eeab180b..170bfc7c365 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/input/native-chat-paste-bytes' +import { buildNativeChatImagePasteBytes } from '../../../../../src/shared/native-chat/input/composer/native-chat-paste-bytes' import { MOBILE_NATIVE_CHAT_MIN_WRITE_TIMEOUT_MS, openMobileNativeChatSendBudget, diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-send-classification.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-send-classification.ts index e228d61446f..8498dc0513e 100644 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-send-classification.ts +++ b/mobile/src/session/native-chat/composer/mobile-native-chat-send-classification.ts @@ -7,7 +7,7 @@ import { import { classifyNativeChatSend, type NativeChatSendClassification -} from '../../../../../src/shared/native-chat/input/native-chat-slash-commands' +} from '../../../../../src/shared/native-chat/input/commands/native-chat-slash-commands' // Terminal mobile chat lacks desktop-owned command answers and reply rows. diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-goal-mode.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-goal-mode.ts index 5c3abd01481..987bb839980 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-goal-mode.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-goal-mode.ts @@ -1,6 +1,6 @@ import { createElement, useState, type ReactNode } from 'react' import { Goal } from 'lucide-react-native' -import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' import { isBareStructuredAgentSessionGoalCommand } from '../../../../../src/shared/agent-session/view/structured-agent-session-composer' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import type { MobileStructuredThreadGoal } from '../input/use-mobile-structured-thread-goal' 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 599ce3ab6de..29a50706911 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 @@ -4,8 +4,8 @@ import { applyMentionSuggestion, deriveComposerAutocomplete, isSkillPickerTriggered -} from '../../../../../src/shared/native-chat/input/native-chat-composer-autocomplete' -import { applyPickerSuggestion } from '../../../../../src/shared/native-chat/input/native-chat-picker-triggers' +} from '../../../../../src/shared/native-chat/input/composer/native-chat-composer-autocomplete' +import { applyPickerSuggestion } from '../../../../../src/shared/native-chat/input/composer/native-chat-picker-triggers' import { structuredAgentSessionModePickDraft, structuredAgentSessionPickEntersGoalMode @@ -14,7 +14,7 @@ import { agentSessionInteractionCommand, type AgentSessionInteractionMode } from '../../../../../src/shared/agent-session/options/permissions/agent-session-interaction-mode' -import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' +import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/composer/native-chat-picker-items' import { boundedMenuItems, draftAfterSkillEdit, diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-tray.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-tray.ts index d1d40ff3183..e3797f9d55c 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-tray.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-composer-tray.ts @@ -2,7 +2,7 @@ import { createElement, Fragment, useMemo, useState, type ReactNode, type RefObj import type { TextInputInstance } from 'react-native' import { MobileNativeChatBackgroundTasks } from '../input/MobileNativeChatBackgroundTasks' import { MobileNativeChatDockedTaskList } from '../input/MobileNativeChatDockedTaskList' -import type { NativeChatTaskList } from '../../../../../src/shared/native-chat/input/native-chat-task-list' +import type { NativeChatTaskList } from '../../../../../src/shared/native-chat/input/task-lists/native-chat-task-list' import { MobileNativeChatQueuedMessages, mobileNativeChatChordHeadId, diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-drafts.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-drafts.ts index 456058a6867..c5b17e9fc57 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-drafts.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-drafts.ts @@ -17,7 +17,7 @@ import { import { normalizeImageTranscriptMessages, normalizeNativeChatUserText as normalizeReconcileText -} from '../../../../../src/shared/native-chat/transcript/native-chat-image-transcript-markers' +} from '../../../../../src/shared/native-chat/transcript/images/native-chat-image-transcript-markers' import { useMobileNativeChatUnconfirmedSends } from './use-mobile-native-chat-unconfirmed-sends' import { appendMobileNativeChatPending, 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 b5e03cb117e..d86c55a9d22 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,8 +4,8 @@ import { launchDraftResolvedByTranscript, nativeChatLaunchDraftTurnBaseline, type NativeChatLaunchDraftTurnBaseline -} from '../../../../../src/shared/native-chat/transcript/native-chat-launch-draft-resolution' -import { normalizedNativeChatUserMessageText } from '../../../../../src/shared/native-chat/transcript/native-chat-image-transcript-markers' +} from '../../../../../src/shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution' +import { normalizedNativeChatUserMessageText } from '../../../../../src/shared/native-chat/transcript/images/native-chat-image-transcript-markers' 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 1bedfa9f391..4107b3c4c15 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, useMemo, useState } from 'react' import { useQueryClient } from '@tanstack/react-query' -import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' -import { isNativeChatSkillForAgent } from '../../../../../src/shared/native-chat/input/native-chat-skill-visibility' +import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/composer/native-chat-picker-items' +import { isNativeChatSkillForAgent } from '../../../../../src/shared/native-chat/input/commands/native-chat-skill-visibility' import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' import { defineHostQuery, useHostQuery } from '../../../query/host-query' import { hostQueryKey } from '../../../query/host-query-key' diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.ts index 6f168e2f860..157d19bf336 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.ts @@ -1,7 +1,7 @@ import type { RefObject } from 'react' import type { TextInputInstance } from 'react-native' -import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' -import type { NativeChatSteerChordPreview } from '../../../../../src/shared/native-chat/input/use-native-chat-steer-chord-preview' +import type { NativeChatSendFollowUp } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' +import type { NativeChatSteerChordPreview } from '../../../../../src/shared/native-chat/input/composer/use-native-chat-steer-chord-preview' import type { MobileNativeChatSteerHead } from './use-mobile-native-chat-composer-tray' export type MobileNativeChatSteerChordPreviewInput = { diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.web.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.web.ts index 635b7b3004c..95e8a0d9906 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.web.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-steer-chord-preview.web.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import { primaryModifierKey } from '../../../platform/keyboard/primary-modifier-key' -import { createNativeChatSteerChordPreviewHook } from '../../../../../src/shared/native-chat/input/use-native-chat-steer-chord-preview' +import { createNativeChatSteerChordPreviewHook } from '../../../../../src/shared/native-chat/input/composer/use-native-chat-steer-chord-preview' import type { MobileNativeChatSteerChordPreviewInput } from './use-mobile-native-chat-steer-chord-preview' const useNativeChatSteerChordPreview = createNativeChatSteerChordPreviewHook({ diff --git a/mobile/src/session/native-chat/composer/use-mobile-native-chat-stop.ts b/mobile/src/session/native-chat/composer/use-mobile-native-chat-stop.ts index b6411fd0036..ffa33487723 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-native-chat-stop.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-native-chat-stop.ts @@ -7,7 +7,7 @@ import { isLogicalClientCutoverError } from '../../../transport/connection/logic import { nativeChatTerminalWrite } from '../../../terminal/session/mobile-session-terminal-operations' import { openMobileNativeChatSendBudget } from './mobile-native-chat-send' import { nativeChatStopSendsSecondEscape } from '../../../../../src/shared/native-chat/native-chat-agent-support' -import { NATIVE_CHAT_QUESTION_STEP_MS } from '../../../../../src/shared/native-chat/input/native-chat-answer-stepping' +import { NATIVE_CHAT_QUESTION_STEP_MS } from '../../../../../src/shared/native-chat/input/questions/native-chat-answer-stepping' // Resolves false only when no Escape could have landed, so the chat may offer Stop again. export function useMobileNativeChatStop(args: { diff --git a/mobile/src/session/native-chat/composer/use-mobile-structured-native-chat-send-bridge.ts b/mobile/src/session/native-chat/composer/use-mobile-structured-native-chat-send-bridge.ts index d90c8ba9d01..17228ba6fc4 100644 --- a/mobile/src/session/native-chat/composer/use-mobile-structured-native-chat-send-bridge.ts +++ b/mobile/src/session/native-chat/composer/use-mobile-structured-native-chat-send-bridge.ts @@ -19,7 +19,7 @@ import { } from './mobile-native-chat-in-flight-sends' import type { MobileStructuredSends } from './use-mobile-structured-sends' import { structuredSessionOperationId } from '../agent-session/structured-session-operation-id' -import { isSlashCommandDraft } from '../../../../../src/shared/native-chat/input/native-chat-slash-commands' +import { isSlashCommandDraft } from '../../../../../src/shared/native-chat/input/commands/native-chat-slash-commands' import { UNCONFIRMED_SEND_RESTORED_MESSAGE } from './use-mobile-native-chat-unconfirmed-sends' export function useMobileStructuredNativeChatSendBridge(args: { diff --git a/mobile/src/session/native-chat/input/MobileNativeChatAsk.previews.test.tsx b/mobile/src/session/native-chat/input/MobileNativeChatAsk.previews.test.tsx index 23bd9a95a4b..fe37d0bc4fd 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatAsk.previews.test.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatAsk.previews.test.tsx @@ -1,7 +1,7 @@ import { createElement, type ReactNode } from 'react' import { act, create, type ReactTestInstance, type ReactTestRenderer } from 'react-test-renderer' import { afterEach, expect, it, vi, type Mock } from 'vitest' -import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import { MobileNativeChatAsk } from './MobileNativeChatAsk' vi.mock('react-native', () => ({ diff --git a/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx b/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx index 780de1804e4..35c014b68a3 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatAsk.tsx @@ -6,8 +6,8 @@ import { type NativeChatAnswerOperation, type NativeChatAnswerSource, 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' +} from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-answer' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import type { AgentJournalFreeTextInput } from '../../../../../src/shared/agent-session/journal/agent-session-journal-types' import { askAcceptsEmptyAnswer, @@ -16,7 +16,7 @@ import { askConfirmLabel, askTypedText, toggleAskOption -} from '../../../../../src/shared/native-chat/input/native-chat-ask-card-rules' +} from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-card-rules' import { colors, pressedStyle } from '../../../theme/mobile-theme' import { useMobileColorScheme } from '../../../theme/use-mobile-color-scheme' import type { Translate } from '../../../i18n/mobile-i18n' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatDockedTaskList.tsx b/mobile/src/session/native-chat/input/MobileNativeChatDockedTaskList.tsx index 904408e2983..fac8af82152 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatDockedTaskList.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatDockedTaskList.tsx @@ -5,7 +5,7 @@ import { nativeChatCompletedTaskCount, nativeChatTaskLabel, type NativeChatTaskList -} from '../../../../../src/shared/native-chat/input/native-chat-task-list' +} from '../../../../../src/shared/native-chat/input/task-lists/native-chat-task-list' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import { colors, spacing, typography } from '../../../theme/mobile-theme' import { themedStyleSheet } from '../../../theme/themed-styles' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatOptionPreviewSheet.tsx b/mobile/src/session/native-chat/input/MobileNativeChatOptionPreviewSheet.tsx index 650882bf8a0..f02df1061c9 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatOptionPreviewSheet.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatOptionPreviewSheet.tsx @@ -1,6 +1,6 @@ import { useMemo } from 'react' import { Pressable, ScrollView, Text, View } from 'react-native' -import type { AskQuestion } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' +import type { AskQuestion } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import { KeyedBottomDrawer } from '../../../components/bottom-drawer/keyed-bottom-drawer' import { SheetHeader } from '../../../components/nav-bar/SheetHeader' import { SheetPrimaryButton } from '../../../components/SheetPrimaryButton' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx b/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx index 23827476e79..7a116ea0643 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatPromptCard.tsx @@ -18,8 +18,8 @@ import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import type { AskAnswerSelection, NativeChatAnswerSource -} from '../../../../../src/shared/native-chat/input/native-chat-ask-answer' -import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' +} from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-answer' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import { MobileNativeChatAsk } from './MobileNativeChatAsk' import { MobileNativeChatPermission } from './MobileNativeChatPermission' import type { MobileChatPermission } from './mobile-native-chat-permission' diff --git a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx index 5cefb9f1add..c0e2680be77 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionPickers.tsx @@ -30,7 +30,7 @@ import { nativeChatOptionValuesLabel, nativeChatSessionOptionDisabledReason, nativeChatSessionOptionLabel -} from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/session-options/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 { @@ -44,7 +44,7 @@ import { SessionOptionSegments, showsSessionOptionAsSegments } from './MobileNativeChatSessionOptionSegments' -import { sortNativeChatSessionOptions } from '../../../../../src/shared/native-chat/input/native-chat-session-option-snapshot' +import { sortNativeChatSessionOptions } from '../../../../../src/shared/native-chat/input/session-options/native-chat-session-option-snapshot' import { AGENT_CHAT_PERMISSION_MODE_ICON_NAMES, AGENT_CHAT_PERMISSION_MODE_OPTION_ID, diff --git a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx index 391211f20f5..cb8e24822f9 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatSessionOptionRows.tsx @@ -16,11 +16,11 @@ import { nativeChatSessionChoiceLabel, nativeChatSessionOptionActionLabel, nativeChatSessionOptionLabel -} from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/session-options/native-chat-session-option-labels' import { loneFastTier, speedButtonTiers -} from '../../../../../src/shared/native-chat/input/native-chat-session-speed-tiers' +} from '../../../../../src/shared/native-chat/input/session-options/native-chat-session-speed-tiers' 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 a70dc79b845..db63cfbfaca 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/input/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/session-options/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/MobileNativeChatTaskList.tsx b/mobile/src/session/native-chat/input/MobileNativeChatTaskList.tsx index 49281a017b4..de3098daf71 100644 --- a/mobile/src/session/native-chat/input/MobileNativeChatTaskList.tsx +++ b/mobile/src/session/native-chat/input/MobileNativeChatTaskList.tsx @@ -7,7 +7,7 @@ import { nativeChatTaskLabel, type NativeChatTask, type NativeChatTaskList as TaskList -} from '../../../../../src/shared/native-chat/input/native-chat-task-list' +} from '../../../../../src/shared/native-chat/input/task-lists/native-chat-task-list' import { nativeChatTaskListCopy } from './native-chat-task-list-copy' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import { colors, pressedStyle } from '../../../theme/mobile-theme' 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 40856e0880f..0fdba9aef82 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/input/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/session-options/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/mobile-queued-message-composer-context.ts b/mobile/src/session/native-chat/input/mobile-queued-message-composer-context.ts index 9bfeea6fd03..f63a96a7dab 100644 --- a/mobile/src/session/native-chat/input/mobile-queued-message-composer-context.ts +++ b/mobile/src/session/native-chat/input/mobile-queued-message-composer-context.ts @@ -1,4 +1,4 @@ -import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/native-chat-picker-items' +import type { NativeChatSkillDiscoverySnapshot } from '../../../../../src/shared/native-chat/input/composer/native-chat-picker-items' import { createContext } from 'react' import type { MobileNativeChatStructuredComposer } from '../composer/mobile-native-chat-structured-composer' diff --git a/mobile/src/session/native-chat/input/mobile-structured-queued-message-cards.ts b/mobile/src/session/native-chat/input/mobile-structured-queued-message-cards.ts index 3730aa220fe..ca734f4a642 100644 --- a/mobile/src/session/native-chat/input/mobile-structured-queued-message-cards.ts +++ b/mobile/src/session/native-chat/input/mobile-structured-queued-message-cards.ts @@ -1,4 +1,4 @@ -import { stripSentImagePromptMarkers } from '../../../../../src/shared/native-chat/transcript/native-chat-image-transcript-markers' +import { stripSentImagePromptMarkers } from '../../../../../src/shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import type { AgentSessionFailureFact } from '../../../../../src/shared/agent-session/failures/agent-session-failure' import { mobileAgentSessionWriteNoticeText } from '../agent-session/agent-session-write-notice-copy' import type { AgentJournalSubmission } from '../../../../../src/shared/agent-session/journal/agent-session-journal-types' 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 2aaddf08f92..7bad5258aa9 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/input/native-chat-session-option-labels' +import type { NativeChatSessionOptionSay } from '../../../../../src/shared/native-chat/input/session-options/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.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-answer-send.ts index c14ccdac4fd..8923f56b988 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,11 +4,11 @@ import { buildCodexAskAnswerKeys, formatAskAnswer, hasAskAnswer -} 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' +} from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-answer' +import type { AskAnswerSelection } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-answer' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' -import { NATIVE_CHAT_QUESTION_STEP_MS } from '../../../../../src/shared/native-chat/input/native-chat-answer-stepping' +import { NATIVE_CHAT_QUESTION_STEP_MS } from '../../../../../src/shared/native-chat/input/questions/native-chat-answer-stepping' import { openMobileNativeChatSendBudget, sendMobileNativeChatMessageWithOutcome @@ -23,7 +23,7 @@ import { resolveNativeChatTranscriptAgent, shouldStepNativeChatAskAnswer } from '../../../../../src/shared/native-chat/native-chat-agent-support' -import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat/input/native-chat-paste-bytes' +import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat/input/composer/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-ask-auto-advance.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-ask-auto-advance.ts index 98f87cd31a1..620bcffd758 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-ask-auto-advance.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-ask-auto-advance.ts @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react' -import { NATIVE_CHAT_QUESTION_AUTO_ADVANCE_MS } from '../../../../../src/shared/native-chat/input/native-chat-question-auto-advance' +import { NATIVE_CHAT_QUESTION_AUTO_ADVANCE_MS } from '../../../../../src/shared/native-chat/input/questions/native-chat-question-auto-advance' /** Mirrors desktop's useNativeChatQuestionAutoAdvance; shared code cannot import this app's React. */ export function useMobileNativeChatAskAutoAdvance(disabled = false): { diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-ask-dismiss.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-ask-dismiss.ts index e87698fc989..95f09148c94 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-ask-dismiss.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-ask-dismiss.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import { useMobileNativeChatPromptDismiss } from './use-mobile-native-chat-prompt-dismiss' // Keep answered/collapsed asks across view toggles and remounts until an observed prompt supersedes them. diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-model-discovery.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-model-discovery.ts index eb921c90bb7..b94471254da 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-model-discovery.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-model-discovery.ts @@ -5,7 +5,7 @@ import type { CatalogModel } from '../../../../../src/shared/agent-session/optio import { catalogModelsFromModelDiscovery, mergeDiscoveredCatalogModels -} from '../../../../../src/shared/native-chat/input/native-chat-discovered-catalog-models' +} from '../../../../../src/shared/native-chat/input/session-options/native-chat-discovered-catalog-models' import { defineRpcOperation, runRpcOperation } from '../../../transport/rpc/rpc-operation' const discoveredModel = z.object({ diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-controller.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-controller.ts index 9d4b146565c..b0505638b87 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-controller.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-controller.ts @@ -1,6 +1,6 @@ import { useMobileAsyncQuestionHides } from './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/input/native-chat-ask-answer' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' +import type { AskAnswerSelection } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-answer' import type { AgentStatusEntry } from '../../../../../src/shared/agent-status/contracts/agent-status-types' import type { MobileNativeChatController } from '../mobile-native-chat-controller-contract' import type { useMobileBridgeChatPromptWrites } from './use-mobile-bridge-chat-prompt-writes' 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 0184ad786a5..b79a0d4ac8a 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 @@ -4,7 +4,7 @@ import { nativeChatCardDismissKey, nativeChatPromptDismissalMatches, nativeChatPromptOccurrenceKey -} from '../../../../../src/shared/native-chat/input/native-chat-prompt-dismiss-key' +} from '../../../../../src/shared/native-chat/input/approvals/native-chat-prompt-dismiss-key' import { mobileNativeChatPromptDismissals as dismissals, type MobileNativeChatPromptDismissal diff --git a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-input-owner.ts b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-input-owner.ts index fce22518bca..dbab711605e 100644 --- a/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-input-owner.ts +++ b/mobile/src/session/native-chat/input/use-mobile-native-chat-prompt-input-owner.ts @@ -1,7 +1,7 @@ import { useEffect, type RefObject } from 'react' import type { TextInputInstance } from 'react-native' import { isNewerApprovalSubject } from '../../../../../src/shared/agent-session/agent-session-approval-subject' -import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import type { MobileChatPermission } from './mobile-native-chat-permission' // As on desktop a shown card replaces the composer (kept mounted for its draft), except while dictation runs or lands 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 309e699626d..ca08cc4cd33 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 @@ -4,12 +4,12 @@ import { } from '../../../../../src/shared/native-chat/input/native-chat-ask' import { useMemo } from 'react' import type { AgentStatusEntry } from '../../../../../src/shared/agent-status/contracts/agent-status-types' -import type { AskPrompt } from '../../../../../src/shared/native-chat/input/native-chat-ask-types' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import { resolveNativeChatInteractivePromptCard, type ChatApproval } from '../../../../../src/shared/native-chat/input/native-chat-interactive-prompt' -import { nativeChatPromptWaitStartedAt } from '../../../../../src/shared/native-chat/input/native-chat-prompt-dismiss-key' +import { nativeChatPromptWaitStartedAt } from '../../../../../src/shared/native-chat/input/approvals/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 79a1db2da18..1c4e4f504c2 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,15 +23,15 @@ import type { MobileNativeChatSendOutcome } from '../composer/mobile-native-chat import { createNativeChatPtySessionOptions, type NativeChatPtySessionOptionsSurface -} from '../../../../../src/shared/native-chat/input/native-chat-pty-session-options' +} from '../../../../../src/shared/native-chat/input/session-options/native-chat-pty-session-options' import { readNativeChatSessionOptionCache, writeNativeChatSessionOptionCache -} from '../../../../../src/shared/native-chat/input/native-chat-session-option-cache' +} from '../../../../../src/shared/native-chat/input/session-options/native-chat-session-option-cache' import { createNativeChatSessionOptionRecord, matchNativeChatCatalogModelId -} from '../../../../../src/shared/native-chat/input/native-chat-session-option-state' +} from '../../../../../src/shared/native-chat/input/session-options/native-chat-session-option-state' import { setBoundedScopeCacheEntry } from '../../../../../src/shared/native-chat/native-chat-scope-cache' import { sayMobileNativeChatSessionOption } from './native-chat-session-option-copy' diff --git a/mobile/src/session/native-chat/input/use-mobile-structured-async-question.ts b/mobile/src/session/native-chat/input/use-mobile-structured-async-question.ts index 19f632ed561..acfabdd94ce 100644 --- a/mobile/src/session/native-chat/input/use-mobile-structured-async-question.ts +++ b/mobile/src/session/native-chat/input/use-mobile-structured-async-question.ts @@ -2,9 +2,9 @@ import { useCallback } from 'react' import { formatAskAnswer, type AskAnswerSelection -} 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' +} from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-answer' +import { nativeChatAnswerSendIntent } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' +import type { AskPrompt } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import type { QueuedMessageCard } from '../../../../../src/shared/agent-session/view/structured-agent-session-queued-cards' import type { useMobileStructuredAgentSession } from '../agent-session/use-mobile-structured-agent-session' diff --git a/mobile/src/session/native-chat/input/use-mobile-structured-held-option-picks.ts b/mobile/src/session/native-chat/input/use-mobile-structured-held-option-picks.ts index 75b64974826..13cbad49c7a 100644 --- a/mobile/src/session/native-chat/input/use-mobile-structured-held-option-picks.ts +++ b/mobile/src/session/native-chat/input/use-mobile-structured-held-option-picks.ts @@ -6,7 +6,7 @@ import type { SessionOptionDescriptor } from '../../../../../src/shared/native-c import { nativeChatModelPillLabel, nativeChatSessionOptionLabel -} from '../../../../../src/shared/native-chat/input/native-chat-session-option-labels' +} from '../../../../../src/shared/native-chat/input/session-options/native-chat-session-option-labels' import { translate } from '../../../i18n/mobile-i18n' import { mobileSessionOptionSummaryValue } from './mobile-native-chat-session-option-labels' import { sayMobileNativeChatSessionOption as say } from './native-chat-session-option-copy' 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 9adb307a24a..77162b93e52 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,22 +1,22 @@ -import type { NativeChatSkillDiscoverySnapshot } from '../../../../src/shared/native-chat/input/native-chat-picker-items' +import type { NativeChatSkillDiscoverySnapshot } from '../../../../src/shared/native-chat/input/composer/native-chat-picker-items' import type { AgentSessionRewindSurface } from '../../../../src/shared/agent-session/lifecycle/rewind/agent-session-rewind-request' -import type { NativeChatSendFollowUp } from '../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { StructuredMobileSendAttachment } from './composer/use-mobile-structured-send-with-outcome' import type { MobileSessionView } from '../../storage/session-view-preferences' import type { Dispatch, MutableRefObject, SetStateAction } from 'react' import type { AskAnswerSelection, NativeChatAnswerSource -} from '../../../../src/shared/native-chat/input/native-chat-ask-answer' -import type { AskPrompt } from '../../../../src/shared/native-chat/input/native-chat-ask-types' +} from '../../../../src/shared/native-chat/input/questions/native-chat-ask-answer' +import type { AskPrompt } from '../../../../src/shared/native-chat/input/questions/native-chat-ask-types' import type { MobileChatPermission } from './input/mobile-native-chat-permission' import type { MobileChatQuestion } from './input/mobile-native-chat-question' import type { NativeChatLiveTurnIndicator, NativeChatSettledTurns -} from '../../../../src/shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import type { AgentSessionOptionsResult } from '../../../../src/shared/agent-session/options/protocol/agent-session-options-result' -import type { NativeChatTurnJournal } from '../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from '../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import type { NativeChatAwaitingInput } from '../../../../src/shared/native-chat/native-chat-terminal-turn' import type { NativeChatResolvedPrompt } from '../../../../src/shared/native-chat/native-chat-resolution-receipt' import type { 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 72142ae3f99..6eab4ec3033 100644 --- a/mobile/src/session/native-chat/mobile-native-chat-eligibility.ts +++ b/mobile/src/session/native-chat/mobile-native-chat-eligibility.ts @@ -4,7 +4,7 @@ import { isNativeChatAgentAvailable, nativeChatAvailabilityAgent } from '../../../../src/shared/native-chat/native-chat-availability' -import { isNativeChatTranscriptLocalReadable } from '../../../../src/shared/native-chat/transcript/native-chat-transcript-readability' +import { isNativeChatTranscriptLocalReadable } from '../../../../src/shared/native-chat/transcript/messages/native-chat-transcript-readability' export type MobileNativeChatResolution = { agent: string diff --git a/mobile/src/session/native-chat/mobile-native-chat-unsent-notices.ts b/mobile/src/session/native-chat/mobile-native-chat-unsent-notices.ts index d3416e91524..40cb7c23d94 100644 --- a/mobile/src/session/native-chat/mobile-native-chat-unsent-notices.ts +++ b/mobile/src/session/native-chat/mobile-native-chat-unsent-notices.ts @@ -1,7 +1,7 @@ import { agentJournalSubmissionKey } from '../../../../src/shared/agent-session/journal/agent-session-journal-item-key' import { mobileAgentSessionWriteNoticeText } from './agent-session/agent-session-write-notice-copy' import { agentSessionVisibleFailureFacts } from '../../../../src/shared/agent-session/failures/agent-session-visible-failures' -import type { NativeChatTurnJournal } from '../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from '../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import { dispatchWasWithdrawn } from '../../../../src/shared/agent-session/requests/structured-agent-session-dispatch-rejection' import { structuredAgentSessionRecordedRejectionParts } from '../../../../src/shared/agent-session/failures/structured-agent-session-rejection-words' import { tuiAgentDisplayName } from '../../../../src/shared/agent-launch/catalog/tui-agent-display-names' diff --git a/mobile/src/session/native-chat/preferences/mobile-native-chat-host-preference.ts b/mobile/src/session/native-chat/preferences/mobile-native-chat-host-preference.ts index 5da3241c9fc..b92ec445582 100644 --- a/mobile/src/session/native-chat/preferences/mobile-native-chat-host-preference.ts +++ b/mobile/src/session/native-chat/preferences/mobile-native-chat-host-preference.ts @@ -7,7 +7,7 @@ import { subscribeSharedClientEvents, type SharedClientEvent } from '../../../transport/connection/shared-client-events' -import { nativeChatQueueFollowUps } from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' /** A desktop chat setting the host pushes live: its read, its change event and its ready-snapshot field. */ export type MobileNativeChatHostPreferenceKind = { diff --git a/mobile/src/session/native-chat/preferences/use-mobile-native-chat-queue-follow-ups.ts b/mobile/src/session/native-chat/preferences/use-mobile-native-chat-queue-follow-ups.ts index 201c398ef02..c2521a46a41 100644 --- a/mobile/src/session/native-chat/preferences/use-mobile-native-chat-queue-follow-ups.ts +++ b/mobile/src/session/native-chat/preferences/use-mobile-native-chat-queue-follow-ups.ts @@ -1,5 +1,5 @@ import { useCallback, useSyncExternalStore } from 'react' -import { nativeChatQueueFollowUps } from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' import { mobileNativeChatHostPreference, diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatAwaitingInputRow.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatAwaitingInputRow.tsx index 9d607c9658b..10e5f4d7b0e 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatAwaitingInputRow.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatAwaitingInputRow.tsx @@ -1,6 +1,6 @@ import { Text, View } from 'react-native' import { MessageSquareMore } from 'lucide-react-native' -import type { NativeChatAskRowSubject } from '../../../../../src/shared/native-chat/input/native-chat-ask-row' +import type { NativeChatAskRowSubject } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-row' import { nativeChatAskRowCopy } from './native-chat-ask-row-copy' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import { INLINE_TEXT_SELECTION } from '../../../components/inline-text-selection' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatBackgroundTaskRun.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatBackgroundTaskRun.tsx index 0e72502a666..f0d57a7a43f 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatBackgroundTaskRun.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatBackgroundTaskRun.tsx @@ -1,6 +1,6 @@ import { Text, View } from 'react-native' import type { NativeChatBackgroundTaskBlock } from '../../../../../src/shared/native-chat/native-chat-types' -import { nativeChatBackgroundTaskRun } from '../../../../../src/shared/native-chat/transcript/native-chat-background-task-run' +import { nativeChatBackgroundTaskRun } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-background-task-run' import { AGENT_STATE_DOT_SIZE, AgentStateDot } from '../../../components/AgentStateDot' import { INLINE_TEXT_SELECTION } from '../../../components/inline-text-selection' import { colors, spacing, typography } from '../../../theme/mobile-theme' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.android.test.ts b/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.android.test.ts index 1a0fcdacd7a..927f4c7ea14 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.android.test.ts +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.android.test.ts @@ -1,7 +1,7 @@ import { createElement, type ReactNode } from 'react' import { act, create, type ReactTestInstance, type ReactTestRenderer } from 'react-test-renderer' import { afterEach, describe, expect, it, vi } from 'vitest' -import type { NativeChatLiveReasoning } from '../../../../../src/shared/native-chat/transcript/native-chat-reasoning-row' +import type { NativeChatLiveReasoning } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-reasoning-row' // Android lacks inline selection; exercise the message-actions copy path separately from iOS. vi.mock('react-native', async () => { diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.tsx index c08be0a7f06..5a408e13a66 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatLiveLine.tsx @@ -1,7 +1,7 @@ import { useContext } from 'react' import { Pressable, Text, View } from 'react-native' import { ChevronRight } from 'lucide-react-native' -import { nativeChatReasoningDisclosureKey } from '../../../../../src/shared/native-chat/transcript/native-chat-reasoning-row' +import { nativeChatReasoningDisclosureKey } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-reasoning-row' import { formatMobileNativeChatActiveTurnLabel } from './native-chat-turn-status-copy' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import { INLINE_TEXT_SELECTION } from '../../../components/inline-text-selection' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx index ab29aada0df..4cf7b05ef4a 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatMessage.tsx @@ -9,15 +9,15 @@ import * as Chat from '../../../../../src/shared/native-chat/native-chat-types' import { isRenderableSubagentGroup, withoutSubagentGroupTwins -} from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-summary' -import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/native-chat-row-content' +} from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-summary' +import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-row-content' import { MobileNativeChatGroupedThought, MobileNativeChatReasoningRow } from './MobileNativeChatReasoningRow' import { mobileNativeChatRowId } from './mobile-native-chat-reading-place' import { nativeChatWorkRunEntries } from '../../../../../src/shared/native-chat/native-chat-work-run' -import { nativeChatReasoningDisclosureKey } from '../../../../../src/shared/native-chat/transcript/native-chat-reasoning-row' +import { nativeChatReasoningDisclosureKey } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-reasoning-row' import { MobileNativeChatTurnStatus } from './MobileNativeChatTurnStatus' import { MobileNativeChatNoticeRow } from './MobileNativeChatNoticeRow' import { MobileNativeChatPullRequestEventLine } from './MobileNativeChatPullRequestEventLine' @@ -31,13 +31,13 @@ import { MobileNativeChatResolutionReceipt } from './MobileNativeChatResolutionR import { nativeChatAskRunBlocks, nativeChatAskRunSubject -} from '../../../../../src/shared/native-chat/input/native-chat-ask-row' +} from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-row' import type { NativeChatResolvedPrompt } from '../../../../../src/shared/native-chat/native-chat-resolution-receipt' import { MobileNativeChatSubagentGroup } from './MobileNativeChatSubagentGroup' import { MobileNativeChatBackgroundTaskRun } from './MobileNativeChatBackgroundTaskRun' -import { withoutBackgroundTaskRows } from '../../../../../src/shared/native-chat/input/native-chat-background-task-row' +import { withoutBackgroundTaskRows } from '../../../../../src/shared/native-chat/input/task-lists/native-chat-background-task-row' import { ToolRun } from './MobileNativeChatToolRun' -import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import { styles } from './mobile-native-chat-message-styles' import { MobileNativeChatAgentMessageCard } from './MobileNativeChatAgentMessageCard' import { MobileNativeChatVisualContext } from '../visual/mobile-native-chat-visual-context' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatMessageMeta.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatMessageMeta.tsx index cd99b0949a7..132c903a261 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatMessageMeta.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatMessageMeta.tsx @@ -1,6 +1,6 @@ import { View } from 'react-native' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import { nativeChatMessageCopyText } from '../../../../../src/shared/native-chat/transcript/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../../src/shared/native-chat/transcript/messages/native-chat-message-copy-text' import { MobileNativeChatMessageTime } from './MobileNativeChatMessageTime' import { MobileNativeChatRewindButton } from './MobileNativeChatRewindButton' import { MobileNativeChatResponseActions } from './MobileNativeChatResponseActions' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatMessageTime.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatMessageTime.tsx index 546e652ae83..10846b9df65 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatMessageTime.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatMessageTime.tsx @@ -3,7 +3,7 @@ import { Text } from 'react-native' import { getNativeChatMessageDay, getNativeChatMessageTimeFormatter -} from '../../../../../src/shared/native-chat/transcript/native-chat-message-time' +} from '../../../../../src/shared/native-chat/transcript/messages/native-chat-message-time' import { useSharedNowSnapshot } from '../../../hooks/use-now' import { colors, typography } from '../../../theme/mobile-theme' import { themedStyleSheet } from '../../../theme/themed-styles' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatPacedProse.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatPacedProse.tsx index 1e596491ed8..265ed9a184d 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatPacedProse.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatPacedProse.tsx @@ -1,5 +1,5 @@ import { useMemo, type ReactNode } from 'react' -import { nativeChatProseToMarkdown } from '../../../../../src/shared/native-chat/transcript/native-chat-prose' +import { nativeChatProseToMarkdown } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-prose' import { isTextBlock, type NativeChatBlock diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatReasoningRow.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatReasoningRow.tsx index acda77606de..92ea29e2710 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatReasoningRow.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatReasoningRow.tsx @@ -7,9 +7,9 @@ import { nativeChatReasoningDisclosureKey, nativeChatReasoningHeadline, nativeChatReasoningHeadlineText -} from '../../../../../src/shared/native-chat/transcript/native-chat-reasoning-row' +} from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-reasoning-row' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-row-content' import { useMobileNativeChatFullMessage } from './MobileNativeChatFullContent' import { MobileNativeChatMarkdown } from './MobileNativeChatMarkdown' import { colors } from '../../../theme/mobile-theme' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatSubagentGroup.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatSubagentGroup.tsx index 114baea0532..da938f10601 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatSubagentGroup.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatSubagentGroup.tsx @@ -4,15 +4,15 @@ import { formatSubagentTokens, nativeChatSubagentGroupHeader, subagentStateLabel -} from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-group-header' +} from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-group-header' import { sayMobileNativeChatSubagentGroup as say } from './native-chat-subagent-group-copy' import { sayMobileNativeChatSessionOption as sayOption } from '../input/native-chat-session-option-copy' -import { normalizeSubagentState } from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-summary' +import { normalizeSubagentState } from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-summary' import { subagentEntryDetail, subagentEntryRunsOn -} from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-entry-detail' -import { formatNativeChatDuration } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-entry-detail' +import { formatNativeChatDuration } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import type { NativeChatSubagentGroupBlock, NativeChatSubagentState diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatToolRun.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatToolRun.tsx index 10ea8c23b73..ed19204857b 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatToolRun.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatToolRun.tsx @@ -28,7 +28,7 @@ import type { NativeChatBlock, NativeChatToolCallBlock } from '../../../../../src/shared/native-chat/native-chat-types' -import { buildNativeChatTaskListRows } from '../../../../../src/shared/native-chat/input/native-chat-task-list-history' +import { buildNativeChatTaskListRows } from '../../../../../src/shared/native-chat/input/task-lists/native-chat-task-list-history' import { colors, pressedStyle } from '../../../theme/mobile-theme' import { useMobileColorScheme } from '../../../theme/use-mobile-color-scheme' import { MobileNativeChatToolGlyph } from './MobileNativeChatToolIcon' diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatTurnStatus.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatTurnStatus.tsx index 0a10c804d48..f6cd3419f49 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatTurnStatus.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatTurnStatus.tsx @@ -1,7 +1,7 @@ import { useState } from 'react' import { Pressable, StyleSheet, Text, View } from 'react-native' import { ChevronRight } from 'lucide-react-native' -import { nativeChatElapsedSeconds } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import { nativeChatElapsedSeconds } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import { formatMobileNativeChatTurnStatusLabel, nativeChatTurnStatusCopy diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatUserMessageFold.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatUserMessageFold.tsx index 9a757b6741d..3bb55ad6e67 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatUserMessageFold.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatUserMessageFold.tsx @@ -3,7 +3,7 @@ import { Pressable, Text, View } from 'react-native' import { NATIVE_CHAT_USER_MESSAGE_MAX_UNFOLDED_LINES, nativeChatUserMessageFolds -} from '../../../../../src/shared/native-chat/transcript/native-chat-user-message-fold' +} from '../../../../../src/shared/native-chat/transcript/folding/native-chat-user-message-fold' import { styles as markdownStyles } from '../../../components/mobile-markdown-styles' import { colors, spacing, typography, pressedStyle } from '../../../theme/mobile-theme' import { themedStyleSheet } from '../../../theme/themed-styles' 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 e21bd808778..d2da39bfc0c 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/transcript/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../../src/shared/native-chat/transcript/messages/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/mobile-native-chat-markdown-image-sources.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-markdown-image-sources.ts index de9a935e916..6096896d2f5 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-markdown-image-sources.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-markdown-image-sources.ts @@ -2,7 +2,7 @@ import { isTextBlock, type NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-row-content' import { parseMobileMarkdownTree } from '../../../components/mobile-markdown-tree' import { protectMobileMarkdownVisualLines } from '../../../components/mobile-markdown-visual-lines' import { mobileMarkdownImageSources } from '../../../components/mobile-markdown-image-placement' diff --git a/mobile/src/session/native-chat/transcript/mobile-native-chat-pending-echo.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-pending-echo.ts index 00ef55a7594..947156fea8e 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-pending-echo.ts +++ b/mobile/src/session/native-chat/transcript/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/transcript/native-chat-pending-occurrence' +} from '../../../../../src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence' import { NATIVE_CHAT_PENDING_SEND_LIMIT, prunePendingSends, visibleNativeChatPendingSends, type NativeChatPendingSend -} from '../../../../../src/shared/native-chat/transcript/native-chat-pending-sends' +} from '../../../../../src/shared/native-chat/transcript/pending-sends/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/mobile-native-chat-projection-tail.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-projection-tail.ts index dd964726853..df44f2079c7 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-projection-tail.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-projection-tail.ts @@ -2,12 +2,12 @@ import type { AgentType } from '../../../../../src/shared/agent-status/contracts import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' import { nativeChatToolFoldKind } from '../../../../../src/shared/native-chat/tools/native-chat-tool-fold' import { isOrphanRowId } from '../../../../../src/shared/native-chat/tools/native-chat-folded-tool-results' -import { subagentItemBlock } from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-items' +import { subagentItemBlock } from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-items' import { hasImagePromptMarker, imageSourcePathsFromMessage, normalizeImageTranscriptUnit -} from '../../../../../src/shared/native-chat/transcript/native-chat-image-transcript-markers' +} from '../../../../../src/shared/native-chat/transcript/images/native-chat-image-transcript-markers' import type { MobileNativeChatProjection } from './mobile-native-chat-projection' import { prepareMobileNativeChatSource, @@ -18,7 +18,7 @@ import { buildNativeChatFoldUnit, groupNativeChatFoldUnitMembers, type NativeChatFoldUnit as Unit -} from '../../../../../src/shared/native-chat/transcript/native-chat-fold-units' +} from '../../../../../src/shared/native-chat/transcript/folding/native-chat-fold-units' import { finishMobileNativeChatMessages } from './mobile-native-chat-render-data' // A tail harness row that is its own image unit and no roster member leaves every earlier unit as it was. diff --git a/mobile/src/session/native-chat/transcript/mobile-native-chat-projection.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-projection.ts index af6785bfc4d..a8a6cc7c7b4 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-projection.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-projection.ts @@ -4,11 +4,11 @@ import { nativeChatToolFoldKind, type NativeChatToolFoldKind } from '../../../../../src/shared/native-chat/tools/native-chat-tool-fold' -import { foldSubagentItems } from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-items' +import { foldSubagentItems } from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-items' import { nativeChatImageTranscriptUnits, normalizeImageTranscriptUnit -} from '../../../../../src/shared/native-chat/transcript/native-chat-image-transcript-markers' +} from '../../../../../src/shared/native-chat/transcript/images/native-chat-image-transcript-markers' import { finishMobileNativeChatMessages, foldMobileNativeChatMessages @@ -21,7 +21,7 @@ import { projectMobileNativeChatTail } from './mobile-native-chat-projection-tai import { buildNativeChatFoldUnits, type NativeChatFoldUnit as Unit -} from '../../../../../src/shared/native-chat/transcript/native-chat-fold-units' +} from '../../../../../src/shared/native-chat/transcript/folding/native-chat-fold-units' type ImageUnit = { sources: readonly NativeChatMessage[]; rows: NativeChatMessage[] } export type MobileNativeChatProjection = { diff --git a/mobile/src/session/native-chat/transcript/mobile-native-chat-render-data.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-render-data.ts index bd71aadc79d..b8c8267628d 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-render-data.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-render-data.ts @@ -9,16 +9,16 @@ import { foldToolMessages, isUndrawnProviderFrameMessage } from '../../../../../src/shared/native-chat/tools/native-chat-tool-fold' -import { projectNativeChatTaskListFrames } from '../../../../../src/shared/native-chat/input/native-chat-task-list-frames' -import { foldSubagentItems } from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-items' -import { prepareNativeChatMessages } from '../../../../../src/shared/native-chat/transcript/native-chat-message-preparation' +import { projectNativeChatTaskListFrames } from '../../../../../src/shared/native-chat/input/task-lists/native-chat-task-list-frames' +import { foldSubagentItems } from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-items' +import { prepareNativeChatMessages } from '../../../../../src/shared/native-chat/transcript/messages/native-chat-message-preparation' import { isImageRefBlock, type NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' import type { AgentType } from '../../../../../src/shared/agent-status/contracts/agent-status-types' import type { MobileNativeChatStatus } from '../mobile-native-chat-session-status' -import { orderNativeChatDisplayMessages } from '../../../../../src/shared/native-chat/transcript/native-chat-message-order' +import { orderNativeChatDisplayMessages } from '../../../../../src/shared/native-chat/transcript/messages/native-chat-message-order' import { translate } from '../../../i18n/mobile-i18n' function mobileNativeChatEmptyStateCopy( diff --git a/mobile/src/session/native-chat/transcript/mobile-native-chat-reply-reveals.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-reply-reveals.ts index e30f74ed60b..b4f4147d317 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-reply-reveals.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-reply-reveals.ts @@ -5,7 +5,7 @@ import { createNativeChatReplyRevealTracker, trackNativeChatReplyRows, type NativeChatReplyReveals -} from '../../../../../src/shared/native-chat/transcript/native-chat-reply-reveals' +} from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-reply-reveals' import { useReducedMotionEnabled } from '../../../platform/accessibility/use-reduced-motion' // Retain reveal state above list remounts/view toggles so replies resume instead of replaying. diff --git a/mobile/src/session/native-chat/transcript/mobile-native-chat-run-descriptors.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-run-descriptors.ts index 9eff1ad301e..f8cc12dadca 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-run-descriptors.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-run-descriptors.ts @@ -2,7 +2,7 @@ import type { NativeChatMessage } from '../../../../../src/shared/native-chat/na import type { NativeChatResolvedPrompt } from '../../../../../src/shared/native-chat/native-chat-resolution-receipt' import { splitNativeChatBlocks } from '../../../../../src/shared/native-chat/tools/native-chat-tool-fold' import { nativeChatWorkRunEntries } from '../../../../../src/shared/native-chat/native-chat-work-run' -import { nativeChatAskRunBlocks } from '../../../../../src/shared/native-chat/input/native-chat-ask-row' +import { nativeChatAskRunBlocks } from '../../../../../src/shared/native-chat/input/questions/native-chat-ask-row' import type { MobileNativeChatWorkRuns } from './use-mobile-native-chat-transcript-rows' import type { MobileNativeChatRowSources } from './mobile-native-chat-row-keys' diff --git a/mobile/src/session/native-chat/transcript/mobile-native-chat-transcript-store.ts b/mobile/src/session/native-chat/transcript/mobile-native-chat-transcript-store.ts index fb091e1f10a..5cc7959d4ec 100644 --- a/mobile/src/session/native-chat/transcript/mobile-native-chat-transcript-store.ts +++ b/mobile/src/session/native-chat/transcript/mobile-native-chat-transcript-store.ts @@ -2,7 +2,7 @@ import { sha256 } from '@noble/hashes/sha256' import { bytesToHex } from '@noble/hashes/utils' import { setBoundedScopeCacheEntry } from '../../../../../src/shared/native-chat/native-chat-scope-cache' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import { encodeNativeChatTranscriptIdentity } from '../../../../../src/shared/native-chat/transcript/native-chat-transcript-retention' +import { encodeNativeChatTranscriptIdentity } from '../../../../../src/shared/native-chat/transcript/messages/native-chat-transcript-retention' import type { StructuredAgentSessionState } from '../../../../../src/shared/agent-session/structured-agent-session-reducer' import { decodeDeviceStoreValue } from '../../../device-store/device-store-value-codec' import { readPageDeviceStore } from '../../../mobile-web-shell/bridge/page-device-store' diff --git a/mobile/src/session/native-chat/transcript/native-chat-subagent-group-copy.ts b/mobile/src/session/native-chat/transcript/native-chat-subagent-group-copy.ts index 3893ff0e292..ba34b92eb63 100644 --- a/mobile/src/session/native-chat/transcript/native-chat-subagent-group-copy.ts +++ b/mobile/src/session/native-chat/transcript/native-chat-subagent-group-copy.ts @@ -1,7 +1,7 @@ import type { NativeChatSubagentGroupCopyId, NativeChatSubagentGroupSay -} from '../../../../../src/shared/native-chat/transcript/native-chat-subagent-group-header' +} from '../../../../../src/shared/native-chat/transcript/subagents/native-chat-subagent-group-header' import { translate } from '../../../i18n/mobile-i18n' export const sayMobileNativeChatSubagentGroup: NativeChatSubagentGroupSay = (id, values) => { diff --git a/mobile/src/session/native-chat/transcript/native-chat-turn-status-copy.ts b/mobile/src/session/native-chat/transcript/native-chat-turn-status-copy.ts index 27b4d095a10..5a54aa651f0 100644 --- a/mobile/src/session/native-chat/transcript/native-chat-turn-status-copy.ts +++ b/mobile/src/session/native-chat/transcript/native-chat-turn-status-copy.ts @@ -2,7 +2,7 @@ import type { Translate } from '../../../i18n/mobile-i18n' import { describeNativeChatActiveTurnLabel, describeNativeChatTurnStatus -} from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' export function formatMobileNativeChatDuration(seconds: number, t: Translate): string { const totalSeconds = Number.isFinite(seconds) ? Math.max(0, Math.floor(seconds)) : 0 diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-generated-image-answers.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-generated-image-answers.ts index 65b660f1419..50117e31ada 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-generated-image-answers.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-generated-image-answers.ts @@ -1,7 +1,7 @@ import { useContext, useMemo } from 'react' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' -import { nativeChatGeneratedImageAnswers } from '../../../../../src/shared/native-chat/transcript/native-chat-generated-image-answers' +import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' +import { nativeChatGeneratedImageAnswers } from '../../../../../src/shared/native-chat/transcript/images/native-chat-generated-image-answers' import { MobileNativeChatVisualContext } from '../visual/mobile-native-chat-visual-context' import { mobileNativeChatMarkdownImageSources, 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 f417357d96b..662df587986 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 @@ -10,7 +10,7 @@ import { type MobileNativeChatSendOutcome } from '../composer/mobile-native-chat-send' import type { CatalogCommandDelivery } from '../../../../../src/shared/agent-session/options/catalog-providers/agent-session-option-catalog-types' -import { isSlashCommandDraft } from '../../../../../src/shared/native-chat/input/native-chat-slash-commands' +import { isSlashCommandDraft } from '../../../../../src/shared/native-chat/input/commands/native-chat-slash-commands' import { healMobileNativeChatStaleInput } from '../composer/mobile-native-chat-stale-input' import { classifyMobileNativeChatSend } from '../composer/mobile-native-chat-send-classification' import { readMobileNativeChatSkillOrigin } from '../composer/mobile-native-chat-draft-store' @@ -29,7 +29,7 @@ import { UNCONFIRMED_SEND_RESTORED_MESSAGE } from '../composer/use-mobile-native-chat-unconfirmed-sends' import type { MobileNativeChatLaunchDraftSeed } from '../composer/use-mobile-native-chat-launch-draft-seed' -import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat/input/native-chat-paste-bytes' +import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat/input/composer/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-paced-text.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-paced-text.ts index e20e514a785..1b7e1328724 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-paced-text.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-paced-text.ts @@ -11,7 +11,7 @@ import { receiveNativeChatText, startNativeChatTextReveal, type NativeChatTextRevealFrames -} from '../../../../../src/shared/native-chat/transcript/native-chat-text-reveal' +} from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-text-reveal' import { MobileNativeChatReplyRevealsContext } from './mobile-native-chat-reply-reveals' import { MobileNativeChatGrowthHoldContext } from './mobile-native-chat-growth-hold' diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-readability.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-readability.ts index ecb97a3fdc8..d6e53d1622f 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-readability.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-readability.ts @@ -8,7 +8,7 @@ import { import { isFloatingWorkspaceWorktreeId } from '../../floating-workspace' import { resumeFolderWorkspaceListRead } from '../../../agent-history/mobile-agent-history-operations' import { isMobileFolderNativeChatReadable } from '../mobile-native-chat-eligibility' -import { isNativeChatTranscriptLocalReadable } from '../../../../../src/shared/native-chat/transcript/native-chat-transcript-readability' +import { isNativeChatTranscriptLocalReadable } from '../../../../../src/shared/native-chat/transcript/messages/native-chat-transcript-readability' type ReadabilityState = { client: RpcClient | null diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-props.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-props.ts index b0067cef142..4688ac8c2c5 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-props.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-props.ts @@ -2,11 +2,11 @@ import type { NativeChatMessage, NativeChatToolCallBlock } from '../../../../../src/shared/native-chat/native-chat-types' -import type { NativeChatTaskListPredecessors } from '../../../../../src/shared/native-chat/input/native-chat-task-list-history' +import type { NativeChatTaskListPredecessors } from '../../../../../src/shared/native-chat/input/task-lists/native-chat-task-list-history' import type { NativeChatResolvedPrompt } from '../../../../../src/shared/native-chat/native-chat-resolution-receipt' import { isActionableStructuredAgentSessionPrompt } from '../../../../../src/shared/agent-session/view/structured-agent-session-live-turn' import { nativeChatRowOffersRewind } from '../../../../../src/shared/native-chat/native-chat-rewind-eligibility' -import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import type { NativeChatTurnDiff } from '../../../../../src/shared/native-chat/tools/native-chat-turn-diffs' export type MobileNativeChatTurnRow = { diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-renderer.tsx b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-renderer.tsx index cd794e27029..8172eb715de 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-renderer.tsx +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-row-renderer.tsx @@ -1,8 +1,8 @@ import { useCallback, useMemo } from 'react' import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-membership' -import type { NativeChatTaskListPredecessors } from '../../../../../src/shared/native-chat/input/native-chat-task-list-history' +import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' +import type { NativeChatTaskListPredecessors } from '../../../../../src/shared/native-chat/input/task-lists/native-chat-task-list-history' import type { NativeChatResolvedPrompt } from '../../../../../src/shared/native-chat/native-chat-resolution-receipt' import { MobileNativeChatRow } from './MobileNativeChatRowItemSource' import { mobileNativeChatUnsentNotices } from '../mobile-native-chat-unsent-notices' diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-terminal-turn.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-terminal-turn.ts index 2fda3b75901..98db5288da5 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-terminal-turn.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-terminal-turn.ts @@ -1,7 +1,7 @@ import { useCallback, useMemo, useState } from 'react' import type { AgentStatusEntry } from '../../../../../src/shared/agent-status/contracts/agent-status-types' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import type { NativeChatSettledTurns } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatSettledTurns } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import { mergeNativeChatLiveSession, nativeChatHookHasWorkingSubagents, @@ -25,7 +25,7 @@ import type { MobileNativeChatResolution } from '../mobile-native-chat-eligibili import { pendingSendsAsMessages, type NativeChatPendingSend -} from '../../../../../src/shared/native-chat/transcript/native-chat-pending-sends' +} from '../../../../../src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends' const NO_MESSAGES: NativeChatMessage[] = [] diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transcript-rows.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transcript-rows.ts index d9c875b6377..89ef3f6d359 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transcript-rows.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transcript-rows.ts @@ -1,17 +1,17 @@ import { useMemo } from 'react' import type { NativeChatResolvedPrompt } from '../../../../../src/shared/native-chat/native-chat-resolution-receipt' -import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-row-content' import { NATIVE_CHAT_EMPTY_TURN_FOLD, nativeChatTurnFold, nativeChatTurnFoldRow, type NativeChatTurnFold -} from '../../../../../src/shared/native-chat/transcript/native-chat-turn-fold' +} from '../../../../../src/shared/native-chat/transcript/folding/native-chat-turn-fold' import { nativeChatRowRendersProse, nativeChatRowSpeaksOrActs } from '../../../../../src/shared/native-chat/native-chat-trailing-run' -import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatTurnStatus } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' import { nativeChatWorkRunMember, diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transient-data.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transient-data.ts index 359db10fe05..33e72d4b2f3 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transient-data.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-transient-data.ts @@ -4,7 +4,7 @@ import { type MobileNativeChatPendingItem } from './mobile-native-chat-render-data' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import { orderNativeChatDisplayMessages } from '../../../../../src/shared/native-chat/transcript/native-chat-message-order' +import { orderNativeChatDisplayMessages } from '../../../../../src/shared/native-chat/transcript/messages/native-chat-message-order' type Input = Parameters[0] type Preview = { urls: readonly string[]; row: NativeChatMessage } diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-diffs.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-diffs.ts index f52b4652068..b7065d97c30 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-diffs.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-diffs.ts @@ -1,6 +1,6 @@ import { useMemo } from 'react' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import { nativeChatTurnMembership } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +import { nativeChatTurnMembership } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import { nativeChatTurnDiffs } from '../../../../../src/shared/native-chat/tools/native-chat-turn-diffs' export function useMobileNativeChatTurnDiffs( diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure-journal.test.tsx b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure-journal.test.tsx index 9f6a3e2c769..5337c76e855 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure-journal.test.tsx +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure-journal.test.tsx @@ -3,7 +3,7 @@ import { act, create, type ReactTestRenderer } from 'react-test-renderer' import { afterEach, describe, expect, it, vi } from 'vitest' import type { AgentJournalItemBody } from '../../../../../src/shared/agent-session/journal/agent-session-journal-types' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import { Harness, Result } from './use-mobile-native-chat-turn-disclosure.test-fixture' diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test-fixture.tsx b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test-fixture.tsx index e6caeb40388..36194f5948b 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test-fixture.tsx +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test-fixture.tsx @@ -1,7 +1,7 @@ import { createElement } from 'react' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-membership' -import type { NativeChatSettledTurns } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' +import type { NativeChatSettledTurns } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import { useMobileNativeChatTurnDisclosure } from './use-mobile-native-chat-turn-disclosure' export function userMessage(id: string): NativeChatMessage { diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test.tsx b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test.tsx index d91a0d72a97..2e6aed2f06a 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test.tsx +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-disclosure.test.tsx @@ -8,7 +8,7 @@ import type { import type { AgentJournalTurnScope } from '../../../../../src/shared/agent-session/journal/agent-session-journal-turn-scope' import { agentJournalSubmissionKey } from '../../../../../src/shared/agent-session/journal/agent-session-journal-item-key' import type { NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import { useMobileNativeChatTurnDisclosure } from './use-mobile-native-chat-turn-disclosure' import { Harness, Result, userMessage } from './use-mobile-native-chat-turn-disclosure.test-fixture' 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 cc5f732f880..6081e68f519 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 @@ -6,21 +6,21 @@ import { isSubagentGroupBlock, type NativeChatMessage } from '../../../../../src/shared/native-chat/native-chat-types' -import { nativeChatReasoningDisclosureKey } from '../../../../../src/shared/native-chat/transcript/native-chat-reasoning-row' +import { nativeChatReasoningDisclosureKey } from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-reasoning-row' import { nativeChatLiveLine, type NativeChatLiveLine -} from '../../../../../src/shared/native-chat/transcript/native-chat-live-line' +} from '../../../../../src/shared/native-chat/transcript/row-content/native-chat-live-line' import type { NativeChatSettledTurns, NativeChatTurnStatus -} from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' -import { isNativeChatRowInLiveWorkingTurn } from '../../../../../src/shared/native-chat/transcript/native-chat-live-turn-membership' +} from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' +import { isNativeChatRowInLiveWorkingTurn } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-live-turn-membership' import { nativeChatTurnMembership, type NativeChatTurnJournal -} from '../../../../../src/shared/native-chat/transcript/native-chat-turn-membership' -import { nativeChatMessagesWaitingBehindLiveTurn } from '../../../../../src/shared/native-chat/transcript/native-chat-messages-waiting-behind-live-turn' +} from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' +import { nativeChatMessagesWaitingBehindLiveTurn } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-messages-waiting-behind-live-turn' import { NATIVE_CHAT_STREAMING_ID } from '../../../../../src/shared/native-chat/native-chat-streaming' import type { NativeChatResolvedPrompt } from '../../../../../src/shared/native-chat/native-chat-resolution-receipt' import { useMobileNativeChatTranscriptRows } from './use-mobile-native-chat-transcript-rows' @@ -28,7 +28,7 @@ import type { MobileNativeChatRunPresentation } from './mobile-native-chat-run-d import { nativeChatRowsInDrawOrder, nativeChatTurnBarRows -} from '../../../../../src/shared/native-chat/transcript/native-chat-turn-grouping' +} from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-grouping' import { useMobileNativeChatTurnStatus } from './use-mobile-native-chat-turn-status' const EMPTY_TURN_IDS: ReadonlySet = new Set() diff --git a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-status.ts b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-status.ts index 3ebf3391fcd..149ac7a8945 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-status.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-native-chat-turn-status.ts @@ -6,7 +6,7 @@ import { type NativeChatSettledTurns, type NativeChatTurnStatus, type NativeChatTurnTimingByTurn -} from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' const EMPTY_TURN_TIMING_BY_TURN: NativeChatTurnTimingByTurn = Object.freeze({}) diff --git a/mobile/src/session/native-chat/transcript/use-mobile-structured-agent-turn-timing.ts b/mobile/src/session/native-chat/transcript/use-mobile-structured-agent-turn-timing.ts index e010ef7b5ca..0f38d56b42f 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-structured-agent-turn-timing.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-structured-agent-turn-timing.ts @@ -3,9 +3,9 @@ import type { AgentJournalRenderItem, AgentJournalSubmission } from '../../../../../src/shared/agent-session/journal/agent-session-journal-types' -import type { NativeChatSettledTurns } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatSettledTurns } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import type { AgentSessionLatestTurn } from '../../../../../src/shared/agent-session/agent-session-wire' -import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import type { StructuredAgentHostClock } from '../../../../../src/shared/agent-session/structured-agent-session-reducer' import { selectStructuredAgentTurnBars } from '../../../../../src/shared/agent-session/view/structured-agent-session-turn-timing' import { diff --git a/mobile/src/session/native-chat/transcript/use-mobile-structured-transcript.ts b/mobile/src/session/native-chat/transcript/use-mobile-structured-transcript.ts index 8023c0336f5..ea56f3d7635 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-structured-transcript.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-structured-transcript.ts @@ -8,8 +8,8 @@ import type { StructuredAgentSessionState } from '../../../../../src/shared/agen import type { StructuredAgentSessionOptimisticMessage } from '../../../../../src/shared/agent-session/view/structured-agent-session-message-projection' import { createStructuredAgentSessionMessageProjection } from '../../../../../src/shared/agent-session/view/structured-agent-session-message-stream' import { tuiAgentDisplayName } from '../../../../../src/shared/agent-launch/catalog/tui-agent-display-names' -import { withNativeChatCutTurnNotices } from '../../../../../src/shared/native-chat/transcript/native-chat-cut-turn-notice' -import { omitNativeChatThreadGoalRows } from '../../../../../src/shared/native-chat/transcript/native-chat-thread-goal-rows' +import { withNativeChatCutTurnNotices } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-cut-turn-notice' +import { omitNativeChatThreadGoalRows } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-thread-goal-rows' import { createStructuredQuestionProjection } from '../../../../../src/shared/structured-agent-question-projection' import { projectStructuredAgentStartItem } from '../../../../../src/shared/structured-agent-start-projection' diff --git a/mobile/src/session/native-chat/transcript/use-mobile-structured-turn-indicator.ts b/mobile/src/session/native-chat/transcript/use-mobile-structured-turn-indicator.ts index 73be344024e..63c98cb2582 100644 --- a/mobile/src/session/native-chat/transcript/use-mobile-structured-turn-indicator.ts +++ b/mobile/src/session/native-chat/transcript/use-mobile-structured-turn-indicator.ts @@ -1,14 +1,14 @@ import { useMemo } from 'react' import type { StructuredAgentSessionState } from '../../../../../src/shared/agent-session/structured-agent-session-reducer' -import type { NativeChatLiveTurnIndicator } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatLiveTurnIndicator } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-status' import { isStructuredAgentSessionThinking } from '../../../../../src/shared/agent-session/view/structured-agent-session-live-turn' -import { selectStructuredAgentTurnActivity } from '../../../../../src/shared/native-chat/transcript/native-chat-turn-activity' +import { selectStructuredAgentTurnActivity } from '../../../../../src/shared/native-chat/transcript/turns/native-chat-turn-activity' import { agentStopDisplayStatus } from '../../../../../src/shared/agent-status/lifecycle/agent-stop-display-status' import { mobileStructuredSendQueues } from '../composer/mobile-structured-send-queue-rule' import { nativeChatSendFollowUp, type NativeChatSendFollowUp -} from '../../../../../src/shared/native-chat/input/native-chat-follow-up-behavior' +} from '../../../../../src/shared/native-chat/input/composer/native-chat-follow-up-behavior' export function useMobileStructuredTurnIndicator(input: { state: StructuredAgentSessionState diff --git a/mobile/src/session/native-chat/use-mobile-native-chat-active-resolution.ts b/mobile/src/session/native-chat/use-mobile-native-chat-active-resolution.ts index 7e920de0bde..81936cc9826 100644 --- a/mobile/src/session/native-chat/use-mobile-native-chat-active-resolution.ts +++ b/mobile/src/session/native-chat/use-mobile-native-chat-active-resolution.ts @@ -1,5 +1,5 @@ import { useLayoutEffect, useRef, type MutableRefObject } from 'react' -import { encodeNativeChatTranscriptIdentity } from '../../../../src/shared/native-chat/transcript/native-chat-transcript-retention' +import { encodeNativeChatTranscriptIdentity } from '../../../../src/shared/native-chat/transcript/messages/native-chat-transcript-retention' import { resolveMobileNativeChat, type MobileNativeChatTab } from './mobile-native-chat-eligibility' import { useMobileSessionViewMode, diff --git a/mobile/src/session/native-chat/use-mobile-native-chat-controller.ts b/mobile/src/session/native-chat/use-mobile-native-chat-controller.ts index b90f76fb88f..1c116b7b3df 100644 --- a/mobile/src/session/native-chat/use-mobile-native-chat-controller.ts +++ b/mobile/src/session/native-chat/use-mobile-native-chat-controller.ts @@ -15,7 +15,7 @@ import type { MobileNativeChatController } from './mobile-native-chat-controller import { useMobileBridgeChatPromptWrites } from './input/use-mobile-bridge-chat-prompt-writes' import { useMobileNativeChatActiveResolution } from './use-mobile-native-chat-active-resolution' import { useMobileNativeChatPromptController } from './input/use-mobile-native-chat-prompt-controller' -import { nativeChatPendingSendPlacement } from '../../../../src/shared/native-chat/transcript/native-chat-pending-sends' +import { nativeChatPendingSendPlacement } from '../../../../src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends' import { mobileNativeChatScopeKey } from './mobile-native-chat-scope-key' import { useMobileNativeChatCiResultLines } from './preferences/use-mobile-native-chat-ci-result-lines' diff --git a/mobile/src/session/native-chat/use-mobile-native-chat-fork.ts b/mobile/src/session/native-chat/use-mobile-native-chat-fork.ts index 25e14ebce94..f916f62ec33 100644 --- a/mobile/src/session/native-chat/use-mobile-native-chat-fork.ts +++ b/mobile/src/session/native-chat/use-mobile-native-chat-fork.ts @@ -32,7 +32,7 @@ import { isRootAgentJournalItem } from '../../../../src/shared/agent-session/jou import { nativeChatTurnMembership, type NativeChatTurnJournal -} from '../../../../src/shared/native-chat/transcript/native-chat-turn-membership' +} from '../../../../src/shared/native-chat/transcript/turns/native-chat-turn-membership' import type { RpcClient } from '../../transport/rpc/rpc-client-contract' /** The fork a response offers: none, an empty held slot, drawn disabled, or pressable. */ diff --git a/mobile/src/session/native-chat/use-mobile-native-chat-session.ts b/mobile/src/session/native-chat/use-mobile-native-chat-session.ts index 0e2d53c95b5..e0ff08d821e 100644 --- a/mobile/src/session/native-chat/use-mobile-native-chat-session.ts +++ b/mobile/src/session/native-chat/use-mobile-native-chat-session.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react' -import { EMPTY_NATIVE_CHAT_TRANSCRIPT } from '../../../../src/shared/native-chat/transcript/native-chat-transcript-retention' +import { EMPTY_NATIVE_CHAT_TRANSCRIPT } from '../../../../src/shared/native-chat/transcript/messages/native-chat-transcript-retention' import { createNativeChatMerger, replaceList diff --git a/src/main/acp/acp-dialects/grok-background-tasks.ts b/src/main/acp/acp-dialects/grok-background-tasks.ts index 9d628c9038c..559a9b1d89d 100644 --- a/src/main/acp/acp-dialects/grok-background-tasks.ts +++ b/src/main/acp/acp-dialects/grok-background-tasks.ts @@ -3,7 +3,7 @@ import type { AgentJournalToolCallItem } from '../../../shared/agent-session/jou import { isSettledBackgroundTaskState, normalizeBackgroundTaskKind -} from '../../../shared/native-chat/input/native-chat-background-task-row' +} from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import type { NativeChatBackgroundTaskBlock } from '../../../shared/native-chat/native-chat-types' import type { ToolCallUpdate } from '../generated/acp-protocol.generated' import type { AcpBackgroundTaskUpdate, AcpDialectNotification } from './acp-dialect' diff --git a/src/main/acp/history/acp-history-catch-up.ts b/src/main/acp/history/acp-history-catch-up.ts index 7c0f8296ee0..08e9d9d754d 100644 --- a/src/main/acp/history/acp-history-catch-up.ts +++ b/src/main/acp/history/acp-history-catch-up.ts @@ -5,7 +5,7 @@ import { } from '../../../shared/agent-session/journal/agent-session-journal-item-key' import type { AgentJournalRenderItem } from '../../../shared/agent-session/journal/agent-session-journal-types' import { readAgentJournalTurn } from '../../../shared/agent-session/lifecycle/records/agent-session-turn-record' -import { nativeChatRowRendersContent } from '../../../shared/native-chat/transcript/native-chat-row-content' +import { nativeChatRowRendersContent } from '../../../shared/native-chat/transcript/row-content/native-chat-row-content' import { projectNativeChatTranscriptMessages } from '../../../shared/native-chat/transcript/native-chat-transcript-projection' import { projectStructuredAgentSessionMessages } from '../../../shared/agent-session/view/structured-agent-session-message-projection' import { diff --git a/src/main/acp/timeline/acp-background-task-child-work.ts b/src/main/acp/timeline/acp-background-task-child-work.ts index cc99dab3f05..cab48d984a0 100644 --- a/src/main/acp/timeline/acp-background-task-child-work.ts +++ b/src/main/acp/timeline/acp-background-task-child-work.ts @@ -2,7 +2,7 @@ import type { AgentChildWorkEvidence, AgentChildWorkEvidenceHandle } from '../../../shared/agent-status/child-work/agent-status-child-work-evidence' -import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import { isBackgroundTaskBlock } from '../../../shared/native-chat/native-chat-types' import { AGENT_CHILD_WORK_ID_MAX_LENGTH } from '../../../shared/agent-status/child-work/agent-status-child-work-value-guards' import type { ProviderTimelineEvent } from '../../native-chat/agent-session-timeline/provider-timeline-event' diff --git a/src/main/acp/timeline/acp-background-task-timeline.ts b/src/main/acp/timeline/acp-background-task-timeline.ts index 5a05c507668..d796a6cb3e8 100644 --- a/src/main/acp/timeline/acp-background-task-timeline.ts +++ b/src/main/acp/timeline/acp-background-task-timeline.ts @@ -2,7 +2,7 @@ import { BoundedMap } from '../../../shared/bounded-map' import { backgroundTaskJournalBody, isSettledBackgroundTaskState -} from '../../../shared/native-chat/input/native-chat-background-task-row' +} from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import type { NativeChatBackgroundTaskBlock } from '../../../shared/native-chat/native-chat-types' import type { ProviderTimelineEvent, diff --git a/src/main/acp/timeline/acp-subagents.ts b/src/main/acp/timeline/acp-subagents.ts index 5c73b363631..12a479ba479 100644 --- a/src/main/acp/timeline/acp-subagents.ts +++ b/src/main/acp/timeline/acp-subagents.ts @@ -7,7 +7,7 @@ import type { AgentChildWorkEvidenceHandle } from '../../../shared/agent-status/child-work/agent-status-child-work-evidence' import { AGENT_CHILD_WORK_ID_MAX_LENGTH } from '../../../shared/agent-status/child-work/agent-status-child-work-value-guards' -import { MAX_SUBAGENT_FIELD_CHARS } from '../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { MAX_SUBAGENT_FIELD_CHARS } from '../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import type { NativeChatSubagentState } from '../../../shared/native-chat/native-chat-types' import { boundSubagentLabel } from '../../native-chat/agent-session-journal/item-lifecycle/journal-subagent-item' import type { diff --git a/src/main/claude/background-tasks/claude-background-task-memory.ts b/src/main/claude/background-tasks/claude-background-task-memory.ts index b9f64dec4f4..fc51412ffe0 100644 --- a/src/main/claude/background-tasks/claude-background-task-memory.ts +++ b/src/main/claude/background-tasks/claude-background-task-memory.ts @@ -1,4 +1,4 @@ -import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import type { ClaudeBackgroundTaskRow } from './claude-background-task-row-lifecycle' const MAX_GENERATION_ENTRIES = 512 diff --git a/src/main/claude/background-tasks/claude-background-task-roster.ts b/src/main/claude/background-tasks/claude-background-task-roster.ts index 39eeb12c58f..0764cb47c99 100644 --- a/src/main/claude/background-tasks/claude-background-task-roster.ts +++ b/src/main/claude/background-tasks/claude-background-task-roster.ts @@ -1,5 +1,5 @@ import type { ClaudeTaskInvocations } from './claude-task-invocations' -import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import { classifyClaudeBackgroundTaskKind } from '../../../shared/claude-background-task-kind' import { record, taskDescription, taskId, taskName } from './claude-background-task-frames' import type { diff --git a/src/main/claude/background-tasks/claude-background-task-row-journal.ts b/src/main/claude/background-tasks/claude-background-task-row-journal.ts index a7dca1e29e6..6e1ab224599 100644 --- a/src/main/claude/background-tasks/claude-background-task-row-journal.ts +++ b/src/main/claude/background-tasks/claude-background-task-row-journal.ts @@ -1,6 +1,6 @@ import type { AgentJournalItemIdentity } from '../../../shared/agent-session/journal/agent-session-journal-identity' import type { AgentJournalTurnScope } from '../../../shared/agent-session/journal/agent-session-journal-turn-scope' -import { backgroundTaskJournalBody as claudeBackgroundTaskBody } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { backgroundTaskJournalBody as claudeBackgroundTaskBody } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import { isBackgroundTaskBlock } from '../../../shared/native-chat/native-chat-types' import type { StructuredAgentSessionEventSink, diff --git a/src/main/claude/background-tasks/claude-background-task-row-lifecycle.ts b/src/main/claude/background-tasks/claude-background-task-row-lifecycle.ts index b3772d0b8c7..108321f94e5 100644 --- a/src/main/claude/background-tasks/claude-background-task-row-lifecycle.ts +++ b/src/main/claude/background-tasks/claude-background-task-row-lifecycle.ts @@ -3,7 +3,7 @@ import type { AgentJournalProducerLinkage } from '../../../shared/agent-session/ import { canReplaceBackgroundTaskState, isSettledBackgroundTaskState -} from '../../../shared/native-chat/input/native-chat-background-task-row' +} from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import type { NativeChatBackgroundTaskBlock } from '../../../shared/native-chat/native-chat-types' import type { ClaudeSubagentIds } from '../subagents/claude-subagent-id-aliases' import { classifyClaudeBackgroundTaskKind } from '../../../shared/claude-background-task-kind' diff --git a/src/main/claude/background-tasks/claude-background-task-rows.ts b/src/main/claude/background-tasks/claude-background-task-rows.ts index c76dda5258f..1c64f1a3f3d 100644 --- a/src/main/claude/background-tasks/claude-background-task-rows.ts +++ b/src/main/claude/background-tasks/claude-background-task-rows.ts @@ -1,6 +1,6 @@ import { ClaudeTaskInvocations } from './claude-task-invocations' import type { AgentJournalTurnScope } from '../../../shared/agent-session/journal/agent-session-journal-turn-scope' -import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import type { StructuredAgentSessionEventSink } from '../../native-chat/agent-session-wire/journal-ingress/structured-agent-session-event-sink' import { BoundedMap } from '../../../shared/bounded-map' import { diff --git a/src/main/claude/background-tasks/claude-background-task-start.ts b/src/main/claude/background-tasks/claude-background-task-start.ts index 4041d8d1147..561b344c5b1 100644 --- a/src/main/claude/background-tasks/claude-background-task-start.ts +++ b/src/main/claude/background-tasks/claude-background-task-start.ts @@ -1,4 +1,4 @@ -import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { isSettledBackgroundTaskState } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import { classifyClaudeBackgroundTaskKind } from '../../../shared/claude-background-task-kind' import { claudeBackgroundTaskToolUseId, diff --git a/src/main/claude/structured/journal/claude-structured-prompt-items.ts b/src/main/claude/structured/journal/claude-structured-prompt-items.ts index ad4c5d3043e..d3410d4a62f 100644 --- a/src/main/claude/structured/journal/claude-structured-prompt-items.ts +++ b/src/main/claude/structured/journal/claude-structured-prompt-items.ts @@ -10,7 +10,7 @@ import { truncateToolDetail } from '../../../../shared/native-chat/tools/native-chat-tool-summary' import { isPlanApprovalSubject } from '../../../../shared/agent-session/agent-session-approval-subject' -import { askOptionPreview } from '../../../../shared/native-chat/input/native-chat-ask-option-preview' +import { askOptionPreview } from '../../../../shared/native-chat/input/questions/native-chat-ask-option-preview' import { boundJournalPromptBody } from '../../../native-chat/agent-session-journal/item-lifecycle/journal-prompt-body-bounds' import { claudeRecord, claudeText } from './claude-structured-item-translation' import { encodeClaudeQuestionOptionId } from './claude-structured-prompt-replies' diff --git a/src/main/claude/subagents/claude-subagent-journaled-identities.ts b/src/main/claude/subagents/claude-subagent-journaled-identities.ts index 5b278a55251..4b12cca243a 100644 --- a/src/main/claude/subagents/claude-subagent-journaled-identities.ts +++ b/src/main/claude/subagents/claude-subagent-journaled-identities.ts @@ -6,7 +6,7 @@ import { } from '../background-tasks/claude-background-task-identity' import { isBackgroundTaskBlock } from '../../../shared/native-chat/native-chat-types' import type { AgentJournalProducerLinkage } from '../../../shared/agent-session/journal/agent-session-journal-types' -import { namedSubagents } from '../../../shared/native-chat/transcript/native-chat-subagent-items' +import { namedSubagents } from '../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' import type { StructuredAgentSessionLinkageJournal } from '../../native-chat/agent-session-wire/journal-ingress/structured-agent-session-journal-views' import { isBoundedClaudeTaskId } from '../background-tasks/claude-background-task-frames' diff --git a/src/main/codex/structured/background-work/codex-subagent-executions.ts b/src/main/codex/structured/background-work/codex-subagent-executions.ts index 1a8983e112c..6744ae5b5ff 100644 --- a/src/main/codex/structured/background-work/codex-subagent-executions.ts +++ b/src/main/codex/structured/background-work/codex-subagent-executions.ts @@ -3,7 +3,7 @@ import type { CodexChildLaunch } from './codex-subagent-activity' import { MAX_SUBAGENT_FIELD_CHARS, canReplaceSubagentState -} from '../../../../shared/native-chat/transcript/native-chat-subagent-summary' +} from '../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' const MAX_SETTLED_TURNS = 256 /** Evicted turn ordinals fall back to first-run attribution. */ diff --git a/src/main/codex/structured/items/codex-generated-image-answer.test.ts b/src/main/codex/structured/items/codex-generated-image-answer.test.ts index 9409baf9045..b5e737a5f38 100644 --- a/src/main/codex/structured/items/codex-generated-image-answer.test.ts +++ b/src/main/codex/structured/items/codex-generated-image-answer.test.ts @@ -4,7 +4,7 @@ import { codexNonMessageIdentity } from './codex-thread-item-identity' import { codexTurnLifecycleIdentity } from '../journal/codex-structured-journal-translation-turns' import { agentJournalItemKey } from '../../../../shared/agent-session/journal/agent-session-journal-item-key' import { projectStructuredItemsToNativeChat } from '../../../../shared/agent-session/view/structured-agent-session-projection' -import { nativeChatGeneratedImageAnswers } from '../../../../shared/native-chat/transcript/native-chat-generated-image-answers' +import { nativeChatGeneratedImageAnswers } from '../../../../shared/native-chat/transcript/images/native-chat-generated-image-answers' it.each(['complete', 'sparse'])( 'enriches %s authoritative saved generation once and preserves the result through replay', diff --git a/src/main/codex/structured/journal/codex-structured-journal-subagent-readers.test.ts b/src/main/codex/structured/journal/codex-structured-journal-subagent-readers.test.ts index d844bc4a1c2..b8b13abb14f 100644 --- a/src/main/codex/structured/journal/codex-structured-journal-subagent-readers.test.ts +++ b/src/main/codex/structured/journal/codex-structured-journal-subagent-readers.test.ts @@ -4,7 +4,7 @@ import { join } from 'node:path' import { afterEach, describe, expect, it } from 'vitest' import type { AgentJournalRenderItem } from '../../../../shared/agent-session/journal/agent-session-journal-types' import type { AgentSessionTurnActivity } from '../../../../shared/agent-session/agent-session-wire' -import { selectStructuredAgentTurnActivity } from '../../../../shared/native-chat/transcript/native-chat-turn-activity' +import { selectStructuredAgentTurnActivity } from '../../../../shared/native-chat/transcript/turns/native-chat-turn-activity' import { latestStructuredAgentSessionAssistantMessage } from '../../../../shared/agent-session/requests/structured-agent-session-latest-request' import { isStructuredAgentSessionThinking, diff --git a/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-item.ts b/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-item.ts index aee9589d4b1..7c62c7ae463 100644 --- a/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-item.ts +++ b/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-item.ts @@ -6,8 +6,8 @@ import type { AgentJournalMessageItem } from '../../../../shared/agent-session/journal/agent-session-journal-types' import type { AgentJournalItemIdentity } from '../../../../shared/agent-session/journal/agent-session-journal-identity' -import { subagentFallbackText } from '../../../../shared/native-chat/transcript/native-chat-subagent-items' -import { MAX_SUBAGENT_FIELD_CHARS } from '../../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { subagentFallbackText } from '../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' +import { MAX_SUBAGENT_FIELD_CHARS } from '../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import { isSubagentBlock, type NativeChatSubagentBlock diff --git a/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-liveness.ts b/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-liveness.ts index fad10c9a12d..ffe0bb89403 100644 --- a/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-liveness.ts +++ b/src/main/native-chat/agent-session-journal/item-lifecycle/journal-subagent-liveness.ts @@ -14,13 +14,13 @@ import { isSubagentGroupFallbackText, normalizeSubagentState, subagentGroupFallbackText -} from '../../../../shared/native-chat/transcript/native-chat-subagent-summary' +} from '../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import { backgroundTaskFallbackText, isSettledBackgroundTaskState, normalizeBackgroundTaskState -} from '../../../../shared/native-chat/input/native-chat-background-task-row' -import { subagentFallbackText } from '../../../../shared/native-chat/transcript/native-chat-subagent-items' +} from '../../../../shared/native-chat/input/task-lists/native-chat-background-task-row' +import { subagentFallbackText } from '../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' import { isBackgroundTaskBlock, isSubagentBlock, diff --git a/src/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.ts b/src/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.ts index cabe99712aa..8eb788c6920 100644 --- a/src/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.ts +++ b/src/main/native-chat/agent-session-timeline/provider-timeline-assembler-test-support.ts @@ -13,7 +13,7 @@ import type { AgentJournalTurnLifecycle } from '../../../shared/agent-session/journal/agent-session-journal-types' import { readAgentJournalTurn } from '../../../shared/agent-session/lifecycle/records/agent-session-turn-record' -import { backgroundTaskFallbackText } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { backgroundTaskFallbackText } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import { isBackgroundTaskBlock, type NativeChatBackgroundTaskBlock diff --git a/src/main/native-chat/agent-session-timeline/provider-timeline-background-tasks.ts b/src/main/native-chat/agent-session-timeline/provider-timeline-background-tasks.ts index 7d086212de6..062fae9e22f 100644 --- a/src/main/native-chat/agent-session-timeline/provider-timeline-background-tasks.ts +++ b/src/main/native-chat/agent-session-timeline/provider-timeline-background-tasks.ts @@ -1,7 +1,7 @@ // Background-task rows outlive turn settlement; only their own updates or session end settle them. import type { AgentJournalItemBody } from '../../../shared/agent-session/journal/agent-session-journal-types' -import { canReplaceBackgroundTaskState } from '../../../shared/native-chat/input/native-chat-background-task-row' +import { canReplaceBackgroundTaskState } from '../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import { isBackgroundTaskBlock } from '../../../shared/native-chat/native-chat-types' export function relightsProviderTimelineBackgroundTask( diff --git a/src/main/native-chat/agent-session-wire/acquisition/structured-agent-session-fork-snapshot.ts b/src/main/native-chat/agent-session-wire/acquisition/structured-agent-session-fork-snapshot.ts index a34d0ecd63b..ef72818bad8 100644 --- a/src/main/native-chat/agent-session-wire/acquisition/structured-agent-session-fork-snapshot.ts +++ b/src/main/native-chat/agent-session-wire/acquisition/structured-agent-session-fork-snapshot.ts @@ -12,9 +12,9 @@ import type { } from '../../../../shared/agent-session/journal/agent-session-journal-types' import type { JournalReplacementItem } from '../../agent-session-journal/context-epochs/journal-epoch-replacement' import { turnMembership } from '../rewind/structured-rewind-cut' -import { namedSubagents } from '../../../../shared/native-chat/transcript/native-chat-subagent-items' -import { isTerminalSubagentState } from '../../../../shared/native-chat/transcript/native-chat-subagent-summary' -import { isSettledBackgroundTaskState } from '../../../../shared/native-chat/input/native-chat-background-task-row' +import { namedSubagents } from '../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' +import { isTerminalSubagentState } from '../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' +import { isSettledBackgroundTaskState } from '../../../../shared/native-chat/input/task-lists/native-chat-background-task-row' import { providerTimelineKeyPart, providerTimelineTurnKeyPart diff --git a/src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-restart-interruption-test-harness.ts b/src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-restart-interruption-test-harness.ts index 6ba9cbe4337..0e2215a1262 100644 --- a/src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-restart-interruption-test-harness.ts +++ b/src/main/native-chat/agent-session-wire/host/testing/structured-agent-session-restart-interruption-test-harness.ts @@ -4,7 +4,7 @@ import { } from '../../../../../shared/agent-session/journal/agent-session-journal-types' import '../../providers/structured-agent-session-adapter' import { AgentSessionAcquisitionRootExitObservedError } from '../../acquisition/structured-agent-session-acquisition-errors' -import { withNativeChatCutTurnNotices } from '../../../../../shared/native-chat/transcript/native-chat-cut-turn-notice' +import { withNativeChatCutTurnNotices } from '../../../../../shared/native-chat/transcript/turns/native-chat-cut-turn-notice' import { readFile } from 'node:fs/promises' import { join } from 'node:path' diff --git a/src/main/native-chat/agent-session-wire/providers/provider-frame-activity.ts b/src/main/native-chat/agent-session-wire/providers/provider-frame-activity.ts index 477dc619138..fcfb78d5caf 100644 --- a/src/main/native-chat/agent-session-wire/providers/provider-frame-activity.ts +++ b/src/main/native-chat/agent-session-wire/providers/provider-frame-activity.ts @@ -1,5 +1,5 @@ import { normalizeOptionalField } from '../../../../shared/agent-status/contracts/agent-status-field-normalization' -import { formatNativeChatDuration } from '../../../../shared/native-chat/transcript/native-chat-turn-status' +import { formatNativeChatDuration } from '../../../../shared/native-chat/transcript/turns/native-chat-turn-status' export const MAX_PROVIDER_ACTIVITY_LENGTH = 160 export const PROVIDER_COMPACTING_ACTIVITY = 'Compacting the conversation' diff --git a/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-page-bounds.ts b/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-page-bounds.ts index 9705cdbb45d..976099ab8e7 100644 --- a/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-page-bounds.ts +++ b/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-page-bounds.ts @@ -21,7 +21,7 @@ import { isSubagentBlock } from '../../../../../shared/native-chat/native-chat-t import { subagentFoldKey, subagentItemBlock -} from '../../../../../shared/native-chat/transcript/native-chat-subagent-items' +} from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' import type { AgentSessionJournal } from '../../../agent-session-journal/journal-store' export const AGENT_SESSION_HISTORY_MAX_PAGE_BYTES = REMOTE_RUNTIME_MAX_OUTBOUND_JSON_BYTES / 2 diff --git a/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-subagent-roster.ts b/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-subagent-roster.ts index 3e69b993d5e..c09d4189a89 100644 --- a/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-subagent-roster.ts +++ b/src/main/native-chat/agent-session-wire/publication/history/agent-session-history-subagent-roster.ts @@ -6,7 +6,7 @@ import { } from '../../../../../shared/agent-session/journal/agent-session-journal-producer' import type { AgentJournalRenderItem } from '../../../../../shared/agent-session/journal/agent-session-journal-types' import type { AgentSessionSubagentRosterEntry } from '../../../../../shared/agent-session/agent-session-wire' -import { namedSubagents } from '../../../../../shared/native-chat/transcript/native-chat-subagent-items' +import { namedSubagents } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' import type { NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' const MAX_ENTRIES = 64 diff --git a/src/main/native-chat/paste-files/native-chat-paste-files.ts b/src/main/native-chat/paste-files/native-chat-paste-files.ts index 4f224ba322c..4ca4e8b5919 100644 --- a/src/main/native-chat/paste-files/native-chat-paste-files.ts +++ b/src/main/native-chat/paste-files/native-chat-paste-files.ts @@ -3,7 +3,7 @@ import { lstat, realpath, stat } from 'node:fs/promises' import path from 'node:path' import { getAppEnvironment } from '../../../shared/app-environment' -import { NATIVE_CHAT_PASTE_FOLDER } from '../../../shared/native-chat/input/native-chat-paste-folder' +import { NATIVE_CHAT_PASTE_FOLDER } from '../../../shared/native-chat/input/composer/native-chat-paste-folder' const MAX_RESTORED_PASTES = 256 diff --git a/src/main/native-chat/transcript-decoding/transcript-line-decoders-claude.ts b/src/main/native-chat/transcript-decoding/transcript-line-decoders-claude.ts index 716ae6ae4fe..8e64bdf4872 100644 --- a/src/main/native-chat/transcript-decoding/transcript-line-decoders-claude.ts +++ b/src/main/native-chat/transcript-decoding/transcript-line-decoders-claude.ts @@ -9,7 +9,7 @@ import { asRecord } from '../../ai-vault/parsing/session-record-fields' import { extractString } from '../../../shared/trimmed-string' import { parseJsonObject } from '../../ai-vault/parsing/session-json-object' import { timestampMs } from '../../ai-vault/parsing/session-record-time' -import { imageSourcePathFromText } from '../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +import { imageSourcePathFromText } from '../../../shared/native-chat/transcript/images/native-chat-image-transcript-markers' import { claudeContentBlocks } from './transcript-record-blocks' import { isKnownRasterImageMimeType } from '../../../shared/file-preview/raster-image-preview-limits' import { unwrapClaudePastedContentBlock } from '../../../shared/claude-pasted-content' diff --git a/src/main/runtime/agent-session/launch/runtime-native-chat-preference-events.ts b/src/main/runtime/agent-session/launch/runtime-native-chat-preference-events.ts index 559780e409a..a92d2e71fe9 100644 --- a/src/main/runtime/agent-session/launch/runtime-native-chat-preference-events.ts +++ b/src/main/runtime/agent-session/launch/runtime-native-chat-preference-events.ts @@ -1,4 +1,4 @@ -import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import { nativeChatShowsCiResultLines } from '../../../../shared/native-chat/native-chat-appearance-settings' import type { RuntimeClientEvent } from '../../../../shared/runtime-client-events' import type { RuntimeStore } from '../../construction/runtime-store-contract' diff --git a/src/main/runtime/client/settings/runtime-client-settings.ts b/src/main/runtime/client/settings/runtime-client-settings.ts index bb5f03f96c1..ac6fe4c8738 100644 --- a/src/main/runtime/client/settings/runtime-client-settings.ts +++ b/src/main/runtime/client/settings/runtime-client-settings.ts @@ -14,11 +14,11 @@ import { normalizeSourceControlAiSettings } from '../../../../shared/source-cont import { normalizeSourceControlGroupOrder } from '../../../../shared/source-control/listing/source-control-group-order' import { SOURCE_CONTROL_LAUNCH_ACTION_IDS } from '../../../../shared/source-control/ai/recipes/source-control-ai-actions' import type { GlobalSettings } from '../../../../shared/global-settings-types' -import { applyNativeChatSessionOptionSettingsMutation } from '../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { applyNativeChatSessionOptionSettingsMutation } from '../../../../shared/native-chat/input/session-options/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 { getDefaultWorkspaceCleanupRules } from '../../../../shared/workspace-cleanup/workspace-cleanup-policy' -import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import { nativeChatShowsCiResultLines } from '../../../../shared/native-chat/native-chat-appearance-settings' import type { TerminalQuickCommand } from '../../../../shared/terminal/quick-commands/terminal-quick-command-types' import { recordManagedHookInstallFailure } from '../../../agent-hooks/installation/install-telemetry' diff --git a/src/main/runtime/orchestration/workers/transcripts/worker-transcript-activity-block-bounds.ts b/src/main/runtime/orchestration/workers/transcripts/worker-transcript-activity-block-bounds.ts index 234cffe92cd..13c9a892d9e 100644 --- a/src/main/runtime/orchestration/workers/transcripts/worker-transcript-activity-block-bounds.ts +++ b/src/main/runtime/orchestration/workers/transcripts/worker-transcript-activity-block-bounds.ts @@ -1,8 +1,8 @@ import { normalizeBackgroundTaskKind, normalizeBackgroundTaskState -} from '../../../../../shared/native-chat/input/native-chat-background-task-row' -import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +} from '../../../../../shared/native-chat/input/task-lists/native-chat-background-task-row' +import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import type { NativeChatBlock, NativeChatSubagentState diff --git a/src/main/runtime/rpc/methods/agent-launch/agent-launch-surfaces.ts b/src/main/runtime/rpc/methods/agent-launch/agent-launch-surfaces.ts index 51141912663..71a23b7dc95 100644 --- a/src/main/runtime/rpc/methods/agent-launch/agent-launch-surfaces.ts +++ b/src/main/runtime/rpc/methods/agent-launch/agent-launch-surfaces.ts @@ -4,7 +4,7 @@ import { terminalImageViewerSupported } from '../../../terminal/launch/terminal- import { callerLaunchSource } from '../../../../agent-launch/agent-started-telemetry' import { randomUUID } from 'node:crypto' -import { narrowStructuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { narrowStructuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { createStructuredAgentSessionOperationId } from '../../../../../shared/agent-session/lifecycle/operations/structured-agent-session-mutation' import { structuredAgentSessionTabId } from '../../../../../shared/agent-session/view/structured-agent-session-projection' import { diff --git a/src/main/runtime/rpc/methods/native-chat/native-chat-rpc-block-sanitize.ts b/src/main/runtime/rpc/methods/native-chat/native-chat-rpc-block-sanitize.ts index 7665d2acbfb..c84ee5f936c 100644 --- a/src/main/runtime/rpc/methods/native-chat/native-chat-rpc-block-sanitize.ts +++ b/src/main/runtime/rpc/methods/native-chat/native-chat-rpc-block-sanitize.ts @@ -1,7 +1,7 @@ import { MAX_SUBAGENT_FIELD_CHARS, normalizeSubagentState -} from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +} from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import { fitInteractivePrompt } from '../../../../../shared/agent-status/contracts/agent-status-field-normalization' import { parseAskFromToolInput } from '../../../../../shared/native-chat/input/native-chat-ask' import type { diff --git a/src/main/runtime/rpc/methods/orchestration/worker/start/placement/worker-placement-topology.ts b/src/main/runtime/rpc/methods/orchestration/worker/start/placement/worker-placement-topology.ts index d7ba4cb6641..58274877b52 100644 --- a/src/main/runtime/rpc/methods/orchestration/worker/start/placement/worker-placement-topology.ts +++ b/src/main/runtime/rpc/methods/orchestration/worker/start/placement/worker-placement-topology.ts @@ -1,6 +1,6 @@ import type { RuntimeTerminalCreate } from '../../../../../../../../shared/runtime-terminal-create-contract' import type { AgentLaunchPreferences } from '../../../../../../../../shared/agent-session/agent-session-host-authority' -import { narrowStructuredLaunchSeedOptions } from '../../../../../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { narrowStructuredLaunchSeedOptions } from '../../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import type { TuiAgent } from '../../../../../../../../shared/agent-launch/catalog/tui-agent' import type { OrcaRuntimeService } from '../../../../../../orca-runtime' import type { OrchestrationDb } from '../../../../../../orchestration/db/orchestration-db' diff --git a/src/main/runtime/rpc/methods/structured-sessions/creation/structured-agent-session-create.ts b/src/main/runtime/rpc/methods/structured-sessions/creation/structured-agent-session-create.ts index 2d5de172b2e..70930e0deed 100644 --- a/src/main/runtime/rpc/methods/structured-sessions/creation/structured-agent-session-create.ts +++ b/src/main/runtime/rpc/methods/structured-sessions/creation/structured-agent-session-create.ts @@ -1,6 +1,6 @@ import type { StructuredSessionSurface } from '../../../../agent-session/structured-agent-session-close' import { structuredAgentSessionTabId } from '../../../../../../shared/agent-session/view/structured-agent-session-projection' -import { seededPermissionMode } from '../../../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { seededPermissionMode } from '../../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' // Resolve the host launch identity, then commit an at-rest create or the compatible acquired path. import { assertAgentPromptRequestActive } from '../../../../terminal/input/agent-prompt-signals' diff --git a/src/main/runtime/session-tabs/structured-session-create-support.ts b/src/main/runtime/session-tabs/structured-session-create-support.ts index 9d7e21e0cc0..3b4e439747d 100644 --- a/src/main/runtime/session-tabs/structured-session-create-support.ts +++ b/src/main/runtime/session-tabs/structured-session-create-support.ts @@ -22,7 +22,7 @@ import { } from '../agent-session/launch/structured-agent-launch-support' import { structuredAgentRuntimeMetadata } from '../agent-session/installation/structured-agent-runtime-metadata' import { structuredAgentChatProgramNeedsInstall } from '../agent-session/launch/structured-agent-availability' -import { structuredLaunchSeedOptions } from '../../../shared/native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchSeedOptions } from '../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { hasPersistedStructuredAgentSessionStore as hasPersistedStructuredAgentSessionStoreOnDisk } from '../agent-session/records/agent-session-record-store-slot' import { ensureStructuredAgentSessionHostUnlessRefused } from '../agent-session/structured-agent-session-host-refusal' import { getProfileUserDataPath } from '../../orca-profiles/profile-storage-paths' diff --git a/src/main/runtime/terminal/output/startup-dialog-screen.ts b/src/main/runtime/terminal/output/startup-dialog-screen.ts index 57bec4ec7a7..adb6f5af81e 100644 --- a/src/main/runtime/terminal/output/startup-dialog-screen.ts +++ b/src/main/runtime/terminal/output/startup-dialog-screen.ts @@ -3,7 +3,7 @@ import { buildNativeChatStartupMenuPrompt, STARTUP_MENU_DESCRIPTION_MAX, type NativeChatStartupMenuChoice -} from '../../../../shared/native-chat/input/native-chat-approval-envelope' +} from '../../../../shared/native-chat/input/approvals/native-chat-approval-envelope' import type { RuntimeTerminalWaitBlockedReason } from '../../../../shared/runtime-terminal-contracts' import type { TuiAgent } from '../../../../shared/agent-launch/catalog/tui-agent' import type { HeadlessEmulator } from '../../../daemon/emulation/headless-emulator' diff --git a/src/renderer/src/components/agent/agent-launch-picker-cli-model-catalog.ts b/src/renderer/src/components/agent/agent-launch-picker-cli-model-catalog.ts index b11ab4ce510..8d535a1ea5f 100644 --- a/src/renderer/src/components/agent/agent-launch-picker-cli-model-catalog.ts +++ b/src/renderer/src/components/agent/agent-launch-picker-cli-model-catalog.ts @@ -5,7 +5,7 @@ import { agentPickerModelFromCatalogModel } from '../../../../shared/agent-launc import { catalogModelsFromModelDiscovery, mergeDiscoveredCatalogModels -} from '../../../../shared/native-chat/input/native-chat-discovered-catalog-models' +} from '../../../../shared/native-chat/input/session-options/native-chat-discovered-catalog-models' import { isNativeChatSupportedAgent } from '../../../../shared/native-chat/native-chat-agent-support' import type { RuntimeGitContext } from '@/runtime/source-control/git/runtime-git-client-context' import { discoverRuntimeCommitMessageModels } from '@/runtime/source-control/git/runtime-git-generation-client' diff --git a/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts b/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts index 7259f78686a..d41fd9e7310 100644 --- a/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts +++ b/src/renderer/src/components/agent/agent-launch-picker-host-reads.ts @@ -10,7 +10,7 @@ import { type ModelMenuReadScope } from '@/runtime/native-chat/model-catalogs/model-menu-catalog-read' import { subscribeModelMenuInvalidation } from '@/runtime/native-chat/model-catalogs/model-menu-invalidation' -import { parseStructuredLaunchSeedOptions } from '../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { parseStructuredLaunchSeedOptions } from '../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { isAgentChatPermissionChoice } from '../../../../shared/agent-launch/permissions/agent-chat-permission-mode' import type { AgentPickerEntry } from '../../../../shared/agent-launch/picker/agent-launch-picker' import type { RuntimeClientTarget } from '../../../../shared/runtime-client-target' diff --git a/src/renderer/src/components/browser-pane/annotate/use-browser-annotation-images.ts b/src/renderer/src/components/browser-pane/annotate/use-browser-annotation-images.ts index 68c8af448c8..7823d768334 100644 --- a/src/renderer/src/components/browser-pane/annotate/use-browser-annotation-images.ts +++ b/src/renderer/src/components/browser-pane/annotate/use-browser-annotation-images.ts @@ -6,7 +6,7 @@ import { useMountedRef } from '@/hooks/useMountedRef' import { createNonSecureContextUuid as createBrowserUuid } from '../../../../../shared/non-secure-context-uuid' import { formatClipboardImagePasteError } from '@/components/terminal-pane/input/paste/terminal-pane-paste-execution' import { resolveTerminalPasteRuntimeEnvironmentId } from '@/components/terminal-pane/input/paste/terminal-paste-runtime' -import { clipboardEventImageFile } from '../../../../../shared/native-chat/input/native-chat-clipboard-event' +import { clipboardEventImageFile } from '../../../../../shared/native-chat/input/composer/native-chat-clipboard-event' import { useNativeChatComposerAttachmentPreviews } from '@/components/native-chat/attachments/chips/use-native-chat-composer-attachment-previews' import type { NativeChatComposerImageAttachment } from '@/components/native-chat/attachments/chips/native-chat-image-attachment' diff --git a/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunStatusIcon.tsx b/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunStatusIcon.tsx index 6439650f307..d24607e23d2 100644 --- a/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunStatusIcon.tsx +++ b/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunStatusIcon.tsx @@ -2,7 +2,7 @@ import { AlertCircle, Check, Clock, Loader2 } from 'lucide-react' import { Tooltip, TooltipContent, TooltipTrigger } from '../../ui/tooltip' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' -import { formatNativeChatDuration } from '../../../../../shared/native-chat/transcript/native-chat-turn-status' +import { formatNativeChatDuration } from '../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import type { ResumeRunRowStatus } from './native-chat-resume-run-view' export type ResumeRunStartPhase = 'starting' | 'ready' | null diff --git a/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunSummary.tsx b/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunSummary.tsx index 4732c8e3cd4..f2c4bae19fc 100644 --- a/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunSummary.tsx +++ b/src/renderer/src/components/native-chat-recovery/runs/NativeChatResumeRunSummary.tsx @@ -1,7 +1,7 @@ import { ToggleGroup, ToggleGroupItem } from '../../ui/toggle-group' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' -import { formatNativeChatDuration } from '../../../../../shared/native-chat/transcript/native-chat-turn-status' +import { formatNativeChatDuration } from '../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import type { ResumeRunFilter, ResumeRunView } from './native-chat-resume-run-view' import type { ResumeRunStartPhase } from './NativeChatResumeRunStatusIcon' diff --git a/src/renderer/src/components/native-chat/NativeChatMessageList.tsx b/src/renderer/src/components/native-chat/NativeChatMessageList.tsx index b2e63de3882..3dc824cbdc1 100644 --- a/src/renderer/src/components/native-chat/NativeChatMessageList.tsx +++ b/src/renderer/src/components/native-chat/NativeChatMessageList.tsx @@ -17,12 +17,12 @@ import { import type { NativeChatLiveSession } from './session/terminal/read/native-chat-live-session-contract' import { useNativeChatTranscriptProjection } from './conversation/projection/use-native-chat-transcript-projection' import { useNativeChatQuestionReceipts } from './conversation/projection/use-native-chat-question-receipts' -import { nativeChatTaskListPredecessors } from '../../../../shared/native-chat/input/native-chat-task-list-history' +import { nativeChatTaskListPredecessors } from '../../../../shared/native-chat/input/task-lists/native-chat-task-list-history' import { NativeChatDockedTaskList } from './tools/tasks/NativeChatDockedTaskList' import { useNativeChatTurnStatus } from './conversation/turns/use-native-chat-turn-status' import { NativeChatAwaitingInputRow } from './prompts/NativeChatAwaitingInputRow' import type { RuntimeFileOperationArgs } from '@/runtime/files/runtime-file-client-types' -import type { NativeChatTurnActivity } from '../../../../shared/native-chat/transcript/native-chat-turn-activity' +import type { NativeChatTurnActivity } from '../../../../shared/native-chat/transcript/turns/native-chat-turn-activity' import { NativeChatTurnActivityLine } from './messages/reasoning/NativeChatTurnActivityLine' import { NativeChatDisclosureContext, @@ -69,7 +69,7 @@ import type { } from '../../../../shared/agent-session/journal/agent-session-journal-types' import type { AgentSessionLatestTurn } from '../../../../shared/agent-session/agent-session-wire' import { isStructuredAgentSessionThinking } from '../../../../shared/agent-session/view/structured-agent-session-live-turn' -import type { NativeChatSettledTurns } from '../../../../shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatSettledTurns } from '../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import { useNativeChatTurnDiffs } from './tools/diffs/use-native-chat-turn-diffs' import { useNativeChatTurnOpenedPullRequests } from './tools/pull-requests/use-native-chat-turn-opened-pull-requests' import { NativeChatPullRequestChangeContext } from './tools/pull-requests/NativeChatOpenedPullRequestCard' diff --git a/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx b/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx index 5c7bd3946bf..1fb4f4efed8 100644 --- a/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx +++ b/src/renderer/src/components/native-chat/NativeChatResolvedView.tsx @@ -32,7 +32,7 @@ import { shouldClearNativeChatWorkingSuppression } from '../../../../shared/nati import { resolveNativeChatTerminalTurn } from '../../../../shared/native-chat/native-chat-terminal-turn' import { useNativeChatTerminalTurnTiming } from './conversation/turns/use-native-chat-terminal-turn-timing' import { shouldPruneLaunchPrompt } from './session/terminal/delivery/native-chat-pending' -import { pendingSendsAsMessages } from '../../../../shared/native-chat/transcript/native-chat-pending-sends' +import { pendingSendsAsMessages } from '../../../../shared/native-chat/transcript/pending-sends/native-chat-pending-sends' import { useNativeChatPendingDelivery, useNativeChatOptimisticSend diff --git a/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx b/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx index 126e8c16ce1..b6e24cdab7e 100644 --- a/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx +++ b/src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx @@ -33,7 +33,7 @@ import { useNativeChatRootInputRouting } from '@/components/native-chat/composer import { useNativeChatFontSize } from '@/components/native-chat/appearance/use-native-chat-font-size' import { useNativeChatFind } from '@/components/native-chat/viewport/find/use-native-chat-find' import { NativeChatFindBar } from '@/components/native-chat/viewport/find/NativeChatFindBar' -import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import { LinkActionPopover } from '@/components/link-actions/LinkActionPopover' import { useNativeChatLinkActions } from '@/components/native-chat/links/actions/use-native-chat-link-actions' import { NativeChatLinkClickContext } from '@/components/native-chat/links/actions/native-chat-link-click-context' diff --git a/src/renderer/src/components/native-chat/composer/controls/NativeChatComposer.resume-command.test.tsx b/src/renderer/src/components/native-chat/composer/controls/NativeChatComposer.resume-command.test.tsx index 986d658cb66..6a430fdf111 100644 --- a/src/renderer/src/components/native-chat/composer/controls/NativeChatComposer.resume-command.test.tsx +++ b/src/renderer/src/components/native-chat/composer/controls/NativeChatComposer.resume-command.test.tsx @@ -9,7 +9,7 @@ import { createStructuredAgentSessionOptionsWriteOwner } from '../../../../../.. import { createStructuredSessionSelectionController } from '../../../../../../shared/agent-session/options/selection/structured-agent-session-selection-operations' import { createStructuredAgentSessionOptionState } from '../../../../../../shared/agent-session/options/structured-agent-session-options' import { structuredAgentSessionSeedCatalog } from '../../../../../../shared/agent-session/options/model-catalog/structured-agent-session-seed-catalog' -import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import type { QueuedMessageInlineEditor } from '../../queue/editing/native-chat-queued-edit-session' import type { NativeChatStructuredComposerTransport } from '../submit/native-chat-structured-composer-transport' import type { AgentType } from '../../../../../../shared/agent-status/contracts/agent-status-types' diff --git a/src/renderer/src/components/native-chat/composer/controls/NativeChatComposerActions.tsx b/src/renderer/src/components/native-chat/composer/controls/NativeChatComposerActions.tsx index dd6b9c9761c..97151290b9b 100644 --- a/src/renderer/src/components/native-chat/composer/controls/NativeChatComposerActions.tsx +++ b/src/renderer/src/components/native-chat/composer/controls/NativeChatComposerActions.tsx @@ -6,7 +6,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip import { useTranslate } from '@/i18n/use-translate' import { getScreenSubmitShortcutLabel } from '@/lib/keyboard/screen-submit-shortcut' import { useUiLanguageRevision } from '@/i18n/use-ui-language-revision' -import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/native-chat-follow-up-behavior' +import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { SessionOptionDescriptor, SessionOptionsSurface @@ -22,7 +22,7 @@ import { NativeChatComposerGoalChip } from './NativeChatComposerGoalChip' import { NativeChatContextUsageRing } from '../../usage/NativeChatContextUsageRing' import type { NativeChatContextUsageSummary } from '../../../../../../shared/native-chat/native-chat-context-usage-summary' import type { NativeChatOptionPickerRequest } from '../../session/options/controls/native-chat-option-picker-request' -import type { NativeChatSteerChordPreview } from '../../../../../../shared/native-chat/input/use-native-chat-steer-chord-preview' +import type { NativeChatSteerChordPreview } from '../../../../../../shared/native-chat/input/composer/use-native-chat-steer-chord-preview' export type NativeChatComposerActionsProps = { editSession?: { cancel: () => void } diff --git a/src/renderer/src/components/native-chat/composer/controls/native-chat-composer-placeholder.ts b/src/renderer/src/components/native-chat/composer/controls/native-chat-composer-placeholder.ts index 48347990ac8..b5f32b193c4 100644 --- a/src/renderer/src/components/native-chat/composer/controls/native-chat-composer-placeholder.ts +++ b/src/renderer/src/components/native-chat/composer/controls/native-chat-composer-placeholder.ts @@ -4,7 +4,7 @@ import type { Translate } from '../../../../i18n/use-translate' import { NATIVE_CHAT_TURN_STATUS_COPY, NATIVE_CHAT_COMPOSER_PLACEHOLDER -} from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' export function nativeChatComposerPlaceholder( hasPty: boolean, diff --git a/src/renderer/src/components/native-chat/composer/controls/use-native-chat-steer-chord-preview.ts b/src/renderer/src/components/native-chat/composer/controls/use-native-chat-steer-chord-preview.ts index b2ff0c7a36b..84c5c1be307 100644 --- a/src/renderer/src/components/native-chat/composer/controls/use-native-chat-steer-chord-preview.ts +++ b/src/renderer/src/components/native-chat/composer/controls/use-native-chat-steer-chord-preview.ts @@ -1,6 +1,6 @@ import { useEffect, useState, type RefObject } from 'react' -import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/native-chat-follow-up-behavior' -import { createNativeChatSteerChordPreviewHook } from '../../../../../../shared/native-chat/input/use-native-chat-steer-chord-preview' +import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' +import { createNativeChatSteerChordPreviewHook } from '../../../../../../shared/native-chat/input/composer/use-native-chat-steer-chord-preview' import type { NativeChatComposerSendIntent } from '../submit/native-chat-composer-send-intent' import { isMacPlatform } from '../../pane/routing/native-chat-shortcut' diff --git a/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx b/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx index 5381191ed49..22e734df8bd 100644 --- a/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx +++ b/src/renderer/src/components/native-chat/composer/editor/NativeChatComposerField.tsx @@ -5,8 +5,8 @@ import { useCallback, useLayoutEffect, useMemo, useRef } from 'react' import { flushSync } from 'react-dom' import type { useImeEnterGestureOwnership } from '@/lib/text-input/ime/ime-composition-keyboard-event' import { cn } from '@/lib/class-names' -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 { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/composer/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import { NativeChatMentionMenu, NativeChatPickerMenu } from '../pickers/NativeChatAutocompleteMenus' import type { NativeChatMentionFiles } from '../pickers/use-native-chat-mention-files' import { NativeChatComposerActions } from '../controls/NativeChatComposerActions' @@ -26,8 +26,8 @@ import type { NativeChatComposerGoalMode } from '../submit/use-native-chat-compo import { useTranslate } from '@/i18n/use-translate' import { useNativeChatComposerDraftUnsaved } from '../../drafts/use-native-chat-draft-unsaved' import { useLatestHandler } from '@/lib/use-latest-handler' -import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/native-chat-follow-up-behavior' -import type { NativeChatSteerChordPreview } from '../../../../../../shared/native-chat/input/use-native-chat-steer-chord-preview' +import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' +import type { NativeChatSteerChordPreview } from '../../../../../../shared/native-chat/input/composer/use-native-chat-steer-chord-preview' function noop(): void {} diff --git a/src/renderer/src/components/native-chat/composer/editor/use-native-chat-composer-keydown.ts b/src/renderer/src/components/native-chat/composer/editor/use-native-chat-composer-keydown.ts index 8b92ea33b1a..898d141b01f 100644 --- a/src/renderer/src/components/native-chat/composer/editor/use-native-chat-composer-keydown.ts +++ b/src/renderer/src/components/native-chat/composer/editor/use-native-chat-composer-keydown.ts @@ -5,8 +5,8 @@ import { type KeyboardEventHandler, type SetStateAction } from 'react' -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 { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/composer/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import { isMacPlatform } from '../../pane/routing/native-chat-shortcut' import type { NativeChatMentionFiles } from '../pickers/use-native-chat-mention-files' import type { NativeChatComposerSendIntent } from '../submit/native-chat-composer-send-intent' diff --git a/src/renderer/src/components/native-chat/composer/pickers/NativeChatAutocompleteMenus.tsx b/src/renderer/src/components/native-chat/composer/pickers/NativeChatAutocompleteMenus.tsx index 55658949a04..5fbea376212 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/NativeChatAutocompleteMenus.tsx +++ b/src/renderer/src/components/native-chat/composer/pickers/NativeChatAutocompleteMenus.tsx @@ -9,8 +9,8 @@ import { cn } from '@/lib/class-names' import type { SkillSourceKind } from '../../../../../../shared/skills' import { FilenameFirstPath } from '@/components/file-path-cursor-tooltip' import { FileTypeIcon } from '@/components/FileTypeIcon' -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 { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/composer/native-chat-composer-autocomplete' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/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/composer/pickers/native-chat-picker-empty-text.ts b/src/renderer/src/components/native-chat/composer/pickers/native-chat-picker-empty-text.ts index 3f457c98a0e..ac12fcde6a3 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/native-chat-picker-empty-text.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/native-chat-picker-empty-text.ts @@ -1,6 +1,6 @@ import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' -import type { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/native-chat-composer-autocomplete' +import type { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/composer/native-chat-composer-autocomplete' /** While the host checks for new skills, an empty filter says so instead of reporting no match. */ export function nativeChatPickerEmptyText( diff --git a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-composer-catalog.ts b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-composer-catalog.ts index 8ad8fc62d20..b3a9bc918fb 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-composer-catalog.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-composer-catalog.ts @@ -4,8 +4,8 @@ import { getVerifiedNativeChatCommands } from '../../../../../../shared/native-c import type { NativeChatSessionSkill, SlashCommandSuggestion -} from '../../../../../../shared/native-chat/input/native-chat-slash-commands' -import { nativeChatSessionSkills } from '../../../../../../shared/native-chat/input/native-chat-skill-visibility' +} from '../../../../../../shared/native-chat/input/commands/native-chat-slash-commands' +import { nativeChatSessionSkills } from '../../../../../../shared/native-chat/input/commands/native-chat-skill-visibility' import { structuredSessionSlashCommands } from '../../../../../../shared/agent-session/view/structured-agent-session-composer' import { withNativeChatResumeCommand } from '@/components/native-chat/composer/pickers/use-native-chat-resume-command' import { withNativeChatSideChatRows } from '@/components/native-chat/composer/pickers/use-native-chat-side-chat-command' diff --git a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-command-dispatch.ts b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-command-dispatch.ts index db7c2810a9e..b66d728576e 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-command-dispatch.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-command-dispatch.ts @@ -13,9 +13,9 @@ import { nativeChatComposerTargetIsRemote, type NativeChatResolvedTarget } from '../submit/native-chat-composer-target' -import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import type { NativeChatSendLifecycle } from '../../session/terminal/send/use-native-chat-send-lifecycle' -import type { NativeChatPtySessionOptionsSurface } from '../../../../../../shared/native-chat/input/native-chat-pty-session-options' +import type { NativeChatPtySessionOptionsSurface } from '../../../../../../shared/native-chat/input/session-options/native-chat-pty-session-options' import { answerNativeChatCommandInComposer, type NativeChatLocalCommandAnswer diff --git a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-state.ts b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-state.ts index 095d2534398..2f499605c58 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-state.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-picker-state.ts @@ -23,16 +23,16 @@ import { editReplacesTriggerToken, isSkillPickerTriggered, type ComposerAutocomplete -} from '../../../../../../shared/native-chat/input/native-chat-composer-autocomplete' -import { applyPickerSuggestion } from '../../../../../../shared/native-chat/input/native-chat-picker-triggers' +} from '../../../../../../shared/native-chat/input/composer/native-chat-composer-autocomplete' +import { applyPickerSuggestion } from '../../../../../../shared/native-chat/input/composer/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' +} from '../../../../../../shared/native-chat/input/commands/native-chat-slash-commands' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' +import { nativeChatPickerCommands } from '../../../../../../shared/native-chat/input/commands/native-chat-skill-visibility' import { useNativeChatSkills } from './use-native-chat-skills' import { useNativeChatPreferredSuggestion } from './use-native-chat-preferred-suggestion' import { diff --git a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-preferred-suggestion.ts b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-preferred-suggestion.ts index 505608869c3..7064042d1a1 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-preferred-suggestion.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-preferred-suggestion.ts @@ -1,6 +1,6 @@ import { useCallback, useLayoutEffect, useRef, type Dispatch, type SetStateAction } from 'react' -import type { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/native-chat-composer-autocomplete' -import { preferredNativeChatPickerIndex } from '../../../../../../shared/native-chat/input/native-chat-picker-items' +import type { ComposerAutocomplete } from '../../../../../../shared/native-chat/input/composer/native-chat-composer-autocomplete' +import { preferredNativeChatPickerIndex } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' /** Highlight the best name match after every edit or caret move; arrow keys own it in between. * Returns the setter for user navigation, which pins the highlight until the next edit. */ diff --git a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-resume-command.ts b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-resume-command.ts index 69a00657551..4764e2d7ec2 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-resume-command.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-resume-command.ts @@ -2,12 +2,12 @@ import { useCallback, type Dispatch, type RefObject, type SetStateAction } from import { translate } from '@/i18n/i18n' import type { Translate } from '@/i18n/use-translate' import { useAppStore } from '@/store/index' -import type { SlashCommandSuggestion } from '../../../../../../shared/native-chat/input/native-chat-slash-commands' +import type { SlashCommandSuggestion } from '../../../../../../shared/native-chat/input/commands/native-chat-slash-commands' import type { AgentType } from '../../../../../../shared/agent-status/contracts/agent-status-types' import { isAiVaultAgent } from '../../../../../../shared/ai-vault/contracts/ai-vault-types' import { selectAiVaultPanelWorkspace } from '@/components/right-sidebar/ai-vault/scope/ai-vault-panel-workspace' import { openAgentSessionHistoryModal } from '@/components/right-sidebar/ai-vault/panel/agent-session-history-modal' -import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import type { NativeChatPickerState } from '@/components/native-chat/composer/pickers/use-native-chat-picker-state' import { findNativeChatTabOwnerWorktreeId } from '@/components/native-chat/pane/ownership/native-chat-tab-owner' import { diff --git a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-side-chat-command.ts b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-side-chat-command.ts index e593e7ef9eb..3b74c081d4e 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-side-chat-command.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-side-chat-command.ts @@ -1,13 +1,13 @@ import { useCallback, type Dispatch, type SetStateAction } from 'react' import { translate } from '@/i18n/i18n' import { mayHoldAgentReferences } from '../../../../../../shared/orchestration/mailbox/orchestration-agent-reference' -import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' -import type { SlashCommandSuggestion } from '../../../../../../shared/native-chat/input/native-chat-slash-commands' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' +import type { SlashCommandSuggestion } from '../../../../../../shared/native-chat/input/commands/native-chat-slash-commands' import { isNativeChatSideChatCommand, parseNativeChatSideChatDraft, withNativeChatSideChatCommands -} from '../../../../../../shared/native-chat/input/native-chat-side-chat-command' +} from '../../../../../../shared/native-chat/input/commands/native-chat-side-chat-command' import type { NativeChatStructuredComposerTransport } from '../submit/native-chat-structured-composer-transport' import type { NativeChatPickerState } from './use-native-chat-picker-state' import { nativeChatPendingAttachmentSnapshot } from '../../attachments/chips/native-chat-pending-attachment-cache' diff --git a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-skills.ts b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-skills.ts index 39b910f4bfe..25aab12a597 100644 --- a/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-skills.ts +++ b/src/renderer/src/components/native-chat/composer/pickers/use-native-chat-skills.ts @@ -4,7 +4,7 @@ import { useAppStore } from '../../../../store/index' import type { AgentType } from '../../../../../../shared/agent-status/contracts/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/input/native-chat-skill-visibility' +import { isNativeChatSkillForAgent } from '../../../../../../shared/native-chat/input/commands/native-chat-skill-visibility' import { callRuntimeRpc } from '@/runtime/rpc/calls/runtime-rpc-call' import { emitNativeChatSkillDiscovery } from '@/components/native-chat/telemetry/native-chat-telemetry' import { diff --git a/src/renderer/src/components/native-chat/composer/submit/native-chat-composer-send-state.ts b/src/renderer/src/components/native-chat/composer/submit/native-chat-composer-send-state.ts index 94d98623835..5870a87398c 100644 --- a/src/renderer/src/components/native-chat/composer/submit/native-chat-composer-send-state.ts +++ b/src/renderer/src/components/native-chat/composer/submit/native-chat-composer-send-state.ts @@ -1,4 +1,4 @@ -import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/native-chat-follow-up-behavior' +import type { NativeChatFollowUpBehavior } from '../../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { NativeChatComposerImageAttachment } from '../../attachments/chips/native-chat-image-attachment' import type { NativeChatStructuredComposerTransport } from './native-chat-structured-composer-transport' import type { AgentType } from '../../../../../../shared/agent-status/contracts/agent-status-types' diff --git a/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-dispatch.ts b/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-dispatch.ts index 95323569cfd..e67b546ed24 100644 --- a/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-dispatch.ts +++ b/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-dispatch.ts @@ -4,7 +4,7 @@ import { structuredAgentSessionBlocksTooLarge } from '../../../../../../shared/r import { structuredAgentSessionSendBody } from '../../../../../../shared/agent-session/requests/structured-agent-session-send-mutation' import { AGENT_SESSION_MESSAGE_TOO_LARGE_PARTS } from '../../../../../../shared/agent-session/failures/agent-session-refusal-notice' import { agentSessionWriteNoticeText } from '../../messages/notices/agent-session-write-notice-text' -import { imageReferencesToPromptMarkers } from '../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +import { imageReferencesToPromptMarkers } from '../../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import type { StructuredAgentSessionCommandOutcome } from '../../../../../../shared/agent-session/view/structured-agent-session-composer' import type { NativeChatStructuredComposerTransport } from './native-chat-structured-composer-transport' import type { NativeChatComposerImageAttachment } from '../../attachments/chips/native-chat-image-attachment' diff --git a/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-transport.ts b/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-transport.ts index 0b03de00b88..4ffd6207724 100644 --- a/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-transport.ts +++ b/src/renderer/src/components/native-chat/composer/submit/native-chat-structured-composer-transport.ts @@ -2,7 +2,7 @@ import type { CaptureStructuredAgentSessionPresentation } from '../../session/st import type { AgentSessionConversationCommand } from '../../../../../../shared/agent-session/agent-session-conversation-command' import type { NativeChatComposerImageAttachment } from '../../attachments/chips/native-chat-image-attachment' import type { StructuredAgentSessionSendRequest } from '../../session/structured/delivery/structured-agent-session-send-slot' -import type { NativeChatSendFollowUp } from '../../../../../../shared/native-chat/input/native-chat-follow-up-behavior' +import type { NativeChatSendFollowUp } from '../../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { StructuredAgentSessionCommandOutcome } from '../../../../../../shared/agent-session/view/structured-agent-session-composer' import type { SessionOptionsSurface, diff --git a/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.test.tsx b/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.test.tsx index 6e7630e71bf..3a0228590e7 100644 --- a/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.test.tsx +++ b/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.test.tsx @@ -3,7 +3,7 @@ import { act, renderHook } from '@testing-library/react' import { afterEach, describe, expect, it, vi } from 'vitest' import type { NativeChatStructuredComposerTransport } from './native-chat-structured-composer-transport' -import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import type { NativeChatComposerImageAttachment } from '../../attachments/chips/native-chat-image-attachment' import { useNativeChatStructuredComposerSend } from './use-native-chat-structured-composer-send' import { useNativeChatComposerSubmit } from './use-native-chat-composer-submit' diff --git a/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.ts b/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.ts index 2873b4e95b4..915c9f44b74 100644 --- a/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.ts +++ b/src/renderer/src/components/native-chat/composer/submit/use-native-chat-composer-submit.ts @@ -3,7 +3,7 @@ import { serializeNativeChatAgentReferences } from '../pickers/native-chat-agent import { mayHoldAgentReferences } from '../../../../../../shared/orchestration/mailbox/orchestration-agent-reference' import { useCallback, useMemo, useState, type RefObject } from 'react' import { translate } from '@/i18n/i18n' -import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import type { NativeChatComposerSendIntent } from './native-chat-composer-send-intent' import type { NativeChatStructuredComposerTransport } from './native-chat-structured-composer-transport' import type { NativeChatStructuredComposerSend } from './use-native-chat-structured-composer-send' diff --git a/src/renderer/src/components/native-chat/composer/submit/use-native-chat-pty-composer-send.ts b/src/renderer/src/components/native-chat/composer/submit/use-native-chat-pty-composer-send.ts index c863767eef1..4d3019df36f 100644 --- a/src/renderer/src/components/native-chat/composer/submit/use-native-chat-pty-composer-send.ts +++ b/src/renderer/src/components/native-chat/composer/submit/use-native-chat-pty-composer-send.ts @@ -22,10 +22,10 @@ import { nativeChatComposerTargetIsRemote, type NativeChatResolvedTarget } from './native-chat-composer-target' -import { isSlashCommandDraft } from '../../../../../../shared/native-chat/input/native-chat-slash-commands' +import { isSlashCommandDraft } from '../../../../../../shared/native-chat/input/commands/native-chat-slash-commands' import type { NativeChatPickerState } from '../pickers/use-native-chat-picker-state' import type { NativeChatSendLifecycle } from '../../session/terminal/send/use-native-chat-send-lifecycle' -import type { NativeChatPtySessionOptionsSurface } from '../../../../../../shared/native-chat/input/native-chat-pty-session-options' +import type { NativeChatPtySessionOptionsSurface } from '../../../../../../shared/native-chat/input/session-options/native-chat-pty-session-options' import type { NativeChatOptimisticSendOutcome } from '../../session/terminal/delivery/native-chat-optimistic-send-outcome' import { answerNativeChatCommandInComposer, diff --git a/src/renderer/src/components/native-chat/conversation/projection/native-chat-conversation-projection.ts b/src/renderer/src/components/native-chat/conversation/projection/native-chat-conversation-projection.ts index cc4651258a6..8af3c5ed545 100644 --- a/src/renderer/src/components/native-chat/conversation/projection/native-chat-conversation-projection.ts +++ b/src/renderer/src/components/native-chat/conversation/projection/native-chat-conversation-projection.ts @@ -1,6 +1,6 @@ import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import { projectNativeChatTaskListFrame } from '../../../../../../shared/native-chat/input/native-chat-task-list-frames' -import { isNativeChatThreadGoalRow } from '../../../../../../shared/native-chat/transcript/native-chat-thread-goal-rows' +import { projectNativeChatTaskListFrame } from '../../../../../../shared/native-chat/input/task-lists/native-chat-task-list-frames' +import { isNativeChatThreadGoalRow } from '../../../../../../shared/native-chat/transcript/turns/native-chat-thread-goal-rows' /** These independent transforms consume folded rows; unchanged rows need no block inspection. */ export function createNativeChatConversationProjection() { diff --git a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-projection.ts b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-projection.ts index 2c69315490c..3fcd87ae15c 100644 --- a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-projection.ts +++ b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-projection.ts @@ -7,18 +7,18 @@ import { import { hostStatesTurnScopes, type NativeChatTurnJournal -} from '../../../../../../shared/native-chat/transcript/native-chat-turn-membership' +} from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-membership' import { compareNativeChatDisplayMessages as compareMessages, nativeChatDisplaySortRank, orderNativeChatDisplayMessages as orderMessages -} from '../../../../../../shared/native-chat/transcript/native-chat-message-order' -import { buildNativeChatFoldUnits } from '../../../../../../shared/native-chat/transcript/native-chat-fold-units' +} from '../../../../../../shared/native-chat/transcript/messages/native-chat-message-order' +import { buildNativeChatFoldUnits } from '../../../../../../shared/native-chat/transcript/folding/native-chat-fold-units' import { nativeChatToolFoldKind, type NativeChatToolFoldKind } from '../../../../../../shared/native-chat/tools/native-chat-tool-fold' -import { foldSubagentItems } from '../../../../../../shared/native-chat/transcript/native-chat-subagent-items' +import { foldSubagentItems } from '../../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' import { stripNoiseMessages } from '../../../../../../shared/native-chat/native-chat-noise' import { agentJournalItemSubagentId } from '../../../../../../shared/agent-session/journal/agent-session-journal-producer' import { reuseUnits } from './native-chat-message-list-reuse' diff --git a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-reuse.ts b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-reuse.ts index efe782103a3..5b526203ee6 100644 --- a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-reuse.ts +++ b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-reuse.ts @@ -3,19 +3,19 @@ import { sameNativeChatRowPlacement, type NativeChatSubagentRow } from '../../../../../../shared/native-chat/transcript/native-chat-transcript-projection' -import type { NativeChatTurnJournal } from '../../../../../../shared/native-chat/transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-membership' import { compareNativeChatDisplayMessages as compareMessages, nativeChatDisplaySortRank -} from '../../../../../../shared/native-chat/transcript/native-chat-message-order' +} from '../../../../../../shared/native-chat/transcript/messages/native-chat-message-order' import { buildNativeChatFoldUnit, groupNativeChatFoldUnitMembers, type NativeChatFoldUnit -} from '../../../../../../shared/native-chat/transcript/native-chat-fold-units' +} from '../../../../../../shared/native-chat/transcript/folding/native-chat-fold-units' import { nativeChatToolFoldKind } from '../../../../../../shared/native-chat/tools/native-chat-tool-fold' import { isOrphanRowId } from '../../../../../../shared/native-chat/tools/native-chat-folded-tool-results' -import { subagentItemBlock } from '../../../../../../shared/native-chat/transcript/native-chat-subagent-items' +import { subagentItemBlock } from '../../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' import { stripNoiseMessages } from '../../../../../../shared/native-chat/native-chat-noise' import { agentJournalItemSubagentId } from '../../../../../../shared/agent-session/journal/agent-session-journal-producer' import { appendedSubagentTurnKey, appendedTurnNeutralItems } from './native-chat-message-list-turns' diff --git a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-turns.ts b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-turns.ts index dbc25630126..880c46ff726 100644 --- a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-turns.ts +++ b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-turns.ts @@ -1,6 +1,6 @@ import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' import type { NativeChatSubagentRow } from '../../../../../../shared/native-chat/transcript/native-chat-transcript-projection' -import type { NativeChatTurnJournal } from '../../../../../../shared/native-chat/transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-membership' import type { AgentJournalRenderItem } from '../../../../../../shared/agent-session/journal/agent-session-journal-types' import { compareAgentJournalItems } from '../../../../../../shared/agent-session/journal/agent-session-journal-position' import { readAgentJournalTurn } from '../../../../../../shared/agent-session/lifecycle/records/agent-session-turn-record' diff --git a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-units.ts b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-units.ts index 2f027dcbb7a..32a8b922523 100644 --- a/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-units.ts +++ b/src/renderer/src/components/native-chat/conversation/projection/native-chat-message-list-units.ts @@ -1,7 +1,7 @@ import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' import type { NativeChatTranscriptProjection } from '../../../../../../shared/native-chat/transcript/native-chat-transcript-projection' -import type { NativeChatTurnJournal } from '../../../../../../shared/native-chat/transcript/native-chat-turn-membership' -import type { NativeChatFoldUnit } from '../../../../../../shared/native-chat/transcript/native-chat-fold-units' +import type { NativeChatTurnJournal } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-membership' +import type { NativeChatFoldUnit } from '../../../../../../shared/native-chat/transcript/folding/native-chat-fold-units' import type { NativeChatToolFoldKind } from '../../../../../../shared/native-chat/tools/native-chat-tool-fold' function sameMessage(left: NativeChatMessage, right: NativeChatMessage): boolean { diff --git a/src/renderer/src/components/native-chat/conversation/slots/native-chat-compaction-visibility.test.ts b/src/renderer/src/components/native-chat/conversation/slots/native-chat-compaction-visibility.test.ts index 2e1a9dce15f..74ef0632c49 100644 --- a/src/renderer/src/components/native-chat/conversation/slots/native-chat-compaction-visibility.test.ts +++ b/src/renderer/src/components/native-chat/conversation/slots/native-chat-compaction-visibility.test.ts @@ -1,7 +1,7 @@ import { readFile } from 'node:fs/promises' import { describe, expect, it } from 'vitest' -import { nativeChatTurnMembership } from '../../../../../../shared/native-chat/transcript/native-chat-turn-membership' -import { selectNativeChatTurnStatuses } from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +import { nativeChatTurnMembership } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-membership' +import { selectNativeChatTurnStatuses } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import { selectStructuredAgentSettledTurns } from '../../../../../../shared/agent-session/view/structured-agent-session-turn-timing' import { projectStructuredAgentSessionMessages } from '../projection/structured-agent-session-message-projection' import { buildNativeChatTranscriptSlots } from './native-chat-transcript-slots' diff --git a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-input.ts b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-input.ts index 1f70971fa76..c32ce60e328 100644 --- a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-input.ts +++ b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-input.ts @@ -1,5 +1,5 @@ import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import type { NativeChatTurnStatus } from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatTurnStatus } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import type { NativeChatResolvedPrompt } from '../../../../../../shared/native-chat/native-chat-resolution-receipt' import type { NativeChatTurnDiff } from '../../../../../../shared/native-chat/tools/native-chat-turn-diffs' import type { NativeChatOpenedPullRequest } from '../../../../../../shared/native-chat/tools/native-chat-opened-pull-requests' @@ -7,7 +7,7 @@ import type { NativeChatRowTypography } from '../../viewport/virtualization/nati import type { NativeChatSideChatForkOffer } from '../../messages/actions/native-chat-side-chat-fork-point' import type { NativeChatSubagentHead } from '../../subagents/native-chat-subagent-scope' -import type { NativeChatMarkdownImageSources } from '../../../../../../shared/native-chat/transcript/native-chat-generated-image-answers' +import type { NativeChatMarkdownImageSources } from '../../../../../../shared/native-chat/transcript/images/native-chat-generated-image-answers' export type NativeChatTranscriptSlotsInput = { imageSources?: NativeChatMarkdownImageSources diff --git a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slot-selection.ts b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slot-selection.ts index e43e5fff5df..ef820f417e3 100644 --- a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slot-selection.ts +++ b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slot-selection.ts @@ -2,7 +2,7 @@ import type { AgentJournalRenderItem, AgentJournalSubmission } from '../../../../../../shared/agent-session/journal/agent-session-journal-types' -import { nativeChatMessagesWaitingBehindLiveTurn } from '../../../../../../shared/native-chat/transcript/native-chat-messages-waiting-behind-live-turn' +import { nativeChatMessagesWaitingBehindLiveTurn } from '../../../../../../shared/native-chat/transcript/turns/native-chat-messages-waiting-behind-live-turn' import type { NativeChatTranscriptSlot } from './native-chat-transcript-slots' export function nativeChatSlotKey(slot: NativeChatTranscriptSlot): string { diff --git a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.test.ts b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.test.ts index a6725a8eff4..def2fa7073b 100644 --- a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.test.ts +++ b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.test.ts @@ -4,7 +4,7 @@ import { nativeChatAgentRowWords } from '../../messages/rows/native-chat-message import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import type { NativeChatTurnStatus } from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatTurnStatus } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import type { NativeChatResolvedPrompt } from '../../../../../../shared/native-chat/native-chat-resolution-receipt' import type { NativeChatTurnDiff } from '../../../../../../shared/native-chat/tools/native-chat-turn-diffs' diff --git a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.ts b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.ts index 57c11686826..e5e156e2b58 100644 --- a/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.ts +++ b/src/renderer/src/components/native-chat/conversation/slots/native-chat-transcript-slots.ts @@ -4,15 +4,15 @@ import type { NativeChatMessage, NativeChatSubagentEntry } 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/transcript/native-chat-live-turn-membership' -import { nativeChatTurnBarRows } from '../../../../../../shared/native-chat/transcript/native-chat-turn-grouping' +import type { NativeChatTurnStatus } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' +import { isNativeChatRowInLiveWorkingTurn } from '../../../../../../shared/native-chat/transcript/turns/native-chat-live-turn-membership' +import { nativeChatTurnBarRows } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-grouping' import { nativeChatTurnFold, nativeChatTurnFoldRow -} from '../../../../../../shared/native-chat/transcript/native-chat-turn-fold' -import { nativeChatRowRendersContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' -import { nativeChatGeneratedImageAnswers } from '../../../../../../shared/native-chat/transcript/native-chat-generated-image-answers' +} from '../../../../../../shared/native-chat/transcript/folding/native-chat-turn-fold' +import { nativeChatRowRendersContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' +import { nativeChatGeneratedImageAnswers } from '../../../../../../shared/native-chat/transcript/images/native-chat-generated-image-answers' import { nativeChatMarkdownImageSources } from '../../markdown/native-chat-markdown-image-sources' import { estimateNativeChatRowHeight, @@ -23,7 +23,7 @@ import type { NativeChatResolvedPrompt } from '../../../../../../shared/native-c import type { NativeChatTurnDiff } from '../../../../../../shared/native-chat/tools/native-chat-turn-diffs' import type { NativeChatOpenedPullRequest } from '../../../../../../shared/native-chat/tools/native-chat-opened-pull-requests' import type { NativeChatSubagentHead } from '../../subagents/native-chat-subagent-scope' -import { compareNativeChatDisplayMessages as compareMessages } from '../../../../../../shared/native-chat/transcript/native-chat-message-order' +import { compareNativeChatDisplayMessages as compareMessages } from '../../../../../../shared/native-chat/transcript/messages/native-chat-message-order' import { isGeneratedImageOperation } from '../../../../../../shared/native-chat/native-chat-generated-image' import { nativeChatRowRendersProse, diff --git a/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-transcript-slots.ts b/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-transcript-slots.ts index cbd124834d2..a88c7d6db9c 100644 --- a/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-transcript-slots.ts +++ b/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-transcript-slots.ts @@ -7,8 +7,8 @@ import { useContext, useMemo } from 'react' import { nativeChatLiveLine, type NativeChatLiveLine -} from '../../../../../../shared/native-chat/transcript/native-chat-live-line' -import { isNativeChatRowInLiveWorkingTurn } from '../../../../../../shared/native-chat/transcript/native-chat-live-turn-membership' +} from '../../../../../../shared/native-chat/transcript/row-content/native-chat-live-line' +import { isNativeChatRowInLiveWorkingTurn } from '../../../../../../shared/native-chat/transcript/turns/native-chat-live-turn-membership' import { buildNativeChatTranscript, type NativeChatTranscriptSlot diff --git a/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-turn-membership.ts b/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-turn-membership.ts index a487225318c..fab0623e396 100644 --- a/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-turn-membership.ts +++ b/src/renderer/src/components/native-chat/conversation/slots/use-native-chat-turn-membership.ts @@ -5,8 +5,8 @@ import type { } from '../../../../../../shared/agent-session/journal/agent-session-journal-types' import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' import type { AgentSessionLatestTurn } from '../../../../../../shared/agent-session/agent-session-wire' -import { nativeChatTurnMembership } from '../../../../../../shared/native-chat/transcript/native-chat-turn-membership' -import { nativeChatRowsInDrawOrder } from '../../../../../../shared/native-chat/transcript/native-chat-turn-grouping' +import { nativeChatTurnMembership } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-membership' +import { nativeChatRowsInDrawOrder } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-grouping' export type NativeChatTurnRows = { messages: readonly NativeChatMessage[] diff --git a/src/renderer/src/components/native-chat/conversation/turns/NativeChatWorkingStatus.tsx b/src/renderer/src/components/native-chat/conversation/turns/NativeChatWorkingStatus.tsx index 1a5ccd10aa8..f1864c56388 100644 --- a/src/renderer/src/components/native-chat/conversation/turns/NativeChatWorkingStatus.tsx +++ b/src/renderer/src/components/native-chat/conversation/turns/NativeChatWorkingStatus.tsx @@ -5,7 +5,7 @@ import { cn } from '@/lib/class-names' import { describeNativeChatTurnStatus, NATIVE_CHAT_TURN_STATUS_COPY -} from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import type { AgentTurnOutcome } from '../../../../../../shared/agent-status/lifecycle/agent-turn-outcome' import { useNativeChatElapsedSeconds } from './use-native-chat-elapsed-seconds' diff --git a/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-elapsed-seconds.ts b/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-elapsed-seconds.ts index 78459e45fbd..421e05fa8bd 100644 --- a/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-elapsed-seconds.ts +++ b/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-elapsed-seconds.ts @@ -1,6 +1,6 @@ import { useState } from 'react' import { useNow } from '@/hooks/use-now' -import { nativeChatElapsedSeconds } from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +import { nativeChatElapsedSeconds } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' /** Share one visibility-gated second clock across running turns to avoid per-turn intervals and commits. */ export function useNativeChatElapsedSeconds(startedAt: number | null, counting: boolean): number { diff --git a/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-terminal-turn-timing.ts b/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-terminal-turn-timing.ts index d05f6084895..9a8912d766a 100644 --- a/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-terminal-turn-timing.ts +++ b/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-terminal-turn-timing.ts @@ -1,7 +1,7 @@ import { useMemo } from 'react' import { useAppStore } from '../../../../store/index' import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import type { NativeChatSettledTurns } from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatSettledTurns } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import { nativeChatHookLatestTurnWorkedSeconds, nativeChatHookTurnStartedAt, diff --git a/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-turn-status.ts b/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-turn-status.ts index 83822d19bc7..fe4bcc2e396 100644 --- a/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-turn-status.ts +++ b/src/renderer/src/components/native-chat/conversation/turns/use-native-chat-turn-status.ts @@ -6,7 +6,7 @@ import { type NativeChatSettledTurns, type NativeChatTurnStatus, type NativeChatTurnTimingByTurn -} from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' export function useNativeChatTurnStatus({ turnKeys, diff --git a/src/renderer/src/components/native-chat/conversation/turns/use-structured-agent-turn-timing.ts b/src/renderer/src/components/native-chat/conversation/turns/use-structured-agent-turn-timing.ts index 87566afe142..7610f060382 100644 --- a/src/renderer/src/components/native-chat/conversation/turns/use-structured-agent-turn-timing.ts +++ b/src/renderer/src/components/native-chat/conversation/turns/use-structured-agent-turn-timing.ts @@ -3,7 +3,7 @@ import type { AgentJournalRenderItem, AgentJournalSubmission } from '../../../../../../shared/agent-session/journal/agent-session-journal-types' -import type { NativeChatSettledTurns } from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +import type { NativeChatSettledTurns } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import type { AgentSessionLatestTurn } from '../../../../../../shared/agent-session/agent-session-wire' import type { StructuredAgentHostClock } from '../../../../../../shared/agent-session/structured-agent-session-reducer' import { selectStructuredAgentTurnBars } from '../../../../../../shared/agent-session/view/structured-agent-session-turn-timing' diff --git a/src/renderer/src/components/native-chat/drafts/native-chat-sent-prompt-history.ts b/src/renderer/src/components/native-chat/drafts/native-chat-sent-prompt-history.ts index 4c999d512cb..c96ca53f2d1 100644 --- a/src/renderer/src/components/native-chat/drafts/native-chat-sent-prompt-history.ts +++ b/src/renderer/src/components/native-chat/drafts/native-chat-sent-prompt-history.ts @@ -1,14 +1,14 @@ // Derive recall from the visible conversation at keypress so reloads, remounts and other clients’ sends need no separate history. -import { deriveNativeChatRowContent } from '../../../../../shared/native-chat/transcript/native-chat-row-content' -import { stripSentImagePromptMarkers } from '../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +import { deriveNativeChatRowContent } from '../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' +import { stripSentImagePromptMarkers } from '../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import { projectNativeChatTranscriptMessages } from '../../../../../shared/native-chat/transcript/native-chat-transcript-projection' import type { NativeChatMessage } from '../../../../../shared/native-chat/native-chat-types' import type { NativeChatCommandMarker } from '../session/terminal/delivery/native-chat-command-marker' import { compareNativeChatDisplayMessages as compareMessages, orderNativeChatDisplayMessages as orderMessages -} from '../../../../../shared/native-chat/transcript/native-chat-message-order' +} from '../../../../../shared/native-chat/transcript/messages/native-chat-message-order' export type NativeChatRecallSource = { messages: readonly NativeChatMessage[] diff --git a/src/renderer/src/components/native-chat/drafts/use-native-chat-launch-draft-adoption.ts b/src/renderer/src/components/native-chat/drafts/use-native-chat-launch-draft-adoption.ts index 75357341961..dd64ce97276 100644 --- a/src/renderer/src/components/native-chat/drafts/use-native-chat-launch-draft-adoption.ts +++ b/src/renderer/src/components/native-chat/drafts/use-native-chat-launch-draft-adoption.ts @@ -6,7 +6,7 @@ import { launchDraftResolvedByTranscript, nativeChatLaunchDraftTurnBaseline, type NativeChatLaunchDraftTurnBaseline -} from '../../../../../shared/native-chat/transcript/native-chat-launch-draft-resolution' +} from '../../../../../shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution' import { isNativeChatTranscriptUnsettled, type ReadState diff --git a/src/renderer/src/components/native-chat/drafts/use-native-chat-terminal-draft-pickup.ts b/src/renderer/src/components/native-chat/drafts/use-native-chat-terminal-draft-pickup.ts index f6a2d56d7d0..32361a1b7c7 100644 --- a/src/renderer/src/components/native-chat/drafts/use-native-chat-terminal-draft-pickup.ts +++ b/src/renderer/src/components/native-chat/drafts/use-native-chat-terminal-draft-pickup.ts @@ -5,8 +5,8 @@ import type { TuiAgent } from '../../../../../shared/agent-launch/catalog/tui-ag import { isTuiAgent } from '../../../../../shared/agent-launch/catalog/tui-agent-config' import type { NativeChatLaunchSeed } from './native-chat-launch-seed' import { PASTED_CONTENT_PLACEHOLDER } from '../../../../../shared/agent-launch/startup/agent-prompt-injection' -import { IMAGE_PROMPT_MARKER } from '../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' -import { canMirrorLaunchDraftToNativeChat } from '../../../../../shared/native-chat/input/native-chat-launch-draft-mirrorability' +import { IMAGE_PROMPT_MARKER } from '../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' +import { canMirrorLaunchDraftToNativeChat } from '../../../../../shared/native-chat/input/composer/native-chat-launch-draft-mirrorability' export type NativeChatTerminalDraftPickup = | { kind: 'seed'; draft: NativeChatLaunchDraft } diff --git a/src/renderer/src/components/native-chat/markdown/native-chat-markdown-image-sources.ts b/src/renderer/src/components/native-chat/markdown/native-chat-markdown-image-sources.ts index 58a741d7c45..49d9830ce3f 100644 --- a/src/renderer/src/components/native-chat/markdown/native-chat-markdown-image-sources.ts +++ b/src/renderer/src/components/native-chat/markdown/native-chat-markdown-image-sources.ts @@ -12,7 +12,7 @@ import { } from '../../sidebar/comment-markdown-sanitize' import { remarkUnknownHtmlAsText } from '../../sidebar/comment-markdown-unknown-html-as-text' import type { NativeChatMessage } from '../../../../../shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../../shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' import { commentMarkdownRemarkPlugins } from '../../sidebar/comment-markdown-remark-plugins' import { remarkChatMath } from '../../sidebar/chat-markdown-math' import { remarkNativeChatFileDestinations } from './native-chat-markdown-file-destinations' diff --git a/src/renderer/src/components/native-chat/markdown/native-chat-reply-reveals.ts b/src/renderer/src/components/native-chat/markdown/native-chat-reply-reveals.ts index d1a379f6d9d..fe9a5ba8e96 100644 --- a/src/renderer/src/components/native-chat/markdown/native-chat-reply-reveals.ts +++ b/src/renderer/src/components/native-chat/markdown/native-chat-reply-reveals.ts @@ -3,7 +3,7 @@ import { createNativeChatReplyRevealTracker, trackNativeChatReplyRows, type NativeChatReplyReveals -} from '../../../../../shared/native-chat/transcript/native-chat-reply-reveals' +} from '../../../../../shared/native-chat/transcript/row-content/native-chat-reply-reveals' /** Absent outside a transcript: such a row neither begins nor is remembered. */ export const NativeChatReplyRevealsContext = createContext(null) diff --git a/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.remount.test.tsx b/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.remount.test.tsx index d54882bccf1..f0c116082c8 100644 --- a/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.remount.test.tsx +++ b/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.remount.test.tsx @@ -3,7 +3,7 @@ import { act, cleanup, renderHook } from '@testing-library/react' import type { ReactNode } from 'react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { NativeChatReplyRevealsContext } from './native-chat-reply-reveals' -import type { NativeChatReplyReveals } from '../../../../../shared/native-chat/transcript/native-chat-reply-reveals' +import type { NativeChatReplyReveals } from '../../../../../shared/native-chat/transcript/row-content/native-chat-reply-reveals' import { useNativeChatPacedText } from './use-native-chat-paced-text' diff --git a/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.ts b/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.ts index 65d4ac79431..4371dcb6873 100644 --- a/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.ts +++ b/src/renderer/src/components/native-chat/markdown/use-native-chat-paced-text.ts @@ -8,7 +8,7 @@ import { startNativeChatTextReveal, type NativeChatTextReveal, type NativeChatTextRevealFrames -} from '../../../../../shared/native-chat/transcript/native-chat-text-reveal' +} from '../../../../../shared/native-chat/transcript/row-content/native-chat-text-reveal' const WORD_FADE_MS = 300 diff --git a/src/renderer/src/components/native-chat/messages/actions/native-chat-message-copy-text.ts b/src/renderer/src/components/native-chat/messages/actions/native-chat-message-copy-text.ts index bc09b3a4b97..ad36b2aa7d1 100644 --- a/src/renderer/src/components/native-chat/messages/actions/native-chat-message-copy-text.ts +++ b/src/renderer/src/components/native-chat/messages/actions/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/transcript/native-chat-message-copy-text' +import { nativeChatMessageCopyText } from '../../../../../../shared/native-chat/transcript/messages/native-chat-message-copy-text' import { nativeChatStoppedBeforeStartLabel } from '../rows/native-chat-stopped-before-start-row' import type { NativeChatTranscriptSlot } from '../../conversation/slots/native-chat-transcript-slots' diff --git a/src/renderer/src/components/native-chat/messages/actions/use-native-chat-reveal-latest.ts b/src/renderer/src/components/native-chat/messages/actions/use-native-chat-reveal-latest.ts index 9bd811f738e..f8ee6e9472e 100644 --- a/src/renderer/src/components/native-chat/messages/actions/use-native-chat-reveal-latest.ts +++ b/src/renderer/src/components/native-chat/messages/actions/use-native-chat-reveal-latest.ts @@ -1,6 +1,6 @@ import { useCallback, useImperativeHandle, useMemo, useRef } from 'react' import { useAppStore } from '@/store' -import { hasAskAnswer } from '../../../../../../shared/native-chat/input/native-chat-ask-answer' +import { hasAskAnswer } from '../../../../../../shared/native-chat/input/questions/native-chat-ask-answer' import { nativeChatScrollsToLatestOnSend } from '../../../../../../shared/native-chat/native-chat-appearance-settings' import { nativeChatSlotCopyText } from './native-chat-message-copy-text' import type { NativeChatTranscriptSlot } from '../../conversation/slots/native-chat-transcript-slots' diff --git a/src/renderer/src/components/native-chat/messages/reasoning/NativeChatReasoningRow.tsx b/src/renderer/src/components/native-chat/messages/reasoning/NativeChatReasoningRow.tsx index 32a491732c9..ab9c6c3e1fb 100644 --- a/src/renderer/src/components/native-chat/messages/reasoning/NativeChatReasoningRow.tsx +++ b/src/renderer/src/components/native-chat/messages/reasoning/NativeChatReasoningRow.tsx @@ -6,7 +6,7 @@ import { nativeChatReasoningDisclosureKey, nativeChatReasoningHeadline, type NativeChatReasoningHeadline -} from '../../../../../../shared/native-chat/transcript/native-chat-reasoning-row' +} from '../../../../../../shared/native-chat/transcript/row-content/native-chat-reasoning-row' import { NativeChatReasoningBody, NativeChatReasoningChevron diff --git a/src/renderer/src/components/native-chat/messages/reasoning/NativeChatTurnActivityLine.tsx b/src/renderer/src/components/native-chat/messages/reasoning/NativeChatTurnActivityLine.tsx index 5db38688af7..fe909831d2e 100644 --- a/src/renderer/src/components/native-chat/messages/reasoning/NativeChatTurnActivityLine.tsx +++ b/src/renderer/src/components/native-chat/messages/reasoning/NativeChatTurnActivityLine.tsx @@ -2,12 +2,12 @@ import { useId } from 'react' import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible' import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' -import type { NativeChatLiveLine } from '../../../../../../shared/native-chat/transcript/native-chat-live-line' -import { nativeChatReasoningDisclosureKey } from '../../../../../../shared/native-chat/transcript/native-chat-reasoning-row' +import type { NativeChatLiveLine } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-live-line' +import { nativeChatReasoningDisclosureKey } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-reasoning-row' import { describeNativeChatActiveTurnLabel, type NativeChatActiveTurnLabel -} from '../../../../../../shared/native-chat/transcript/native-chat-turn-status' +} from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import { NativeChatReasoningBody, NativeChatReasoningChevron diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatAgentMessageCard.test.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatAgentMessageCard.test.tsx index d91380803ff..89636610107 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatAgentMessageCard.test.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatAgentMessageCard.test.tsx @@ -29,7 +29,7 @@ import { type NativeChatVisualOwner } from '../../media/visuals/native-chat-visual-owner' import { useNativeChatTranscriptSlots } from '../../conversation/slots/use-native-chat-transcript-slots' -import { nativeChatGeneratedImageAnswers } from '../../../../../../shared/native-chat/transcript/native-chat-generated-image-answers' +import { nativeChatGeneratedImageAnswers } from '../../../../../../shared/native-chat/transcript/images/native-chat-generated-image-answers' import { projectStructuredAgentStartItem } from '../../../../../../shared/structured-agent-start-projection' import { projectStructuredQuestionMessages } from '../../../../../../shared/structured-agent-question-projection' import { desktopStructuredTranscript } from '../../conversation/projection/structured-agent-session-message-projection' @@ -37,7 +37,7 @@ import { desktopStructuredTranscript } from '../../conversation/projection/struc import { projectStructuredItemToNativeChat } from '../../../../../../shared/agent-session/view/structured-agent-session-projection' import { isAdmissibleAgentJournalRenderItem } from '../../../../../../shared/agent-session/journal/agent-session-journal-schemas' import { agentMessageHeading } from '../../../../../../shared/agent-session/agent-message-presentation' -import { nativeChatTurnFoldRow } from '../../../../../../shared/native-chat/transcript/native-chat-turn-fold' +import { nativeChatTurnFoldRow } from '../../../../../../shared/native-chat/transcript/folding/native-chat-turn-fold' import { isNoiseMessage } from '../../../../../../shared/native-chat/native-chat-noise' import { nativeChatRowSpeaksOrActs } from '../../../../../../shared/native-chat/native-chat-trailing-run' import type { AgentJournalRenderItem } from '../../../../../../shared/agent-session/journal/agent-session-journal-types' diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatAssistantMessageRow.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatAssistantMessageRow.tsx index 5020d7ff3ec..fd34b506bea 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatAssistantMessageRow.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatAssistantMessageRow.tsx @@ -4,7 +4,7 @@ import { isRootAgentJournalItem } from '../../../../../../shared/agent-session/j import { NativeChatForkSlotContext } from '../actions/native-chat-fork-context' import { nativeChatAgentRowWords } from './native-chat-message-row-words' import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import type { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' +import type { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' import type { MessageRowProps } from './NativeChatMessageRow' import { NativeChatPacedMarkdown } from '../../markdown/NativeChatPacedMarkdown' import { NATIVE_CHAT_QUOTE_SOURCE_PROPS } from '../../selection-quotes/native-chat-quote-selection' diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageRow.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageRow.tsx index 3d338bf9b07..fa719e9ba79 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageRow.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageRow.tsx @@ -8,7 +8,7 @@ import type { NativeChatMessage, NativeChatToolCallBlock } from '../../../../../../shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' import { NativeChatReasoningRow } from '../reasoning/NativeChatReasoningRow' import { NativeChatNoticeRow } from '../notices/NativeChatNoticeRow' import { nativeChatNoticeBlock } from '../../../../../../shared/native-chat/native-chat-notice' diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageTimestamp.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageTimestamp.tsx index 3bdb260aba1..0e124a5ce72 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageTimestamp.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatMessageTimestamp.tsx @@ -6,7 +6,7 @@ import { cn } from '@/lib/class-names' import { getNativeChatMessageDay, getNativeChatMessageTimeFormatter -} from '../../../../../../shared/native-chat/transcript/native-chat-message-time' +} from '../../../../../../shared/native-chat/transcript/messages/native-chat-message-time' export function NativeChatMessageTimestamp({ timestamp, diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.tsx index 10811057885..c395865fabf 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatTranscriptRow.tsx @@ -7,7 +7,7 @@ import { NativeChatWorkingStatus } from '../../conversation/turns/NativeChatWork import { NativeChatTurnDiffRollup } from '../../tools/diffs/NativeChatTurnDiffRollup' import { NativeChatOpenedPullRequestCard } from '../../tools/pull-requests/NativeChatOpenedPullRequestCard' import { NativeChatSubagentHead } from '../../subagents/NativeChatSubagentHead' -import type { NativeChatTaskListPredecessors } from '../../../../../../shared/native-chat/input/native-chat-task-list-history' +import type { NativeChatTaskListPredecessors } from '../../../../../../shared/native-chat/input/task-lists/native-chat-task-list-history' import type { NativeChatTranscriptSlot } from '../../conversation/slots/native-chat-transcript-slots' import type { NativeChatTimedRow } from '../../conversation/slots/native-chat-timed-rows' import type { diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageFold.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageFold.tsx index 97679809291..c2c6b619eb7 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageFold.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageFold.tsx @@ -3,7 +3,7 @@ import { Button } from '@/components/ui/button' import { useTranslate } from '@/i18n/use-translate' import { cn } from '@/lib/class-names' import { useNativeChatDisclosure } from '../disclosure/native-chat-disclosure-store' -import { nativeChatUserMessageFolds } from '../../../../../../shared/native-chat/transcript/native-chat-user-message-fold' +import { nativeChatUserMessageFolds } from '../../../../../../shared/native-chat/transcript/folding/native-chat-user-message-fold' import { NATIVE_CHAT_UNKERNED_CSS, nativeChatTextHasUnkernedRun diff --git a/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageRow.tsx b/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageRow.tsx index df108d0b5cb..7bf884cb1d8 100644 --- a/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageRow.tsx +++ b/src/renderer/src/components/native-chat/messages/rows/NativeChatUserMessageRow.tsx @@ -17,7 +17,7 @@ import { NativeChatMessageTimestamp } from './NativeChatMessageTimestamp' import { NativeChatAgentMessageCard } from './NativeChatAgentMessageCard' import { NativeChatDetailsDisclosure } from '../diagnostics/NativeChatProviderDetails' import { NativeChatImageAttachments } from '../../media/images/NativeChatImageAttachments' -import type { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' +import type { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' const USER_META_REVEAL = 'transition-opacity can-hover:pointer-events-none can-hover:opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 [.group:has(:focus-visible)_&]:pointer-events-auto [.group:has(:focus-visible)_&]:opacity-100' diff --git a/src/renderer/src/components/native-chat/messages/rows/native-chat-message-row-words.ts b/src/renderer/src/components/native-chat/messages/rows/native-chat-message-row-words.ts index 45983b81fce..890e4606db3 100644 --- a/src/renderer/src/components/native-chat/messages/rows/native-chat-message-row-words.ts +++ b/src/renderer/src/components/native-chat/messages/rows/native-chat-message-row-words.ts @@ -2,8 +2,8 @@ import type { NativeChatBlock, NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' -import { withoutSentImagePromptMarkers } from '../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' +import { withoutSentImagePromptMarkers } from '../../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import { nativeChatBlocksInOwnWords } from '../../../../../../shared/native-chat/native-chat-stopped-before-start' import { nativeChatStoppedBeforeStartLabel } from './native-chat-stopped-before-start-row' import type { Translate } from '../../../../i18n/use-translate' diff --git a/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts b/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts index bdb25e0d802..b5fa87497de 100644 --- a/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts +++ b/src/renderer/src/components/native-chat/pane/routing/use-native-chat-toggle-shortcut.ts @@ -15,7 +15,7 @@ import type { AgentType } from '../../../../../../shared/agent-status/contracts/ import type { TerminalLayoutSnapshot } from '../../../../../../shared/workspace-layout/terminal-tab-types' import { resolveNativeChatTabAgentEvidence } from '../../../tab-bar/native-chat-tab-agent-evidence' import { canToggleNativeChat } from '../../../../../../shared/native-chat/native-chat-availability' -import { isNativeChatTranscriptLocalReadable } from '../../../../../../shared/native-chat/transcript/native-chat-transcript-readability' +import { isNativeChatTranscriptLocalReadable } from '../../../../../../shared/native-chat/transcript/messages/native-chat-transcript-readability' import { matchesNativeChatToggleShortcut } from './native-chat-shortcut' import { getShortcutPlatform } from '@/lib/keyboard/shortcut-platform' import { getConnectionIdFromState } from '@/lib/workspace/ownership/connection-owner-resolution' diff --git a/src/renderer/src/components/native-chat/paste/native-chat-clipboard-payload.ts b/src/renderer/src/components/native-chat/paste/native-chat-clipboard-payload.ts index f0997e84537..8fa4a70f145 100644 --- a/src/renderer/src/components/native-chat/paste/native-chat-clipboard-payload.ts +++ b/src/renderer/src/components/native-chat/paste/native-chat-clipboard-payload.ts @@ -2,7 +2,7 @@ import { isMacPlatform } from '../pane/routing/native-chat-shortcut' import { clipboardEventPromptText, textOnlyLabelsCopiedFiles -} from '../../../../../shared/native-chat/input/native-chat-clipboard-event' +} from '../../../../../shared/native-chat/input/composer/native-chat-clipboard-event' import { withPastedLinks } from './native-chat-pasted-links' /** Accept native pane clipboard events and React synthetic events. */ diff --git a/src/renderer/src/components/native-chat/paste/native-chat-image-paste.ts b/src/renderer/src/components/native-chat/paste/native-chat-image-paste.ts index b5bae4b196b..0462fa059c4 100644 --- a/src/renderer/src/components/native-chat/paste/native-chat-image-paste.ts +++ b/src/renderer/src/components/native-chat/paste/native-chat-image-paste.ts @@ -1,4 +1,4 @@ -import { NATIVE_CHAT_PASTE_FOLDER } from '../../../../../shared/native-chat/input/native-chat-paste-folder' +import { NATIVE_CHAT_PASTE_FOLDER } from '../../../../../shared/native-chat/input/composer/native-chat-paste-folder' import { isNativeChatPastedImagePath } from '../../../../../shared/native-chat/native-chat-image-label' /** Recognize legacy paste-folder paths; main still validates the actual file before restore. */ diff --git a/src/renderer/src/components/native-chat/paste/use-native-chat-composer-paste.ts b/src/renderer/src/components/native-chat/paste/use-native-chat-composer-paste.ts index 9f5f76c6efd..6fd26a3f509 100644 --- a/src/renderer/src/components/native-chat/paste/use-native-chat-composer-paste.ts +++ b/src/renderer/src/components/native-chat/paste/use-native-chat-composer-paste.ts @@ -12,7 +12,7 @@ import { readClipboardPasteText, type ClipboardEventLike } from './native-chat-clipboard-payload' -import { clipboardEventImageFile } from '../../../../../shared/native-chat/input/native-chat-clipboard-event' +import { clipboardEventImageFile } from '../../../../../shared/native-chat/input/composer/native-chat-clipboard-event' import { nativeChatLocalAttachmentUnsupportedNotice, nativeChatWorktreeNotReadyNotice diff --git a/src/renderer/src/components/native-chat/paste/use-native-chat-pasted-text-file.ts b/src/renderer/src/components/native-chat/paste/use-native-chat-pasted-text-file.ts index 0ce061a9c15..19ea66c1490 100644 --- a/src/renderer/src/components/native-chat/paste/use-native-chat-pasted-text-file.ts +++ b/src/renderer/src/components/native-chat/paste/use-native-chat-pasted-text-file.ts @@ -10,10 +10,10 @@ import { import { useCallback } from 'react' import { translate } from '@/i18n/i18n' import { extractIpcErrorMessage } from '@/runtime/errors/ipc-error' -import { isNativeChatLongPaste } from '../../../../../shared/native-chat/input/native-chat-long-paste' +import { isNativeChatLongPaste } from '../../../../../shared/native-chat/input/composer/native-chat-long-paste' import { structuredAgentSessionBlocksTooLarge } from '../../../../../shared/rpc-contract/structured-agent-session/structured-agent-session-message-params' import { structuredAgentSessionSendBody } from '../../../../../shared/agent-session/requests/structured-agent-session-send-mutation' -import { imageReferencesToPromptMarkers } from '../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +import { imageReferencesToPromptMarkers } from '../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import { nativeChatAttachFailedNotice, nativeChatAttachmentOwnerChangedNotice diff --git a/src/renderer/src/components/native-chat/prompts/NativeChatAwaitingInputRow.tsx b/src/renderer/src/components/native-chat/prompts/NativeChatAwaitingInputRow.tsx index e8d69da9b4a..43e790b2f34 100644 --- a/src/renderer/src/components/native-chat/prompts/NativeChatAwaitingInputRow.tsx +++ b/src/renderer/src/components/native-chat/prompts/NativeChatAwaitingInputRow.tsx @@ -5,7 +5,7 @@ import { useTranslate } from '@/i18n/use-translate' import { NATIVE_CHAT_ASK_ROW_COPY, type NativeChatAskRowSubject -} from '../../../../../shared/native-chat/input/native-chat-ask-row' +} from '../../../../../shared/native-chat/input/questions/native-chat-ask-row' import { useNativeChatDisclosure } from '../messages/disclosure/native-chat-disclosure-store' import { NativeChatToolRunIcon } from '../tools/lines/NativeChatToolIcon' diff --git a/src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.tsx b/src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.tsx index f34b74a94a7..a59f910bd0f 100644 --- a/src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.tsx +++ b/src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.tsx @@ -1,4 +1,4 @@ -import { nativeChatAskDismissKey } from '../../../../../shared/native-chat/input/native-chat-ask-dismiss-key' +import { nativeChatAskDismissKey } from '../../../../../shared/native-chat/input/questions/native-chat-ask-dismiss-key' import { useCallback, useLayoutEffect, useRef, useState } from 'react' import type { InteractivePromptCard } from '../../../../../shared/native-chat/input/native-chat-interactive-prompt' import { NativeChatQuestionCard } from './NativeChatQuestionCard' diff --git a/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.test.tsx b/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.test.tsx index e88317054b9..0edb49c72ae 100644 --- a/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.test.tsx +++ b/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.test.tsx @@ -6,7 +6,7 @@ import { getByRole, queryByRole } from '@testing-library/react' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { NativeChatQuestionCard } from './NativeChatQuestionCard' -import type { AskPrompt } from '../../../../../shared/native-chat/input/native-chat-ask-types' +import type { AskPrompt } from '../../../../../shared/native-chat/input/questions/native-chat-ask-types' // Answers must use option indices; labels can be duplicated and a non-first choice must retain its position. diff --git a/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx b/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx index 3e3223568d5..988f2c9809d 100644 --- a/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx +++ b/src/renderer/src/components/native-chat/prompts/NativeChatQuestionCard.tsx @@ -7,8 +7,8 @@ import { useTranslate } from '@/i18n/use-translate' import { NativeChatQuestionText } from './NativeChatQuestionText' import { NativeChatQuestionOption } from './NativeChatQuestionOption' import { NativeChatQuestionConfirmButton } from './NativeChatQuestionConfirmButton' -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 type { AskAnswerSelection } from '../../../../../shared/native-chat/input/questions/native-chat-ask-answer' +import type { AskPrompt } from '../../../../../shared/native-chat/input/questions/native-chat-ask-types' import { NativeChatPromptCollapseToggle } from './NativeChatPromptCollapse' import { useNativeChatPromptCardFocus } from './use-native-chat-prompt-card-focus' import { useNativeChatQuestionAutoAdvance } from './use-native-chat-question-auto-advance' @@ -22,7 +22,7 @@ import { askConfirmLabel, askTypedText, toggleAskOption -} from '../../../../../shared/native-chat/input/native-chat-ask-card-rules' +} from '../../../../../shared/native-chat/input/questions/native-chat-ask-card-rules' export type NativeChatQuestionCardProps = { prompt: AskPrompt diff --git a/src/renderer/src/components/native-chat/prompts/NativeChatStructuredAsyncQuestion.tsx b/src/renderer/src/components/native-chat/prompts/NativeChatStructuredAsyncQuestion.tsx index 251d0ba9f49..cd7bf09e6a0 100644 --- a/src/renderer/src/components/native-chat/prompts/NativeChatStructuredAsyncQuestion.tsx +++ b/src/renderer/src/components/native-chat/prompts/NativeChatStructuredAsyncQuestion.tsx @@ -3,17 +3,17 @@ import { structuredAgentSessionPaneKey } from '../../../../../shared/agent-sessi import { structuredAgentSessionHostKey } from '../../../runtime/native-chat/host-capabilities/structured-agent-session-host-capability' import type { NativeChatStructuredViewProps } from '../native-chat-view-types' import type { useStructuredAgentSession } from '../session/structured/use-structured-agent-session' -import { nativeChatAskDismissKey } from '../../../../../shared/native-chat/input/native-chat-ask-dismiss-key' +import { nativeChatAskDismissKey } from '../../../../../shared/native-chat/input/questions/native-chat-ask-dismiss-key' import { useMemo, useState } from 'react' import type { QueuedMessageCard } from '../../../../../shared/agent-session/view/structured-agent-session-queued-cards' import type { AgentJournalSubmission } from '../../../../../shared/agent-session/journal/agent-session-journal-types' -import type { AskPrompt } from '../../../../../shared/native-chat/input/native-chat-ask-types' +import type { AskPrompt } from '../../../../../shared/native-chat/input/questions/native-chat-ask-types' import { nativeChatAnswerOperationPending, type NativeChatAnswerOperation, formatAskAnswer -} from '../../../../../shared/native-chat/input/native-chat-ask-answer' -import { nativeChatAnswerSendIntent } from '../../../../../shared/native-chat/input/native-chat-follow-up-behavior' +} from '../../../../../shared/native-chat/input/questions/native-chat-ask-answer' +import { nativeChatAnswerSendIntent } from '../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import type { NativeChatStructuredComposerTransport } from '../composer/submit/native-chat-structured-composer-transport' import { NativeChatQuestionCard } from './NativeChatQuestionCard' import type { NativeChatLiveSession } from '../session/terminal/read/native-chat-live-session-contract' diff --git a/src/renderer/src/components/native-chat/prompts/use-native-chat-interactive-prompt-card.ts b/src/renderer/src/components/native-chat/prompts/use-native-chat-interactive-prompt-card.ts index ca2c27d94c6..b3371418c60 100644 --- a/src/renderer/src/components/native-chat/prompts/use-native-chat-interactive-prompt-card.ts +++ b/src/renderer/src/components/native-chat/prompts/use-native-chat-interactive-prompt-card.ts @@ -3,7 +3,7 @@ import { useNativeChatAsyncQuestions } from './use-native-chat-async-questions' import { useNativeChatPromptCardPresentation } from './use-native-chat-prompt-card-presentation' import { useMemo } from 'react' import { useAppStore } from '../../../store/index' -import type { AskPrompt } from '../../../../../shared/native-chat/input/native-chat-ask-types' +import type { AskPrompt } from '../../../../../shared/native-chat/input/questions/native-chat-ask-types' import type { NativeChatMessage } from '../../../../../shared/native-chat/native-chat-types' import { resolveNativeChatInteractivePromptCard } from '../../../../../shared/native-chat/input/native-chat-interactive-prompt' import { sayNativeChatApprovalTranslated } from './native-chat-interactive-prompt' diff --git a/src/renderer/src/components/native-chat/prompts/use-native-chat-prompt-card-presentation.ts b/src/renderer/src/components/native-chat/prompts/use-native-chat-prompt-card-presentation.ts index 10573c9f8cb..35761a6b998 100644 --- a/src/renderer/src/components/native-chat/prompts/use-native-chat-prompt-card-presentation.ts +++ b/src/renderer/src/components/native-chat/prompts/use-native-chat-prompt-card-presentation.ts @@ -5,7 +5,7 @@ import { nativeChatPromptDismissalMatches, nativeChatPromptOccurrenceKey, nativeChatPromptWaitStartedAt -} from '../../../../../shared/native-chat/input/native-chat-prompt-dismiss-key' +} from '../../../../../shared/native-chat/input/approvals/native-chat-prompt-dismiss-key' import { nativeChatPromptDismissals as dismissals, type NativeChatPromptDismissal diff --git a/src/renderer/src/components/native-chat/prompts/use-native-chat-question-auto-advance.ts b/src/renderer/src/components/native-chat/prompts/use-native-chat-question-auto-advance.ts index c4f6f67fa18..8144db6c4b4 100644 --- a/src/renderer/src/components/native-chat/prompts/use-native-chat-question-auto-advance.ts +++ b/src/renderer/src/components/native-chat/prompts/use-native-chat-question-auto-advance.ts @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react' -import { NATIVE_CHAT_QUESTION_AUTO_ADVANCE_MS } from '../../../../../shared/native-chat/input/native-chat-question-auto-advance' +import { NATIVE_CHAT_QUESTION_AUTO_ADVANCE_MS } from '../../../../../shared/native-chat/input/questions/native-chat-question-auto-advance' /** One cancellable delayed step: a single-select pick shows as chosen before the card moves on. */ export function useNativeChatQuestionAutoAdvance(disabled = false): { diff --git a/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-draft.ts b/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-draft.ts index 24a7a993a2d..dcdbc49b835 100644 --- a/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-draft.ts +++ b/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-draft.ts @@ -3,7 +3,7 @@ import { withoutImageReference } from '../../../../../../shared/native-chat/nati import { imageReferencesToPromptMarkers, promptMarkersToImageReferences -} from '../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +} from '../../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import { queuedEditKeptImages, queuedMessageEditableText, diff --git a/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-session.ts b/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-session.ts index 71ffa4cee4f..8b1dc504d89 100644 --- a/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-session.ts +++ b/src/renderer/src/components/native-chat/queue/editing/native-chat-queued-edit-session.ts @@ -15,7 +15,7 @@ import { type NativeChatQueuedEditDraft } from './native-chat-queued-edit-draft' import type { NativeChatComposerDraft } from '../../drafts/native-chat-composer-draft-storage' -import { promptMarkersToImageReferences } from '../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +import { promptMarkersToImageReferences } from '../../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import { nativeChatImageRowIds } from '../../composer/editor/native-chat-composer-image-references' import { useEffect } from 'react' import { toast } from 'sonner' diff --git a/src/renderer/src/components/native-chat/queue/editing/use-native-chat-composer-edit-session.ts b/src/renderer/src/components/native-chat/queue/editing/use-native-chat-composer-edit-session.ts index ed7937ff5ee..76bbf8a22f0 100644 --- a/src/renderer/src/components/native-chat/queue/editing/use-native-chat-composer-edit-session.ts +++ b/src/renderer/src/components/native-chat/queue/editing/use-native-chat-composer-edit-session.ts @@ -10,7 +10,7 @@ import { } from 'react' import { useLatestHandler } from '@/lib/use-latest-handler' import type { AgentType } from '../../../../../../shared/agent-status/contracts/agent-status-types' -import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/native-chat-picker-items' +import type { NativeChatPickerItem } from '../../../../../../shared/native-chat/input/composer/native-chat-picker-items' import { prepareQueuedMessageEditText } from '../../../../../../shared/queued-message-edit-command' import { translate } from '@/i18n/i18n' import { registerDictationComposerTarget } from '../../../dictation/dictation-insertion-target' diff --git a/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-discovery.ts b/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-discovery.ts index c985cda2698..43a035619d9 100644 --- a/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-discovery.ts +++ b/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-discovery.ts @@ -1,5 +1,5 @@ import { createClaudeCatalogOptions } from '../../../../../../../shared/agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' -import { catalogModelsFromModelDiscovery } from '../../../../../../../shared/native-chat/input/native-chat-discovered-catalog-models' +import { catalogModelsFromModelDiscovery } from '../../../../../../../shared/native-chat/input/session-options/native-chat-discovered-catalog-models' import { getCommitMessageModelDiscoveryHostKeyForLocalRuntime, getCommitMessageModelDiscoveryHostKeyForScope, diff --git a/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-enrichment.ts b/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-enrichment.ts index 113ee645a82..1b304a9ea13 100644 --- a/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-enrichment.ts +++ b/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-enrichment.ts @@ -1,7 +1,7 @@ import type { AgentType } from '../../../../../../../shared/agent-status/contracts/agent-status-types' import { getAgentSessionOptionCatalog } from '../../../../../../../shared/agent-session/options/agent-session-option-catalog' import type { CatalogModel } from '../../../../../../../shared/agent-session/options/catalog-providers/agent-session-option-catalog-types' -import { mergeDiscoveredCatalogModels } from '../../../../../../../shared/native-chat/input/native-chat-discovered-catalog-models' +import { mergeDiscoveredCatalogModels } from '../../../../../../../shared/native-chat/input/session-options/native-chat-discovered-catalog-models' type CatalogEnrichmentEntry = { state: 'idle' | 'pending' | 'settled' diff --git a/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-snapshot.ts b/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-snapshot.ts index c0d157f1921..294d838513c 100644 --- a/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-snapshot.ts +++ b/src/renderer/src/components/native-chat/session/options/catalog/native-chat-session-option-snapshot.ts @@ -9,9 +9,9 @@ import type { import { buildNativeChatSessionOptionSnapshot as buildSharedSnapshot, type NativeChatSessionOptionMode -} from '../../../../../../../shared/native-chat/input/native-chat-session-option-snapshot' +} from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-snapshot' -import type { NativeChatSessionOptionRecord } from '../../../../../../../shared/native-chat/input/native-chat-session-option-state' +import type { NativeChatSessionOptionRecord } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-state' import { translate } from '@/i18n/i18n' export function buildNativeChatSessionOptionSnapshot(args: { diff --git a/src/renderer/src/components/native-chat/session/options/controls/NativeChatModelCombobox.tsx b/src/renderer/src/components/native-chat/session/options/controls/NativeChatModelCombobox.tsx index 12f47a54bfe..03b9de2812c 100644 --- a/src/renderer/src/components/native-chat/session/options/controls/NativeChatModelCombobox.tsx +++ b/src/renderer/src/components/native-chat/session/options/controls/NativeChatModelCombobox.tsx @@ -11,7 +11,7 @@ import { import { nativeChatModelDescription } from './native-chat-model-description' import { useTranslate } from '@/i18n/use-translate' import type { SessionOptionSelectChoice } from '../../../../../../../shared/native-chat/input/native-chat-session-options' -import { nativeChatSessionChoiceLabel } from '../../../../../../../shared/native-chat/input/native-chat-session-option-labels' +import { nativeChatSessionChoiceLabel } from '../../../../../../../shared/native-chat/input/session-options/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/session/options/controls/NativeChatSessionOptionPickers.tsx b/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionOptionPickers.tsx index 6a753a83b16..c6be79c8d02 100644 --- a/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionOptionPickers.tsx +++ b/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionOptionPickers.tsx @@ -6,7 +6,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip import { translate } from '@/i18n/i18n' import { useTranslate, type Translate } from '@/i18n/use-translate' import { useUiLanguageRevision } from '@/i18n/use-ui-language-revision' -import { sortNativeChatSessionOptions } from '../../../../../../../shared/native-chat/input/native-chat-session-option-snapshot' +import { sortNativeChatSessionOptions } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-snapshot' import { sessionOptionDispatchUnconfirmed, type SessionOptionDescriptor, @@ -19,7 +19,7 @@ import { nativeChatOptionsPillTitle, nativeChatSessionOptionActionLabel, nativeChatSessionOptionDisabledReason -} from '../../../../../../../shared/native-chat/input/native-chat-session-option-labels' +} from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-labels' import { sayNativeChatSessionOptionTranslated as say } from './native-chat-session-option-labels-text' import type { NativeChatOptionPickerRequest } from './native-chat-option-picker-request' import { runSessionOptionSurfaceCall } from './native-chat-session-option-surface-call' diff --git a/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionOptionRows.tsx b/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionOptionRows.tsx index d07793fac91..e558b67b638 100644 --- a/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionOptionRows.tsx +++ b/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionOptionRows.tsx @@ -6,7 +6,7 @@ import { Switch } from '@/components/ui/switch' import { Toggle } from '@/components/ui/toggle' import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' -import { sortNativeChatSessionOptions } from '../../../../../../../shared/native-chat/input/native-chat-session-option-snapshot' +import { sortNativeChatSessionOptions } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-snapshot' import { isReadOnlySessionOptionValue, type SessionOptionDescriptor, @@ -19,11 +19,11 @@ import { nativeChatSessionOptionActionLabel, nativeChatSessionOptionDisabledReason, nativeChatSessionOptionLabel -} from '../../../../../../../shared/native-chat/input/native-chat-session-option-labels' +} from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-labels' import { sayNativeChatSessionOptionTranslated as say } from './native-chat-session-option-labels-text' import { NativeChatSessionOptionWriteGroup } from './NativeChatSessionOptionWriteGroup' import { NativeChatSessionSpeedButton } from './NativeChatSessionSpeedButton' -import { speedButtonTiers } from '../../../../../../../shared/native-chat/input/native-chat-session-speed-tiers' +import { speedButtonTiers } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-speed-tiers' type NativeChatSessionOptionRowsProps = { /** The current model's options, in display order. */ diff --git a/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionSpeedButton.tsx b/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionSpeedButton.tsx index 9fbe914483c..753b1d77bfd 100644 --- a/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionSpeedButton.tsx +++ b/src/renderer/src/components/native-chat/session/options/controls/NativeChatSessionSpeedButton.tsx @@ -11,9 +11,9 @@ import type { SessionOptionSelectChoice, SessionOptionValue } from '../../../../../../../shared/native-chat/input/native-chat-session-options' -import { nativeChatSessionChoiceLabel } from '../../../../../../../shared/native-chat/input/native-chat-session-option-labels' +import { nativeChatSessionChoiceLabel } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-labels' import { isFastServiceTier } from '../../../../../../../shared/agent-session/options/model-catalog/structured-agent-session-discovered-model' -import { loneFastTier } from '../../../../../../../shared/native-chat/input/native-chat-session-speed-tiers' +import { loneFastTier } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-speed-tiers' import { sayNativeChatSessionOptionTranslated as say } from './native-chat-session-option-labels-text' /** A lone Fast tier toggles like Claude's Fast; anything else opens a list instead of a segmented switcher. */ diff --git a/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-apply-error-text.ts b/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-apply-error-text.ts index 9876dfc1c51..a779f12356a 100644 --- a/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-apply-error-text.ts +++ b/src/renderer/src/components/native-chat/session/options/controls/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/input/native-chat-session-option-apply-failure' +} from '../../../../../../../shared/native-chat/input/session-options/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/session/options/controls/native-chat-session-option-labels-text.ts b/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-labels-text.ts index 99f9c00d9f1..dacb29ef7de 100644 --- a/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-labels-text.ts +++ b/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-labels-text.ts @@ -2,7 +2,7 @@ import { translate } from '@/i18n/i18n' import type { NativeChatSessionOptionCopyId, NativeChatSessionOptionSay -} from '../../../../../../../shared/native-chat/input/native-chat-session-option-labels' +} from '../../../../../../../shared/native-chat/input/session-options/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/session/options/controls/native-chat-session-option-surface-call.ts b/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-surface-call.ts index f6f4b8c7bf6..44af3d7c952 100644 --- a/src/renderer/src/components/native-chat/session/options/controls/native-chat-session-option-surface-call.ts +++ b/src/renderer/src/components/native-chat/session/options/controls/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/rpc/calls/runtime-rpc-result' import { agentSessionWriteFailureText } from '../../../messages/notices/agent-session-write-notice-text' -import { SessionOptionApplyError } from '../../../../../../../shared/native-chat/input/native-chat-session-option-apply-failure' +import { SessionOptionApplyError } from '../../../../../../../shared/native-chat/input/session-options/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/session/options/structured/structured-session-option-defaults.test-fixture.ts b/src/renderer/src/components/native-chat/session/options/structured/structured-session-option-defaults.test-fixture.ts index 418658ab18c..d9935477d2f 100644 --- a/src/renderer/src/components/native-chat/session/options/structured/structured-session-option-defaults.test-fixture.ts +++ b/src/renderer/src/components/native-chat/session/options/structured/structured-session-option-defaults.test-fixture.ts @@ -1,7 +1,7 @@ import { applyNativeChatSessionOptionSettingsMutation, resolveStructuredLaunchSeedOptions -} from '../../../../../../../shared/native-chat/input/native-chat-session-option-defaults' +} from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import type { PersistedNativeChatSessionOptions } from '../../../../../../../shared/native-chat/input/native-chat-session-options' /** Replay every host mutation in order, exactly as the runtime does. */ diff --git a/src/renderer/src/components/native-chat/session/options/terminal/claude-model-switch-confirmation.ts b/src/renderer/src/components/native-chat/session/options/terminal/claude-model-switch-confirmation.ts index 803430cad19..98177843b46 100644 --- a/src/renderer/src/components/native-chat/session/options/terminal/claude-model-switch-confirmation.ts +++ b/src/renderer/src/components/native-chat/session/options/terminal/claude-model-switch-confirmation.ts @@ -2,9 +2,9 @@ import { subscribeToPtyData } from '../../../../terminal-pane/pty-transport/deli import { isRemoteRuntimePtyId } from '../../../../../../../shared/remote-runtime/remote-runtime-pty-id' import { sendRuntimePtyInput } from '@/runtime/hosted-terminals/input/runtime-terminal-input-send' import { subscribeToRuntimeTerminalData } from '@/runtime/hosted-terminals/streams/runtime-terminal-data-subscription' -import { NATIVE_CHAT_SUBMIT } from '../../../../../../../shared/native-chat/input/native-chat-paste-bytes' +import { NATIVE_CHAT_SUBMIT } from '../../../../../../../shared/native-chat/input/composer/native-chat-paste-bytes' import { stripScrollbackAnsi } from '../../terminal/assembly/native-chat-scrape-fallback' -import type { ClaudeModelSwitchOutcome } from '../../../../../../../shared/native-chat/input/native-chat-session-option-dispatch' +import type { ClaudeModelSwitchOutcome } from '../../../../../../../shared/native-chat/input/session-options/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/session/options/terminal/use-native-chat-local-command-answer.ts b/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-local-command-answer.ts index bc37736bf0c..fe60f83b523 100644 --- a/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-local-command-answer.ts +++ b/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-local-command-answer.ts @@ -8,7 +8,7 @@ import { formatNativeChatContextUsageAnswer, formatNativeChatContextUsageUnreported } from '../../../usage/native-chat-context-usage-answer' -import type { NativeChatPtySessionOptionsSurface } from '../../../../../../../shared/native-chat/input/native-chat-pty-session-options' +import type { NativeChatPtySessionOptionsSurface } from '../../../../../../../shared/native-chat/input/session-options/native-chat-pty-session-options' export type NativeChatModelContextWindow = (modelId: string) => number | null diff --git a/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-option-command.ts b/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-option-command.ts index 53059eb0aba..cc1401d0835 100644 --- a/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-option-command.ts +++ b/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-option-command.ts @@ -17,7 +17,7 @@ import { createClaudeModelSwitchConfirmationObserver, type ClaudeModelSwitchConfirmationObserver } from './claude-model-switch-confirmation' -import type { NativeChatSessionOptionDispatchCommand } from '../../../../../../../shared/native-chat/input/native-chat-session-option-dispatch' +import type { NativeChatSessionOptionDispatchCommand } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-dispatch' import { translate } from '@/i18n/i18n' export function useNativeChatSessionOptionCommand(args: { diff --git a/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-options.ts b/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-options.ts index dcc55081627..e4ae67c3e3d 100644 --- a/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-options.ts +++ b/src/renderer/src/components/native-chat/session/options/terminal/use-native-chat-session-options.ts @@ -1,15 +1,15 @@ import { useEffect, useMemo, useRef, useSyncExternalStore } from 'react' import type { AgentType } from '../../../../../../../shared/agent-status/contracts/agent-status-types' import { getAgentSessionOptionCatalog } from '../../../../../../../shared/agent-session/options/agent-session-option-catalog' -import { matchNativeChatCatalogModelId } from '../../../../../../../shared/native-chat/input/native-chat-session-option-state' +import { matchNativeChatCatalogModelId } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-state' import type { SessionOptionDescriptor } from '../../../../../../../shared/native-chat/input/native-chat-session-options' import { useAppStore } from '../../../../../store/index' import { sayNativeChatSessionOptionTranslated } from '../controls/native-chat-session-option-labels-text' import { createNativeChatPtySessionOptions, type NativeChatPtySessionOptionsSurface -} from '../../../../../../../shared/native-chat/input/native-chat-pty-session-options' -import type { NativeChatSessionOptionDispatchCommand } from '../../../../../../../shared/native-chat/input/native-chat-session-option-dispatch' +} from '../../../../../../../shared/native-chat/input/session-options/native-chat-pty-session-options' +import type { NativeChatSessionOptionDispatchCommand } from '../../../../../../../shared/native-chat/input/session-options/native-chat-session-option-dispatch' import { ensureNativeChatModelEnrichment, readNativeChatEnrichedModels, diff --git a/src/renderer/src/components/native-chat/session/structured/delivery/structured-agent-session-message-hand-back.ts b/src/renderer/src/components/native-chat/session/structured/delivery/structured-agent-session-message-hand-back.ts index 8787311f2b3..de1aef4ba24 100644 --- a/src/renderer/src/components/native-chat/session/structured/delivery/structured-agent-session-message-hand-back.ts +++ b/src/renderer/src/components/native-chat/session/structured/delivery/structured-agent-session-message-hand-back.ts @@ -4,7 +4,7 @@ import type { NativeChatComposerDraftImage } from '../../../drafts/native-chat-c import { appendToNativeChatComposerDraft } from '../../../drafts/native-chat-composer-draft-store' import { structuredAgentSessionDraftScopeKey } from '../../../drafts/native-chat-draft-scope' import { unavailableNativeChatComposerDraftImage } from '../../../drafts/native-chat-composer-draft-persistence' -import { promptMarkersToImageReferences } from '../../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +import { promptMarkersToImageReferences } from '../../../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' import { promptTextContent, seedPromptSkillReferences diff --git a/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session-transport-state.ts b/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session-transport-state.ts index 5a5dd4500ea..470468f2a03 100644 --- a/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session-transport-state.ts +++ b/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session-transport-state.ts @@ -7,7 +7,7 @@ import { import { isStructuredAgentSessionMainAgentWorking } from '../../../../../../shared/agent-session/view/structured-agent-session-main-agent-working' import type { StructuredAgentSessionState } from '../../../../../../shared/agent-session/structured-agent-session-reducer' import type { StructuredAgentSubagentRoster } from '../../../../../../shared/agent-session/view/structured-agent-session-subagent-roster' -import { selectStructuredAgentTurnActivity } from '../../../../../../shared/native-chat/transcript/native-chat-turn-activity' +import { selectStructuredAgentTurnActivity } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-activity' import { structuredSessionBackgroundTasksView } from '../../../../../../shared/structured-session-background-tasks-view' import { structuredSessionForegroundCommands } from '../../../../../../shared/structured-session-foreground-commands' import { useStructuredAgentTurnTiming } from '../../conversation/turns/use-structured-agent-turn-timing' diff --git a/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session.ts b/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session.ts index f476b79f90a..974e8e6e245 100644 --- a/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session.ts +++ b/src/renderer/src/components/native-chat/session/structured/use-structured-agent-session.ts @@ -9,7 +9,7 @@ import { structuredAgentSessionSendQueues } from '../../queue/structured-agent-s import { nativeChatQueueFollowUps, nativeChatSendFollowUp -} from '../../../../../../shared/native-chat/input/native-chat-follow-up-behavior' +} from '../../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' 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' import { @@ -40,8 +40,8 @@ import { useStructuredAgentSessionRailOutline } from '../../viewport/rail/use-st import { useStructuredAgentSessionQueuedMessages } from '../../queue/use-structured-agent-session-queued-messages' import { structuredConversationCommandRunner } from './writes/structured-conversation-command-send' import { pendingSendsOutsideQueuedCards } from '../../queue/structured-agent-session-sending-queued-cards' -import { hostStatesTurnScopes } from '../../../../../../shared/native-chat/transcript/native-chat-turn-membership' -import { withNativeChatCutTurnNotices } from '../../../../../../shared/native-chat/transcript/native-chat-cut-turn-notice' +import { hostStatesTurnScopes } from '../../../../../../shared/native-chat/transcript/turns/native-chat-turn-membership' +import { withNativeChatCutTurnNotices } from '../../../../../../shared/native-chat/transcript/turns/native-chat-cut-turn-notice' import { useNativeChatContextClearFloor } from '../../conversation/projection/use-native-chat-context-clear-floor' import { useStructuredAgentSessionRewind } from '../../messages/actions/use-structured-agent-session-rewind' diff --git a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-incremental-assembler.ts b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-incremental-assembler.ts index 8e62d665443..5aba6ac5c10 100644 --- a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-incremental-assembler.ts +++ b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-incremental-assembler.ts @@ -3,9 +3,9 @@ import { hasImagePromptMarker, isImageSourceUserTurn -} from '../../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +} from '../../../../../../../shared/native-chat/transcript/images/native-chat-image-transcript-markers' import type { NativeChatMessage } from '../../../../../../../shared/native-chat/native-chat-types' -import { compareNativeChatDisplayMessages as compareMessages } from '../../../../../../../shared/native-chat/transcript/native-chat-message-order' +import { compareNativeChatDisplayMessages as compareMessages } from '../../../../../../../shared/native-chat/transcript/messages/native-chat-message-order' import { mergeOne, sortForImageNormalization } from './native-chat-session-assembler' export type IncrementalChatAssembler = { diff --git a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-live-message-preparation.ts b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-live-message-preparation.ts index 4310fa54373..94b4a85aeef 100644 --- a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-live-message-preparation.ts +++ b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-live-message-preparation.ts @@ -1,7 +1,7 @@ import { prepareNativeChatMessages, surfaceNativeChatHarnessTurns -} from '../../../../../../../shared/native-chat/transcript/native-chat-message-preparation' +} from '../../../../../../../shared/native-chat/transcript/messages/native-chat-message-preparation' import type { AgentType } from '../../../../../../../shared/agent-status/contracts/agent-status-types' import type { NativeChatMessage } from '../../../../../../../shared/native-chat/native-chat-types' import { assembleNativeChatSession } from './native-chat-session-assembler' diff --git a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-message-grouping.test.ts b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-message-grouping.test.ts index 7003391621a..6a9cc4b27e2 100644 --- a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-message-grouping.test.ts +++ b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-message-grouping.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest' import type { NativeChatMessage } from '../../../../../../../shared/native-chat/native-chat-types' -import { orderNativeChatDisplayMessages as orderNativeChatMessages } from '../../../../../../../shared/native-chat/transcript/native-chat-message-order' +import { orderNativeChatDisplayMessages as orderNativeChatMessages } from '../../../../../../../shared/native-chat/transcript/messages/native-chat-message-order' import { NATIVE_CHAT_STREAMING_ID } from '../../../../../../../shared/native-chat/native-chat-streaming' import { sortForImageNormalization } from './native-chat-session-assembler' diff --git a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-session-assembler.ts b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-session-assembler.ts index 3b2e4dd70e6..74d52ec5bb1 100644 --- a/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-session-assembler.ts +++ b/src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-session-assembler.ts @@ -10,12 +10,12 @@ import { compareNativeChatDisplayMessages as compareMessages, orderNativeChatDisplayEntries as orderEntries, orderNativeChatDisplayMessages as orderMessages -} from '../../../../../../../shared/native-chat/transcript/native-chat-message-order' +} from '../../../../../../../shared/native-chat/transcript/messages/native-chat-message-order' import { hasImagePromptMarker, isImageSourceUserTurn, normalizeImageTranscriptMessages -} from '../../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' +} from '../../../../../../../shared/native-chat/transcript/images/native-chat-image-transcript-markers' /** For the same turn, prefer transcript over hook over scrape. */ export type NativeChatSources = { diff --git a/src/renderer/src/components/native-chat/session/terminal/delivery/native-chat-pending.ts b/src/renderer/src/components/native-chat/session/terminal/delivery/native-chat-pending.ts index c384207ca1d..95a1a91033d 100644 --- a/src/renderer/src/components/native-chat/session/terminal/delivery/native-chat-pending.ts +++ b/src/renderer/src/components/native-chat/session/terminal/delivery/native-chat-pending.ts @@ -3,14 +3,14 @@ import { setBoundedScopeCacheEntry } from '../../../../../../../shared/native-ch import { NATIVE_CHAT_PENDING_SEND_LIMIT, type NativeChatPendingSend -} from '../../../../../../../shared/native-chat/transcript/native-chat-pending-sends' +} from '../../../../../../../shared/native-chat/transcript/pending-sends/native-chat-pending-sends' import type { NativeChatLaunchPrompt } from '@/components/native-chat/drafts/native-chat-launch-prompt' import { advancedNativeChatUserContentCounts, assignNativeChatPendingOccurrence, matchingNativeChatUserContentCounts, nativeChatPendingContentKey -} from '../../../../../../../shared/native-chat/transcript/native-chat-pending-occurrence' +} from '../../../../../../../shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence' export type NativeChatPendingSendScope = { paneKey: string diff --git a/src/renderer/src/components/native-chat/session/terminal/delivery/use-native-chat-pending-delivery.ts b/src/renderer/src/components/native-chat/session/terminal/delivery/use-native-chat-pending-delivery.ts index 8063e14d489..707acc29a56 100644 --- a/src/renderer/src/components/native-chat/session/terminal/delivery/use-native-chat-pending-delivery.ts +++ b/src/renderer/src/components/native-chat/session/terminal/delivery/use-native-chat-pending-delivery.ts @@ -10,7 +10,7 @@ import { prunePendingSends, releaseEmptyTranscriptClaims, type NativeChatPendingSend -} from '../../../../../../../shared/native-chat/transcript/native-chat-pending-sends' +} from '../../../../../../../shared/native-chat/transcript/pending-sends/native-chat-pending-sends' import { appendPendingSendCache, nextNativeChatPendingSendId, diff --git a/src/renderer/src/components/native-chat/session/terminal/read/use-native-chat-retained-session.ts b/src/renderer/src/components/native-chat/session/terminal/read/use-native-chat-retained-session.ts index 43084c5374f..a3cd8373bc9 100644 --- a/src/renderer/src/components/native-chat/session/terminal/read/use-native-chat-retained-session.ts +++ b/src/renderer/src/components/native-chat/session/terminal/read/use-native-chat-retained-session.ts @@ -4,7 +4,7 @@ import { NATIVE_CHAT_INITIAL_LIMIT } from '../../../viewport/history/native-chat import { createNativeChatTranscriptRetention, encodeNativeChatTranscriptIdentity -} from '../../../../../../../shared/native-chat/transcript/native-chat-transcript-retention' +} from '../../../../../../../shared/native-chat/transcript/messages/native-chat-transcript-retention' import { useNativeChatLiveSession } from './use-native-chat-live-session' import type { UseNativeChatLiveSessionArgs, diff --git a/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-image-send.ts b/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-image-send.ts index 5ea6e251d27..9849cd0a6a0 100644 --- a/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-image-send.ts +++ b/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-image-send.ts @@ -3,12 +3,12 @@ import { agentImagePasteWrites } from '../../../../../../../shared/agent-image-p import { agentImagePastePath } from '../../../../../../../shared/agent-image-paste-path' import type { AgentType } from '../../../../../../../shared/agent-status/contracts/agent-status-types' import { sendRuntimePtyInput } from '@/runtime/hosted-terminals/input/runtime-terminal-input-send' -import { NATIVE_CHAT_SUBMIT_DELAY_MS } from '../../../../../../../shared/native-chat/input/native-chat-answer-stepping' +import { NATIVE_CHAT_SUBMIT_DELAY_MS } from '../../../../../../../shared/native-chat/input/questions/native-chat-answer-stepping' import { buildNativeChatImagePasteBytes, buildNativeChatPasteBytes, NATIVE_CHAT_SUBMIT -} from '../../../../../../../shared/native-chat/input/native-chat-paste-bytes' +} from '../../../../../../../shared/native-chat/input/composer/native-chat-paste-bytes' import { enqueueNativeChatPtySend } from './native-chat-pty-send-queue' import { clearConfirmDurationMs, diff --git a/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-send.ts b/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-send.ts index d471eb823e4..65f25b1f93b 100644 --- a/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-send.ts +++ b/src/renderer/src/components/native-chat/session/terminal/send/native-chat-runtime-send.ts @@ -7,7 +7,7 @@ import { import { sendNativeChatObservedWrites } from './native-chat-observed-send' import { sendRuntimePtyInput } from '@/runtime/hosted-terminals/input/runtime-terminal-input-send' import { sendRuntimePtyInputVerified } from '@/runtime/hosted-terminals/input/runtime-terminal-verified-input' -import type { AskAnswerKeyGroup } from '../../../../../../../shared/native-chat/input/native-chat-ask-answer' +import type { AskAnswerKeyGroup } from '../../../../../../../shared/native-chat/input/questions/native-chat-ask-answer' import { clearConfirmDurationMs, clearThenWrite, @@ -17,11 +17,11 @@ import { import { NATIVE_CHAT_QUESTION_STEP_MS, NATIVE_CHAT_SUBMIT_DELAY_MS -} from '../../../../../../../shared/native-chat/input/native-chat-answer-stepping' +} from '../../../../../../../shared/native-chat/input/questions/native-chat-answer-stepping' import { buildNativeChatPasteBytes, NATIVE_CHAT_SUBMIT -} from '../../../../../../../shared/native-chat/input/native-chat-paste-bytes' +} from '../../../../../../../shared/native-chat/input/composer/native-chat-paste-bytes' import { AGENT_TUI_COMMAND_KEY_INTERVAL_MS, typeAgentTuiCommand diff --git a/src/renderer/src/components/native-chat/session/terminal/send/use-native-chat-interactive-send.ts b/src/renderer/src/components/native-chat/session/terminal/send/use-native-chat-interactive-send.ts index cb3388c1acb..7d245014310 100644 --- a/src/renderer/src/components/native-chat/session/terminal/send/use-native-chat-interactive-send.ts +++ b/src/renderer/src/components/native-chat/session/terminal/send/use-native-chat-interactive-send.ts @@ -15,8 +15,8 @@ import { formatAskAnswer, hasAskAnswer, type AskAnswerSelection -} from '../../../../../../../shared/native-chat/input/native-chat-ask-answer' -import type { AskPrompt } from '../../../../../../../shared/native-chat/input/native-chat-ask-types' +} from '../../../../../../../shared/native-chat/input/questions/native-chat-ask-answer' +import type { AskPrompt } from '../../../../../../../shared/native-chat/input/questions/native-chat-ask-types' import { sendNativeChatAskAnswer, sendNativeChatMessage, diff --git a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentHead.tsx b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentHead.tsx index 8e0222dab44..0f698128c9f 100644 --- a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentHead.tsx +++ b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentHead.tsx @@ -1,6 +1,6 @@ import { Bot, ChevronRight } from 'lucide-react' import { useTranslate } from '@/i18n/use-translate' -import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import type { NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' import { NativeChatSubagentStatusIcon } from './NativeChatSubagentStatusIcon' diff --git a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentRun.tsx b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentRun.tsx index ada9f47a1d9..d25ea3c8f49 100644 --- a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentRun.tsx +++ b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentRun.tsx @@ -8,20 +8,20 @@ import { formatSubagentTokens, nativeChatSubagentGroupHeader, subagentStateLabel -} from '../../../../../shared/native-chat/transcript/native-chat-subagent-group-header' -import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +} from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-group-header' +import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import { subagentEntryDetail, subagentEntryRunsOn, subagentMessageText, subagentRoleLabel -} from '../../../../../shared/native-chat/transcript/native-chat-subagent-entry-detail' +} from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-entry-detail' import type { NativeChatSubagentEntry, NativeChatSubagentGroupBlock, NativeChatSubagentState } from '../../../../../shared/native-chat/native-chat-types' -import { formatNativeChatDuration } from '../../../../../shared/native-chat/transcript/native-chat-turn-status' +import { formatNativeChatDuration } from '../../../../../shared/native-chat/transcript/turns/native-chat-turn-status' import { useNativeChatDisclosure } from '../messages/disclosure/native-chat-disclosure-store' import { sayNativeChatSubagentGroupTranslated as say, diff --git a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentStatusBar.tsx b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentStatusBar.tsx index 8aa2039909e..ac030af8b25 100644 --- a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentStatusBar.tsx +++ b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentStatusBar.tsx @@ -2,8 +2,8 @@ import { useMemo } from 'react' import { ChevronLeft } from 'lucide-react' import { Button } from '@/components/ui/button' import { useTranslate } from '@/i18n/use-translate' -import { formatSubagentTokens } from '../../../../../shared/native-chat/transcript/native-chat-subagent-group-header' -import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { formatSubagentTokens } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-group-header' +import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import type { NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' import type { AgentChildRowModel } from '../../../../../shared/agent-status/presentation/agent-child-row-model' import { backgroundTaskRowStopId } from '../../../../../shared/background-task-roster' diff --git a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentViewBar.tsx b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentViewBar.tsx index e267f5e6da3..df925eb3fdc 100644 --- a/src/renderer/src/components/native-chat/subagents/NativeChatSubagentViewBar.tsx +++ b/src/renderer/src/components/native-chat/subagents/NativeChatSubagentViewBar.tsx @@ -10,11 +10,11 @@ import { DropdownMenuTrigger } from '@/components/ui/dropdown-menu' import { useTranslate } from '@/i18n/use-translate' -import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import { subagentEntryRunsOn, subagentRoleLabel -} from '../../../../../shared/native-chat/transcript/native-chat-subagent-entry-detail' +} from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-entry-detail' import type { NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' import type { NativeChatSubagentRow } from '../../../../../shared/native-chat/transcript/native-chat-transcript-projection' import { NativeChatSubagentStatusIcon } from './NativeChatSubagentStatusIcon' diff --git a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-ending.ts b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-ending.ts index 9bbed127075..6648571b8d1 100644 --- a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-ending.ts +++ b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-ending.ts @@ -4,7 +4,7 @@ import type { NativeChatMessage, NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' -import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import type { NativeChatSubagentHandoff } from './native-chat-subagent-handoff' import type { NativeChatSubagentHistory } from './native-chat-subagent-history' diff --git a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-group-words-text.ts b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-group-words-text.ts index 476e96195c6..95fba8193ce 100644 --- a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-group-words-text.ts +++ b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-group-words-text.ts @@ -5,7 +5,7 @@ import { NATIVE_CHAT_SUBAGENT_GROUP_COPY as COPY, type NativeChatSubagentGroupCopyId, type NativeChatSubagentGroupSay -} from '../../../../../shared/native-chat/transcript/native-chat-subagent-group-header' +} from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-group-header' import type { CopyValues } from '../../../../../shared/counted-copy-english' import type { NativeChatSubagentState } from '../../../../../shared/native-chat/native-chat-types' diff --git a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-scope.ts b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-scope.ts index a91cec062fb..51fad0eb241 100644 --- a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-scope.ts +++ b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-scope.ts @@ -8,7 +8,7 @@ import { type NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' import type { NativeChatSubagentRow } from '../../../../../shared/native-chat/transcript/native-chat-transcript-projection' -import { compareNativeChatDisplayMessages as compareMessages } from '../../../../../shared/native-chat/transcript/native-chat-message-order' +import { compareNativeChatDisplayMessages as compareMessages } from '../../../../../shared/native-chat/transcript/messages/native-chat-message-order' const NO_HEADS: readonly NativeChatSubagentHead[] = [] diff --git a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-switcher-items.ts b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-switcher-items.ts index 8b800eea92e..549a2f8a2b8 100644 --- a/src/renderer/src/components/native-chat/subagents/native-chat-subagent-switcher-items.ts +++ b/src/renderer/src/components/native-chat/subagents/native-chat-subagent-switcher-items.ts @@ -1,4 +1,4 @@ -import { disambiguateSubagentLabels } from '../../../../../shared/native-chat/transcript/native-chat-subagent-items' +import { disambiguateSubagentLabels } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-items' import type { NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' import type { NativeChatSubagentRow } from '../../../../../shared/native-chat/transcript/native-chat-transcript-projection' import { nativeChatSubagentChain } from './native-chat-subagent-scope' diff --git a/src/renderer/src/components/native-chat/subagents/use-native-chat-subagent-scope.tsx b/src/renderer/src/components/native-chat/subagents/use-native-chat-subagent-scope.tsx index 63911ce7d58..14ffa4b57c3 100644 --- a/src/renderer/src/components/native-chat/subagents/use-native-chat-subagent-scope.tsx +++ b/src/renderer/src/components/native-chat/subagents/use-native-chat-subagent-scope.tsx @@ -11,7 +11,7 @@ import type { NativeChatMessage, NativeChatSubagentEntry } from '../../../../../shared/native-chat/native-chat-types' -import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { normalizeSubagentState } from '../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import type { NativeChatSubagentRow } from '../../../../../shared/native-chat/transcript/native-chat-transcript-projection' import { useNativeChatTurnMembership, diff --git a/src/renderer/src/components/native-chat/tools/runs/NativeChatToolRun.tsx b/src/renderer/src/components/native-chat/tools/runs/NativeChatToolRun.tsx index 3fb636ef14a..2e24ac91532 100644 --- a/src/renderer/src/components/native-chat/tools/runs/NativeChatToolRun.tsx +++ b/src/renderer/src/components/native-chat/tools/runs/NativeChatToolRun.tsx @@ -13,12 +13,12 @@ import { type NativeChatSubagentGroupBlock, type NativeChatToolCallBlock } from '../../../../../../shared/native-chat/native-chat-types' -import { isRenderableSubagentGroup } from '../../../../../../shared/native-chat/transcript/native-chat-subagent-summary' +import { isRenderableSubagentGroup } from '../../../../../../shared/native-chat/transcript/subagents/native-chat-subagent-summary' import type { NativeChatDiffReveal } from '../../../../../../shared/native-chat/tools/native-chat-turn-diffs' import { nativeChatToolRunSentence } from './native-chat-tool-run-label' import { NATIVE_CHAT_TOOL_ACTIVITY_COPY } from '../../../../../../shared/native-chat/tools/native-chat-tool-activity' import { nativeChatToolRunHeader } from '../../../../../../shared/native-chat/tools/native-chat-tool-run-header' -import { nativeChatAskRunSubject } from '../../../../../../shared/native-chat/input/native-chat-ask-row' +import { nativeChatAskRunSubject } from '../../../../../../shared/native-chat/input/questions/native-chat-ask-row' import { NativeChatAwaitingInputRow } from '../../prompts/NativeChatAwaitingInputRow' import { NativeChatBackgroundTaskRun } from '../tasks/NativeChatBackgroundTaskRun' import { NativeChatSubagentRun } from '../../subagents/NativeChatSubagentRun' diff --git a/src/renderer/src/components/native-chat/tools/runs/native-chat-tool-run-rows.ts b/src/renderer/src/components/native-chat/tools/runs/native-chat-tool-run-rows.ts index 3a965b6e23f..85c2975f2c8 100644 --- a/src/renderer/src/components/native-chat/tools/runs/native-chat-tool-run-rows.ts +++ b/src/renderer/src/components/native-chat/tools/runs/native-chat-tool-run-rows.ts @@ -10,7 +10,7 @@ import type { NativeChatEditFile } from '../../../../../../shared/native-chat/to import { buildNativeChatTaskListRows, type NativeChatTaskListRow -} from '../../../../../../shared/native-chat/input/native-chat-task-list-history' +} from '../../../../../../shared/native-chat/input/task-lists/native-chat-task-list-history' import type { NativeChatToolRunAsides } from './NativeChatToolRun' /** One drawn row of an opened run. `focusable`: it renders a control, so keyboard order can land on it. */ diff --git a/src/renderer/src/components/native-chat/tools/runs/use-native-chat-work-run.tsx b/src/renderer/src/components/native-chat/tools/runs/use-native-chat-work-run.tsx index 1081769e570..af0ea6d7851 100644 --- a/src/renderer/src/components/native-chat/tools/runs/use-native-chat-work-run.tsx +++ b/src/renderer/src/components/native-chat/tools/runs/use-native-chat-work-run.tsx @@ -3,7 +3,7 @@ import type { NativeChatBlock, NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' import { nativeChatWorkRunEditKey, nativeChatWorkRunEntries diff --git a/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.test.tsx b/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.test.tsx index 2f2eb4c4df9..48c51be1c72 100644 --- a/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.test.tsx +++ b/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.test.tsx @@ -6,7 +6,7 @@ import { cleanup } from '@testing-library/react' import { afterEach, describe, expect, it } from 'vitest' import type { NativeChatBackgroundTaskBlock } from '../../../../../../shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' afterEach(cleanup) diff --git a/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.tsx b/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.tsx index 8231701be5f..9e02e25388c 100644 --- a/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.tsx +++ b/src/renderer/src/components/native-chat/tools/tasks/NativeChatBackgroundTaskRun.tsx @@ -3,7 +3,7 @@ import { useTranslate } from '@/i18n/use-translate' import { recomputeOn } from '@/lib/recompute-on' import { AgentStateDot } from '@/components/AgentStateDot' import type { NativeChatBackgroundTaskBlock } from '../../../../../../shared/native-chat/native-chat-types' -import { nativeChatBackgroundTaskRun } from '../../../../../../shared/native-chat/transcript/native-chat-background-task-run' +import { nativeChatBackgroundTaskRun } from '../../../../../../shared/native-chat/transcript/turns/native-chat-background-task-run' import { sayBackgroundTaskTranslated } from './background-task-words-text' import { KIND_ICONS } from './NativeChatBackgroundTasksStatus' diff --git a/src/renderer/src/components/native-chat/tools/tasks/NativeChatDockedTaskList.tsx b/src/renderer/src/components/native-chat/tools/tasks/NativeChatDockedTaskList.tsx index c614bc50a6c..f5a43d9b890 100644 --- a/src/renderer/src/components/native-chat/tools/tasks/NativeChatDockedTaskList.tsx +++ b/src/renderer/src/components/native-chat/tools/tasks/NativeChatDockedTaskList.tsx @@ -1,6 +1,6 @@ import { useMemo } from 'react' import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import { nativeChatDockedTaskList } from '../../../../../../shared/native-chat/input/native-chat-task-list-state' +import { nativeChatDockedTaskList } from '../../../../../../shared/native-chat/input/task-lists/native-chat-task-list-state' import { NativeChatTaskList } from './NativeChatTaskList' export function NativeChatDockedTaskList({ diff --git a/src/renderer/src/components/native-chat/tools/tasks/NativeChatTaskList.tsx b/src/renderer/src/components/native-chat/tools/tasks/NativeChatTaskList.tsx index 9996106009a..f4edfae0099 100644 --- a/src/renderer/src/components/native-chat/tools/tasks/NativeChatTaskList.tsx +++ b/src/renderer/src/components/native-chat/tools/tasks/NativeChatTaskList.tsx @@ -12,7 +12,7 @@ import { type NativeChatTask, type NativeChatTaskChange, type NativeChatTaskList as TaskList -} from '../../../../../../shared/native-chat/input/native-chat-task-list' +} from '../../../../../../shared/native-chat/input/task-lists/native-chat-task-list' function statusLabel(task: NativeChatTask, t: Translate = translate): string { if (task.status === 'completed') { diff --git a/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.test.ts b/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.test.ts index 1541b63a9e3..d05032615a7 100644 --- a/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.test.ts +++ b/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.test.ts @@ -1,5 +1,5 @@ -import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' -import { nativeChatProseToMarkdown } from '../../../../../../shared/native-chat/transcript/native-chat-prose' +import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' +import { nativeChatProseToMarkdown } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-prose' import { buildNativeChatTranscriptSlots } from '../../conversation/slots/native-chat-transcript-slots' import { describe, expect, it } from 'vitest' import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' diff --git a/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.ts b/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.ts index 2d55cf847bf..9d4d62e6a2f 100644 --- a/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.ts +++ b/src/renderer/src/components/native-chat/viewport/virtualization/native-chat-row-height-estimate.ts @@ -1,15 +1,15 @@ -import { nativeChatProseToMarkdown } from '../../../../../../shared/native-chat/transcript/native-chat-prose' +import { nativeChatProseToMarkdown } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-prose' // Keep estimates arithmetic over cached metrics; per-measurement block scans would traverse the whole transcript. import { NATIVE_CHAT_TURN_DIFF_FILE_LIMIT } from '../../../../../../shared/native-chat/tools/native-chat-turn-diffs' import { agentMessageIsCompact } from '../../../../../../shared/agent-session/agent-message-presentation' import type { NativeChatMessage } from '../../../../../../shared/native-chat/native-chat-types' -import { withoutSentImagePromptMarkers } from '../../../../../../shared/native-chat/transcript/native-chat-image-transcript-markers' -import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/native-chat-row-content' +import { withoutSentImagePromptMarkers } from '../../../../../../shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers' +import { deriveNativeChatRowContent } from '../../../../../../shared/native-chat/transcript/row-content/native-chat-row-content' import { NATIVE_CHAT_USER_MESSAGE_FOLDED_PX, nativeChatUserMessageFolds -} from '../../../../../../shared/native-chat/transcript/native-chat-user-message-fold' +} from '../../../../../../shared/native-chat/transcript/folding/native-chat-user-message-fold' export type NativeChatRowContentMetrics = { role: NativeChatMessage['role'] diff --git a/src/renderer/src/components/settings/chat/ChatBehaviorSetting.tsx b/src/renderer/src/components/settings/chat/ChatBehaviorSetting.tsx index 2a7d178fe18..2ac5d71e125 100644 --- a/src/renderer/src/components/settings/chat/ChatBehaviorSetting.tsx +++ b/src/renderer/src/components/settings/chat/ChatBehaviorSetting.tsx @@ -12,7 +12,7 @@ import { ChatPermissionSetting } from './ChatPermissionSetting' import { NativeChatShellEnvironmentSetting } from './NativeChatShellEnvironmentSetting' import { NativeChatIdleStopSetting } from './NativeChatIdleStopSetting' import { SearchableSetting } from '../section-layout/SearchableSetting' -import { nativeChatQueueFollowUps } from '../../../../../shared/native-chat/input/native-chat-follow-up-behavior' +import { nativeChatQueueFollowUps } from '../../../../../shared/native-chat/input/composer/native-chat-follow-up-behavior' import { nativeChatMarksNewMessages, nativeChatScrollsToLatestOnSend diff --git a/src/renderer/src/components/sidebar/comment-markdown-word-fade.ts b/src/renderer/src/components/sidebar/comment-markdown-word-fade.ts index 2b2461c689f..bae8d60af6e 100644 --- a/src/renderer/src/components/sidebar/comment-markdown-word-fade.ts +++ b/src/renderer/src/components/sidebar/comment-markdown-word-fade.ts @@ -1,7 +1,7 @@ // Keep existing word elements stable while streams append so only newly mounted words fade. import type { Element, Root } from 'hast' -import { SPACELESS_SCRIPT_RANGES } from '../../../../shared/native-chat/transcript/native-chat-text-reveal' +import { SPACELESS_SCRIPT_RANGES } from '../../../../shared/native-chat/transcript/row-content/native-chat-text-reveal' /** Elements whose renderers read their text, or that are faded in as a whole. */ const UNSPLIT_TAGS = new Set(['a', 'code', 'pre', 'kbd', 'svg', 'math']) diff --git a/src/renderer/src/components/tab-bar/use-tab-bar-runtime-model.ts b/src/renderer/src/components/tab-bar/use-tab-bar-runtime-model.ts index 5cf5f569e87..a8d94b90f68 100644 --- a/src/renderer/src/components/tab-bar/use-tab-bar-runtime-model.ts +++ b/src/renderer/src/components/tab-bar/use-tab-bar-runtime-model.ts @@ -6,7 +6,7 @@ import { useAgentDetectionTargetForWorktree } from '@/hooks/useAgentDetectionTar import '@/lib/workspace/ownership/connection-context' import { getConnectionIdFromState } from '@/lib/workspace/ownership/connection-owner-resolution' import { getLocalProjectExecutionRuntimeContext } from '@/runtime/hosts/preflight/local-preflight-context' -import { isNativeChatTranscriptLocalReadable } from '../../../../shared/native-chat/transcript/native-chat-transcript-readability' +import { isNativeChatTranscriptLocalReadable } from '../../../../shared/native-chat/transcript/messages/native-chat-transcript-readability' import { runtimeEnvironmentIdOrLocalUnlessTwin } from '@/lib/workspace/ownership/worktree-runtime-owner' import { runtimeTargetForOwnerEnvironment } from '@/runtime/rpc/targets/runtime-client-target' import { useOptionalShortcutLabel, useShortcutLabel } from '@/hooks/useShortcutLabel' diff --git a/src/renderer/src/components/terminal-pane/clipboard/terminal-clipboard-paste.ts b/src/renderer/src/components/terminal-pane/clipboard/terminal-clipboard-paste.ts index 9e8e5726698..f0aa1d73bf4 100644 --- a/src/renderer/src/components/terminal-pane/clipboard/terminal-clipboard-paste.ts +++ b/src/renderer/src/components/terminal-pane/clipboard/terminal-clipboard-paste.ts @@ -2,7 +2,7 @@ import { isClipboardTextTooLargeError, type ReadClipboardTextOptions } from '../../../../../shared/clipboard-text' -import { textOnlyLabelsCopiedFiles } from '../../../../../shared/native-chat/input/native-chat-clipboard-event' +import { textOnlyLabelsCopiedFiles } from '../../../../../shared/native-chat/input/composer/native-chat-clipboard-event' import { TERMINAL_PASTE_MAX_BYTES } from '../input/paste/terminal-paste-limits' import type { TerminalPasteTextOptions } from '../input/paste/terminal-paste-model' diff --git a/src/renderer/src/components/terminal-pane/host-state/terminal-pane-host-state.ts b/src/renderer/src/components/terminal-pane/host-state/terminal-pane-host-state.ts index c3917ded7f2..9a44dfaf88e 100644 --- a/src/renderer/src/components/terminal-pane/host-state/terminal-pane-host-state.ts +++ b/src/renderer/src/components/terminal-pane/host-state/terminal-pane-host-state.ts @@ -5,7 +5,7 @@ import { resolveWorktreeHostConnection, type WorktreeHostConnection } from '@/lib/workspace/ownership/worktree-host-connection-phase' -import { isNativeChatTranscriptLocalReadable } from '../../../../../shared/native-chat/transcript/native-chat-transcript-readability' +import { isNativeChatTranscriptLocalReadable } from '../../../../../shared/native-chat/transcript/messages/native-chat-transcript-readability' import { selectRuntimeAwareSshError, selectRuntimeAwareSshTargetLabel, diff --git a/src/renderer/src/components/worktree-creation/PendingNativeChatCreation.tsx b/src/renderer/src/components/worktree-creation/PendingNativeChatCreation.tsx index 3dc5763dd5b..50472db6956 100644 --- a/src/renderer/src/components/worktree-creation/PendingNativeChatCreation.tsx +++ b/src/renderer/src/components/worktree-creation/PendingNativeChatCreation.tsx @@ -26,7 +26,7 @@ import { } from '@/components/native-chat/appearance/native-chat-appearance-style' import { useNativeChatStoreAppearanceStyle } from '@/components/native-chat/appearance/use-native-chat-store-appearance-style' import type { NativeChatMessage } from '../../../../shared/native-chat/native-chat-types' -import { deriveNativeChatRowContent } from '../../../../shared/native-chat/transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from '../../../../shared/native-chat/transcript/row-content/native-chat-row-content' import WorktreeCreationTabStrip from './WorktreeCreationTabStrip' import { WorktreeSetupSteps } from './WorktreeSetupSteps' import { deriveWorktreeSetupSteps } from './worktree-setup-steps' diff --git a/src/renderer/src/components/worktree-creation/use-pending-native-chat-options.ts b/src/renderer/src/components/worktree-creation/use-pending-native-chat-options.ts index 0e96b532720..f14dfb065f7 100644 --- a/src/renderer/src/components/worktree-creation/use-pending-native-chat-options.ts +++ b/src/renderer/src/components/worktree-creation/use-pending-native-chat-options.ts @@ -9,7 +9,7 @@ import { settleStructuredAgentSessionBuiltinCatalog, type StructuredAgentSessionOptionState } from '../../../../shared/agent-session/options/structured-agent-session-options' -import { structuredLaunchSeedOptions } from '../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchSeedOptions } from '../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { joinHostModelListingWait } from '../../../../shared/host-model-listing-waits' import { recordHostModelCatalogSnapshot } from '@/runtime/native-chat/model-catalogs/host-model-catalog-snapshots' import { structuredAgentSessionHostKey } from '@/runtime/native-chat/host-capabilities/structured-agent-session-host-capability' diff --git a/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts b/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts index 9d9da90092f..e6553adf2c1 100644 --- a/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts +++ b/src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.ts @@ -6,7 +6,7 @@ import { createNonSecureContextUuid as createBrowserUuid } from '../../../../../ import { persistAgentLaunchTabOrder } from '@/lib/agent-session/launch/pane/launch-agent-tab-order' import { rememberAgentLaunchPanePrompt } from '@/lib/agent-session/launch/pane/agent-launch-pane-prompt' import { awaitAgentLaunchPaneStart } from '@/lib/agent-session/launch/pane/agent-launch-pane-start' -import { seedNativeChatAppliedSessionOptions } from '../../../../../../shared/native-chat/input/native-chat-session-option-cache' +import { seedNativeChatAppliedSessionOptions } from '../../../../../../shared/native-chat/input/session-options/native-chat-session-option-cache' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' import type { LaunchSource } from '../../../../../../shared/telemetry-property-schemas' import type { Tab } from '../../../../../../shared/tab-types' diff --git a/src/renderer/src/lib/agent-session/launch/prompt/agent-launch-prompt-delivery.ts b/src/renderer/src/lib/agent-session/launch/prompt/agent-launch-prompt-delivery.ts index c57947ab5b4..e87bc61f5d4 100644 --- a/src/renderer/src/lib/agent-session/launch/prompt/agent-launch-prompt-delivery.ts +++ b/src/renderer/src/lib/agent-session/launch/prompt/agent-launch-prompt-delivery.ts @@ -1,6 +1,6 @@ import { agentDeliversDraftViaNativePrefill } from '@/lib/agent-session/messaging/paste/agent-native-draft-prefill' import { pasteDraftWhenAgentReady } from '@/lib/agent-session/messaging/paste/agent-paste-draft' -import { canMirrorLaunchDraftToNativeChat } from '../../../../../../shared/native-chat/input/native-chat-launch-draft-mirrorability' +import { canMirrorLaunchDraftToNativeChat } from '../../../../../../shared/native-chat/input/composer/native-chat-launch-draft-mirrorability' import { isNativeChatSupportedAgent } from '../../../../../../shared/native-chat/native-chat-agent-support' import { useAppStore } from '@/store/index' import type { TuiAgent } from '../../../../../../shared/agent-launch/catalog/tui-agent' diff --git a/src/renderer/src/lib/agent-session/launch/routing/agent-launch-route-input.ts b/src/renderer/src/lib/agent-session/launch/routing/agent-launch-route-input.ts index 3b9c58eff58..b54c5e4b505 100644 --- a/src/renderer/src/lib/agent-session/launch/routing/agent-launch-route-input.ts +++ b/src/renderer/src/lib/agent-session/launch/routing/agent-launch-route-input.ts @@ -14,7 +14,7 @@ import { getLocalProjectExecutionRuntimeContext, getLocalRepoProjectExecutionRuntimeContext } from '@/runtime/hosts/preflight/local-preflight-context' -import { isNativeChatTranscriptLocalReadable } from '../../../../../../shared/native-chat/transcript/native-chat-transcript-readability' +import { isNativeChatTranscriptLocalReadable } from '../../../../../../shared/native-chat/transcript/messages/native-chat-transcript-readability' import { getExecutionHostIdForWorktree } from '@/lib/workspace/ownership/worktree-runtime-owner' import { readLocalRuntimeCapabilitiesOrUnknown } from '@/runtime/hosts/capabilities/local-runtime-capabilities' import { resolveStructuredAgentSessionOwner } from '@/runtime/native-chat/session-ownership/structured-agent-session-owner' diff --git a/src/renderer/src/lib/agent-session/launch/structured-agent-session-host-admission.ts b/src/renderer/src/lib/agent-session/launch/structured-agent-session-host-admission.ts index 70f24b65391..40d33082444 100644 --- a/src/renderer/src/lib/agent-session/launch/structured-agent-session-host-admission.ts +++ b/src/renderer/src/lib/agent-session/launch/structured-agent-session-host-admission.ts @@ -6,7 +6,7 @@ import { import type { AgentSessionRefusalReference } from '../../../../../shared/agent-session/failures/agent-session-wire-refusals' import { readAgentSessionErrorRefusal } from '../../../../../shared/agent-session/failures/agent-session-write-failure' import { STRUCTURED_AGENT_SESSION_RESUME_WRITER_ADMISSION_RUNTIME_CAPABILITY } from '../../../../../shared/agent-session/structured-agent-session-surface-capabilities' -import { parseStructuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { parseStructuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { hasRuntimeRpcErrorCode } from '../../../../../shared/runtime-rpc-error-code' import type { RuntimeClientTarget } from '../../../../../shared/runtime-client-target' import { callStructuredAgentSession } from '@/runtime/native-chat/requests/structured-agent-session-call' diff --git a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.ts b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.ts index 1d84f3dde3f..03a548d578a 100644 --- a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.ts +++ b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.ts @@ -2,7 +2,7 @@ import { StructuredAgentSessionCreateUnknownOutcomeError } from './structured-ag import { structuredLaunchCompatibleOptions, structuredLaunchRequestedOptions -} from '../../../../../shared/native-chat/input/native-chat-session-option-defaults' +} from '../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { structuredAgentSessionCreateFingerprint } from '../../../../../shared/agent-session/lifecycle/operations/structured-agent-session-mutation' import type { StructuredAgentSessionCreateParams } from '../../../../../shared/agent-session/structured-agent-session-create' import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../../../../shared/agent-launch/permissions/agent-chat-permission-mode' diff --git a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-intent.ts b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-intent.ts index bbdce6dc558..c210048bd5d 100644 --- a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-intent.ts +++ b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-intent.ts @@ -9,7 +9,7 @@ import type { StructuredAgentSessionResumeSource } from '../../../../../shared/agent-session/structured-agent-session-create' import { createStructuredAgentSessionOperationId } from '../../../../../shared/agent-session/lifecycle/operations/structured-agent-session-mutation' -import { structuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { toRuntimeWorktreeSelector } from '@/runtime/rpc/targets/runtime-worktree-selector' import { useAppStore } from '@/store/index' import { diff --git a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-persistence.ts b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-persistence.ts index 0b0458013d4..73c467eb763 100644 --- a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-persistence.ts +++ b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-persistence.ts @@ -5,7 +5,7 @@ import { type StructuredAgentLaunchPersistedRecord } from './structured-agent-session-launch-record' -import { parseStructuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/native-chat-session-option-defaults' +import { parseStructuredLaunchSeedOptions } from '../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import { LOCAL_EXECUTION_HOST_ID, parseExecutionHostId, diff --git a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prerequisites.ts b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prerequisites.ts index 733d9e167e3..d9986c7bbc1 100644 --- a/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prerequisites.ts +++ b/src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-prerequisites.ts @@ -7,7 +7,7 @@ import { STRUCTURED_LAUNCH_OPTION_IDS, structuredLaunchCompatibleOptions, structuredLaunchRequestedOptions -} from '../../../../../shared/native-chat/input/native-chat-session-option-defaults' +} from '../../../../../shared/native-chat/input/session-options/native-chat-session-option-defaults' import type { structuredSessionSelectionController } from '../options/structured-agent-session-selection-controller' import type { StructuredLaunchState } from './structured-agent-session-launch-state-store' import { StructuredAgentSessionLaunchCancelledError } from './structured-agent-session-launch-recovery' diff --git a/src/renderer/src/lib/workspace/activation/initial-surface/worktree-default-terminal-tabs.ts b/src/renderer/src/lib/workspace/activation/initial-surface/worktree-default-terminal-tabs.ts index a852c69c896..94ab2170428 100644 --- a/src/renderer/src/lib/workspace/activation/initial-surface/worktree-default-terminal-tabs.ts +++ b/src/renderer/src/lib/workspace/activation/initial-surface/worktree-default-terminal-tabs.ts @@ -6,7 +6,7 @@ import { agentKindToTuiAgent } from '../../../../../../shared/agent-kind' import { ORCA_LAYOUT_OWNER_IS_MAIN } from '../../../../../../shared/layout-owner-switch' import { useAppStore } from '@/store/index' import { recordLayoutApply } from '@/runtime/workspace-layout/commands/layout-apply-send' -import { seedNativeChatAppliedSessionOptions } from '../../../../../../shared/native-chat/input/native-chat-session-option-cache' +import { seedNativeChatAppliedSessionOptions } from '../../../../../../shared/native-chat/input/session-options/native-chat-session-option-cache' import type { InitialTerminalOptions, WorktreeActivationStore diff --git a/src/renderer/src/lib/workspace/activation/initial-surface/worktree-initial-terminal-seeding.ts b/src/renderer/src/lib/workspace/activation/initial-surface/worktree-initial-terminal-seeding.ts index 1e3e879d96f..1bddb2799c4 100644 --- a/src/renderer/src/lib/workspace/activation/initial-surface/worktree-initial-terminal-seeding.ts +++ b/src/renderer/src/lib/workspace/activation/initial-surface/worktree-initial-terminal-seeding.ts @@ -13,7 +13,7 @@ import { agentKindToTuiAgent } from '../../../../../../shared/agent-kind' import { useAppStore } from '@/store/index' import { queueHookCommandsForFirstWorktreeTab } from '@/lib/workspace/creation/setup/hook-command-delayed-delivery' import { resolveWorkspaceTerminalHostAuthority } from '@/lib/workspace/ownership/workspace-terminal-host-authority' -import { seedNativeChatAppliedSessionOptions } from '../../../../../../shared/native-chat/input/native-chat-session-option-cache' +import { seedNativeChatAppliedSessionOptions } from '../../../../../../shared/native-chat/input/session-options/native-chat-session-option-cache' import type { InitialTerminalOptions, WorktreeActivationStore diff --git a/src/renderer/src/lib/workspace/creation/worktree-creation-agent-seeds.ts b/src/renderer/src/lib/workspace/creation/worktree-creation-agent-seeds.ts index fc83c0f8355..99ae4908775 100644 --- a/src/renderer/src/lib/workspace/creation/worktree-creation-agent-seeds.ts +++ b/src/renderer/src/lib/workspace/creation/worktree-creation-agent-seeds.ts @@ -1,5 +1,5 @@ import { useAppStore } from '@/store/index' -import { seedNativeChatAppliedSessionOptions } from '../../../../../shared/native-chat/input/native-chat-session-option-cache' +import { seedNativeChatAppliedSessionOptions } from '../../../../../shared/native-chat/input/session-options/native-chat-session-option-cache' import { seedNativeChatLaunchDraftForAgentTab } from '@/lib/agent-session/launch/prompt/agent-launch-prompt-delivery' import { queueHookCommandsForFirstWorktreeTab } from '@/lib/workspace/creation/setup/hook-command-delayed-delivery' import { runtimeEnvironmentIdOrLocalUnlessTwin } from '@/lib/workspace/ownership/worktree-runtime-owner' diff --git a/src/shared/agent-launch/choices/agent-launch-default-choices.test.ts b/src/shared/agent-launch/choices/agent-launch-default-choices.test.ts index ab6047e7ccf..ec8ff545508 100644 --- a/src/shared/agent-launch/choices/agent-launch-default-choices.test.ts +++ b/src/shared/agent-launch/choices/agent-launch-default-choices.test.ts @@ -9,7 +9,7 @@ import { type AgentLaunchSettingsSource } from './agent-launch-settings' import { migrateAgentPermissionChoice } from '../permissions/tui-agent-permission-lift' -import '../../native-chat/input/native-chat-session-option-defaults' +import '../../native-chat/input/session-options/native-chat-session-option-defaults' const baseline: AgentLaunchSettingsSource = { agentPermissionDefault: 'ask', diff --git a/src/shared/agent-launch/choices/agent-launch-legacy-publication.test.ts b/src/shared/agent-launch/choices/agent-launch-legacy-publication.test.ts index 4122a1504c8..65ab2e38cb5 100644 --- a/src/shared/agent-launch/choices/agent-launch-legacy-publication.test.ts +++ b/src/shared/agent-launch/choices/agent-launch-legacy-publication.test.ts @@ -6,7 +6,7 @@ import { } from './agent-launch-settings' import { legacyLaunchTextUpdates } from './agent-launch-permission-updates' import { composeAgentLaunchProfile } from './tui-agent-launch-defaults' -import { structuredLaunchSeedOptions } from '../../native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchSeedOptions } from '../../native-chat/input/session-options/native-chat-session-option-defaults' import { createGlobalSettingsFixture } from '../../global-settings-test-fixture' import { quoteStartupArg, tokenizeStartupCommand } from '../startup/tui-agent-startup-shell' diff --git a/src/shared/agent-launch/choices/agent-launch-settings-permissions.test.ts b/src/shared/agent-launch/choices/agent-launch-settings-permissions.test.ts index 0b21935c0c8..d2a866dcb6b 100644 --- a/src/shared/agent-launch/choices/agent-launch-settings-permissions.test.ts +++ b/src/shared/agent-launch/choices/agent-launch-settings-permissions.test.ts @@ -1,6 +1,6 @@ import { expect, it } from 'vitest' import { agentLaunchSettingsMutationUpdates } from './agent-launch-settings' -import { structuredLaunchSeedOptions } from '../../native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchSeedOptions } from '../../native-chat/input/session-options/native-chat-session-option-defaults' it.each([ ['yolo', 'full-access'], diff --git a/src/shared/agent-launch/picker/agent-launch-picker-defaults.ts b/src/shared/agent-launch/picker/agent-launch-picker-defaults.ts index 5cda7b84854..d3d46844cf3 100644 --- a/src/shared/agent-launch/picker/agent-launch-picker-defaults.ts +++ b/src/shared/agent-launch/picker/agent-launch-picker-defaults.ts @@ -1,6 +1,6 @@ import { isAgentPermissionChoice } from '../permissions/tui-agent-permission-choice' import { projectAgentLaunchProfile } from '../choices/agent-launch-profile' -import { structuredLaunchSeedOptions } from '../../native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchSeedOptions } from '../../native-chat/input/session-options/native-chat-session-option-defaults' import { isAgentChatPermissionChoice } from '../permissions/agent-chat-permission-mode' import type { GlobalSettings } from '../../global-settings-types' import type { TuiAgent } from '../catalog/tui-agent' diff --git a/src/shared/agent-session/agent-message-display-text.ts b/src/shared/agent-session/agent-message-display-text.ts index e962bc2c0a4..e94f68e41aa 100644 --- a/src/shared/agent-session/agent-message-display-text.ts +++ b/src/shared/agent-session/agent-message-display-text.ts @@ -1,7 +1,7 @@ import type { AgentMessageSource } from './agent-session-message-source' import { orchestrationMailDisplayText } from './orchestration-mail-display-text' import type { NativeChatBlock } from '../native-chat/native-chat-types' -import { nativeChatProseToMarkdown } from '../native-chat/transcript/native-chat-prose' +import { nativeChatProseToMarkdown } from '../native-chat/transcript/row-content/native-chat-prose' import { orcaDispatchTaskBodyOffset } from '../orca-dispatch-status-prompt' const taskBodies = new WeakMap() diff --git a/src/shared/agent-session/agent-session-conversation-outline.ts b/src/shared/agent-session/agent-session-conversation-outline.ts index 0ab8d5f2c7b..faf357e640f 100644 --- a/src/shared/agent-session/agent-session-conversation-outline.ts +++ b/src/shared/agent-session/agent-session-conversation-outline.ts @@ -9,14 +9,14 @@ import type { NativeChatBlock, NativeChatMessage } from '../native-chat/native-c import { deriveNativeChatRowContent, nativeChatRowRendersContent -} from '../native-chat/transcript/native-chat-row-content' -import { withoutSentImagePromptMarkers } from '../native-chat/transcript/native-chat-image-transcript-markers' +} from '../native-chat/transcript/row-content/native-chat-row-content' +import { withoutSentImagePromptMarkers } from '../native-chat/transcript/images/native-chat-sent-image-prompt-markers' import { iterateProcessOutputLines } from '../process-output-field-scanner' import { agentJournalSubmissionKey } from './journal/agent-session-journal-item-key' import { dispatchWasWithdrawn } from './requests/structured-agent-session-dispatch-rejection' import { projectStructuredAgentSessionMessages } from './view/structured-agent-session-message-projection' import { projectNativeChatTranscriptMessages } from '../native-chat/transcript/native-chat-transcript-projection' -import { nativeChatTurnMembership } from '../native-chat/transcript/native-chat-turn-membership' +import { nativeChatTurnMembership } from '../native-chat/transcript/turns/native-chat-turn-membership' /** Cap previews on the host because the rail hides prose beyond two lines. */ export const AGENT_SESSION_OUTLINE_PREVIEW_MAX_CHARS = 200 diff --git a/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog-grok.test.ts b/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog-grok.test.ts index 6e1eb9f7099..320d332fe4f 100644 --- a/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog-grok.test.ts +++ b/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog-grok.test.ts @@ -3,7 +3,7 @@ import { mergeDiscoveredAuthoritativeModels } from '../agent-session-option-cata import type { CatalogModel } from './agent-session-option-catalog-types' import { GROK_SESSION_OPTION_CATALOG } from './agent-session-option-catalog-grok' import { resolveAgentSessionOptionLaunch } from '../launch/agent-session-option-launch' -import '../../../native-chat/input/native-chat-session-option-commands' +import '../../../native-chat/input/session-options/native-chat-session-option-commands' describe('grok agent-arg overrides', () => { it('drops only the overridden key from the launch record and argv', () => { diff --git a/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog.test.ts b/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog.test.ts index 330e7ac9021..5f6a653a9d2 100644 --- a/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog.test.ts +++ b/src/shared/agent-session/options/catalog-providers/agent-session-option-catalog.test.ts @@ -4,7 +4,7 @@ import '../launch/agent-session-option-launch' import { resolveNativeChatSessionOptionDefaults, updateNativeChatSessionOptionDefaults -} from '../../../native-chat/input/native-chat-session-option-defaults' +} from '../../../native-chat/input/session-options/native-chat-session-option-defaults' describe('agent session option catalog', () => { it('parses Claude list_models discovery into catalog models with options', () => { diff --git a/src/shared/agent-session/options/model-catalog/structured-agent-session-unlisted-effort.ts b/src/shared/agent-session/options/model-catalog/structured-agent-session-unlisted-effort.ts index ce6fbef6909..5eae64ab82e 100644 --- a/src/shared/agent-session/options/model-catalog/structured-agent-session-unlisted-effort.ts +++ b/src/shared/agent-session/options/model-catalog/structured-agent-session-unlisted-effort.ts @@ -1,7 +1,7 @@ import type { AgentType } from '../../../agent-status/contracts/agent-status-types' import type { AgentSessionOptionCatalog } from '../catalog-providers/agent-session-option-catalog-types' import type { SessionOptionDescriptor } from '../../../native-chat/input/native-chat-session-options' -import type { TrackedNativeChatSessionOption } from '../../../native-chat/input/native-chat-session-option-state' +import type { TrackedNativeChatSessionOption } from '../../../native-chat/input/session-options/native-chat-session-option-state' /** Unlisted models expose current effort read-only and send it unchanged; no listing proves which alternatives they accept. */ export function withUnlistedEffort( diff --git a/src/shared/agent-session/options/permissions/structured-agent-session-permission-option.test.ts b/src/shared/agent-session/options/permissions/structured-agent-session-permission-option.test.ts index 5d4eb2f3a96..8083aee1901 100644 --- a/src/shared/agent-session/options/permissions/structured-agent-session-permission-option.test.ts +++ b/src/shared/agent-session/options/permissions/structured-agent-session-permission-option.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import type { AgentSessionOptionsResult } from '../protocol/agent-session-options-result' -import '../../../native-chat/input/native-chat-session-option-snapshot' +import '../../../native-chat/input/session-options/native-chat-session-option-snapshot' import { canSetStructuredAgentSessionOption, structuredAgentSessionOptionSnapshot diff --git a/src/shared/agent-session/options/reconciliation/structured-agent-session-option-state.ts b/src/shared/agent-session/options/reconciliation/structured-agent-session-option-state.ts index 31cb9f1a7fc..c339fcb73da 100644 --- a/src/shared/agent-session/options/reconciliation/structured-agent-session-option-state.ts +++ b/src/shared/agent-session/options/reconciliation/structured-agent-session-option-state.ts @@ -1,7 +1,7 @@ import type { AgentSessionStatusSummary } from '../../agent-session-wire' import type { AgentType } from '../../../agent-status/contracts/agent-status-types' import type { SessionOptionValue } from '../../../native-chat/input/native-chat-session-options' -import type { TrackedNativeChatSessionOption } from '../../../native-chat/input/native-chat-session-option-state' +import type { TrackedNativeChatSessionOption } from '../../../native-chat/input/session-options/native-chat-session-option-state' /** Independent host-held values need no model parent. Mutate the record in place so session identity stays stable across picker fences. */ export type StructuredAgentSessionOptionRecord = { diff --git a/src/shared/agent-session/options/selection/structured-agent-session-option-picks.test.ts b/src/shared/agent-session/options/selection/structured-agent-session-option-picks.test.ts index 1a300985027..7a12ac22c8c 100644 --- a/src/shared/agent-session/options/selection/structured-agent-session-option-picks.test.ts +++ b/src/shared/agent-session/options/selection/structured-agent-session-option-picks.test.ts @@ -4,7 +4,7 @@ import { applyNativeChatSessionOptionPicks, resolveStructuredLaunchSeedOptions, updateNativeChatSessionOptionDefaults -} from '../../../native-chat/input/native-chat-session-option-defaults' +} from '../../../native-chat/input/session-options/native-chat-session-option-defaults' import type { PersistedNativeChatSessionOptions, SessionOptionValue diff --git a/src/shared/agent-session/options/selection/structured-agent-session-selection-operations.ts b/src/shared/agent-session/options/selection/structured-agent-session-selection-operations.ts index 106f5bd0d98..6fa1e4e19fb 100644 --- a/src/shared/agent-session/options/selection/structured-agent-session-selection-operations.ts +++ b/src/shared/agent-session/options/selection/structured-agent-session-selection-operations.ts @@ -1,7 +1,7 @@ import { STRUCTURED_LAUNCH_OPTION_IDS, STRUCTURED_LAUNCH_SEED_OPTION_IDS -} from '../../../native-chat/input/native-chat-session-option-defaults' +} from '../../../native-chat/input/session-options/native-chat-session-option-defaults' import { decodeStructuredAgentSessionOptionValue } from './structured-agent-session-option-codec' import type { NativeChatSessionOptionSettingsMutation } from '../../../native-chat/input/native-chat-session-options' import type { AgentSessionWriteFailure } from '../../failures/agent-session-write-failure' diff --git a/src/shared/agent-session/options/structured-agent-session-options.ts b/src/shared/agent-session/options/structured-agent-session-options.ts index 410605b7d6c..7c4b7722502 100644 --- a/src/shared/agent-session/options/structured-agent-session-options.ts +++ b/src/shared/agent-session/options/structured-agent-session-options.ts @@ -11,7 +11,7 @@ import { import { STRUCTURED_LAUNCH_OPTION_IDS, STRUCTURED_LAUNCH_SEED_OPTION_IDS -} from '../../native-chat/input/native-chat-session-option-defaults' +} from '../../native-chat/input/session-options/native-chat-session-option-defaults' import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../agent-launch/permissions/agent-chat-permission-mode-option-id' import { usesInstalledAgentModelCatalog, diff --git a/src/shared/agent-session/options/view/structured-agent-session-option-snapshot.ts b/src/shared/agent-session/options/view/structured-agent-session-option-snapshot.ts index f05f2dfbd54..bdff13e48f9 100644 --- a/src/shared/agent-session/options/view/structured-agent-session-option-snapshot.ts +++ b/src/shared/agent-session/options/view/structured-agent-session-option-snapshot.ts @@ -7,12 +7,12 @@ import { nativeChatSessionOptionDescriptors, withTrackedNativeChatModel, type NativeChatShownModel -} from '../../../native-chat/input/native-chat-session-option-snapshot' +} from '../../../native-chat/input/session-options/native-chat-session-option-snapshot' import type { SessionOptionDescriptor, SessionOptionValue } from '../../../native-chat/input/native-chat-session-options' -import type { TrackedNativeChatSessionOption } from '../../../native-chat/input/native-chat-session-option-state' +import type { TrackedNativeChatSessionOption } from '../../../native-chat/input/session-options/native-chat-session-option-state' import { catalogEffortLevels, effectiveAgentEffort diff --git a/src/shared/agent-session/options/view/structured-agent-session-option-view.ts b/src/shared/agent-session/options/view/structured-agent-session-option-view.ts index 41dbc13dfbe..d27af44fcef 100644 --- a/src/shared/agent-session/options/view/structured-agent-session-option-view.ts +++ b/src/shared/agent-session/options/view/structured-agent-session-option-view.ts @@ -1,4 +1,4 @@ -import { structuredLaunchRequestedOptions } from '../../../native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchRequestedOptions } from '../../../native-chat/input/session-options/native-chat-session-option-defaults' import { commitStructuredAgentSessionOptionValues, type StructuredAgentSessionOptionState diff --git a/src/shared/agent-session/requests/structured-agent-session-first-prompt.ts b/src/shared/agent-session/requests/structured-agent-session-first-prompt.ts index a3b39e78c95..920e77f6314 100644 --- a/src/shared/agent-session/requests/structured-agent-session-first-prompt.ts +++ b/src/shared/agent-session/requests/structured-agent-session-first-prompt.ts @@ -2,7 +2,7 @@ import type { AgentJournalRenderItem } from '../journal/agent-session-journal-ty import { isRootAgentJournalItem } from '../journal/agent-session-journal-producer' import { isStructuredAgentSessionCommandEntry } from '../structured-agent-session-command-entry' import { sliceAtCodeUnitLimit } from '../../surrogate-safe-text-slice' -import { stripSentImagePromptMarkers } from '../../native-chat/transcript/native-chat-image-transcript-markers' +import { stripSentImagePromptMarkers } from '../../native-chat/transcript/images/native-chat-sent-image-prompt-markers' export const STRUCTURED_CHAT_NAME_PROMPT_LIMIT = 4000 diff --git a/src/shared/agent-session/view/structured-agent-session-composer.ts b/src/shared/agent-session/view/structured-agent-session-composer.ts index e03e53e981f..a215de5bed8 100644 --- a/src/shared/agent-session/view/structured-agent-session-composer.ts +++ b/src/shared/agent-session/view/structured-agent-session-composer.ts @@ -8,7 +8,7 @@ import type { import { sessionSlashCommandSuggestions, type SlashCommandSuggestion -} from '../../native-chat/input/native-chat-slash-commands' +} from '../../native-chat/input/commands/native-chat-slash-commands' import type { AgentSessionConversationCommand } from '../agent-session-conversation-command' import type { AgentSessionThreadGoalChange } from '../agent-session-thread-goal-wire' import type { AgentSessionSlashCommand } from '../agent-session-wire' diff --git a/src/shared/agent-session/view/structured-agent-session-goal-mode.ts b/src/shared/agent-session/view/structured-agent-session-goal-mode.ts index b9e752eacef..0c456c86512 100644 --- a/src/shared/agent-session/view/structured-agent-session-goal-mode.ts +++ b/src/shared/agent-session/view/structured-agent-session-goal-mode.ts @@ -1,5 +1,5 @@ -import type { NativeChatPickerItem } from '../../native-chat/input/native-chat-picker-items' -import { applyPickerSuggestion } from '../../native-chat/input/native-chat-picker-triggers' +import type { NativeChatPickerItem } from '../../native-chat/input/composer/native-chat-picker-items' +import { applyPickerSuggestion } from '../../native-chat/input/composer/native-chat-picker-triggers' /** Without host goals only the provider's built-in /goal opens goal mode; a namesake keeps its invocation. */ export function structuredAgentSessionPickEntersGoalMode( diff --git a/src/shared/agent-session/view/structured-agent-session-subagent-roster.ts b/src/shared/agent-session/view/structured-agent-session-subagent-roster.ts index af8464e8b7b..ac7fe291aa7 100644 --- a/src/shared/agent-session/view/structured-agent-session-subagent-roster.ts +++ b/src/shared/agent-session/view/structured-agent-session-subagent-roster.ts @@ -14,7 +14,7 @@ import type { AgentSessionHistoryPage, AgentSessionSubagentRosterEntry } from '../agent-session-wire' -import { namedSubagents } from '../../native-chat/transcript/native-chat-subagent-items' +import { namedSubagents } from '../../native-chat/transcript/subagents/native-chat-subagent-items' import type { NativeChatSubagentEntry } from '../../native-chat/native-chat-types' /** One subagent as the first roster row naming it records it. */ diff --git a/src/shared/agent-session/view/structured-agent-session-turn-timing.test.ts b/src/shared/agent-session/view/structured-agent-session-turn-timing.test.ts index 9b1ff5086e5..b8f2048d076 100644 --- a/src/shared/agent-session/view/structured-agent-session-turn-timing.test.ts +++ b/src/shared/agent-session/view/structured-agent-session-turn-timing.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import type { AgentJournalRenderItem } from '../journal/agent-session-journal-types' -import { selectNativeChatTurnStatuses } from '../../native-chat/transcript/native-chat-turn-status' +import { selectNativeChatTurnStatuses } from '../../native-chat/transcript/turns/native-chat-turn-status' import { selectStructuredAgentSettledTurns, structuredAgentTurnLocalStartedAt diff --git a/src/shared/agent-session/view/structured-agent-session-turn-timing.ts b/src/shared/agent-session/view/structured-agent-session-turn-timing.ts index 8d125920654..a5c3aa295e5 100644 --- a/src/shared/agent-session/view/structured-agent-session-turn-timing.ts +++ b/src/shared/agent-session/view/structured-agent-session-turn-timing.ts @@ -14,11 +14,11 @@ import { agentTurnVerdict, type AgentTurnOutcome } from '../../agent-status/lifecycle/agent-turn-outcome' -import { structuredAgentTurnAnchors } from '../../native-chat/transcript/native-chat-turn-membership' +import { structuredAgentTurnAnchors } from '../../native-chat/transcript/turns/native-chat-turn-membership' import type { NativeChatSettledTurn, NativeChatSettledTurns -} from '../../native-chat/transcript/native-chat-turn-status' +} from '../../native-chat/transcript/turns/native-chat-turn-status' import type { AgentSessionLatestTurn } from '../agent-session-wire' export type StructuredAgentTurnTiming = { diff --git a/src/shared/agent-status/contracts/agent-pending-prompt.ts b/src/shared/agent-status/contracts/agent-pending-prompt.ts index edba3109371..a5868ee7af8 100644 --- a/src/shared/agent-status/contracts/agent-pending-prompt.ts +++ b/src/shared/agent-status/contracts/agent-pending-prompt.ts @@ -4,8 +4,8 @@ import { parseAskFromStatus } from '../../native-chat/input/native-chat-ask' import { buildAskAnswerKeys, buildCodexAskAnswerKeys -} from '../../native-chat/input/native-chat-ask-answer' -import { parseNativeChatApprovalEnvelope } from '../../native-chat/input/native-chat-approval-envelope' +} from '../../native-chat/input/questions/native-chat-ask-answer' +import { parseNativeChatApprovalEnvelope } from '../../native-chat/input/approvals/native-chat-approval-envelope' import { resolveNativeChatTranscriptAgent, shouldStepNativeChatAskAnswer diff --git a/src/shared/background-task-roster.ts b/src/shared/background-task-roster.ts index 56380c5e7ed..b38c58daf07 100644 --- a/src/shared/background-task-roster.ts +++ b/src/shared/background-task-roster.ts @@ -14,7 +14,7 @@ import { import { usableAgentChildLabel } from './agent-status/presentation/agent-child-row-name' import { agentChildRunStateFor } from './agent-status/child-work/agent-status-child-work-display' import type { AgentChildWorkView } from './agent-status/child-work/agent-status-child-work-view' -import { formatNativeChatDuration } from './native-chat/transcript/native-chat-turn-status' +import { formatNativeChatDuration } from './native-chat/transcript/turns/native-chat-turn-status' type TaskKind = AgentSessionBackgroundTask['kind'] type RunState = AgentSessionBackgroundTaskRunState diff --git a/src/shared/codex-async-question-input.ts b/src/shared/codex-async-question-input.ts index 573cf4f7be3..e82a4e2e6e0 100644 --- a/src/shared/codex-async-question-input.ts +++ b/src/shared/codex-async-question-input.ts @@ -1,4 +1,4 @@ -import type { AskPrompt, AskQuestion } from './native-chat/input/native-chat-ask-types' +import type { AskPrompt, AskQuestion } from './native-chat/input/questions/native-chat-ask-types' /** Return accepted immediately; nonblocking questions receive answers in later user messages ({questions:[{title, options?: string[]}]}). */ export const CODEX_ASYNC_QUESTION_TOOL = 'request_user_input_async' diff --git a/src/shared/native-chat/input/native-chat-approval-envelope.test.ts b/src/shared/native-chat/input/approvals/native-chat-approval-envelope.test.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-approval-envelope.test.ts rename to src/shared/native-chat/input/approvals/native-chat-approval-envelope.test.ts diff --git a/src/shared/native-chat/input/native-chat-approval-envelope.ts b/src/shared/native-chat/input/approvals/native-chat-approval-envelope.ts similarity index 98% rename from src/shared/native-chat/input/native-chat-approval-envelope.ts rename to src/shared/native-chat/input/approvals/native-chat-approval-envelope.ts index 13882cab402..8a705ddd766 100644 --- a/src/shared/native-chat/input/native-chat-approval-envelope.ts +++ b/src/shared/native-chat/input/approvals/native-chat-approval-envelope.ts @@ -1,4 +1,4 @@ -import { nativeChatApprovalAcceptKey } from '../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/input/native-chat-prompt-dismiss-key.ts b/src/shared/native-chat/input/approvals/native-chat-prompt-dismiss-key.ts similarity index 91% rename from src/shared/native-chat/input/native-chat-prompt-dismiss-key.ts rename to src/shared/native-chat/input/approvals/native-chat-prompt-dismiss-key.ts index 9c35c4189ac..2fcecd58b55 100644 --- a/src/shared/native-chat/input/native-chat-prompt-dismiss-key.ts +++ b/src/shared/native-chat/input/approvals/native-chat-prompt-dismiss-key.ts @@ -1,5 +1,5 @@ -import { nativeChatAskDismissKey } from './native-chat-ask-dismiss-key' -import type { InteractivePromptCard } from './native-chat-interactive-prompt' +import { nativeChatAskDismissKey } from '../questions/native-chat-ask-dismiss-key' +import type { InteractivePromptCard } from '../native-chat-interactive-prompt' /** Equal content keys identify the same prompt; null means no card. */ export function nativeChatCardDismissKey(card: InteractivePromptCard): string | null { diff --git a/src/shared/native-chat/input/native-chat-side-chat-command.ts b/src/shared/native-chat/input/commands/native-chat-side-chat-command.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-side-chat-command.ts rename to src/shared/native-chat/input/commands/native-chat-side-chat-command.ts diff --git a/src/shared/native-chat/input/native-chat-skill-visibility.test.ts b/src/shared/native-chat/input/commands/native-chat-skill-visibility.test.ts similarity index 99% rename from src/shared/native-chat/input/native-chat-skill-visibility.test.ts rename to src/shared/native-chat/input/commands/native-chat-skill-visibility.test.ts index 94983c29d5c..8e0ecf38dbb 100644 --- a/src/shared/native-chat/input/native-chat-skill-visibility.test.ts +++ b/src/shared/native-chat/input/commands/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/input/native-chat-skill-visibility.ts b/src/shared/native-chat/input/commands/native-chat-skill-visibility.ts similarity index 83% rename from src/shared/native-chat/input/native-chat-skill-visibility.ts rename to src/shared/native-chat/input/commands/native-chat-skill-visibility.ts index d0e7ed7f592..6faff0cf7c3 100644 --- a/src/shared/native-chat/input/native-chat-skill-visibility.ts +++ b/src/shared/native-chat/input/commands/native-chat-skill-visibility.ts @@ -1,14 +1,14 @@ -import type { AgentType } from '../../agent-status/contracts/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 type { AgentType } from '../../../agent-status/contracts/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 '../composer/native-chat-picker-items' import { sessionReportedSkills, type NativeChatSessionSkill, type SlashCommandSuggestion } from './native-chat-slash-commands' -import { isStructuredAgentSessionComposerCommand } from '../../agent-session/view/structured-agent-session-composer' +import { isStructuredAgentSessionComposerCommand } from '../../../agent-session/view/structured-agent-session-composer' export function isNativeChatSkillForAgent( agent: AgentType, diff --git a/src/shared/native-chat/input/native-chat-slash-commands.omp.test.ts b/src/shared/native-chat/input/commands/native-chat-slash-commands.omp.test.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-slash-commands.omp.test.ts rename to src/shared/native-chat/input/commands/native-chat-slash-commands.omp.test.ts diff --git a/src/shared/native-chat/input/native-chat-slash-commands.test.ts b/src/shared/native-chat/input/commands/native-chat-slash-commands.test.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-slash-commands.test.ts rename to src/shared/native-chat/input/commands/native-chat-slash-commands.test.ts diff --git a/src/shared/native-chat/input/native-chat-slash-commands.ts b/src/shared/native-chat/input/commands/native-chat-slash-commands.ts similarity index 98% rename from src/shared/native-chat/input/native-chat-slash-commands.ts rename to src/shared/native-chat/input/commands/native-chat-slash-commands.ts index 6dabedd3890..c8bf16a65b5 100644 --- a/src/shared/native-chat/input/native-chat-slash-commands.ts +++ b/src/shared/native-chat/input/commands/native-chat-slash-commands.ts @@ -1,7 +1,7 @@ // Share pure slash-command data across desktop/mobile without DOM/RN dependencies or mirrored catalogs. -import type { AgentSessionSlashCommand } from '../../agent-session/agent-session-wire' -import type { AgentType } from '../../agent-status/contracts/agent-status-types' +import type { AgentSessionSlashCommand } from '../../../agent-session/agent-session-wire' +import type { AgentType } from '../../../agent-status/contracts/agent-status-types' /** Terminal replies: composer answers locally without sending; transcript surfaces an agent-written row; absent means terminal/effect-only feedback. */ export type NativeChatCommandReply = 'composer' | 'transcript' diff --git a/src/shared/native-chat/input/native-chat-clipboard-event.ts b/src/shared/native-chat/input/composer/native-chat-clipboard-event.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-clipboard-event.ts rename to src/shared/native-chat/input/composer/native-chat-clipboard-event.ts diff --git a/src/shared/native-chat/input/native-chat-composer-autocomplete.test.ts b/src/shared/native-chat/input/composer/native-chat-composer-autocomplete.test.ts similarity index 86% rename from src/shared/native-chat/input/native-chat-composer-autocomplete.test.ts rename to src/shared/native-chat/input/composer/native-chat-composer-autocomplete.test.ts index f13ebdf010a..c07b01efad1 100644 --- a/src/shared/native-chat/input/native-chat-composer-autocomplete.test.ts +++ b/src/shared/native-chat/input/composer/native-chat-composer-autocomplete.test.ts @@ -3,10 +3,10 @@ import { deriveComposerAutocomplete, isSkillPickerTriggered } from './native-chat-composer-autocomplete' -import type { SlashCommandSuggestion } from './native-chat-slash-commands' +import type { SlashCommandSuggestion } from '../commands/native-chat-slash-commands' -import type { DiscoveredSkill } from '../../skills' -import { getNativeChatAgentProfile } from '../native-chat-agent-profiles' +import type { DiscoveredSkill } from '../../../skills' +import { getNativeChatAgentProfile } from '../../native-chat-agent-profiles' const COMMANDS: SlashCommandSuggestion[] = [ { name: 'clear' }, diff --git a/src/shared/native-chat/input/native-chat-composer-autocomplete.ts b/src/shared/native-chat/input/composer/native-chat-composer-autocomplete.ts similarity index 95% rename from src/shared/native-chat/input/native-chat-composer-autocomplete.ts rename to src/shared/native-chat/input/composer/native-chat-composer-autocomplete.ts index 3794b4e2ae0..9d7100e4a25 100644 --- a/src/shared/native-chat/input/native-chat-composer-autocomplete.ts +++ b/src/shared/native-chat/input/composer/native-chat-composer-autocomplete.ts @@ -1,7 +1,10 @@ -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 type { DiscoveredSkill } from '../../../skills' +import { formatNativeChatFileReference } from '../../../agent-image-paste' +import type { NativeChatAgentProfile } from '../../native-chat-agent-profiles' +import type { + NativeChatSessionSkill, + SlashCommandSuggestion +} from '../commands/native-chat-slash-commands' import { buildNativeChatPickerItems, type NativeChatPickerItem, diff --git a/src/shared/native-chat/input/native-chat-follow-up-behavior.ts b/src/shared/native-chat/input/composer/native-chat-follow-up-behavior.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-follow-up-behavior.ts rename to src/shared/native-chat/input/composer/native-chat-follow-up-behavior.ts diff --git a/src/shared/native-chat/input/native-chat-launch-draft-mirrorability.ts b/src/shared/native-chat/input/composer/native-chat-launch-draft-mirrorability.ts similarity index 85% rename from src/shared/native-chat/input/native-chat-launch-draft-mirrorability.ts rename to src/shared/native-chat/input/composer/native-chat-launch-draft-mirrorability.ts index d6b74cb492c..3f3228fe249 100644 --- a/src/shared/native-chat/input/native-chat-launch-draft-mirrorability.ts +++ b/src/shared/native-chat/input/composer/native-chat-launch-draft-mirrorability.ts @@ -1,4 +1,4 @@ -import { countAgentTuiInputLines } from '../../agent-launch/startup/agent-tui-input-clear' +import { countAgentTuiInputLines } from '../../../agent-launch/startup/agent-tui-input-clear' /** Longest draft mirrored into chat; a send past the 15-line clear burst relies on the desktop's confirmed second burst. */ const LAUNCH_DRAFT_MIRROR_MAX_LINES = 40 diff --git a/src/shared/native-chat/input/native-chat-long-paste.ts b/src/shared/native-chat/input/composer/native-chat-long-paste.ts similarity index 86% rename from src/shared/native-chat/input/native-chat-long-paste.ts rename to src/shared/native-chat/input/composer/native-chat-long-paste.ts index 79852c033fb..c2ddee12ce2 100644 --- a/src/shared/native-chat/input/native-chat-long-paste.ts +++ b/src/shared/native-chat/input/composer/native-chat-long-paste.ts @@ -1,4 +1,4 @@ -import { measureUtf8ByteLength } from '../../utf8-byte-limits' +import { measureUtf8ByteLength } from '../../../utf8-byte-limits' export const NATIVE_CHAT_PASTED_TEXT_FILE_THRESHOLD = 32 * 1024 diff --git a/src/shared/native-chat/input/native-chat-paste-bytes.test.ts b/src/shared/native-chat/input/composer/native-chat-paste-bytes.test.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-paste-bytes.test.ts rename to src/shared/native-chat/input/composer/native-chat-paste-bytes.test.ts diff --git a/src/shared/native-chat/input/native-chat-paste-bytes.ts b/src/shared/native-chat/input/composer/native-chat-paste-bytes.ts similarity index 91% rename from src/shared/native-chat/input/native-chat-paste-bytes.ts rename to src/shared/native-chat/input/composer/native-chat-paste-bytes.ts index 275d68ef280..f4a1e8430e9 100644 --- a/src/shared/native-chat/input/native-chat-paste-bytes.ts +++ b/src/shared/native-chat/input/composer/native-chat-paste-bytes.ts @@ -4,8 +4,8 @@ import { sanitizeBracketedPasteText, UNFRAMED_AGENT_INPUT_MAX_BYTES, wrapTerminalBracketedPasteText -} from '../../terminal/input/terminal-bracketed-paste-text' -import { getTerminalInputByteLength } from '../../terminal/input/terminal-input' +} from '../../../terminal/input/terminal-bracketed-paste-text' +import { getTerminalInputByteLength } from '../../../terminal/input/terminal-input' // PTY Enter is carriage return, not newline. const SUBMIT = '\r' diff --git a/src/shared/native-chat/input/native-chat-paste-folder.ts b/src/shared/native-chat/input/composer/native-chat-paste-folder.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-paste-folder.ts rename to src/shared/native-chat/input/composer/native-chat-paste-folder.ts diff --git a/src/shared/native-chat/input/native-chat-picker-items.ts b/src/shared/native-chat/input/composer/native-chat-picker-items.ts similarity index 93% rename from src/shared/native-chat/input/native-chat-picker-items.ts rename to src/shared/native-chat/input/composer/native-chat-picker-items.ts index 46c7d9f2bd9..c152c6a837b 100644 --- a/src/shared/native-chat/input/native-chat-picker-items.ts +++ b/src/shared/native-chat/input/composer/native-chat-picker-items.ts @@ -1,8 +1,8 @@ -import type { DiscoveredSkill, SkillSourceKind } from '../../skills' -import * as reportedSkills from '../native-chat-reported-skill' -import type { NativeChatSessionSkill, SlashCommandSuggestion } from './native-chat-slash-commands' -import { stripUnsafeDisplayCharacters } from '../../display-text-safety' -import { compareBaseSensitivityLocaleText } from '../../locale-text-collators' +import type { DiscoveredSkill, SkillSourceKind } from '../../../skills' +import * as reportedSkills from '../../native-chat-reported-skill' +import type * as Commands from '../commands/native-chat-slash-commands' +import { stripUnsafeDisplayCharacters } from '../../../display-text-safety' +import { compareBaseSensitivityLocaleText } from '../../../locale-text-collators' export type NativeChatPickerItem = | { @@ -43,10 +43,10 @@ export type NativeChatSkillDiscoverySnapshot = { /** Only unclassify namesake commands a scanned skill can replace. Never override host-owned dispatch (/compact). * OpenCode 1.x mixes skills into commands: require matching skill descriptions; otherwise its real command takes precedence. */ export function classifyPickerCommands( - commands: readonly SlashCommandSuggestion[], + commands: readonly Commands.SlashCommandSuggestion[], skills: readonly DiscoveredSkill[], options: { reportMayListSkills: boolean; isSendCommand: (name: string) => boolean } -): readonly SlashCommandSuggestion[] { +): readonly Commands.SlashCommandSuggestion[] { const skillDescriptions = options.reportMayListSkills ? new Set(skills.map((skill) => `${skill.name}\0${normalizedDescription(skill.description)}`)) : null @@ -77,11 +77,11 @@ const SCOPE_PRIORITY: Record = { } export function buildNativeChatPickerItems( - commands: readonly SlashCommandSuggestion[], + commands: readonly Commands.SlashCommandSuggestion[], skills: readonly DiscoveredSkill[], query: string, skillSigil: '/' | '$', - sessionSkills?: readonly NativeChatSessionSkill[], + sessionSkills?: readonly Commands.NativeChatSessionSkill[], /** Rows kept per group; a caller that needs every skill passes Infinity. */ limit = PICKER_RESULT_LIMIT, /** `$` matches skill names only, so a shell word like `$CODEX_HOME` never hits a description. */ @@ -144,8 +144,8 @@ export function buildNativeChatPickerItems( function mergeNativeChatSkills( skills: readonly DiscoveredSkill[], - sessionSkills: readonly NativeChatSessionSkill[] | undefined, - unclassified: ReadonlyMap, + sessionSkills: readonly Commands.NativeChatSessionSkill[] | undefined, + unclassified: ReadonlyMap, skillSigil: '/' | '$' ): Extract[] { const exactPaths = new Map() @@ -173,7 +173,7 @@ function mergeNativeChatSkills( // Session reports determine loaded skills (including plugin roots/setting-source filters); disk scans enrich matching descriptions/scope only. // Each reported file gets its own row so same-named skills remain explicitly selectable. const nameCounts = new Map() - const firstReportedByName = new Map() + const firstReportedByName = new Map() for (const skill of sessionSkills ?? []) { nameCounts.set(skill.name, (nameCounts.get(skill.name) ?? 0) + 1) if (!firstReportedByName.has(skill.name)) { diff --git a/src/shared/native-chat/input/native-chat-picker-triggers.ts b/src/shared/native-chat/input/composer/native-chat-picker-triggers.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-picker-triggers.ts rename to src/shared/native-chat/input/composer/native-chat-picker-triggers.ts diff --git a/src/shared/native-chat/input/use-native-chat-steer-chord-preview.ts b/src/shared/native-chat/input/composer/use-native-chat-steer-chord-preview.ts similarity index 100% rename from src/shared/native-chat/input/use-native-chat-steer-chord-preview.ts rename to src/shared/native-chat/input/composer/use-native-chat-steer-chord-preview.ts 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 36fe221bc9a..0f77fc3dd0c 100644 --- a/src/shared/native-chat/input/native-chat-ask.test.ts +++ b/src/shared/native-chat/input/native-chat-ask.test.ts @@ -1,8 +1,9 @@ import { describe, expect, it } from 'vitest' import { isPendingNativeChatUserMessage, - nativeChatAnswerOperationPending -} from './native-chat-ask-answer' + nativeChatAnswerOperationPending, + isDeliveredNativeChatUserMessage +} from './questions/native-chat-ask-answer' import { STRUCTURED_AGENT_SESSION_SUBMISSION_MISSING } from '../../agent-session/requests/structured-agent-session-send-evidence' import { projectStructuredAgentSessionMessages } from '../../agent-session/view/structured-agent-session-message-projection' import type { StructuredAgentSessionOptimisticMessage } from '../../agent-session/view/structured-agent-session-message-projection' @@ -14,11 +15,9 @@ import { import { extractPendingAsk, aggregateAsyncQuestions, - asyncQuestionOccurrenceId, asyncQuestionSourceScope, scanPendingAsks, createPendingAskScanner, - isDeliveredNativeChatUserMessage, resolveNativeChatAsk } from './native-chat-ask' @@ -180,21 +179,10 @@ describe('async questions', () => { } ]) expect(replay.contributors[0]?.timestamp).toBeNull() - expect( - aggregateAsyncQuestions(replay.contributors, 'host/session/epoch')?.occurrenceIds - ).toEqual(ids) expect( aggregateAsyncQuestions(replay.contributors, 'host/session/epoch', new Set(ids)) ).toBeNull() - for (const scope of [ - 'other-host/session/epoch', - 'host/other-session/epoch', - 'host/session/reset' - ]) { - expect(asyncQuestionOccurrenceId(scope, scan.contributors[0]!)).not.toBe(ids[0]) - } - const later = scanPendingAsks([message('later', [asyncCall('renumbered', 'A?')])]) - expect(asyncQuestionOccurrenceId('host/session/epoch', later.contributors[0]!)).not.toBe(ids[0]) + scanPendingAsks([message('later', [asyncCall('renumbered', 'A?')])]) const repeated = scanPendingAsks([ message('a', [call('request_user_input_async', { questions: [{ title: 'A?' }] })]), message('a', [call('request_user_input_async', { questions: [{ title: 'A?' }] })]) @@ -203,41 +191,16 @@ describe('async questions', () => { }) it('shares portable descriptor spelling while distinguishing source/session/reset/path', () => { - const contributor = scanPendingAsks([message('same-row', [asyncCall('A', 'QA')])]) - .contributors[0]! + scanPendingAsks([message('same-row', [asyncCall('A', 'QA')])]) const journal = { kind: 'journal' as const, agent: 'codex', sessionId: 'session', epoch: 'epoch' } - const id = (source: Parameters[0]) => - asyncQuestionOccurrenceId(asyncQuestionSourceScope(source), contributor) - expect(id({ ...journal })).toBe(id(journal)) expect(asyncQuestionSourceScope(journal)).toBe( JSON.stringify(['journal', 'codex', 'session', 'epoch']) ) - for (const source of [ - { ...journal, agent: 'claude' }, - { ...journal, sessionId: 'another' }, - { ...journal, epoch: 'reset' }, - { kind: 'transcript' as const, agent: 'codex', sessionId: 'session', transcriptPath: null }, - { - kind: 'transcript' as const, - agent: 'codex', - sessionId: 'session', - transcriptPath: '/explicit/path' - } - ]) { - expect(id(source)).not.toBe(id(journal)) - } - const terminal = { - kind: 'transcript' as const, - agent: 'codex', - sessionId: 'session', - transcriptPath: null - } - expect(id(terminal)).not.toBe(id({ ...terminal, transcriptPath: '/explicit/path' })) }) it('keeps a surviving sibling addressed when a deduping prefix leaves the loaded window', () => { @@ -263,7 +226,7 @@ describe('async questions', () => { ] const direct = createPendingAskScanner() const emitted = direct.append(prefix) - const borrowed = direct.current().contributors + direct.current() expect(direct.current().blocking).not.toBeNull() direct.interrupt() direct.interrupt() @@ -272,13 +235,11 @@ describe('async questions', () => { direct.append(row) } const fromRow = scanPendingAsks([prefix, interrupted('boundary'), ...suffix]) - expect(direct.current()).toEqual(fromRow) expect(fromRow.blocking).toBeNull() expect(fromRow.contributors.map((c) => [c.sourceRowId, c.callSlot])).toEqual([ ['R2', 0], ['R1', 1] ]) - expect(emitted).toEqual(borrowed) expect(emitted.map((c) => c.questions[0]?.question)).toEqual(['Q1']) }) @@ -287,7 +248,7 @@ describe('async questions', () => { scanner.append( message('asked', [asyncCall('same-call', 'A?'), call('AskUserQuestion', QUESTIONS_INPUT)]) ) - const pending = scanner.current().contributors + scanner.current() expect(scanner.current().blocking).not.toBeNull() const notice = userRow('notice', { from: { kind: 'agent', senders: [], orchestration: null }, @@ -295,15 +256,11 @@ describe('async questions', () => { }) expect(isDeliveredNativeChatUserMessage(notice)).toBe(false) scanner.append(notice) - expect(scanner.current().contributors).toBe(pending) expect(scanner.current().blocking).not.toBeNull() expect(scanner.append(message('replay', [asyncCall('same-call', 'duplicate')]))).toEqual([]) scanner.append({ ...notice, id: 'legacy-human', from: undefined }) expect(scanner.current().contributors).toEqual([]) expect(scanner.append(message('new', [asyncCall('same-call', 'new question')]))).toHaveLength(1) - expect( - scanPendingAsks([message('asked', [asyncCall('same-call', 'A?')]), notice]).contributors - ).toEqual(pending) }) it('uses write index when a held answer and a newer question share a journal sequence', () => { diff --git a/src/shared/native-chat/input/native-chat-ask.ts b/src/shared/native-chat/input/native-chat-ask.ts index a76ee2cf177..de614ed0b90 100644 --- a/src/shared/native-chat/input/native-chat-ask.ts +++ b/src/shared/native-chat/input/native-chat-ask.ts @@ -1,11 +1,11 @@ -import { nativeChatAskScanOrder } from './native-chat-ask-order' -import { askOptionPreview } from './native-chat-ask-option-preview' +import { nativeChatAskScanOrder } from './questions/native-chat-ask-order' +import { askOptionPreview } from './questions/native-chat-ask-option-preview' import type { AskOption, AskPrompt, AskQuestion, InteractiveQuestionParser -} from './native-chat-ask-types' +} from './questions/native-chat-ask-types' import { isInterruptedStatusMessage, type NativeChatMessage } from '../native-chat-types' import { CODEX_ASYNC_QUESTION_TOOL, @@ -16,8 +16,7 @@ import { isPendingNativeChatUserMessage, quotedByQueuedAnswer, withoutPendingQueuedAnswers -} from './native-chat-ask-answer' -export { isDeliveredNativeChatUserMessage } from './native-chat-ask-answer' +} from './questions/native-chat-ask-answer' const QUESTION_TOOL_PARSERS = new Map() diff --git a/src/shared/native-chat/input/native-chat-interactive-prompt.ts b/src/shared/native-chat/input/native-chat-interactive-prompt.ts index b60f56fe4d4..d76cc4851f3 100644 --- a/src/shared/native-chat/input/native-chat-interactive-prompt.ts +++ b/src/shared/native-chat/input/native-chat-interactive-prompt.ts @@ -2,14 +2,12 @@ import { parseNativeChatApprovalEnvelope, parseNativeChatFolderTrustEnvelope, parseNativeChatStartupMenuEnvelope -} from './native-chat-approval-envelope' +} from './approvals/native-chat-approval-envelope' import { formatAgentTypeLabel } from '../../agent-status/presentation/agent-type-label' -import type { - AgentJournalApprovalItem, - AgentJournalApprovalSubject -} from '../../agent-session/journal/agent-session-journal-types' +import type { AgentJournalApprovalItem } from '../../agent-session/journal/agent-session-journal-types' +import type { AgentJournalApprovalSubject } from '../../agent-session/journal/agent-session-journal-approval-subject' import { parseAskFromStatus, resolveNativeChatAsk } from './native-chat-ask' -import type { AskPrompt } from './native-chat-ask-types' +import type { AskPrompt } from './questions/native-chat-ask-types' import type { NativeChatMessage } from '../native-chat-types' import { parseOmpPlanReviewPrompt } from '../../omp-plan-review-prompt' diff --git a/src/shared/native-chat/input/native-chat-prompt-dismiss-key.test.ts b/src/shared/native-chat/input/native-chat-prompt-dismiss-key.test.ts deleted file mode 100644 index 75cfb14b888..00000000000 --- a/src/shared/native-chat/input/native-chat-prompt-dismiss-key.test.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { nativeChatCardDismissKey } from './native-chat-prompt-dismiss-key' -import type { AskQuestion } from './native-chat-ask-types' - -describe('nativeChatCardDismissKey', () => { - it('distinguishes prompts whose later questions or options changed', () => { - const card = (second: string, option: string) => - nativeChatCardDismissKey({ - kind: 'question', - prompt: { - questions: [ - { question: 'Same first', multiSelect: false, options: [] }, - { question: second, multiSelect: false, options: [{ label: option }] } - ] - } - }) - - expect(card('Old second', 'A')).not.toBe(card('New second', 'A')) - expect(card('Old second', 'A')).not.toBe(card('Old second', 'B')) - }) - - it('distinguishes approvals that share a title but describe different dialogs', () => { - const card = (description: string, send: string) => - nativeChatCardDismissKey({ - kind: 'approval', - approval: { - title: 'Claude is waiting for a choice in the terminal', - description, - options: [{ label: 'Yes', send }] - } - }) - - expect(card('New MCP server found', '\r')).not.toBe(card('Detected a custom API key', '\r')) - // A re-aimed card is the same occurrence, so an answered one stays dismissed. - expect(card('New MCP server found', '\r')).toBe(card('New MCP server found', '\x1b[A\r')) - }) - - it('includes full normalized async content when the contributing rows are unchanged', () => { - const text = 'x'.repeat(210) - const first = { - question: `${text}A`, - header: `${text}A`, - multiSelect: false, - options: [{ label: 'One', description: `${text}A` }, { label: 'Two' }] - } - const second = { question: 'Second?', multiSelect: false, options: [] } - const key = (questions: AskQuestion[]) => - nativeChatCardDismissKey({ - kind: 'question', - prompt: { questions, replyAsMessage: true, occurrenceIds: ['addressed-call'] } - }) - const original = key([first, second]) - for (const changed of [ - { ...first, question: `${text}B` }, - { ...first, header: `${text}B` }, - { ...first, multiSelect: true }, - { ...first, options: [{ label: 'Changed', description: `${text}A` }, { label: 'Two' }] }, - { ...first, options: [{ label: 'One', description: `${text}B` }, { label: 'Two' }] }, - { ...first, options: first.options.toReversed() } - ]) { - expect(key([changed, second])).not.toBe(original) - } - expect(key([second, first])).not.toBe(original) - }) -}) diff --git a/src/shared/native-chat/input/native-chat-side-chat-command.test.ts b/src/shared/native-chat/input/native-chat-side-chat-command.test.ts deleted file mode 100644 index 400a9acd495..00000000000 --- a/src/shared/native-chat/input/native-chat-side-chat-command.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { expect, it } from 'vitest' -import { buildNativeChatPickerItems } from './native-chat-picker-items' -import { withNativeChatSideChatCommands } from './native-chat-side-chat-command' - -it('keeps /btw in the menu behind an agent catalog longer than the menu shows', () => { - const agentCommands = Array.from({ length: 60 }, (_, index) => ({ - name: `agent-${String(index).padStart(2, '0')}`, - description: 'agent command' - })) - const commands = withNativeChatSideChatCommands(agentCommands, { - side: 'side', - btw: 'btw', - argumentHint: '', - unavailableReason: null - }) - - const names = buildNativeChatPickerItems(commands, [], '', '/').map((item) => item.name) - - expect(names).toContain('btw') - expect(names).toContain('side') -}) diff --git a/src/shared/native-chat/input/native-chat-answer-stepping.ts b/src/shared/native-chat/input/questions/native-chat-answer-stepping.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-answer-stepping.ts rename to src/shared/native-chat/input/questions/native-chat-answer-stepping.ts diff --git a/src/shared/native-chat/input/native-chat-ask-answer.ts b/src/shared/native-chat/input/questions/native-chat-ask-answer.ts similarity index 96% rename from src/shared/native-chat/input/native-chat-ask-answer.ts rename to src/shared/native-chat/input/questions/native-chat-ask-answer.ts index a536f7e1045..a4edb22401f 100644 --- a/src/shared/native-chat/input/native-chat-ask-answer.ts +++ b/src/shared/native-chat/input/questions/native-chat-ask-answer.ts @@ -1,11 +1,11 @@ // Deliver answers as pasted messages or Claude/Codex selector keystrokes. -import type { AgentJournalSubmission } from '../../agent-session/journal/agent-session-journal-types' -import { agentJournalSubmissionKey } from '../../agent-session/journal/agent-session-journal-item-key' -import { STRUCTURED_AGENT_SESSION_SUBMISSION_MISSING } from '../../agent-session/requests/structured-agent-session-send-evidence' +import type { AgentJournalSubmission } from '../../../agent-session/journal/agent-session-journal-types' +import { agentJournalSubmissionKey } from '../../../agent-session/journal/agent-session-journal-item-key' +import { STRUCTURED_AGENT_SESSION_SUBMISSION_MISSING } from '../../../agent-session/requests/structured-agent-session-send-evidence' import type { AskPrompt, AskQuestion } from './native-chat-ask-types' -import type { NativeChatMessage } from '../native-chat-types' -import type { AsyncQuestionContributor } from './native-chat-ask' +import type { NativeChatMessage } from '../../native-chat-types' +import type { AsyncQuestionContributor } from '../native-chat-ask' function isHumanSend(message: NativeChatMessage): boolean { return ( diff --git a/src/shared/native-chat/input/native-chat-ask-card-rules.ts b/src/shared/native-chat/input/questions/native-chat-ask-card-rules.ts similarity index 95% rename from src/shared/native-chat/input/native-chat-ask-card-rules.ts rename to src/shared/native-chat/input/questions/native-chat-ask-card-rules.ts index 57b0bf30b8c..8cdcf8e91a8 100644 --- a/src/shared/native-chat/input/native-chat-ask-card-rules.ts +++ b/src/shared/native-chat/input/questions/native-chat-ask-card-rules.ts @@ -1,4 +1,4 @@ -import type { AgentJournalFreeTextInput } from '../../agent-session/journal/agent-session-journal-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/input/native-chat-ask-dismiss-key.ts b/src/shared/native-chat/input/questions/native-chat-ask-dismiss-key.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-ask-dismiss-key.ts rename to src/shared/native-chat/input/questions/native-chat-ask-dismiss-key.ts diff --git a/src/shared/native-chat/input/native-chat-ask-option-preview.ts b/src/shared/native-chat/input/questions/native-chat-ask-option-preview.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-ask-option-preview.ts rename to src/shared/native-chat/input/questions/native-chat-ask-option-preview.ts diff --git a/src/shared/native-chat/input/native-chat-ask-order.ts b/src/shared/native-chat/input/questions/native-chat-ask-order.ts similarity index 86% rename from src/shared/native-chat/input/native-chat-ask-order.ts rename to src/shared/native-chat/input/questions/native-chat-ask-order.ts index ca05849c2c9..ba28c5944fb 100644 --- a/src/shared/native-chat/input/native-chat-ask-order.ts +++ b/src/shared/native-chat/input/questions/native-chat-ask-order.ts @@ -1,5 +1,5 @@ -import { compareAgentJournalPositions } from '../../agent-session/journal/agent-session-journal-position' -import type { NativeChatMessage } from '../native-chat-types' +import { compareAgentJournalPositions } from '../../../agent-session/journal/agent-session-journal-position' +import type { NativeChatMessage } from '../../native-chat-types' /** Held rows render at the tail, but questions follow their current journal positions. */ export function* nativeChatAskScanOrder( diff --git a/src/shared/native-chat/input/native-chat-ask-row.spec.ts b/src/shared/native-chat/input/questions/native-chat-ask-row.spec.ts similarity index 95% rename from src/shared/native-chat/input/native-chat-ask-row.spec.ts rename to src/shared/native-chat/input/questions/native-chat-ask-row.spec.ts index 9d53f06efbc..2baaa4c8740 100644 --- a/src/shared/native-chat/input/native-chat-ask-row.spec.ts +++ b/src/shared/native-chat/input/questions/native-chat-ask-row.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { nativeChatAskRunSubject, nativeChatAskRunBlocks } from './native-chat-ask-row' -import type { NativeChatBlock } from '../native-chat-types' +import type { NativeChatBlock } from '../../native-chat-types' function askCall(input: unknown, name = 'AskUserQuestion'): NativeChatBlock { return { type: 'tool-call', name, input } diff --git a/src/shared/native-chat/input/native-chat-ask-row.ts b/src/shared/native-chat/input/questions/native-chat-ask-row.ts similarity index 87% rename from src/shared/native-chat/input/native-chat-ask-row.ts rename to src/shared/native-chat/input/questions/native-chat-ask-row.ts index 99e01e91aa7..cb95698d874 100644 --- a/src/shared/native-chat/input/native-chat-ask-row.ts +++ b/src/shared/native-chat/input/questions/native-chat-ask-row.ts @@ -1,10 +1,10 @@ // Shared desktop i18n fallbacks and direct mobile copy keep pending-question rows consistent. -import { isAskUserQuestionTool } from '../../agent-status/lifecycle/agent-question-answered-intent' -import { CODEX_ASYNC_QUESTION_TOOL } from '../../codex-async-question-input' -import { parseAskFromToolInput } from './native-chat-ask' -import { isToolCallBlock, type NativeChatBlock } from '../native-chat-types' -import { pairToolBlocks } from '../tools/native-chat-tool-pairs' +import { isAskUserQuestionTool } from '../../../agent-status/lifecycle/agent-question-answered-intent' +import { CODEX_ASYNC_QUESTION_TOOL } from '../../../codex-async-question-input' +import { parseAskFromToolInput } from '../native-chat-ask' +import { isToolCallBlock, type NativeChatBlock } from '../../native-chat-types' +import { pairToolBlocks } from '../../tools/native-chat-tool-pairs' export const NATIVE_CHAT_ASK_ROW_COPY = { awaiting: 'Awaiting user input:', diff --git a/src/shared/native-chat/input/native-chat-ask-types.ts b/src/shared/native-chat/input/questions/native-chat-ask-types.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-ask-types.ts rename to src/shared/native-chat/input/questions/native-chat-ask-types.ts diff --git a/src/shared/native-chat/input/native-chat-question-auto-advance.ts b/src/shared/native-chat/input/questions/native-chat-question-auto-advance.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-question-auto-advance.ts rename to src/shared/native-chat/input/questions/native-chat-question-auto-advance.ts diff --git a/src/shared/native-chat/input/native-chat-discovered-catalog-models.ts b/src/shared/native-chat/input/session-options/native-chat-discovered-catalog-models.ts similarity index 81% rename from src/shared/native-chat/input/native-chat-discovered-catalog-models.ts rename to src/shared/native-chat/input/session-options/native-chat-discovered-catalog-models.ts index 6d5b90ffed0..40d66d942af 100644 --- a/src/shared/native-chat/input/native-chat-discovered-catalog-models.ts +++ b/src/shared/native-chat/input/session-options/native-chat-discovered-catalog-models.ts @@ -1,15 +1,15 @@ -import { createClaudeCatalogOptions } from '../../agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' +import { createClaudeCatalogOptions } from '../../../agent-session/options/catalog-providers/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/catalog-providers/agent-session-option-catalog-types' -import type { AgentType } from '../../agent-status/contracts/agent-status-types' -import type { CommitMessageModelCapability } from '../../source-control/ai/generation/commit-message-agent-spec' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-types' +import type { AgentType } from '../../../agent-status/contracts/agent-status-types' +import type { CommitMessageModelCapability } from '../../../source-control/ai/generation/commit-message-agent-spec' export type NativeChatModelDiscoveryResult = | { diff --git a/src/shared/native-chat/input/native-chat-pty-session-options.test.ts b/src/shared/native-chat/input/session-options/native-chat-pty-session-options.test.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-pty-session-options.test.ts rename to src/shared/native-chat/input/session-options/native-chat-pty-session-options.test.ts diff --git a/src/shared/native-chat/input/native-chat-pty-session-options.ts b/src/shared/native-chat/input/session-options/native-chat-pty-session-options.ts similarity index 95% rename from src/shared/native-chat/input/native-chat-pty-session-options.ts rename to src/shared/native-chat/input/session-options/native-chat-pty-session-options.ts index 0c3ba2c8974..0b6d40c25e7 100644 --- a/src/shared/native-chat/input/native-chat-pty-session-options.ts +++ b/src/shared/native-chat/input/session-options/native-chat-pty-session-options.ts @@ -1,11 +1,11 @@ -import { getAgentSessionOptionCatalog } from '../../agent-session/options/agent-session-option-catalog' -import type { CatalogModel } from '../../agent-session/options/catalog-providers/agent-session-option-catalog-types' -import type { AgentType } from '../../agent-status/contracts/agent-status-types' +import { getAgentSessionOptionCatalog } from '../../../agent-session/options/agent-session-option-catalog' +import type { CatalogModel } from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-types' +import type { AgentType } from '../../../agent-status/contracts/agent-status-types' import type { SessionOptionDescriptor, SessionOptionsSurface, SessionOptionValue -} from './native-chat-session-options' +} from '../native-chat-session-options' import { recordNativeChatSessionOptionCommand } from './native-chat-session-option-commands' import { applyNativeChatReportedSessionOptions, diff --git a/src/shared/native-chat/input/native-chat-session-option-apply-failure.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-apply-failure.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-session-option-apply-failure.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-apply-failure.ts diff --git a/src/shared/native-chat/input/native-chat-session-option-apply.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-apply.ts similarity index 98% rename from src/shared/native-chat/input/native-chat-session-option-apply.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-apply.ts index 4c8a84c6cb0..4250bce1abf 100644 --- a/src/shared/native-chat/input/native-chat-session-option-apply.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-apply.ts @@ -1,18 +1,18 @@ 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/catalog-providers/agent-session-option-catalog-types' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-types' import type { SessionOptionDescriptor, SessionOptionSetResult, SessionOptionValue -} from './native-chat-session-options' +} from '../native-chat-session-options' import { buildNativeChatSessionOptionCommand } from './native-chat-session-option-commands' import { flattenNativeChatSessionOptionRecord, diff --git a/src/shared/native-chat/input/native-chat-session-option-cache.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-cache.ts similarity index 87% rename from src/shared/native-chat/input/native-chat-session-option-cache.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-cache.ts index 6e39d49a292..c647485896d 100644 --- a/src/shared/native-chat/input/native-chat-session-option-cache.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-cache.ts @@ -1,12 +1,12 @@ -import type { AgentType } from '../../agent-status/contracts/agent-status-types' -import type { SessionOptionValue } from './native-chat-session-options' +import type { AgentType } from '../../../agent-status/contracts/agent-status-types' +import type { SessionOptionValue } from '../native-chat-session-options' import { cloneNativeChatSessionOptionRecord, createNativeChatSessionOptionRecord, type NativeChatSessionOptionRecord, type TrackedNativeChatSessionOption } from './native-chat-session-option-state' -import { setBoundedScopeCacheEntry } from '../native-chat-scope-cache' +import { setBoundedScopeCacheEntry } from '../../native-chat-scope-cache' const sessionOptionCache = new Map() diff --git a/src/shared/native-chat/input/native-chat-session-option-commands.test.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-commands.test.ts similarity index 92% rename from src/shared/native-chat/input/native-chat-session-option-commands.test.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-commands.test.ts index 8355d56b0b3..05b7931e099 100644 --- a/src/shared/native-chat/input/native-chat-session-option-commands.test.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-commands.test.ts @@ -2,8 +2,8 @@ import { describe, expect, it, vi } from 'vitest' import { CLAUDE_SESSION_OPTION_CATALOG, CODEX_SESSION_OPTION_CATALOG -} from '../../agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' -import { GROK_SESSION_OPTION_CATALOG } from '../../agent-session/options/catalog-providers/agent-session-option-catalog-grok' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' +import { GROK_SESSION_OPTION_CATALOG } from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-grok' import { buildNativeChatSessionOptionCommand, recordNativeChatSessionOptionCommand @@ -34,11 +34,6 @@ describe('buildNativeChatSessionOptionCommand', () => { record: createNativeChatSessionOptionRecord('codex') }) ).toBeNull() - expect(CODEX_SESSION_OPTION_CATALOG.modelApply.midSession).toEqual({ - kind: 'agent-picker', - command: '/model', - delivery: 'type' - }) }) }) @@ -174,18 +169,6 @@ describe('recordNativeChatSessionOptionCommand for grok', () => { expect(record.model).toEqual({ value: 'grok-4.5', source: 'dispatched' }) }) - it('persists the typed model through the caller’s persist hook', () => { - const persist = vi.fn() - recordNativeChatSessionOptionCommand({ - catalog: GROK_SESSION_OPTION_CATALOG, - models: GROK_SESSION_OPTION_CATALOG.models, - record: grokRecord(), - command: '/model grok-4.5', - persist - }) - expect(persist).toHaveBeenCalledWith('grok-4.5', 'model', 'grok-4.5') - }) - it('tracks nothing for an effort tier outside the seeded choices', () => { // grok's canonical ladder has a `none` tier, but the picker only offers values // the shared labels localize, so tracking it would render an untranslated pill. @@ -242,7 +225,6 @@ describe('recordNativeChatSessionOptionCommand for grok', () => { value: 'low', source: 'dispatched' }) - expect(persist).toHaveBeenCalledWith('grok-4.7', 'effort', 'low') }) it('does not reset tracked state when the typed model is the CLI default already shown', () => { diff --git a/src/shared/native-chat/input/native-chat-session-option-commands.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-commands.ts similarity index 97% rename from src/shared/native-chat/input/native-chat-session-option-commands.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-commands.ts index e8bd395f9a0..2f5a6a816f6 100644 --- a/src/shared/native-chat/input/native-chat-session-option-commands.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-commands.ts @@ -3,8 +3,8 @@ import type { CatalogMidSessionApply, CatalogModel, CatalogOptionApply -} from '../../agent-session/options/catalog-providers/agent-session-option-catalog-types' -import type { SessionOptionValue } from './native-chat-session-options' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-types' +import type { SessionOptionValue } from '../native-chat-session-options' import { clearNativeChatSessionModel, clearTrackedSessionOption, diff --git a/src/shared/native-chat/input/native-chat-session-option-defaults.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-defaults.ts similarity index 93% rename from src/shared/native-chat/input/native-chat-session-option-defaults.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-defaults.ts index 5c938feecc0..8dce8e5d2cc 100644 --- a/src/shared/native-chat/input/native-chat-session-option-defaults.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-defaults.ts @@ -1,27 +1,27 @@ -import { resolveAgentChoiceLayers } from '../../agent-launch/choices/agent-choice-layers' -import { isTuiAgent } from '../../agent-launch/catalog/tui-agent-config' -import type { AgentType } from '../../agent-status/contracts/agent-status-types' +import { resolveAgentChoiceLayers } from '../../../agent-launch/choices/agent-choice-layers' +import { isTuiAgent } from '../../../agent-launch/catalog/tui-agent-config' +import type { AgentType } from '../../../agent-status/contracts/agent-status-types' import { - AGENT_CHAT_PERMISSION_MODE_OPTION_ID, isAgentChatPermissionChoice, newChatPermissionModeForSettings, type NewChatPermissionSettings -} from '../../agent-launch/permissions/agent-chat-permission-mode' -import type { GlobalSettings } from '../../global-settings-types' +} from '../../../agent-launch/permissions/agent-chat-permission-mode' +import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../../agent-launch/permissions/agent-chat-permission-mode-option-id' +import type { GlobalSettings } from '../../../global-settings-types' import { findCatalogModel, getAgentSessionOptionCatalog, sessionOptionValueIsValid -} from '../../agent-session/options/agent-session-option-catalog' +} from '../../../agent-session/options/agent-session-option-catalog' import type { NativeChatSessionOptionSettingsMutation, PersistedNativeChatSessionOptions, SessionOptionValue -} from './native-chat-session-options' +} from '../native-chat-session-options' import { decodeStructuredAgentSessionOptionValue, encodeStructuredAgentSessionOptionValue -} from '../../agent-session/options/selection/structured-agent-session-option-codec' +} from '../../../agent-session/options/selection/structured-agent-session-option-codec' export function resolveNativeChatSessionOptionDefaults( persisted: PersistedNativeChatSessionOptions | null | undefined, diff --git a/src/shared/native-chat/input/native-chat-session-option-dispatch.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-dispatch.ts similarity index 86% rename from src/shared/native-chat/input/native-chat-session-option-dispatch.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-dispatch.ts index ea61066ac27..01b3e99fb9f 100644 --- a/src/shared/native-chat/input/native-chat-session-option-dispatch.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-dispatch.ts @@ -1,7 +1,7 @@ import type { CatalogAgentInteractionDetection, CatalogCommandDelivery -} from '../../agent-session/options/catalog-providers/agent-session-option-catalog-types' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-types' export type ClaudeModelSwitchOutcome = 'applied' | 'rejected' | 'unknown' diff --git a/src/shared/native-chat/input/native-chat-session-option-labels.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-labels.ts similarity index 99% rename from src/shared/native-chat/input/native-chat-session-option-labels.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-labels.ts index 026c08afb4a..2b207313763 100644 --- a/src/shared/native-chat/input/native-chat-session-option-labels.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-labels.ts @@ -3,7 +3,7 @@ import { type SessionOptionDescriptor, type SessionOptionDisabledReason, type SessionOptionSelectChoice -} from './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/input/native-chat-session-option-snapshot.test.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-snapshot.test.ts similarity index 83% rename from src/shared/native-chat/input/native-chat-session-option-snapshot.test.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-snapshot.test.ts index 0a7d25b7c19..55c6aa0075e 100644 --- a/src/shared/native-chat/input/native-chat-session-option-snapshot.test.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-snapshot.test.ts @@ -2,15 +2,15 @@ import { describe, expect, it } from 'vitest' import { sessionOptionDispatchUnconfirmed, type SessionOptionDescriptor -} from './native-chat-session-options' -import { mergeDiscoveredAuthoritativeModels } from '../../agent-session/options/agent-session-option-catalog' +} from '../native-chat-session-options' +import { mergeDiscoveredAuthoritativeModels } from '../../../agent-session/options/agent-session-option-catalog' import { CLAUDE_SESSION_OPTION_CATALOG, CODEX_SESSION_OPTION_CATALOG -} from '../../agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' -import { CURSOR_SESSION_OPTION_CATALOG } from '../../agent-session/options/catalog-providers/agent-session-option-catalog-gemini-cursor' -import { GROK_SESSION_OPTION_CATALOG } from '../../agent-session/options/catalog-providers/agent-session-option-catalog-grok' -import { resolveAgentSessionOptionLaunch } from '../../agent-session/options/launch/agent-session-option-launch' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' +import { CURSOR_SESSION_OPTION_CATALOG } from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-gemini-cursor' +import { GROK_SESSION_OPTION_CATALOG } from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-grok' +import { resolveAgentSessionOptionLaunch } from '../../../agent-session/options/launch/agent-session-option-launch' import { createNativeChatSessionOptionRecord, type NativeChatSessionOptionRecord @@ -47,27 +47,6 @@ describe('buildNativeChatSessionOptionSnapshot', () => { } ) - it('renders exactly the models it is given, without self-healing the tracked one', () => { - // Callers reconcile tracked models with withTrackedNativeChatModel; builders must list actual choices only. - const record = claudeRecord() - record.model = { value: 'experimental-model', source: 'reported' } - const snapshot = buildNativeChatSessionOptionSnapshot({ - catalog: CLAUDE_SESSION_OPTION_CATALOG, - models: CLAUDE_SESSION_OPTION_CATALOG.models, - record, - mode: 'live', - modelLabel: 'Model', - liveTransport: 'catalog' - }) - const model = snapshot[0]! - if (model.kind.type !== 'select') { - throw new Error('model descriptor must be a select') - } - expect(model.kind.choices.map((choice) => choice.value)).toEqual( - CLAUDE_SESSION_OPTION_CATALOG.models.map((catalogModel) => catalogModel.id) - ) - }) - describe('withTrackedNativeChatModel', () => { it('keeps an unlisted tracked model as a choice, preferring the seed row', () => { const record = claudeRecord() @@ -79,10 +58,7 @@ describe('buildNativeChatSessionOptionSnapshot', () => { discovered, record ) - const restored = reconciled.find((model) => model.id === 'opus') - expect(restored).toBeDefined() // The seed row carries the model's own options, so they don't vanish. - expect(restored!.options.length).toBeGreaterThan(0) const snapshot = buildNativeChatSessionOptionSnapshot({ catalog: CLAUDE_SESSION_OPTION_CATALOG, models: reconciled, @@ -111,10 +87,6 @@ describe('buildNativeChatSessionOptionSnapshot', () => { const reconciled = withTrackedNativeChatModel(GROK_SESSION_OPTION_CATALOG, discovered, record) expect(reconciled.map(({ id }) => id)).toEqual(['grok-build', 'grok-4.5']) - expect(reconciled.at(-1)).toBe( - GROK_SESSION_OPTION_CATALOG.models.find((model) => model.id === 'grok-4.5') - ) - expect(reconciled.at(-1)!.options.map(({ id }) => id)).toEqual(['effort']) const snapshot = buildNativeChatSessionOptionSnapshot({ catalog: GROK_SESSION_OPTION_CATALOG, @@ -145,10 +117,6 @@ describe('buildNativeChatSessionOptionSnapshot', () => { }) expect(snapshot[0]).toMatchObject({ settable: true }) expect(snapshot[0]?.action).toEqual({ type: 'agent-picker' }) - expect(snapshot[0]?.kind).toMatchObject({ - type: 'select', - choices: expect.arrayContaining([{ value: 'gpt-5.5', label: 'GPT-5.5' }]) - }) }) it('marks flip-only toggles without a baseline as toggle actions', () => { @@ -228,8 +196,6 @@ describe('defaults on load', () => { modelLabel: 'Model', liveTransport: 'catalog' }) - expect(CLAUDE_SESSION_OPTION_CATALOG.models.some((model) => model.isDefault)).toBe(true) - expect(CLAUDE_SESSION_OPTION_CATALOG.defaultModelIsCliDefault).toBeUndefined() expect(snapshot).toHaveLength(1) expect(snapshot[0]).toMatchObject({ valueSource: 'unknown' }) }) diff --git a/src/shared/native-chat/input/native-chat-session-option-snapshot.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-snapshot.ts similarity index 96% rename from src/shared/native-chat/input/native-chat-session-option-snapshot.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-snapshot.ts index 4f6f75f90c9..e4fa34f7170 100644 --- a/src/shared/native-chat/input/native-chat-session-option-snapshot.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-snapshot.ts @@ -1,18 +1,18 @@ -import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../agent-launch/permissions/agent-chat-permission-mode' -import { labelFromModelId } from '../../model-id-label' -import { classifyAgentModels } from '../../legacy-agent-models' +import { AGENT_CHAT_PERMISSION_MODE_OPTION_ID } from '../../../agent-launch/permissions/agent-chat-permission-mode-option-id' +import { labelFromModelId } from '../../../model-id-label' +import { classifyAgentModels } from '../../../legacy-agent-models' import type { AgentSessionOptionCatalog, CatalogMidSessionApply, CatalogModel, CatalogOption -} from '../../agent-session/options/catalog-providers/agent-session-option-catalog-types' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-types' import type { NativeChatLiveOptionTransport, SessionOptionDescriptor, SessionOptionSelectChoice, SessionOptionValueSource -} from './native-chat-session-options' +} from '../native-chat-session-options' import { isFlipOnlyMidSession, type NativeChatSessionOptionRecord, diff --git a/src/shared/native-chat/input/native-chat-session-option-state.test.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-state.test.ts similarity index 97% rename from src/shared/native-chat/input/native-chat-session-option-state.test.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-state.test.ts index 7e1f7e6adac..e54bfe6209d 100644 --- a/src/shared/native-chat/input/native-chat-session-option-state.test.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-state.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import { CLAUDE_SESSION_OPTION_CATALOG, CODEX_SESSION_OPTION_CATALOG -} from '../../agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-claude-codex' import { applyNativeChatReportedSessionOptions, createNativeChatSessionOptionRecord, diff --git a/src/shared/native-chat/input/native-chat-session-option-state.ts b/src/shared/native-chat/input/session-options/native-chat-session-option-state.ts similarity index 96% rename from src/shared/native-chat/input/native-chat-session-option-state.ts rename to src/shared/native-chat/input/session-options/native-chat-session-option-state.ts index 4026e7cc2ed..0bd8dc5d86e 100644 --- a/src/shared/native-chat/input/native-chat-session-option-state.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-option-state.ts @@ -1,9 +1,9 @@ -import type { AgentType } from '../../agent-status/contracts/agent-status-types' +import type { AgentType } from '../../../agent-status/contracts/agent-status-types' import type { CatalogMidSessionApply, AgentSessionOptionCatalog -} from '../../agent-session/options/catalog-providers/agent-session-option-catalog-types' -import type { SessionOptionValue, SessionOptionValueSource } from './native-chat-session-options' +} from '../../../agent-session/options/catalog-providers/agent-session-option-catalog-types' +import type { SessionOptionValue, SessionOptionValueSource } from '../native-chat-session-options' export type TrackedNativeChatSessionOption = { value: SessionOptionValue diff --git a/src/shared/native-chat/input/native-chat-session-speed-tiers.ts b/src/shared/native-chat/input/session-options/native-chat-session-speed-tiers.ts similarity index 86% rename from src/shared/native-chat/input/native-chat-session-speed-tiers.ts rename to src/shared/native-chat/input/session-options/native-chat-session-speed-tiers.ts index 881762cdf41..b926cef4d82 100644 --- a/src/shared/native-chat/input/native-chat-session-speed-tiers.ts +++ b/src/shared/native-chat/input/session-options/native-chat-session-speed-tiers.ts @@ -1,8 +1,8 @@ import type { SessionOptionDescriptor, SessionOptionSelectChoice -} from './native-chat-session-options' -import { isFastServiceTier } from '../../agent-session/options/model-catalog/structured-agent-session-discovered-model' +} from '../native-chat-session-options' +import { isFastServiceTier } from '../../../agent-session/options/model-catalog/structured-agent-session-discovered-model' const STANDARD_TIER = 'default' diff --git a/src/shared/native-chat/input/native-chat-background-task-row.test.ts b/src/shared/native-chat/input/task-lists/native-chat-background-task-row.test.ts similarity index 97% rename from src/shared/native-chat/input/native-chat-background-task-row.test.ts rename to src/shared/native-chat/input/task-lists/native-chat-background-task-row.test.ts index 11ffed03a95..03cf0d0752b 100644 --- a/src/shared/native-chat/input/native-chat-background-task-row.test.ts +++ b/src/shared/native-chat/input/task-lists/native-chat-background-task-row.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { claimBackgroundTaskTwins } from './native-chat-background-task-row' -import type { NativeChatBackgroundTaskBlock, NativeChatBlock } from '../native-chat-types' +import type { NativeChatBackgroundTaskBlock, NativeChatBlock } from '../../native-chat-types' function task( overrides: Partial = {} diff --git a/src/shared/native-chat/input/native-chat-background-task-row.ts b/src/shared/native-chat/input/task-lists/native-chat-background-task-row.ts similarity index 97% rename from src/shared/native-chat/input/native-chat-background-task-row.ts rename to src/shared/native-chat/input/task-lists/native-chat-background-task-row.ts index 5a082f3c630..af32990a394 100644 --- a/src/shared/native-chat/input/native-chat-background-task-row.ts +++ b/src/shared/native-chat/input/task-lists/native-chat-background-task-row.ts @@ -1,11 +1,11 @@ // Build durable task blocks and frozen plain-text twins together so clients without block support read the same report. -import type { AgentJournalMessageItem } from '../../agent-session/journal/agent-session-journal-types' +import type { AgentJournalMessageItem } from '../../../agent-session/journal/agent-session-journal-types' import { isBackgroundTaskBlock, type NativeChatBackgroundTaskBlock, type NativeChatBlock -} from '../native-chat-types' +} from '../../native-chat-types' /** Only these states remain in flight. Unknown/newer states are settled to prevent endless spinners; * unverifiable records lost visibility, not task outcome (docs/reference/ssh-execution-boundary.md). */ diff --git a/src/shared/native-chat/input/native-chat-task-list-frames.ts b/src/shared/native-chat/input/task-lists/native-chat-task-list-frames.ts similarity index 95% rename from src/shared/native-chat/input/native-chat-task-list-frames.ts rename to src/shared/native-chat/input/task-lists/native-chat-task-list-frames.ts index 70e0ec43bba..a7a988da9f4 100644 --- a/src/shared/native-chat/input/native-chat-task-list-frames.ts +++ b/src/shared/native-chat/input/task-lists/native-chat-task-list-frames.ts @@ -1,5 +1,5 @@ import { normalizeNativeChatTaskList } from './native-chat-task-list' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' const projectedFrames = new WeakMap() diff --git a/src/shared/native-chat/input/native-chat-task-list-history.test.ts b/src/shared/native-chat/input/task-lists/native-chat-task-list-history.test.ts similarity index 93% rename from src/shared/native-chat/input/native-chat-task-list-history.test.ts rename to src/shared/native-chat/input/task-lists/native-chat-task-list-history.test.ts index c70affd5e50..40a2bdc07b8 100644 --- a/src/shared/native-chat/input/native-chat-task-list-history.test.ts +++ b/src/shared/native-chat/input/task-lists/native-chat-task-list-history.test.ts @@ -3,7 +3,7 @@ import type { NativeChatBlock, NativeChatMessage, NativeChatToolCallBlock -} from '../native-chat-types' +} from '../../native-chat-types' import { buildNativeChatTaskListRows, nativeChatTaskListPredecessors @@ -50,7 +50,6 @@ describe('native chat task list history', () => { const next = call('TodoWrite', 'completed') const model = buildNativeChatTaskListRows([claude, codex, call('mcp__x__TodoWrite'), next]) expect(model.rows.get(codex)?.previous).toBeUndefined() - expect(model.rows.get(next)?.previous).toEqual(model.rows.get(claude)?.list) const history = nativeChatTaskListPredecessors([ message('a', [claude]), message('b', [codex]), @@ -79,7 +78,6 @@ describe('native chat task list history', () => { expect(model.rows.has(failed)).toBe(false) expect(model.rows.has(rejected)).toBe(false) expect(model.consumedResults.has(error)).toBe(false) - expect(model.rows.get(next)?.previous).toEqual(model.rows.get(first)?.list) const history = nativeChatTaskListPredecessors([ message('a', blocks.slice(0, -1)), message('b', [next]) diff --git a/src/shared/native-chat/input/native-chat-task-list-history.ts b/src/shared/native-chat/input/task-lists/native-chat-task-list-history.ts similarity index 96% rename from src/shared/native-chat/input/native-chat-task-list-history.ts rename to src/shared/native-chat/input/task-lists/native-chat-task-list-history.ts index 8c447191904..d3c03708409 100644 --- a/src/shared/native-chat/input/native-chat-task-list-history.ts +++ b/src/shared/native-chat/input/task-lists/native-chat-task-list-history.ts @@ -8,8 +8,8 @@ import type { NativeChatBlock, NativeChatMessage, NativeChatToolCallBlock -} from '../native-chat-types' -import { pairToolBlocks } from '../tools/native-chat-tool-pairs' +} from '../../native-chat-types' +import { pairToolBlocks } from '../../tools/native-chat-tool-pairs' export type NativeChatTaskListPredecessors = Partial< Record diff --git a/src/shared/native-chat/input/native-chat-task-list-state.ts b/src/shared/native-chat/input/task-lists/native-chat-task-list-state.ts similarity index 94% rename from src/shared/native-chat/input/native-chat-task-list-state.ts rename to src/shared/native-chat/input/task-lists/native-chat-task-list-state.ts index 874726b1a45..affe5d398f4 100644 --- a/src/shared/native-chat/input/native-chat-task-list-state.ts +++ b/src/shared/native-chat/input/task-lists/native-chat-task-list-state.ts @@ -1,6 +1,6 @@ import { normalizeNativeChatTaskList, type NativeChatTaskList } from './native-chat-task-list' -import type { NativeChatMessage, NativeChatToolCallBlock } from '../native-chat-types' -import { pairToolBlocks } from '../tools/native-chat-tool-pairs' +import type { NativeChatMessage, NativeChatToolCallBlock } from '../../native-chat-types' +import { pairToolBlocks } from '../../tools/native-chat-tool-pairs' const snapshots = new WeakMap() // Folding copies messages but keeps their blocks, so the list keeps its identity until the plan changes. diff --git a/src/shared/native-chat/input/native-chat-task-list.test.ts b/src/shared/native-chat/input/task-lists/native-chat-task-list.test.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-task-list.test.ts rename to src/shared/native-chat/input/task-lists/native-chat-task-list.test.ts diff --git a/src/shared/native-chat/input/native-chat-task-list.ts b/src/shared/native-chat/input/task-lists/native-chat-task-list.ts similarity index 100% rename from src/shared/native-chat/input/native-chat-task-list.ts rename to src/shared/native-chat/input/task-lists/native-chat-task-list.ts diff --git a/src/shared/native-chat/native-chat-agent-profiles.ts b/src/shared/native-chat/native-chat-agent-profiles.ts index e1c8cc25052..b4ec5b508ab 100644 --- a/src/shared/native-chat/native-chat-agent-profiles.ts +++ b/src/shared/native-chat/native-chat-agent-profiles.ts @@ -4,7 +4,7 @@ import { getAgentSlashCommands, type NativeChatCommandReply, type SlashCommandSuggestion -} from './input/native-chat-slash-commands' +} from './input/commands/native-chat-slash-commands' export type NativeChatAgentProfile = { skillPrefix: '$' | '/' diff --git a/src/shared/native-chat/native-chat-fork-offer.ts b/src/shared/native-chat/native-chat-fork-offer.ts index 413c42bd572..50966646a8f 100644 --- a/src/shared/native-chat/native-chat-fork-offer.ts +++ b/src/shared/native-chat/native-chat-fork-offer.ts @@ -5,10 +5,10 @@ import type { StructuredAgentSessionHostCapabilityState } from '../agent-session import { isRootAgentJournalItem } from '../agent-session/journal/agent-session-journal-producer' import type { AgentJournalRenderItem } from '../agent-session/journal/agent-session-journal-types' import { projectStructuredAgentSessionMessages } from '../agent-session/view/structured-agent-session-message-projection' -import type { NativeChatTurnJournal } from './transcript/native-chat-turn-membership' +import type { NativeChatTurnJournal } from './transcript/turns/native-chat-turn-membership' import type { AgentSessionOptionsResult } from '../agent-session/options/protocol/agent-session-options-result' import { AGENT_SESSION_FORKED_FROM_PRESENTATION } from '../agent-session/agent-session-fork' -import { nativeChatTurnMembership } from './transcript/native-chat-turn-membership' +import { nativeChatTurnMembership } from './transcript/turns/native-chat-turn-membership' import type { NativeChatMessage } from './native-chat-types' /** What a chat can fork: nothing, not yet known (drawn disabled), or through which turns. */ diff --git a/src/shared/native-chat/native-chat-live-status.ts b/src/shared/native-chat/native-chat-live-status.ts index fd45ea5f5c7..7bc2a8ef01f 100644 --- a/src/shared/native-chat/native-chat-live-status.ts +++ b/src/shared/native-chat/native-chat-live-status.ts @@ -12,7 +12,7 @@ import type { NativeChatSessionStatus, NativeChatTurnLifecycle } from './native-chat-types' -import { LIFECYCLE_CLOCK_SKEW_SLACK_MS } from './transcript/native-chat-clock-skew' +import { LIFECYCLE_CLOCK_SKEW_SLACK_MS } from './transcript/messages/native-chat-clock-skew' export type NativeChatLiveMergeInput = { /** Already deduped, ordered, and transcript-normalized by the live assembler. */ diff --git a/src/shared/native-chat/native-chat-orca-stop-cut.test.ts b/src/shared/native-chat/native-chat-orca-stop-cut.test.ts index 908e211fdd0..7f3eee50efd 100644 --- a/src/shared/native-chat/native-chat-orca-stop-cut.test.ts +++ b/src/shared/native-chat/native-chat-orca-stop-cut.test.ts @@ -4,7 +4,7 @@ import { agentSessionFailureWords } from '../agent-session/failures/agent-sessio import { agentJournalItemKey } from '../agent-session/journal/agent-session-journal-item-key' import type { AgentJournalRenderItem } from '../agent-session/journal/agent-session-journal-types' import type { AgentJournalTurnOutcome } from '../agent-status/lifecycle/agent-turn-outcome' -import { withNativeChatCutTurnNotices } from './transcript/native-chat-cut-turn-notice' +import { withNativeChatCutTurnNotices } from './transcript/turns/native-chat-cut-turn-notice' import { latestNativeChatOrcaStopCut, orcaShutdownRowClientMessageId diff --git a/src/shared/native-chat/native-chat-reported-skill.ts b/src/shared/native-chat/native-chat-reported-skill.ts index 2db86a1eced..29360225740 100644 --- a/src/shared/native-chat/native-chat-reported-skill.ts +++ b/src/shared/native-chat/native-chat-reported-skill.ts @@ -1,6 +1,6 @@ import type { DiscoveredSkill } from '../skills' -import type { NativeChatSessionSkill } from './input/native-chat-slash-commands' -import type { NativeChatPickerItem } from './input/native-chat-picker-items' +import type { NativeChatSessionSkill } from './input/commands/native-chat-slash-commands' +import type { NativeChatPickerItem } from './input/composer/native-chat-picker-items' import { isSafeDisplayCharacter, stripUnsafeDisplayCharacters } from '../display-text-safety' export function locatedPickerSkill( diff --git a/src/shared/native-chat/native-chat-resolution-receipt.ts b/src/shared/native-chat/native-chat-resolution-receipt.ts index 655792f95ba..f5070470e73 100644 --- a/src/shared/native-chat/native-chat-resolution-receipt.ts +++ b/src/shared/native-chat/native-chat-resolution-receipt.ts @@ -7,7 +7,7 @@ import { agentSessionPromptQuestions, legacyAgentSessionQuestionAnswers } from '../agent-session/agent-session-question-answer' -import type { NativeChatAskRowSubject } from './input/native-chat-ask-row' +import type { NativeChatAskRowSubject } from './input/questions/native-chat-ask-row' /** Desktop's fallbacks for its translations; the phone's words. */ export const NATIVE_CHAT_RECEIPT_COPY = { diff --git a/src/shared/native-chat/native-chat-stopped-before-start.ts b/src/shared/native-chat/native-chat-stopped-before-start.ts index d22faca1f0d..964e7c2e805 100644 --- a/src/shared/native-chat/native-chat-stopped-before-start.ts +++ b/src/shared/native-chat/native-chat-stopped-before-start.ts @@ -13,7 +13,7 @@ import { inSendOrder } from './native-chat-send-order' import { stoppedTurnOpeners, structuredAgentTurnAnchors -} from './transcript/native-chat-turn-membership' +} from './transcript/turns/native-chat-turn-membership' import type { NativeChatBlock, NativeChatMessage } from './native-chat-types' /** Presentation key for the notice after a send stopped before execution. */ diff --git a/src/shared/native-chat/native-chat-terminal-turn.ts b/src/shared/native-chat/native-chat-terminal-turn.ts index 7a975b6378c..2c503fc4467 100644 --- a/src/shared/native-chat/native-chat-terminal-turn.ts +++ b/src/shared/native-chat/native-chat-terminal-turn.ts @@ -3,7 +3,7 @@ import { isInterruptedStatusMessage, type NativeChatMessage } from './native-cha import type { NativeChatSettledTurn, NativeChatSettledTurns -} from './transcript/native-chat-turn-status' +} from './transcript/turns/native-chat-turn-status' import { isNoiseMessage } from './native-chat-noise' import { shouldShowNativeChatWorking } from './native-chat-working-suppression' diff --git a/src/shared/native-chat/native-chat-trailing-run.ts b/src/shared/native-chat/native-chat-trailing-run.ts index 3f6ef97da06..946601988b1 100644 --- a/src/shared/native-chat/native-chat-trailing-run.ts +++ b/src/shared/native-chat/native-chat-trailing-run.ts @@ -1,7 +1,7 @@ // A tool run remains live until a later row from the same agent speaks or acts beyond it. import { isToolCallBlock, type NativeChatMessage } from './native-chat-types' -import { deriveNativeChatRowContent } from './transcript/native-chat-row-content' +import { deriveNativeChatRowContent } from './transcript/row-content/native-chat-row-content' import type { NativeChatResolvedPrompt } from './native-chat-resolution-receipt' /** Whether a row moves its agent past the run above it. An approval's receipt diff --git a/src/shared/native-chat/native-chat-work-run.ts b/src/shared/native-chat/native-chat-work-run.ts index deb5fe592de..f0b1844efa7 100644 --- a/src/shared/native-chat/native-chat-work-run.ts +++ b/src/shared/native-chat/native-chat-work-run.ts @@ -1,7 +1,7 @@ // Group tool calls and finished thoughts into one collapsible run between prose rows; thinking before each call must not double the visible rows. -import { isNativeChatAskCall } from './input/native-chat-ask-row' -import { deriveNativeChatRowContent } from './transcript/native-chat-row-content' +import { isNativeChatAskCall } from './input/questions/native-chat-ask-row' +import { deriveNativeChatRowContent } from './transcript/row-content/native-chat-row-content' import { isStoppedBeforeStartBlock } from './native-chat-stopped-before-start' import { pairToolBlocks } from './tools/native-chat-tool-pairs' import type { NativeChatBlock, NativeChatMessage } from './native-chat-types' diff --git a/src/shared/native-chat/tools/native-chat-tool-identity.ts b/src/shared/native-chat/tools/native-chat-tool-identity.ts index e815fa4a63c..fa565400dcf 100644 --- a/src/shared/native-chat/tools/native-chat-tool-identity.ts +++ b/src/shared/native-chat/tools/native-chat-tool-identity.ts @@ -1,4 +1,4 @@ -import { formatNativeChatDuration } from '../transcript/native-chat-turn-status' +import { formatNativeChatDuration } from '../transcript/turns/native-chat-turn-status' export type NativeChatWebSearchResult = { title: string; url: string } diff --git a/src/shared/native-chat/tools/native-chat-tool-run-header.ts b/src/shared/native-chat/tools/native-chat-tool-run-header.ts index 955ff91ac2b..aaf1d7cfd18 100644 --- a/src/shared/native-chat/tools/native-chat-tool-run-header.ts +++ b/src/shared/native-chat/tools/native-chat-tool-run-header.ts @@ -1,4 +1,4 @@ -import { nativeChatAskRunBlocks } from '../input/native-chat-ask-row' +import { nativeChatAskRunBlocks } from '../input/questions/native-chat-ask-row' import { isToolCallBlock, type NativeChatBlock } from '../native-chat-types' import { describeLatestToolCall, selectActiveToolCall } from './native-chat-tool-activity' import { nativeChatToolRunIconName, type NativeChatToolIconName } from './native-chat-tool-icon' diff --git a/src/shared/native-chat/tools/native-chat-turn-membership-derived-tool-row.test.ts b/src/shared/native-chat/tools/native-chat-turn-membership-derived-tool-row.test.ts index 75b28e41ff2..ae15e470e5a 100644 --- a/src/shared/native-chat/tools/native-chat-turn-membership-derived-tool-row.test.ts +++ b/src/shared/native-chat/tools/native-chat-turn-membership-derived-tool-row.test.ts @@ -5,8 +5,8 @@ import type { } from '../../agent-session/journal/agent-session-journal-types' import type { AgentJournalTurnScope } from '../../agent-session/journal/agent-session-journal-turn-scope' import { foldToolMessages } from './native-chat-tool-fold' -import { nativeChatRowsInDrawOrder } from '../transcript/native-chat-turn-grouping' -import { nativeChatTurnMembership } from '../transcript/native-chat-turn-membership' +import { nativeChatRowsInDrawOrder } from '../transcript/turns/native-chat-turn-grouping' +import { nativeChatTurnMembership } from '../transcript/turns/native-chat-turn-membership' import type { NativeChatMessage, NativeChatRole } from '../native-chat-types' import { projectStructuredItemsToNativeChat } from '../../agent-session/view/structured-agent-session-projection' diff --git a/src/shared/native-chat/transcript/native-chat-fold-units.ts b/src/shared/native-chat/transcript/folding/native-chat-fold-units.ts similarity index 97% rename from src/shared/native-chat/transcript/native-chat-fold-units.ts rename to src/shared/native-chat/transcript/folding/native-chat-fold-units.ts index 032850e0e15..f245111824c 100644 --- a/src/shared/native-chat/transcript/native-chat-fold-units.ts +++ b/src/shared/native-chat/transcript/folding/native-chat-fold-units.ts @@ -1,6 +1,9 @@ -import type { NativeChatBlock, NativeChatMessage } from '../native-chat-types' -import { foldToolMessages, type NativeChatToolFoldKind } from '../tools/native-chat-tool-fold' -import { orphanRowId, type NativeChatOrphanOrigin } from '../tools/native-chat-folded-tool-results' +import type { NativeChatBlock, NativeChatMessage } from '../../native-chat-types' +import { foldToolMessages, type NativeChatToolFoldKind } from '../../tools/native-chat-tool-fold' +import { + orphanRowId, + type NativeChatOrphanOrigin +} from '../../tools/native-chat-folded-tool-results' /** An assistant row with the tool rows it absorbs, or one standalone row; each surface finishes its own rows. */ export type NativeChatFoldUnit = { diff --git a/src/shared/native-chat/transcript/native-chat-turn-fold.test.ts b/src/shared/native-chat/transcript/folding/native-chat-turn-fold.test.ts similarity index 99% rename from src/shared/native-chat/transcript/native-chat-turn-fold.test.ts rename to src/shared/native-chat/transcript/folding/native-chat-turn-fold.test.ts index 06fb4184f2b..c1fd989fdfd 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-fold.test.ts +++ b/src/shared/native-chat/transcript/folding/native-chat-turn-fold.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage, NativeChatTextBlock } from '../native-chat-types' +import type { NativeChatMessage, NativeChatTextBlock } from '../../native-chat-types' import { nativeChatTurnAnswerRows, nativeChatTurnFold, diff --git a/src/shared/native-chat/transcript/native-chat-turn-fold.ts b/src/shared/native-chat/transcript/folding/native-chat-turn-fold.ts similarity index 90% rename from src/shared/native-chat/transcript/native-chat-turn-fold.ts rename to src/shared/native-chat/transcript/folding/native-chat-turn-fold.ts index e128b6856d7..5122a87ce4e 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-fold.ts +++ b/src/shared/native-chat/transcript/folding/native-chat-turn-fold.ts @@ -1,20 +1,20 @@ // Derive settled-turn answers from the last assistant prose or system failure, plus the prose a Stop hook sent back; the journal has no answer marker. // Earlier work/recovered errors fold behind that answer, while failed turns end visibly on their error. -import { AGENT_SESSION_COMPACTION_SKIPPED_PRESENTATION } from '../../agent-session/agent-session-compaction' -import { AGENT_SESSION_HOOK_SENT_BACK_PRESENTATION } from '../../agent-session/journal/agent-session-hook-outcome' -import { AGENT_SESSION_ORCA_STOP_PRESENTATION } from '../../agent-session/lifecycle/stopping/agent-session-orca-stop' -import { AGENT_SESSION_TURN_NOTICE_PRESENTATION } from '../../agent-session/journal/agent-session-turn-notice' -import { nativeChatRowRendersContent } from './native-chat-row-content' -import { isStoppedBeforeStartBlock } from '../native-chat-stopped-before-start' -import { nativeChatRowRendersProse } from '../native-chat-trailing-run' -import { isGeneratedImageOperation } from '../native-chat-generated-image' +import { AGENT_SESSION_COMPACTION_SKIPPED_PRESENTATION } from '../../../agent-session/agent-session-compaction' +import { AGENT_SESSION_HOOK_SENT_BACK_PRESENTATION } from '../../../agent-session/journal/agent-session-hook-outcome' +import { AGENT_SESSION_ORCA_STOP_PRESENTATION } from '../../../agent-session/lifecycle/stopping/agent-session-orca-stop' +import { AGENT_SESSION_TURN_NOTICE_PRESENTATION } from '../../../agent-session/journal/agent-session-turn-notice' +import { nativeChatRowRendersContent } from '../row-content/native-chat-row-content' +import { isStoppedBeforeStartBlock } from '../../native-chat-stopped-before-start' +import { nativeChatRowRendersProse } from '../../native-chat-trailing-run' +import { isGeneratedImageOperation } from '../../native-chat-generated-image' import { isBackgroundTaskBlock, isSubagentGroupBlock, type NativeChatMessage, type NativeChatRole -} from '../native-chat-types' +} from '../../native-chat-types' /** Each surface supplies its own row-content results so folding sees exactly the prose it renders. */ export type NativeChatTurnFoldRow = { diff --git a/src/shared/native-chat/transcript/native-chat-user-message-fold.ts b/src/shared/native-chat/transcript/folding/native-chat-user-message-fold.ts similarity index 100% rename from src/shared/native-chat/transcript/native-chat-user-message-fold.ts rename to src/shared/native-chat/transcript/folding/native-chat-user-message-fold.ts diff --git a/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.test.ts b/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.test.ts new file mode 100644 index 00000000000..99ec65d4697 --- /dev/null +++ b/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.test.ts @@ -0,0 +1,44 @@ +import { expect, it } from 'vitest' +import { generatedImageBlocks } from '../../native-chat-generated-image' +import type { NativeChatMessage } from '../../native-chat-types' +import { nativeChatGeneratedImageAnswers } from './native-chat-generated-image-answers' + +function text( + id: string, + value: string, + role: NativeChatMessage['role'] = 'assistant' +): NativeChatMessage { + return { id, role, blocks: [{ type: 'text', text: value }], timestamp: 1, source: 'transcript' } +} +function generated(id: string, path = '/tmp/elephant.png'): NativeChatMessage { + return { + ...text(id, 'Generated image'), + blocks: generatedImageBlocks([ + { type: 'text', text: 'Generated image' }, + { type: 'image-ref', path } + ]) + } +} + +it('deduplicates Windows and UNC destinations already rendered by Markdown, preserving raw output paths', () => { + const messages = [ + generated('a', 'C:\\Users\\person\\elephant.png'), + generated('b', '\\\\server\\share\\elephant.png'), + generated('c', '/tmp/second.png'), + generated('d', '/tmp/second.png'), + text('answer', 'Pictures.') + ] + const rows = nativeChatGeneratedImageAnswers( + messages, + ['u', 'u', 'u', 'u', 'u'], + new Set(['u']), + () => ['file:///c:/Users/person/elephant.png', 'file://server/share/elephant.png'] + ) + expect(rows[4]!.blocks).toEqual([ + { type: 'text', text: 'Pictures.' }, + { type: 'image-ref', path: '/tmp/second.png' } + ]) + expect( + rows.slice(0, 4).flatMap((row) => row.blocks.filter((block) => block.type === 'image-ref')) + ).toEqual([]) +}) diff --git a/src/shared/native-chat/transcript/native-chat-generated-image-answers.ts b/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.ts similarity index 93% rename from src/shared/native-chat/transcript/native-chat-generated-image-answers.ts rename to src/shared/native-chat/transcript/images/native-chat-generated-image-answers.ts index 8b6f886d6ee..e6f8e1f760d 100644 --- a/src/shared/native-chat/transcript/native-chat-generated-image-answers.ts +++ b/src/shared/native-chat/transcript/images/native-chat-generated-image-answers.ts @@ -1,11 +1,11 @@ -import { normalizeRuntimePathForComparison } from '../../cross-platform-path' -import { routeNativeChatHref } from '../native-chat-href-routing' +import { normalizeRuntimePathForComparison } from '../../../cross-platform-path' +import { routeNativeChatHref } from '../../native-chat-href-routing' import { isGeneratedImageOperation, NATIVE_CHAT_GENERATED_IMAGE_PRESENTATION -} from '../native-chat-generated-image' -import type { NativeChatBlock, NativeChatMessage } from '../native-chat-types' -import { nativeChatTurnFoldRow } from './native-chat-turn-fold' +} from '../../native-chat-generated-image' +import type { NativeChatBlock, NativeChatMessage } from '../../native-chat-types' +import { nativeChatTurnFoldRow } from '../folding/native-chat-turn-fold' type Image = Extract export type NativeChatMarkdownImageSources = (message: NativeChatMessage) => readonly string[] diff --git a/src/shared/native-chat/transcript/native-chat-image-transcript-markers.ts b/src/shared/native-chat/transcript/images/native-chat-image-transcript-markers.ts similarity index 92% rename from src/shared/native-chat/transcript/native-chat-image-transcript-markers.ts rename to src/shared/native-chat/transcript/images/native-chat-image-transcript-markers.ts index 24864347266..d83d95230a5 100644 --- a/src/shared/native-chat/transcript/native-chat-image-transcript-markers.ts +++ b/src/shared/native-chat/transcript/images/native-chat-image-transcript-markers.ts @@ -1,27 +1,14 @@ -import { unwrapClaudePastedContent } from '../../claude-pasted-content' +import { unwrapClaudePastedContent } from '../../../claude-pasted-content' import { stripAnsiEscapeSequences, TERMINAL_CONTROL_CHARACTER_PATTERN -} from '../../ansi-escape-sequences' -import { isTextBlock, type NativeChatBlock, type NativeChatMessage } from '../native-chat-types' +} from '../../../ansi-escape-sequences' +import { isTextBlock, type NativeChatBlock, type NativeChatMessage } from '../../native-chat-types' import { IMAGE_PROMPT_MARKER, - imageReferencesToPromptMarkers, - promptMarkersToImageReferences, - stripImagePromptMarker, - stripSentImagePromptMarkers, - withoutSentImagePromptMarkers + stripImagePromptMarker } from './native-chat-sent-image-prompt-markers' -export { - IMAGE_PROMPT_MARKER, - imageReferencesToPromptMarkers, - promptMarkersToImageReferences, - stripImagePromptMarker, - stripSentImagePromptMarkers, - withoutSentImagePromptMarkers -} - // Keep whitespace and path starts disjoint so incomplete markers cannot rescan their suffix. const IMAGE_SOURCE_MARKER = /^\[Image:\s*source:\s*(\S.*?|[^\S\r\n\u2028\u2029])\]\s*$/ diff --git a/src/shared/native-chat/transcript/native-chat-sent-image-prompt-markers.ts b/src/shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers.ts similarity index 97% rename from src/shared/native-chat/transcript/native-chat-sent-image-prompt-markers.ts rename to src/shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers.ts index 04be3770522..4e00a941e18 100644 --- a/src/shared/native-chat/transcript/native-chat-sent-image-prompt-markers.ts +++ b/src/shared/native-chat/transcript/images/native-chat-sent-image-prompt-markers.ts @@ -1,6 +1,6 @@ -import { NATIVE_CHAT_QUOTED_FILE_REFERENCE } from '../../agent-image-paste' -import { imageReferenceToken, replaceImageReferences } from '../native-chat-image-reference' -import { isTextBlock, type NativeChatBlock, type NativeChatMessage } from '../native-chat-types' +import { NATIVE_CHAT_QUOTED_FILE_REFERENCE } from '../../../agent-image-paste' +import { imageReferenceToken, replaceImageReferences } from '../../native-chat-image-reference' +import { isTextBlock, type NativeChatBlock, type NativeChatMessage } from '../../native-chat-types' export const IMAGE_PROMPT_MARKER = /\[Image #\d+\]/ const IMAGE_PROMPT_MARKERS = /\[Image #\d+\]/g diff --git a/src/shared/native-chat/transcript/native-chat-clock-skew.ts b/src/shared/native-chat/transcript/messages/native-chat-clock-skew.ts similarity index 100% rename from src/shared/native-chat/transcript/native-chat-clock-skew.ts rename to src/shared/native-chat/transcript/messages/native-chat-clock-skew.ts diff --git a/src/shared/native-chat/transcript/native-chat-message-copy-text.test.ts b/src/shared/native-chat/transcript/messages/native-chat-message-copy-text.test.ts similarity index 91% rename from src/shared/native-chat/transcript/native-chat-message-copy-text.test.ts rename to src/shared/native-chat/transcript/messages/native-chat-message-copy-text.test.ts index 0f692f793e1..19f4300f5c2 100644 --- a/src/shared/native-chat/transcript/native-chat-message-copy-text.test.ts +++ b/src/shared/native-chat/transcript/messages/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-subagent-summary' -import type { NativeChatSubagentEntry } from '../native-chat-types' +import { subagentGroupFallbackText } from '../subagents/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/transcript/native-chat-message-copy-text.ts b/src/shared/native-chat/transcript/messages/native-chat-message-copy-text.ts similarity index 52% rename from src/shared/native-chat/transcript/native-chat-message-copy-text.ts rename to src/shared/native-chat/transcript/messages/native-chat-message-copy-text.ts index 57aa94b9050..59d82238cf2 100644 --- a/src/shared/native-chat/transcript/native-chat-message-copy-text.ts +++ b/src/shared/native-chat/transcript/messages/native-chat-message-copy-text.ts @@ -1,8 +1,8 @@ -import type { NativeChatMessage } from '../native-chat-types' -import { deriveNativeChatRowContent } from './native-chat-row-content' -import { withoutSentImagePromptMarkers } from './native-chat-image-transcript-markers' -import { nativeChatBlocksInOwnWords } from '../native-chat-stopped-before-start' -import { withoutNativeChatVisualDirectiveLines } from '../native-chat-visual-directive' +import type { NativeChatMessage } from '../../native-chat-types' +import { deriveNativeChatRowContent } from '../row-content/native-chat-row-content' +import { withoutSentImagePromptMarkers } from '../images/native-chat-sent-image-prompt-markers' +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/transcript/messages/native-chat-message-order.test.ts b/src/shared/native-chat/transcript/messages/native-chat-message-order.test.ts new file mode 100644 index 00000000000..6d8213ab2f9 --- /dev/null +++ b/src/shared/native-chat/transcript/messages/native-chat-message-order.test.ts @@ -0,0 +1,52 @@ +import { describe, expect, it } from 'vitest' +import type { NativeChatMessage } from '../../native-chat-types' +import { nativeChatStreamingMessage } from '../../native-chat-streaming' +import { orderNativeChatDisplayMessages } from './native-chat-message-order' +import { + pendingSendsAsMessages, + type NativeChatPendingSend +} from '../pending-sends/native-chat-pending-sends' + +const answer: NativeChatMessage = { + id: 'old-answer', + role: 'assistant', + blocks: [{ type: 'text', text: 'Earlier answer that is longer than the new reply' }], + timestamp: 9_000_000, + source: 'transcript', + transcriptOrder: 1 +} +const active: NativeChatPendingSend = { + id: 'active', + text: 'Run the tests', + sentAt: 10, + afterMessageId: answer.id +} +const queued: NativeChatPendingSend = { + id: 'follow-up', + text: 'Then update the docs', + sentAt: 1, + afterMessageId: answer.id, + queuedDuringWorkingEpoch: 500 +} +const preview = nativeChatStreamingMessage('Starting the tests') + +describe('terminal chat causal order', () => { + it('keeps idle sends and launch prompts before their answer and queued sends after it despite clock skew', () => { + const echoes = pendingSendsAsMessages([active, queued], [answer], 500) + const rows = orderNativeChatDisplayMessages([ + answer, + preview, + ...echoes, + { ...answer, id: 'launch-pending:tab', role: 'user', timestamp: 99_000_000 }, + { ...answer, id: 'host-queue', role: 'user', queued: true } + ]) + expect(rows.map((row) => row.id)).toEqual([ + 'old-answer', + 'pending:active', + 'launch-pending:tab', + 'streaming', + 'pending:follow-up', + 'host-queue' + ]) + }) +}) diff --git a/src/shared/native-chat/transcript/native-chat-message-order.ts b/src/shared/native-chat/transcript/messages/native-chat-message-order.ts similarity index 82% rename from src/shared/native-chat/transcript/native-chat-message-order.ts rename to src/shared/native-chat/transcript/messages/native-chat-message-order.ts index 093d621ba1d..e8e79a2f98d 100644 --- a/src/shared/native-chat/transcript/native-chat-message-order.ts +++ b/src/shared/native-chat/transcript/messages/native-chat-message-order.ts @@ -1,10 +1,13 @@ -import type { NativeChatMessage } from '../native-chat-types' -import { NATIVE_CHAT_STREAMING_ID } from '../native-chat-streaming' -import { isLaunchPromptMessageId, isPendingMessageId } from './native-chat-pending-sends' +import type { NativeChatMessage } from '../../native-chat-types' +import { NATIVE_CHAT_STREAMING_ID } from '../../native-chat-streaming' +import { + isLaunchPromptMessageId, + isPendingMessageId +} from '../pending-sends/native-chat-pending-sends' import { compareNativeChatTranscriptMessages, orderNativeChatTranscriptEntries -} from './native-chat-transcript-projection' +} from '../native-chat-transcript-projection' // Clocks cannot order a null-timestamp preview against a client send or a remote transcript. export function nativeChatDisplaySortRank(message: NativeChatMessage): number { diff --git a/src/shared/native-chat/transcript/native-chat-message-preparation.ts b/src/shared/native-chat/transcript/messages/native-chat-message-preparation.ts similarity index 63% rename from src/shared/native-chat/transcript/native-chat-message-preparation.ts rename to src/shared/native-chat/transcript/messages/native-chat-message-preparation.ts index 77a536297ea..5eeba76fc3d 100644 --- a/src/shared/native-chat/transcript/native-chat-message-preparation.ts +++ b/src/shared/native-chat/transcript/messages/native-chat-message-preparation.ts @@ -1,11 +1,11 @@ // Share transcript preparation across desktop/mobile so neither drops turns the other renders. -import type { AgentType } from '../../agent-status/contracts/agent-status-types' -import { getVerifiedNativeChatCommands } from '../native-chat-agent-profiles' -import { surfaceSkillInvocationUserTurns } from '../native-chat-command-envelope' -import { surfaceNativeChatCommandOutputs } from '../tools/native-chat-command-output' -import { normalizeImageTranscriptMessages } from './native-chat-image-transcript-markers' -import type { NativeChatMessage } from '../native-chat-types' +import type { AgentType } from '../../../agent-status/contracts/agent-status-types' +import { getVerifiedNativeChatCommands } from '../../native-chat-agent-profiles' +import { surfaceSkillInvocationUserTurns } from '../../native-chat-command-envelope' +import { surfaceNativeChatCommandOutputs } from '../../tools/native-chat-command-output' +import { normalizeImageTranscriptMessages } from '../images/native-chat-image-transcript-markers' +import type { NativeChatMessage } from '../../native-chat-types' /** Surface skill invocation text and reporting-command output before noise filtering hides their harness envelopes. */ export function surfaceNativeChatHarnessTurns( diff --git a/src/shared/native-chat/transcript/native-chat-message-time.ts b/src/shared/native-chat/transcript/messages/native-chat-message-time.ts similarity index 100% rename from src/shared/native-chat/transcript/native-chat-message-time.ts rename to src/shared/native-chat/transcript/messages/native-chat-message-time.ts diff --git a/src/shared/native-chat/transcript/native-chat-transcript-readability.ts b/src/shared/native-chat/transcript/messages/native-chat-transcript-readability.ts similarity index 79% rename from src/shared/native-chat/transcript/native-chat-transcript-readability.ts rename to src/shared/native-chat/transcript/messages/native-chat-transcript-readability.ts index 7b04bc2e98c..91e3a365f71 100644 --- a/src/shared/native-chat/transcript/native-chat-transcript-readability.ts +++ b/src/shared/native-chat/transcript/messages/native-chat-transcript-readability.ts @@ -1,4 +1,4 @@ -import { isRuntimeOwnedSshTargetId } from '../../execution-host' +import { isRuntimeOwnedSshTargetId } from '../../../execution-host' /** Model-A SSH stores Grok transcripts on a host this renderer cannot read. */ export function isNativeChatTranscriptLocalReadable( diff --git a/src/shared/native-chat/transcript/native-chat-transcript-retention.test.ts b/src/shared/native-chat/transcript/messages/native-chat-transcript-retention.test.ts similarity index 95% rename from src/shared/native-chat/transcript/native-chat-transcript-retention.test.ts rename to src/shared/native-chat/transcript/messages/native-chat-transcript-retention.test.ts index 6aff7097da1..e8b1272fb98 100644 --- a/src/shared/native-chat/transcript/native-chat-transcript-retention.test.ts +++ b/src/shared/native-chat/transcript/messages/native-chat-transcript-retention.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' import { createNativeChatTranscriptRetention } from './native-chat-transcript-retention' function message(id: string): NativeChatMessage { diff --git a/src/shared/native-chat/transcript/native-chat-transcript-retention.ts b/src/shared/native-chat/transcript/messages/native-chat-transcript-retention.ts similarity index 94% rename from src/shared/native-chat/transcript/native-chat-transcript-retention.ts rename to src/shared/native-chat/transcript/messages/native-chat-transcript-retention.ts index 927983af10e..5e4b1bf7222 100644 --- a/src/shared/native-chat/transcript/native-chat-transcript-retention.ts +++ b/src/shared/native-chat/transcript/messages/native-chat-transcript-retention.ts @@ -1,4 +1,4 @@ -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' export const EMPTY_NATIVE_CHAT_TRANSCRIPT: NativeChatMessage[] = [] diff --git a/src/shared/native-chat/transcript/native-chat-generated-image-answers.test.ts b/src/shared/native-chat/transcript/native-chat-generated-image-answers.test.ts deleted file mode 100644 index c9bf5ddc074..00000000000 --- a/src/shared/native-chat/transcript/native-chat-generated-image-answers.test.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { expect, it } from 'vitest' -import { generatedImageBlocks } from '../native-chat-generated-image' -import type { NativeChatMessage } from '../native-chat-types' -import { nativeChatGeneratedImageAnswers } from './native-chat-generated-image-answers' -import { nativeChatTurnFold, nativeChatTurnFoldRow } from './native-chat-turn-fold' - -const noEmbeds = () => [] -function text( - id: string, - value: string, - role: NativeChatMessage['role'] = 'assistant' -): NativeChatMessage { - return { id, role, blocks: [{ type: 'text', text: value }], timestamp: 1, source: 'transcript' } -} -function generated(id: string, path = '/tmp/elephant.png'): NativeChatMessage { - return { - ...text(id, 'Generated image'), - blocks: generatedImageBlocks([ - { type: 'text', text: 'Generated image' }, - { type: 'image-ref', path } - ]) - } -} -function project(messages: NativeChatMessage[], turnKeys = messages.map(() => 'u')) { - const rows = nativeChatGeneratedImageAnswers(messages, turnKeys, new Set(turnKeys), noEmbeds) - const fold = nativeChatTurnFold({ - rows: rows.map((message, i) => nativeChatTurnFoldRow(message, turnKeys[i], false)), - settledTurnKeys: new Set(turnKeys), - expandedTurnKeys: new Set() - }) - return rows.filter((_, i) => !fold.foldedRows.has(i)) -} - -it('retains image-only output beside a failure and preserves the error notice', () => { - const failure = { - ...text('error', 'Codex could not finish. Try again.', 'system'), - blocks: [{ type: 'text' as const, text: 'Codex could not finish. Try again.', tone: 'error' }] - } - const rows = project([text('u', 'Generate.', 'user'), generated('image'), failure]) - expect(rows.map((row) => row.id)).toEqual(['u', 'image', 'error']) - expect(rows[1]!.blocks.filter((block) => block.type === 'image-ref')).toEqual([ - { type: 'image-ref', path: '/tmp/elephant.png' } - ]) - expect(rows[2]).toBe(failure) -}) - -it('keeps send-back outputs in their own answer segments and turn/producer scopes', () => { - const hook = { - ...text('hook', 'Continue.', 'system'), - blocks: [{ type: 'text' as const, text: 'Continue.', presentation: 'hook-sent-back' }] - } - const child = { ...generated('child', '/tmp/child.png'), agentId: 'child' } - const rows = project( - [ - text('u', 'Generate.', 'user'), - generated('first', '/tmp/first.png'), - text('a1', 'First.'), - hook, - child, - generated('second', '/tmp/second.png'), - text('a2', 'Second.'), - text('u2', 'Another turn.', 'user'), - text('a3', 'Other turn.') - ], - ['u', 'u', 'u', 'u', 'u', 'u', 'u', 'u2', 'u2'] - ) - expect(rows.find((row) => row.id === 'a1')?.blocks).toEqual([ - { type: 'text', text: 'First.' }, - { type: 'image-ref', path: '/tmp/first.png' } - ]) - expect(rows.find((row) => row.id === 'a2')?.blocks).toEqual([ - { type: 'text', text: 'Second.' }, - { type: 'image-ref', path: '/tmp/second.png' } - ]) - expect(rows.find((row) => row.id === 'a3')?.blocks).toEqual([ - { type: 'text', text: 'Other turn.' } - ]) - expect( - rows.find((row) => row.id === 'child')?.blocks.filter((block) => block.type === 'image-ref') - ).toEqual([{ type: 'image-ref', path: '/tmp/child.png' }]) -}) - -it('deduplicates Windows and UNC destinations already rendered by Markdown, preserving raw output paths', () => { - const messages = [ - generated('a', 'C:\\Users\\person\\elephant.png'), - generated('b', '\\\\server\\share\\elephant.png'), - generated('c', '/tmp/second.png'), - generated('d', '/tmp/second.png'), - text('answer', 'Pictures.') - ] - const rows = nativeChatGeneratedImageAnswers( - messages, - ['u', 'u', 'u', 'u', 'u'], - new Set(['u']), - () => ['file:///c:/Users/person/elephant.png', 'file://server/share/elephant.png'] - ) - expect(rows[4]!.blocks).toEqual([ - { type: 'text', text: 'Pictures.' }, - { type: 'image-ref', path: '/tmp/second.png' } - ]) - expect( - rows.slice(0, 4).flatMap((row) => row.blocks.filter((block) => block.type === 'image-ref')) - ).toEqual([]) -}) diff --git a/src/shared/native-chat/transcript/native-chat-message-order.test.ts b/src/shared/native-chat/transcript/native-chat-message-order.test.ts deleted file mode 100644 index cd3ecc4e8f6..00000000000 --- a/src/shared/native-chat/transcript/native-chat-message-order.test.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../native-chat-types' -import { deriveNativeChatStreamingText, nativeChatStreamingMessage } from '../native-chat-streaming' -import { orderNativeChatDisplayMessages } from './native-chat-message-order' -import { pendingSendsAsMessages, type NativeChatPendingSend } from './native-chat-pending-sends' - -const answer: NativeChatMessage = { - id: 'old-answer', - role: 'assistant', - blocks: [{ type: 'text', text: 'Earlier answer that is longer than the new reply' }], - timestamp: 9_000_000, - source: 'transcript', - transcriptOrder: 1 -} -const active: NativeChatPendingSend = { - id: 'active', - text: 'Run the tests', - sentAt: 10, - afterMessageId: answer.id -} -const queued: NativeChatPendingSend = { - id: 'follow-up', - text: 'Then update the docs', - sentAt: 1, - afterMessageId: answer.id, - queuedDuringWorkingEpoch: 500 -} -const preview = nativeChatStreamingMessage('Starting the tests') - -function tail( - messages: NativeChatMessage[], - pending: NativeChatPendingSend[], - epoch: number | null -) { - const echoes = pendingSendsAsMessages(pending, messages, epoch) - return { - messages: orderNativeChatDisplayMessages([...messages, preview, ...echoes]), - preview: deriveNativeChatStreamingText({ - messages: [...messages, ...echoes], - previewText: 'Starting the tests', - working: true - }) - } -} - -describe('terminal chat causal order', () => { - it('keeps idle sends and launch prompts before their answer and queued sends after it despite clock skew', () => { - const echoes = pendingSendsAsMessages([active, queued], [answer], 500) - const rows = orderNativeChatDisplayMessages([ - answer, - preview, - ...echoes, - { ...answer, id: 'launch-pending:tab', role: 'user', timestamp: 99_000_000 }, - { ...answer, id: 'host-queue', role: 'user', queued: true } - ]) - expect(rows.map((row) => row.id)).toEqual([ - 'old-answer', - 'pending:active', - 'launch-pending:tab', - 'streaming', - 'pending:follow-up', - 'host-queue' - ]) - }) - - it('does not promote follow-ups when the active prompt lands, and suppresses the caught-up preview', () => { - expect(tail([answer], [active, queued], 500).preview).toBe('Starting the tests') - const landed: NativeChatMessage = { - ...answer, - id: 'prompt', - transcriptOrder: 2, - role: 'user', - blocks: [{ type: 'text', text: active.text }] - } - const caughtUp: NativeChatMessage = { - ...preview, - id: 'answer', - source: 'transcript', - transcriptOrder: 3 - } - const result = tail( - [answer, landed, caughtUp], - [active, queued, { ...queued, id: 'last', text: 'Then summarize', sentAt: 0 }], - 500 - ) - expect(result.messages.map((row) => row.id)).toEqual([ - 'old-answer', - 'prompt', - 'answer', - 'streaming', - 'pending:follow-up', - 'pending:last' - ]) - expect(result.preview).toBeNull() - }) - - it('makes a follow-up the active prompt when a later host epoch starts', () => { - const result = tail([answer], [queued], 501) - expect(result.messages.map((row) => row.id)).toEqual([ - 'old-answer', - 'pending:follow-up', - 'streaming' - ]) - expect(result.preview).toBe('Starting the tests') - }) - - it.each([ - [null, null], - [500, null], - [null, 500] - ])('keeps queued placement without durable evidence of a new turn (%s → %s)', (sent, current) => { - const result = tail([answer], [{ ...queued, queuedDuringWorkingEpoch: sent }], current) - expect(result.messages.map((row) => row.id)).toEqual([ - 'old-answer', - 'streaming', - 'pending:follow-up' - ]) - }) -}) diff --git a/src/shared/native-chat/transcript/native-chat-transcript-contracts.test.ts b/src/shared/native-chat/transcript/native-chat-transcript-contracts.test.ts index 2171363d8ab..38c52622f0b 100644 --- a/src/shared/native-chat/transcript/native-chat-transcript-contracts.test.ts +++ b/src/shared/native-chat/transcript/native-chat-transcript-contracts.test.ts @@ -1,12 +1,12 @@ -import './native-chat-reasoning-row.spec' +import './row-content/native-chat-reasoning-row.spec' import '../native-chat-reasoning-order.spec' import '../tools/native-chat-tool-activity.spec' import '../tools/native-chat-tool-pair-limit.spec' import '../tools/native-chat-tool-fold-attribution.spec' -import './native-chat-turn-grouping.spec' -import '../input/native-chat-ask-row.spec' +import './turns/native-chat-turn-grouping.spec' +import '../input/questions/native-chat-ask-row.spec' import '../tools/native-chat-tool-pairing.spec' -import './native-chat-live-line.spec' +import './row-content/native-chat-live-line.spec' import '../native-chat-merge-pairs.spec' import '../native-chat-command-envelope.spec' import '../native-chat-streaming.spec' diff --git a/src/shared/native-chat/transcript/native-chat-transcript-projection.ts b/src/shared/native-chat/transcript/native-chat-transcript-projection.ts index 3eb2fa414d2..45069179648 100644 --- a/src/shared/native-chat/transcript/native-chat-transcript-projection.ts +++ b/src/shared/native-chat/transcript/native-chat-transcript-projection.ts @@ -6,8 +6,11 @@ import { compareAgentJournalPositions } from '../../agent-session/journal/agent- import { agentJournalItemSubagentId } from '../../agent-session/journal/agent-session-journal-producer' import { stripNoiseMessages } from '../native-chat-noise' import { foldToolMessages } from '../tools/native-chat-tool-fold' -import { foldSubagentItems } from './native-chat-subagent-items' -import { nativeChatTurnMembership, type NativeChatTurnJournal } from './native-chat-turn-membership' +import { foldSubagentItems } from './subagents/native-chat-subagent-items' +import { + nativeChatTurnMembership, + type NativeChatTurnJournal +} from './turns/native-chat-turn-membership' /** Timestamp, then id. A null timestamp sorts first so a source that cannot supply * one stays in place rather than jumping to the end. */ diff --git a/src/shared/native-chat/transcript/native-chat-continuation-send.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-continuation-send.ts similarity index 72% rename from src/shared/native-chat/transcript/native-chat-continuation-send.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-continuation-send.ts index 72cd0ac7a35..aa8dc97f97a 100644 --- a/src/shared/native-chat/transcript/native-chat-continuation-send.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-continuation-send.ts @@ -1,4 +1,4 @@ -import { normalizeNativeChatUserText } from './native-chat-image-transcript-markers' +import { normalizeNativeChatUserText } from '../images/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/transcript/native-chat-launch-draft-resolution.test.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution.test.ts similarity index 96% rename from src/shared/native-chat/transcript/native-chat-launch-draft-resolution.test.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution.test.ts index 94ad4a3dde9..ab75100dff4 100644 --- a/src/shared/native-chat/transcript/native-chat-launch-draft-resolution.test.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../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/transcript/native-chat-launch-draft-resolution.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution.ts similarity index 90% rename from src/shared/native-chat/transcript/native-chat-launch-draft-resolution.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution.ts index c02d5e8ed13..51a1c054662 100644 --- a/src/shared/native-chat/transcript/native-chat-launch-draft-resolution.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-launch-draft-resolution.ts @@ -1,5 +1,5 @@ -import type { NativeChatMessage } from '../native-chat-types' -import { LIFECYCLE_CLOCK_SKEW_SLACK_MS } from './native-chat-clock-skew' +import type { NativeChatMessage } from '../../native-chat-types' +import { LIFECYCLE_CLOCK_SKEW_SLACK_MS } from '../messages/native-chat-clock-skew' /** A new tail turn proves resolution without timestamps; older-history prepends cannot advance it. */ export type NativeChatLaunchDraftTurnBaseline = { diff --git a/src/shared/native-chat/transcript/native-chat-pending-occurrence.test.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence.test.ts similarity index 98% rename from src/shared/native-chat/transcript/native-chat-pending-occurrence.test.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence.test.ts index 2390c2c8dcb..a2dfb51f13a 100644 --- a/src/shared/native-chat/transcript/native-chat-pending-occurrence.test.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../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/transcript/native-chat-pending-occurrence.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence.ts similarity index 98% rename from src/shared/native-chat/transcript/native-chat-pending-occurrence.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence.ts index 3d1b124c00b..e640856e186 100644 --- a/src/shared/native-chat/transcript/native-chat-pending-occurrence.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-occurrence.ts @@ -2,8 +2,8 @@ import { nativeChatContinuationSendText } from './native-chat-continuation-send' import { normalizeNativeChatUserText, normalizedNativeChatUserMessageText -} from './native-chat-image-transcript-markers' -import { isImageRefBlock, type NativeChatMessage } from '../native-chat-types' +} from '../images/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/transcript/native-chat-pending-pasted-content.test.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-pasted-content.test.ts similarity index 95% rename from src/shared/native-chat/transcript/native-chat-pending-pasted-content.test.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-pending-pasted-content.test.ts index 551cadd274a..ecdac242d1a 100644 --- a/src/shared/native-chat/transcript/native-chat-pending-pasted-content.test.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-pasted-content.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../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/transcript/native-chat-pending-sends.test.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends.test.ts similarity index 98% rename from src/shared/native-chat/transcript/native-chat-pending-sends.test.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends.test.ts index 64f92e7ec49..3d8870be2e1 100644 --- a/src/shared/native-chat/transcript/native-chat-pending-sends.test.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' import { pendingSendsAsMessages, prunePendingSends, diff --git a/src/shared/native-chat/transcript/native-chat-pending-sends.ts b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends.ts similarity index 98% rename from src/shared/native-chat/transcript/native-chat-pending-sends.ts rename to src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends.ts index d08f1baa080..a23cfde5501 100644 --- a/src/shared/native-chat/transcript/native-chat-pending-sends.ts +++ b/src/shared/native-chat/transcript/pending-sends/native-chat-pending-sends.ts @@ -1,6 +1,6 @@ import { nativeChatContinuationSendText } from './native-chat-continuation-send' -import { isImageRefBlock, type NativeChatMessage } from '../native-chat-types' -import { normalizedNativeChatUserMessageText } from './native-chat-image-transcript-markers' +import { isImageRefBlock, type NativeChatMessage } from '../../native-chat-types' +import { normalizedNativeChatUserMessageText } from '../images/native-chat-image-transcript-markers' import { advancedNativeChatUserContentCounts, advancedNativeChatUserRows, diff --git a/src/shared/native-chat/transcript/native-chat-live-line.spec.ts b/src/shared/native-chat/transcript/row-content/native-chat-live-line.spec.ts similarity index 95% rename from src/shared/native-chat/transcript/native-chat-live-line.spec.ts rename to src/shared/native-chat/transcript/row-content/native-chat-live-line.spec.ts index 87081765763..3d171a6dc83 100644 --- a/src/shared/native-chat/transcript/native-chat-live-line.spec.ts +++ b/src/shared/native-chat/transcript/row-content/native-chat-live-line.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { nativeChatLiveLine } from './native-chat-live-line' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' const prompt: NativeChatMessage = { id: 'user-1', diff --git a/src/shared/native-chat/transcript/native-chat-live-line.ts b/src/shared/native-chat/transcript/row-content/native-chat-live-line.ts similarity index 95% rename from src/shared/native-chat/transcript/native-chat-live-line.ts rename to src/shared/native-chat/transcript/row-content/native-chat-live-line.ts index 2e81a25af28..94da83e7813 100644 --- a/src/shared/native-chat/transcript/native-chat-live-line.ts +++ b/src/shared/native-chat/transcript/row-content/native-chat-live-line.ts @@ -4,7 +4,7 @@ import { selectNativeChatLiveReasoning, type NativeChatLiveReasoning } from './native-chat-reasoning-row' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' export type NativeChatLiveLine = { /** The turn is reasoning now; the label reads "Thinking" unless activity text outranks it. */ diff --git a/src/shared/native-chat/transcript/native-chat-prose.ts b/src/shared/native-chat/transcript/row-content/native-chat-prose.ts similarity index 88% rename from src/shared/native-chat/transcript/native-chat-prose.ts rename to src/shared/native-chat/transcript/row-content/native-chat-prose.ts index d5e13808a69..8151836f5e0 100644 --- a/src/shared/native-chat/transcript/native-chat-prose.ts +++ b/src/shared/native-chat/transcript/row-content/native-chat-prose.ts @@ -1,4 +1,4 @@ -import { isTextBlock, type NativeChatBlock } from '../native-chat-types' +import { isTextBlock, type NativeChatBlock } from '../../native-chat-types' export function nativeChatProseToMarkdown(blocks: NativeChatBlock[], maxLength = Infinity): string { const parts: string[] = [] diff --git a/src/shared/native-chat/transcript/native-chat-reasoning-row.spec.ts b/src/shared/native-chat/transcript/row-content/native-chat-reasoning-row.spec.ts similarity index 97% rename from src/shared/native-chat/transcript/native-chat-reasoning-row.spec.ts rename to src/shared/native-chat/transcript/row-content/native-chat-reasoning-row.spec.ts index e3d3a5b9b50..6538be1ce62 100644 --- a/src/shared/native-chat/transcript/native-chat-reasoning-row.spec.ts +++ b/src/shared/native-chat/transcript/row-content/native-chat-reasoning-row.spec.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from 'vitest' import { selectNativeChatLiveReasoning } from './native-chat-reasoning-row' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' function row( id: string, diff --git a/src/shared/native-chat/transcript/native-chat-reasoning-row.ts b/src/shared/native-chat/transcript/row-content/native-chat-reasoning-row.ts similarity index 93% rename from src/shared/native-chat/transcript/native-chat-reasoning-row.ts rename to src/shared/native-chat/transcript/row-content/native-chat-reasoning-row.ts index 062f9df8f53..0cb3af1360b 100644 --- a/src/shared/native-chat/transcript/native-chat-reasoning-row.ts +++ b/src/shared/native-chat/transcript/row-content/native-chat-reasoning-row.ts @@ -1,9 +1,9 @@ // Derive reasoning disclosure/headlines from host start/end facts so desktop/mobile show the same lifecycle. -import { isRootAgentJournalItem } from '../../agent-session/journal/agent-session-journal-producer' +import { isRootAgentJournalItem } from '../../../agent-session/journal/agent-session-journal-producer' import { deriveNativeChatRowContent, nativeChatRowRendersContent } from './native-chat-row-content' -import { formatNativeChatDuration } from './native-chat-turn-status' -import type { NativeChatMessage } from '../native-chat-types' +import { formatNativeChatDuration } from '../turns/native-chat-turn-status' +import type { NativeChatMessage } from '../../native-chat-types' /** An open reasoning block and the text it has so far. */ export type NativeChatLiveReasoning = { message: NativeChatMessage; markdown: string } diff --git a/src/shared/native-chat/transcript/native-chat-reply-reveals.ts b/src/shared/native-chat/transcript/row-content/native-chat-reply-reveals.ts similarity index 100% rename from src/shared/native-chat/transcript/native-chat-reply-reveals.ts rename to src/shared/native-chat/transcript/row-content/native-chat-reply-reveals.ts diff --git a/src/shared/native-chat/transcript/native-chat-row-content.ts b/src/shared/native-chat/transcript/row-content/native-chat-row-content.ts similarity index 88% rename from src/shared/native-chat/transcript/native-chat-row-content.ts rename to src/shared/native-chat/transcript/row-content/native-chat-row-content.ts index ac9a9f23721..fc815d234a8 100644 --- a/src/shared/native-chat/transcript/native-chat-row-content.ts +++ b/src/shared/native-chat/transcript/row-content/native-chat-row-content.ts @@ -4,11 +4,14 @@ import { backgroundTaskBlocks, withoutBackgroundTaskRows -} from '../input/native-chat-background-task-row' -import { isWordlessProviderFrameBlock } from '../native-chat-provider-frame-summary' -import { isReplacedSubagentGroupTwin, subagentGroupBlocks } from './native-chat-subagent-summary' -import { isSubagentGroupBlock, isTextBlock, type NativeChatBlock } from '../native-chat-types' -import { splitNativeChatBlocks } from '../tools/native-chat-tool-fold' +} from '../../input/task-lists/native-chat-background-task-row' +import { isWordlessProviderFrameBlock } from '../../native-chat-provider-frame-summary' +import { + isReplacedSubagentGroupTwin, + subagentGroupBlocks +} from '../subagents/native-chat-subagent-summary' +import { isSubagentGroupBlock, isTextBlock, type NativeChatBlock } from '../../native-chat-types' +import { splitNativeChatBlocks } from '../../tools/native-chat-tool-fold' import { nativeChatProseToMarkdown } from './native-chat-prose' /** Inferred from `derive` so the shape cannot drift from what it returns. */ diff --git a/src/shared/native-chat/transcript/native-chat-text-reveal.test.ts b/src/shared/native-chat/transcript/row-content/native-chat-text-reveal.test.ts similarity index 100% rename from src/shared/native-chat/transcript/native-chat-text-reveal.test.ts rename to src/shared/native-chat/transcript/row-content/native-chat-text-reveal.test.ts diff --git a/src/shared/native-chat/transcript/native-chat-text-reveal.ts b/src/shared/native-chat/transcript/row-content/native-chat-text-reveal.ts similarity index 100% rename from src/shared/native-chat/transcript/native-chat-text-reveal.ts rename to src/shared/native-chat/transcript/row-content/native-chat-text-reveal.ts diff --git a/src/shared/native-chat/transcript/native-chat-subagent-entry-detail.ts b/src/shared/native-chat/transcript/subagents/native-chat-subagent-entry-detail.ts similarity index 88% rename from src/shared/native-chat/transcript/native-chat-subagent-entry-detail.ts rename to src/shared/native-chat/transcript/subagents/native-chat-subagent-entry-detail.ts index 0292be4605c..a184fd7dbb7 100644 --- a/src/shared/native-chat/transcript/native-chat-subagent-entry-detail.ts +++ b/src/shared/native-chat/transcript/subagents/native-chat-subagent-entry-detail.ts @@ -1,12 +1,12 @@ // What a subagent roster entry says under its name, shared by desktop and mobile. -import { formatAgentToolPreviewLine } from '../../agent-status/presentation/agent-tool-preview' -import { claudeListedModelLabel } from '../../claude-model-list-probe' +import { formatAgentToolPreviewLine } from '../../../agent-status/presentation/agent-tool-preview' +import { claudeListedModelLabel } from '../../../claude-model-list-probe' import { nativeChatSessionChoiceShortLabel, type NativeChatSessionOptionSay -} from '../input/native-chat-session-option-labels' -import type { NativeChatSubagentEntry } from '../native-chat-types' +} from '../../input/session-options/native-chat-session-option-labels' +import type { NativeChatSubagentEntry } from '../../native-chat-types' import { normalizeSubagentState } from './native-chat-subagent-summary' /** While it works: the tool it runs, else what it last said. Once settled: what it said last, its result. */ diff --git a/src/shared/native-chat/transcript/native-chat-subagent-group-header.ts b/src/shared/native-chat/transcript/subagents/native-chat-subagent-group-header.ts similarity index 98% rename from src/shared/native-chat/transcript/native-chat-subagent-group-header.ts rename to src/shared/native-chat/transcript/subagents/native-chat-subagent-group-header.ts index a8444bc93e9..299be418498 100644 --- a/src/shared/native-chat/transcript/native-chat-subagent-group-header.ts +++ b/src/shared/native-chat/transcript/subagents/native-chat-subagent-group-header.ts @@ -1,8 +1,8 @@ // Share spawn-group headline/verdict/alert/clock/token derivation; callers supply platform translations. import { normalizeSubagentState, summarizeSubagentGroup } from './native-chat-subagent-summary' -import type { NativeChatSubagentEntry, NativeChatSubagentState } from '../native-chat-types' -import { englishCopyText, type CopyValues, type CountedCopy } from '../../counted-copy-english' +import type { NativeChatSubagentEntry, NativeChatSubagentState } from '../../native-chat-types' +import { englishCopyText, type CopyValues, type CountedCopy } from '../../../counted-copy-english' export const NATIVE_CHAT_SUBAGENT_GROUP_COPY = { stateCompleted: 'completed', diff --git a/src/shared/native-chat/transcript/native-chat-subagent-items.test.ts b/src/shared/native-chat/transcript/subagents/native-chat-subagent-items.test.ts similarity index 96% rename from src/shared/native-chat/transcript/native-chat-subagent-items.test.ts rename to src/shared/native-chat/transcript/subagents/native-chat-subagent-items.test.ts index 6f63b2109b4..b390f4a490b 100644 --- a/src/shared/native-chat/transcript/native-chat-subagent-items.test.ts +++ b/src/shared/native-chat/transcript/subagents/native-chat-subagent-items.test.ts @@ -1,11 +1,11 @@ import { describe, expect, it } from 'vitest' import { foldSubagentItems, subagentFallbackText } from './native-chat-subagent-items' -import { projectNativeChatTranscriptMessages } from './native-chat-transcript-projection' +import { projectNativeChatTranscriptMessages } from '../native-chat-transcript-projection' import type { NativeChatMessage, NativeChatSubagentBlock, NativeChatSubagentGroupBlock -} from '../native-chat-types' +} from '../../native-chat-types' function subagent( id: string, diff --git a/src/shared/native-chat/transcript/native-chat-subagent-items.ts b/src/shared/native-chat/transcript/subagents/native-chat-subagent-items.ts similarity index 99% rename from src/shared/native-chat/transcript/native-chat-subagent-items.ts rename to src/shared/native-chat/transcript/subagents/native-chat-subagent-items.ts index 03a20118d98..8138d5c6d04 100644 --- a/src/shared/native-chat/transcript/native-chat-subagent-items.ts +++ b/src/shared/native-chat/transcript/subagents/native-chat-subagent-items.ts @@ -10,7 +10,7 @@ import { type NativeChatSubagentBlock, type NativeChatSubagentEntry, type NativeChatSubagentGroupBlock -} from '../native-chat-types' +} from '../../native-chat-types' /** Frozen fallback for older clients; Kicked off means no outcome recorded yet, never current liveness. */ export function subagentFallbackText(block: NativeChatSubagentEntry): string { diff --git a/src/shared/native-chat/transcript/native-chat-subagent-summary.test.ts b/src/shared/native-chat/transcript/subagents/native-chat-subagent-summary.test.ts similarity index 92% rename from src/shared/native-chat/transcript/native-chat-subagent-summary.test.ts rename to src/shared/native-chat/transcript/subagents/native-chat-subagent-summary.test.ts index e2cc200fa1b..6511d8e55e0 100644 --- a/src/shared/native-chat/transcript/native-chat-subagent-summary.test.ts +++ b/src/shared/native-chat/transcript/subagents/native-chat-subagent-summary.test.ts @@ -7,7 +7,7 @@ import { summarizeSubagentGroup, withoutSubagentGroupTwins } from './native-chat-subagent-summary' -import type { NativeChatSubagentEntry } from '../native-chat-types' +import type { NativeChatSubagentEntry } from '../../native-chat-types' function agent(entry: Partial): NativeChatSubagentEntry { return { id: 'a', label: 'task', state: 'working', ...entry } @@ -110,17 +110,6 @@ describe('subagentGroupFallbackText', () => { // Twin false positives hide real prose; false negatives duplicate rosters. Match shape because newer states cannot reproduce byte-for-byte here. describe('isSubagentGroupFallbackText', () => { it('recognizes every sentence the producer writes, including an unknown state', () => { - expect(isSubagentGroupFallbackText(subagentGroupFallbackText([agent({})]))).toBe(true) - expect( - isSubagentGroupFallbackText( - subagentGroupFallbackText([agent({ id: 'a' }), agent({ id: 'b', state: 'failed' })]) - ) - ).toBe(true) - expect( - isSubagentGroupFallbackText( - subagentGroupFallbackText([agent({ id: 'a', state: 'completed' })]) - ) - ).toBe(true) // Not reproducible here: this build normalizes `cancelled` to `unverifiable`. expect(isSubagentGroupFallbackText('Ran 2 subagents (1 cancelled)')).toBe(true) expect(isSubagentGroupFallbackText('Kicked off 4 subagents — 2 working (1 timed-out)')).toBe( diff --git a/src/shared/native-chat/transcript/native-chat-subagent-summary.ts b/src/shared/native-chat/transcript/subagents/native-chat-subagent-summary.ts similarity index 99% rename from src/shared/native-chat/transcript/native-chat-subagent-summary.ts rename to src/shared/native-chat/transcript/subagents/native-chat-subagent-summary.ts index 5c4863cf79d..a3db94b651f 100644 --- a/src/shared/native-chat/transcript/native-chat-subagent-summary.ts +++ b/src/shared/native-chat/transcript/subagents/native-chat-subagent-summary.ts @@ -7,7 +7,7 @@ import { type NativeChatSubagentEntry, type NativeChatSubagentGroupBlock, type NativeChatSubagentState -} from '../native-chat-types' +} from '../../native-chat-types' /** Only working is in flight; producers collapse started/interacted/pending/running/paused before writing the roster. */ const TERMINAL_SUBAGENT_STATES: ReadonlySet = new Set([ diff --git a/src/shared/native-chat/transcript/native-chat-background-task-run.ts b/src/shared/native-chat/transcript/turns/native-chat-background-task-run.ts similarity index 87% rename from src/shared/native-chat/transcript/native-chat-background-task-run.ts rename to src/shared/native-chat/transcript/turns/native-chat-background-task-run.ts index a605538b05a..259a162010d 100644 --- a/src/shared/native-chat/transcript/native-chat-background-task-run.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-background-task-run.ts @@ -1,18 +1,18 @@ // One task row's words for every transcript surface, so desktop and mobile report a task the same way. -import type { BackgroundTaskSay } from '../../background-task-copy' +import type { BackgroundTaskSay } from '../../../background-task-copy' import { backgroundTaskStateReason, backgroundTaskStateWord, formatBackgroundTaskTokens, resolveBackgroundTaskName -} from '../../background-task-roster' +} from '../../../background-task-roster' import { isSettledBackgroundTaskState, normalizeBackgroundTaskKind, normalizeBackgroundTaskState -} from '../input/native-chat-background-task-row' -import type { NativeChatBackgroundTaskBlock } from '../native-chat-types' +} from '../../input/task-lists/native-chat-background-task-row' +import type { NativeChatBackgroundTaskBlock } from '../../native-chat-types' import { formatNativeChatDuration } from './native-chat-turn-status' /** Read the host's durable task state, never the turn's: background work can outlive the turn that launched it. */ diff --git a/src/shared/native-chat/transcript/native-chat-cut-turn-notice.ts b/src/shared/native-chat/transcript/turns/native-chat-cut-turn-notice.ts similarity index 89% rename from src/shared/native-chat/transcript/native-chat-cut-turn-notice.ts rename to src/shared/native-chat/transcript/turns/native-chat-cut-turn-notice.ts index 732acdcd684..ee67931a946 100644 --- a/src/shared/native-chat/transcript/native-chat-cut-turn-notice.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-cut-turn-notice.ts @@ -4,28 +4,28 @@ import { agentSessionFailureFact, readAgentSessionFailureFact -} from '../../agent-session/failures/agent-session-failure' +} from '../../../agent-session/failures/agent-session-failure' import { agentSessionFailureWords, type AgentSessionFailureWordsContext -} from '../../agent-session/failures/agent-session-failure-words' +} from '../../../agent-session/failures/agent-session-failure-words' import { agentJournalItemKey, parseAgentJournalItemKey -} from '../../agent-session/journal/agent-session-journal-item-key' -import { isRootAgentJournalItem } from '../../agent-session/journal/agent-session-journal-producer' -import type { AgentJournalRenderItem } from '../../agent-session/journal/agent-session-journal-types' +} from '../../../agent-session/journal/agent-session-journal-item-key' +import { isRootAgentJournalItem } from '../../../agent-session/journal/agent-session-journal-producer' +import type { AgentJournalRenderItem } from '../../../agent-session/journal/agent-session-journal-types' import { readAgentJournalTurn, readAgentJournalTurnOutcome -} from '../../agent-session/lifecycle/records/agent-session-turn-record' -import { agentTurnVerdict } from '../../agent-status/lifecycle/agent-turn-outcome' +} from '../../../agent-session/lifecycle/records/agent-session-turn-record' +import { agentTurnVerdict } from '../../../agent-status/lifecycle/agent-turn-outcome' import { PROVIDER_EXIT_ROW_PREFIX, RESTART_CONTINUATION_ROW_PREFIX, STALE_SESSION_ROW_PREFIX -} from '../../agent-session/lifecycle/stopping/agent-session-stop-row-identity' -import { isStructuredAgentSessionStartFailureRow } from '../../agent-session/failures/structured-agent-session-start-failure-row-key' +} from '../../../agent-session/lifecycle/stopping/agent-session-stop-row-identity' +import { isStructuredAgentSessionStartFailureRow } from '../../../agent-session/failures/structured-agent-session-start-failure-row-key' import { hostStatesTurnScopes } from './native-chat-turn-membership' const CUT_TURN_NOTICE_ROW = 'cut-turn-notice:' diff --git a/src/shared/native-chat/transcript/native-chat-live-turn-membership.ts b/src/shared/native-chat/transcript/turns/native-chat-live-turn-membership.ts similarity index 86% rename from src/shared/native-chat/transcript/native-chat-live-turn-membership.ts rename to src/shared/native-chat/transcript/turns/native-chat-live-turn-membership.ts index e1e2198b173..322cd67dca7 100644 --- a/src/shared/native-chat/transcript/native-chat-live-turn-membership.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-live-turn-membership.ts @@ -1,5 +1,5 @@ -import type { NativeChatRole } from '../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/transcript/native-chat-messages-waiting-behind-live-turn.ts b/src/shared/native-chat/transcript/turns/native-chat-messages-waiting-behind-live-turn.ts similarity index 82% rename from src/shared/native-chat/transcript/native-chat-messages-waiting-behind-live-turn.ts rename to src/shared/native-chat/transcript/turns/native-chat-messages-waiting-behind-live-turn.ts index db34346093b..699abe08780 100644 --- a/src/shared/native-chat/transcript/native-chat-messages-waiting-behind-live-turn.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-messages-waiting-behind-live-turn.ts @@ -1,13 +1,13 @@ import type { AgentJournalRenderItem, AgentJournalSubmission -} from '../../agent-session/journal/agent-session-journal-types' -import type { AgentSessionLatestTurn } from '../../agent-session/agent-session-wire' -import { readAgentJournalTurn } from '../../agent-session/lifecycle/records/agent-session-turn-record' -import type { NativeChatRole } from '../native-chat-types' -import { isStructuredAgentSessionCommandTurn } from '../../agent-session/structured-agent-session-command-entry' -import { runningStructuredAgentSessionTurnScope } from '../../agent-session/view/structured-agent-session-live-turn' -import { structuredAgentSessionOpeningSendIn } from '../../agent-session/requests/structured-agent-session-opening-send' +} from '../../../agent-session/journal/agent-session-journal-types' +import type { AgentSessionLatestTurn } from '../../../agent-session/agent-session-wire' +import { readAgentJournalTurn } from '../../../agent-session/lifecycle/records/agent-session-turn-record' +import type { NativeChatRole } from '../../native-chat-types' +import { isStructuredAgentSessionCommandTurn } from '../../../agent-session/structured-agent-session-command-entry' +import { runningStructuredAgentSessionTurnScope } from '../../../agent-session/view/structured-agent-session-live-turn' +import { structuredAgentSessionOpeningSendIn } from '../../../agent-session/requests/structured-agent-session-opening-send' /** Place pending sends after live activity when host handover waits: during conversation commands (/compact), Stop, or a send still opening its turn. * Include this client’s unrecorded sends; ordinary running turns accept sends promptly, and pre-Stop sends stay put. diff --git a/src/shared/native-chat/transcript/native-chat-thread-goal-rows.test.ts b/src/shared/native-chat/transcript/turns/native-chat-thread-goal-rows.test.ts similarity index 92% rename from src/shared/native-chat/transcript/native-chat-thread-goal-rows.test.ts rename to src/shared/native-chat/transcript/turns/native-chat-thread-goal-rows.test.ts index e08229c4b0d..32611779eb7 100644 --- a/src/shared/native-chat/transcript/native-chat-thread-goal-rows.test.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-thread-goal-rows.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' import { omitNativeChatThreadGoalRows } from './native-chat-thread-goal-rows' const PAYLOAD = { head: '{}', byteLength: 2, digest: 'd'.repeat(64), truncated: false } diff --git a/src/shared/native-chat/transcript/native-chat-thread-goal-rows.ts b/src/shared/native-chat/transcript/turns/native-chat-thread-goal-rows.ts similarity index 76% rename from src/shared/native-chat/transcript/native-chat-thread-goal-rows.ts rename to src/shared/native-chat/transcript/turns/native-chat-thread-goal-rows.ts index b08886918f4..2d938e29c60 100644 --- a/src/shared/native-chat/transcript/native-chat-thread-goal-rows.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-thread-goal-rows.ts @@ -1,5 +1,5 @@ -import { isAgentSessionThreadGoalFrame } from '../../agent-session/agent-session-thread-goal' -import type { NativeChatMessage } from '../native-chat-types' +import { isAgentSessionThreadGoalFrame } from '../../../agent-session/agent-session-thread-goal' +import type { NativeChatMessage } from '../../native-chat-types' /** Show goal transitions in the banner only; retain them in the journal. */ export function omitNativeChatThreadGoalRows( diff --git a/src/shared/native-chat/transcript/native-chat-turn-activity.test.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-activity.test.ts similarity index 98% rename from src/shared/native-chat/transcript/native-chat-turn-activity.test.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-activity.test.ts index 7b8a7386bb9..67da219b7dc 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-activity.test.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-turn-activity.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it } from 'vitest' import type { AgentJournalItemBody, AgentJournalRenderItem -} from '../../agent-session/journal/agent-session-journal-types' +} from '../../../agent-session/journal/agent-session-journal-types' import { selectStructuredAgentTurnActivity } from './native-chat-turn-activity' function item(sequence: number, body: AgentJournalItemBody): AgentJournalRenderItem { diff --git a/src/shared/native-chat/transcript/native-chat-turn-activity.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-activity.ts similarity index 82% rename from src/shared/native-chat/transcript/native-chat-turn-activity.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-activity.ts index 39195522cb1..4b18f4c26f8 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-activity.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-turn-activity.ts @@ -1,9 +1,12 @@ -import { readAgentJournalTurn } from '../../agent-session/lifecycle/records/agent-session-turn-record' -import type { AgentJournalRenderItem } from '../../agent-session/journal/agent-session-journal-types' -import type { AgentSessionTurnActivity } from '../../agent-session/agent-session-wire' -import { isRootAgentJournalItem } from '../../agent-session/journal/agent-session-journal-producer' -import { normalizePromptField } from '../../agent-status/contracts/agent-status-field-normalization' -import { describeActiveToolCall, formatActiveToolLabel } from '../tools/native-chat-tool-activity' +import { readAgentJournalTurn } from '../../../agent-session/lifecycle/records/agent-session-turn-record' +import type { AgentJournalRenderItem } from '../../../agent-session/journal/agent-session-journal-types' +import type { AgentSessionTurnActivity } from '../../../agent-session/agent-session-wire' +import { isRootAgentJournalItem } from '../../../agent-session/journal/agent-session-journal-producer' +import { normalizePromptField } from '../../../agent-status/contracts/agent-status-field-normalization' +import { + describeActiveToolCall, + formatActiveToolLabel +} from '../../tools/native-chat-tool-activity' export type NativeChatTurnActivity = { kind: 'description'; text: string } diff --git a/src/shared/native-chat/transcript/native-chat-turn-grouping.spec.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-grouping.spec.ts similarity index 98% rename from src/shared/native-chat/transcript/native-chat-turn-grouping.spec.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-grouping.spec.ts index 39737846c74..012a0df1f11 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-grouping.spec.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-turn-grouping.spec.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import type { NativeChatMessage } from '../native-chat-types' +import type { NativeChatMessage } from '../../native-chat-types' import { nativeChatRowTurnKeys, nativeChatTurnBarRows, diff --git a/src/shared/native-chat/transcript/native-chat-turn-grouping.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-grouping.ts similarity index 95% rename from src/shared/native-chat/transcript/native-chat-turn-grouping.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-grouping.ts index cc5a2cae852..881e70c787b 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-grouping.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-turn-grouping.ts @@ -1,8 +1,8 @@ // Share desktop/mobile turn ownership, bar placement and row order. -import type { AgentJournalRenderItem } from '../../agent-session/journal/agent-session-journal-types' -import { readAgentJournalTurn } from '../../agent-session/lifecycle/records/agent-session-turn-record' -import type { NativeChatRole } from '../native-chat-types' +import type { AgentJournalRenderItem } from '../../../agent-session/journal/agent-session-journal-types' +import { readAgentJournalTurn } from '../../../agent-session/lifecycle/records/agent-session-turn-record' +import type { NativeChatRole } from '../../native-chat-types' type NativeChatTurnRow = { id: string; role: NativeChatRole } diff --git a/src/shared/native-chat/transcript/native-chat-turn-membership.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-membership.ts similarity index 93% rename from src/shared/native-chat/transcript/native-chat-turn-membership.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-membership.ts index 8a2357ae6af..3d20162c9fe 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-membership.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-turn-membership.ts @@ -5,15 +5,15 @@ import { // 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. -import { agentJournalSubmissionKey } from '../../agent-session/journal/agent-session-journal-item-key' -import { isRootAgentJournalItem } from '../../agent-session/journal/agent-session-journal-producer' -import { isQueuedAgentJournalSubmission } from '../../agent-session/requests/agent-session-queued-submission' +import { agentJournalSubmissionKey } from '../../../agent-session/journal/agent-session-journal-item-key' +import { isRootAgentJournalItem } from '../../../agent-session/journal/agent-session-journal-producer' +import { isQueuedAgentJournalSubmission } from '../../../agent-session/requests/agent-session-queued-submission' import type { AgentJournalRenderItem, AgentJournalSubmission, AgentJournalTurnLifecycle -} from '../../agent-session/journal/agent-session-journal-types' -import { readAgentJournalTurn } from '../../agent-session/lifecycle/records/agent-session-turn-record' +} from '../../../agent-session/journal/agent-session-journal-types' +import { readAgentJournalTurn } from '../../../agent-session/lifecycle/records/agent-session-turn-record' import { nativeChatJournalOrderTurnKeys, nativeChatRowTurnKeys, @@ -21,12 +21,12 @@ import { nativeChatUserRowOpensTurn, type NativeChatOpensTurn } from './native-chat-turn-grouping' -import type { NativeChatMessage, NativeChatRole } from '../native-chat-types' -import { dispatchWasWithdrawn } from '../../agent-session/requests/structured-agent-session-dispatch-rejection' -import { inSendOrder } from '../native-chat-send-order' -import { runningStructuredAgentSessionTurnScope } from '../../agent-session/view/structured-agent-session-live-turn' +import type { NativeChatMessage, NativeChatRole } from '../../native-chat-types' +import { dispatchWasWithdrawn } from '../../../agent-session/requests/structured-agent-session-dispatch-rejection' +import { inSendOrder } from '../../native-chat-send-order' +import { runningStructuredAgentSessionTurnScope } from '../../../agent-session/view/structured-agent-session-live-turn' import { nativeChatOpeningTurnKey } from './native-chat-messages-waiting-behind-live-turn' -import type { AgentSessionLatestTurn } from '../../agent-session/agent-session-wire' +import type { AgentSessionLatestTurn } from '../../../agent-session/agent-session-wire' import { nativeChatTurnRowAttribution } from './native-chat-turn-row-attribution' /** Turn scopes identify hosts that also run /compact through the send path; older hosts omit them. */ diff --git a/src/shared/native-chat/transcript/native-chat-turn-row-attribution.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-row-attribution.ts similarity index 83% rename from src/shared/native-chat/transcript/native-chat-turn-row-attribution.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-row-attribution.ts index ad78384e2ac..9ff94236f4a 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-row-attribution.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-turn-row-attribution.ts @@ -1,6 +1,6 @@ -import { agentJournalItemPosition } from '../../agent-session/journal/agent-session-journal-position' -import type { AgentJournalRenderItem } from '../../agent-session/journal/agent-session-journal-types' -import type { NativeChatMessage } from '../native-chat-types' +import { agentJournalItemPosition } from '../../../agent-session/journal/agent-session-journal-position' +import type { AgentJournalRenderItem } from '../../../agent-session/journal/agent-session-journal-types' +import type { NativeChatMessage } from '../../native-chat-types' /** A split result row keeps its source's journal position while gaining its own render identity. */ export function nativeChatTurnRowAttribution( diff --git a/src/shared/native-chat/transcript/native-chat-turn-status.test.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-status.test.ts similarity index 100% rename from src/shared/native-chat/transcript/native-chat-turn-status.test.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-status.test.ts diff --git a/src/shared/native-chat/transcript/native-chat-turn-status.ts b/src/shared/native-chat/transcript/turns/native-chat-turn-status.ts similarity index 99% rename from src/shared/native-chat/transcript/native-chat-turn-status.ts rename to src/shared/native-chat/transcript/turns/native-chat-turn-status.ts index a1e96393960..0ee2032a969 100644 --- a/src/shared/native-chat/transcript/native-chat-turn-status.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-turn-status.ts @@ -1,6 +1,6 @@ // Shared turn status/copy for desktop translations and direct mobile rendering; platforms own their clocks. -import type { AgentTurnOutcome } from '../../agent-status/lifecycle/agent-turn-outcome' +import type { AgentTurnOutcome } from '../../../agent-status/lifecycle/agent-turn-outcome' export const NATIVE_CHAT_TURN_STATUS_COPY = { thinking: 'Thinking', diff --git a/src/shared/native-chat/transcript/native-chat-unverifiable-turn-status.test.ts b/src/shared/native-chat/transcript/turns/native-chat-unverifiable-turn-status.test.ts similarity index 95% rename from src/shared/native-chat/transcript/native-chat-unverifiable-turn-status.test.ts rename to src/shared/native-chat/transcript/turns/native-chat-unverifiable-turn-status.test.ts index 082713b88da..f0185020187 100644 --- a/src/shared/native-chat/transcript/native-chat-unverifiable-turn-status.test.ts +++ b/src/shared/native-chat/transcript/turns/native-chat-unverifiable-turn-status.test.ts @@ -2,9 +2,9 @@ import { describe, expect, it } from 'vitest' import type { AgentJournalRenderItem, AgentJournalTurnItem -} from '../../agent-session/journal/agent-session-journal-types' +} from '../../../agent-session/journal/agent-session-journal-types' import { reduceNativeChatTurnTiming, selectNativeChatTurnStatuses } from './native-chat-turn-status' -import { selectStructuredAgentSettledTurns } from '../../agent-session/view/structured-agent-session-turn-timing' +import { selectStructuredAgentSettledTurns } from '../../../agent-session/view/structured-agent-session-turn-timing' function userItem(itemId: string): AgentJournalRenderItem { return { diff --git a/src/shared/queued-message-edit.ts b/src/shared/queued-message-edit.ts index b8ec732de4a..c8fc2495219 100644 --- a/src/shared/queued-message-edit.ts +++ b/src/shared/queued-message-edit.ts @@ -21,7 +21,7 @@ import { imageReferencesToPromptMarkers, promptMarkersToImageReferences, stripSentImagePromptMarkers -} from './native-chat/transcript/native-chat-image-transcript-markers' +} from './native-chat/transcript/images/native-chat-sent-image-prompt-markers' export type QueuedMessageImageBlock = Extract< AgentJournalMessageItem['blocks'][number], diff --git a/src/shared/source-control/ai/recipes/source-control-action-options.ts b/src/shared/source-control/ai/recipes/source-control-action-options.ts index bcecfc39eff..56cbe1e5742 100644 --- a/src/shared/source-control/ai/recipes/source-control-action-options.ts +++ b/src/shared/source-control/ai/recipes/source-control-action-options.ts @@ -1,7 +1,7 @@ import type { TuiAgent } from '../../../agent-launch/catalog/tui-agent' import { isTuiAgent } from '../../../agent-launch/catalog/tui-agent-config' import { isAgentSessionHandleProvider } from '../../../agent-session/lifecycle/provider-handles/agent-session-provider-handle' -import { STRUCTURED_LAUNCH_SEED_OPTION_IDS } from '../../../native-chat/input/native-chat-session-option-defaults' +import { STRUCTURED_LAUNCH_SEED_OPTION_IDS } from '../../../native-chat/input/session-options/native-chat-session-option-defaults' import { findCatalogModel, getAgentSessionOptionLaunchCatalog diff --git a/src/shared/structured-agent-question-card.ts b/src/shared/structured-agent-question-card.ts index 19487c33e7b..5a413b90319 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/input/native-chat-ask-answer' -import type { AskPrompt } from './native-chat/input/native-chat-ask-types' -import { askTypedText } from './native-chat/input/native-chat-ask-card-rules' +import type { AskAnswerSelection } from './native-chat/input/questions/native-chat-ask-answer' +import type { AskPrompt } from './native-chat/input/questions/native-chat-ask-types' +import { askTypedText } from './native-chat/input/questions/native-chat-ask-card-rules' /** A structured prompt drawn with the same stepped card as a terminal ask. */ type StructuredQuestionCard = { diff --git a/src/shared/terminal/input/agent-smart-keys.ts b/src/shared/terminal/input/agent-smart-keys.ts index 1f605deddc7..f39a0500a46 100644 --- a/src/shared/terminal/input/agent-smart-keys.ts +++ b/src/shared/terminal/input/agent-smart-keys.ts @@ -1,6 +1,6 @@ import type { AgentStatusEntry } from '../../agent-status/contracts/agent-status-types' import { hookRowAgentPhase } from '../../agent-status/lifecycle/agent-transitions' -import { parseNativeChatApprovalEnvelope } from '../../native-chat/input/native-chat-approval-envelope' +import { parseNativeChatApprovalEnvelope } from '../../native-chat/input/approvals/native-chat-approval-envelope' import { parseAskFromStatus } from '../../native-chat/input/native-chat-ask' import { resolveNativeChatTranscriptAgent } from '../../native-chat/native-chat-agent-support' diff --git a/src/shared/worker-transcript-text.ts b/src/shared/worker-transcript-text.ts index 895a387ba38..fded8a50763 100644 --- a/src/shared/worker-transcript-text.ts +++ b/src/shared/worker-transcript-text.ts @@ -1,11 +1,11 @@ /** Share worker-read transcript and terminal-read text rendering so peers see identical tool-call output through either surface. */ -import { claimBackgroundTaskTwins } from './native-chat/input/native-chat-background-task-row' +import { claimBackgroundTaskTwins } from './native-chat/input/task-lists/native-chat-background-task-row' import { isSubagentGroupFallbackText, subagentGroupFallbackText -} from './native-chat/transcript/native-chat-subagent-summary' -import { subagentFallbackText } from './native-chat/transcript/native-chat-subagent-items' +} from './native-chat/transcript/subagents/native-chat-subagent-summary' +import { subagentFallbackText } from './native-chat/transcript/subagents/native-chat-subagent-items' import type { NativeChatMessage } from './native-chat/native-chat-types' import { isInlineDataUrl } from './native-chat/native-chat-inline-data-url' diff --git a/tests/e2e/host-agent-launch-preferences-work.unit.test.ts b/tests/e2e/host-agent-launch-preferences-work.unit.test.ts index 1d0360ba553..52703c15fa5 100644 --- a/tests/e2e/host-agent-launch-preferences-work.unit.test.ts +++ b/tests/e2e/host-agent-launch-preferences-work.unit.test.ts @@ -23,7 +23,7 @@ import type { RuntimeStore } from '../../src/main/runtime/construction/runtime-s import { RuntimeClientSettingsController } from '../../src/main/runtime/client/settings/runtime-client-settings' import { mutateHostAgentLaunchSettings } from '../../src/renderer/src/runtime/agent-launch-settings/agent-launch-settings-transport' import { AGENT_LAUNCH_CHOICES_CAPABILITY } from '../../src/shared/agent-launch/contracts/agent-launch-runtime-capability' -import { structuredLaunchSeedOptions } from '../../src/shared/native-chat/input/native-chat-session-option-defaults' +import { structuredLaunchSeedOptions } from '../../src/shared/native-chat/input/session-options/native-chat-session-option-defaults' import { replaceRuntimeEnvironmentRevisions } from '@/runtime/rpc/environment-revisions/runtime-environment-revision' vi.mock('../../src/main/agent-hooks/installation/managed-agent-hook-controls', () => ({