mirror of
https://github.com/stablyai/orca.git
synced 2026-11-14 09:57:48 +00:00
refactor: colocate native-chat agent support (#36816)
This commit is contained in:
@@ -11866,7 +11866,7 @@
|
||||
"src/shared/muse-session-log.test.ts": 43,
|
||||
"src/shared/native-chat/transcript/native-chat-activity-tail-line.test.ts": 141,
|
||||
"src/shared/native-chat-agent-profiles.test.ts": 37,
|
||||
"src/shared/native-chat-agent-support.test.ts": 38,
|
||||
"src/shared/native-chat/native-chat-agent-support.test.ts": 38,
|
||||
"src/shared/native-chat/native-chat-appearance-settings.test.ts": 34,
|
||||
"src/shared/native-chat-approval-envelope.test.ts": 49,
|
||||
"src/shared/native-chat/input/native-chat-ask.test.ts": 95,
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
useMobileNativeChatReplyReveals
|
||||
} from './native-chat/transcript/mobile-native-chat-reply-reveals'
|
||||
import { MobileNativeChatRowOverlaysHost } from './native-chat/transcript/MobileNativeChatRowOverlaysHost'
|
||||
import { nativeChatAskRequiresTerminal } from '../../../src/shared/native-chat-agent-support'
|
||||
import { nativeChatAskRequiresTerminal } from '../../../src/shared/native-chat/native-chat-agent-support'
|
||||
import { tuiAgentDisplayName } from '../../../src/shared/tui-agent-display-names'
|
||||
import { MobileNativeChatNoticeContext } from './mobile-native-chat-notice-context'
|
||||
import type { MobileNativeChatImageSource } from './native-chat/visual/mobile-native-chat-image-preview'
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
nativeChatAskRequiresTerminal,
|
||||
resolveNativeChatTranscriptAgent,
|
||||
shouldStepNativeChatAskAnswer
|
||||
} from '../../../../../src/shared/native-chat-agent-support'
|
||||
} from '../../../../../src/shared/native-chat/native-chat-agent-support'
|
||||
import { buildNativeChatPasteBytes } from '../../../../../src/shared/native-chat-paste-bytes'
|
||||
|
||||
export type MobileNativeChatAnswerSend = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useCallback, type MutableRefObject } from 'react'
|
||||
import { nativeChatAskRequiresTerminal } from '../../../../../src/shared/native-chat-agent-support'
|
||||
import { nativeChatAskRequiresTerminal } from '../../../../../src/shared/native-chat/native-chat-agent-support'
|
||||
import type { RpcClient } from '../../../transport/rpc-client'
|
||||
import { sendMobileNativeChatMessageWithOutcome } from '../mobile-native-chat-send'
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { isRpcDeliveryUnknown } from '../transport/rpc-delivery-ambiguity'
|
||||
import { isLogicalClientCutoverError } from '../transport/stable-logical-rpc-client'
|
||||
import { nativeChatTerminalWrite } from './mobile-session-write-operations'
|
||||
import { openMobileNativeChatSendBudget } from './native-chat/mobile-native-chat-send'
|
||||
import { nativeChatStopSendsSecondEscape } from '../../../src/shared/native-chat-agent-support'
|
||||
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'
|
||||
|
||||
// Resolves false only when no Escape could have landed, so the chat may offer Stop again.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import type { AgentType } from '../../../shared/agent-status-types'
|
||||
import type { AgentJournalItemIdentity } from '../../../shared/agent-session-journal-types'
|
||||
import type { NativeChatTranscriptAgent } from '../../../shared/native-chat-agent-support'
|
||||
import type { NativeChatTranscriptAgent } from '../../../shared/native-chat/native-chat-agent-support'
|
||||
|
||||
export type LegacyIdentityTracker = {
|
||||
/** Observe every raw line, including discarded ones, to keep decoder identities aligned. */
|
||||
|
||||
@@ -12,7 +12,7 @@ import type {
|
||||
AgentJournalItemIdentity
|
||||
} from '../../../shared/agent-session-journal-types'
|
||||
import type { NativeChatBlock, NativeChatMessage } from '../../../shared/native-chat-types'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../../shared/native-chat/native-chat-agent-support'
|
||||
import { resolveSessionFilePath, type ResolveSessionFileOptions } from '../session-file-resolver'
|
||||
import {
|
||||
decodeClaudeTranscriptLine,
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { AgentType } from '../../shared/native-chat-types'
|
||||
import {
|
||||
resolveNativeChatTranscriptAgent,
|
||||
type NativeChatTranscriptAgent
|
||||
} from '../../shared/native-chat-agent-support'
|
||||
} from '../../shared/native-chat/native-chat-agent-support'
|
||||
import { isWslUncPath } from '../../shared/wsl-paths'
|
||||
import { walkSessionFiles } from '../ai-vault/session-scanner-discovery'
|
||||
import { resolveOmpSessionsDir } from '../ai-vault/omp-session-root'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat/native-chat-agent-support'
|
||||
import { readOpenCodeNativeChatTranscriptFull } from './transcript-opencode'
|
||||
import type { AgentType } from '../../shared/native-chat-types'
|
||||
import { InFlightPromiseDedupe, stableInFlightKey } from '../../shared/in-flight-promise-dedupe'
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
NativeChatMessage,
|
||||
NativeChatTurnLifecycle
|
||||
} from '../../shared/native-chat-types'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat/native-chat-agent-support'
|
||||
import { errorMessage } from '../ai-vault/session-scanner-values'
|
||||
import { resolveSessionFilePath, type ResolveSessionFileOptions } from './session-file-resolver'
|
||||
import { openTranscriptReadStream } from './wsl-transcript-fs-access'
|
||||
|
||||
@@ -5,7 +5,7 @@ import type {
|
||||
NativeChatMessage,
|
||||
NativeChatTurnLifecycle
|
||||
} from '../../shared/native-chat-types'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat/native-chat-agent-support'
|
||||
import { resolveSessionFilePath, type ResolveSessionFileOptions } from './session-file-resolver'
|
||||
import {
|
||||
decodeClaudeTranscriptLine,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentType, NativeChatTurnLifecycle } from '../../shared/native-chat-types'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat/native-chat-agent-support'
|
||||
import { isNoiseMessage } from '../../shared/native-chat-noise'
|
||||
import { claudeBashInputAsTypedCommand } from '../../shared/claude-bash-input'
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { UNFLUSHED_SETTLE_MS } from './transcript-watch-contract'
|
||||
import { subscribeOpenCodeNativeChatTranscript } from './transcript-opencode-subscribe'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat/native-chat-agent-support'
|
||||
import { extname } from 'node:path'
|
||||
import type { NativeChatMessage } from '../../shared/native-chat-types'
|
||||
import {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AgentType, NativeChatMessage } from '../../../shared/native-chat-types'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../../shared/native-chat/native-chat-agent-support'
|
||||
import type { OrchestrationWorkerReadFallbackReason } from '../../../shared/orchestration-worker-output'
|
||||
import { resolveSessionFilePath } from '../../native-chat/session-file-resolver'
|
||||
import { nativeChatLineDecoderForAgent } from '../../native-chat/transcript-tail-reader'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { NativeChatMessage } from '../../../../shared/native-chat-types'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../../../shared/native-chat-agent-support'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../../../shared/native-chat/native-chat-agent-support'
|
||||
import {
|
||||
readNativeChatTranscriptTail,
|
||||
subscribeNativeChatTranscript,
|
||||
|
||||
@@ -19,7 +19,7 @@ import { useNativeChatFind } from './use-native-chat-find'
|
||||
import { NativeChatFindBar } from './NativeChatFindBar'
|
||||
import { useNativeChatCanSend } from './use-native-chat-can-send'
|
||||
import { NativeChatInteractiveCard } from './NativeChatInteractiveCard'
|
||||
import { nativeChatAskRequiresTerminal } from '../../../../shared/native-chat-agent-support'
|
||||
import { nativeChatAskRequiresTerminal } from '../../../../shared/native-chat/native-chat-agent-support'
|
||||
import { useNativeChatTerminalPromptCard } from './use-native-chat-interactive-prompt-card'
|
||||
import { NativeChatPromptStrip } from './NativeChatPromptCollapse'
|
||||
import { NativeChatEmptyState } from './NativeChatEmptyState'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AgentStatusEntry, AgentType } from '../../../../shared/agent-status-types'
|
||||
import type { TuiAgent } from '../../../../shared/tui-agent'
|
||||
import { isNativeChatSupportedAgent } from '../../../../shared/native-chat-agent-support'
|
||||
import { isNativeChatSupportedAgent } from '../../../../shared/native-chat/native-chat-agent-support'
|
||||
import { nativeChatAvailabilityAgent } from '../../../../shared/native-chat-availability'
|
||||
|
||||
export type NativeChatPaneResolutionInput = {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
nativeChatStopSendsSecondEscape,
|
||||
resolveNativeChatTranscriptAgent,
|
||||
shouldStepNativeChatAskAnswer
|
||||
} from '../../../../shared/native-chat-agent-support'
|
||||
} from '../../../../shared/native-chat/native-chat-agent-support'
|
||||
import {
|
||||
buildAskAnswerKeys,
|
||||
buildCodexAskAnswerKeys,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { agentDeliversDraftViaNativePrefill } from '@/lib/agent-native-draft-prefill'
|
||||
import { pasteDraftWhenAgentReady } from '@/lib/agent-paste-draft'
|
||||
import { canMirrorLaunchDraftToNativeChat } from '../../../shared/native-chat/input/native-chat-launch-draft-mirrorability'
|
||||
import { isNativeChatSupportedAgent } from '@/lib/native-chat-supported-agent'
|
||||
import { isNativeChatSupportedAgent } from '../../../shared/native-chat/native-chat-agent-support'
|
||||
import { useAppStore } from '@/store'
|
||||
import type { TuiAgent } from '../../../shared/tui-agent'
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
export {
|
||||
isNativeChatSupportedAgent,
|
||||
nativeChatRequiresLocalTranscript,
|
||||
NATIVE_CHAT_SUPPORTED_AGENTS
|
||||
} from '../../../shared/native-chat-agent-support'
|
||||
@@ -6,7 +6,7 @@ import { parseNativeChatApprovalEnvelope } from './native-chat-approval-envelope
|
||||
import {
|
||||
resolveNativeChatTranscriptAgent,
|
||||
shouldStepNativeChatAskAnswer
|
||||
} from './native-chat-agent-support'
|
||||
} from './native-chat/native-chat-agent-support'
|
||||
|
||||
export type PendingPromptOption = { id: string; label: string; description?: string }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { nativeChatApprovalAcceptKey } from './native-chat-agent-support'
|
||||
import { nativeChatApprovalAcceptKey } from './native-chat/native-chat-agent-support'
|
||||
|
||||
/** The facts in a status row's `{ approval: { tool, summary } }` envelope; callers own labels. */
|
||||
export type NativeChatApprovalEnvelope = {
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { AgentType } from './agent-status-types'
|
||||
import {
|
||||
isNativeChatSupportedAgent,
|
||||
nativeChatRequiresLocalTranscript
|
||||
} from './native-chat-agent-support'
|
||||
} from './native-chat/native-chat-agent-support'
|
||||
|
||||
/** Resolve launched/detected identity from the tab and status before applying this pure toggle policy. */
|
||||
export type NativeChatAvailabilityInput = {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { TuiAgent } from './tui-agent'
|
||||
import type { TuiAgent } from '../tui-agent'
|
||||
|
||||
export type NativeChatTranscriptAgent = 'claude' | 'codex' | 'grok' | 'omp' | 'opencode'
|
||||
|
||||
Reference in New Issue
Block a user