refactor: colocate native-chat command envelopes (#32055)

This commit is contained in:
Neil
2026-10-22 08:55:53 -07:00
committed by GitHub
parent 97d4518d5f
commit de2700d0fb
7 changed files with 7 additions and 7 deletions
@@ -11,7 +11,7 @@ import { deepStrictEqual, strictEqual } from 'node:assert'
import { performance } from 'node:perf_hooks'
import type { NativeChatMessage, NativeChatSession } from '../../src/shared/native-chat-types'
import { getVerifiedNativeChatCommands } from '../../src/shared/native-chat-agent-profiles'
import { surfaceSkillInvocationUserTurns } from '../../src/shared/native-chat-command-envelope'
import { surfaceSkillInvocationUserTurns } from '../../src/shared/native-chat/native-chat-command-envelope'
import { prepareNativeChatLiveMessages } from '../../src/renderer/src/components/native-chat/native-chat-live-message-preparation'
import { mergeNativeChatLiveSession } from '../../src/renderer/src/components/native-chat/native-chat-live-status'
import {
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest'
import type { NativeChatMessage } from '../../../../shared/native-chat-types'
import { getVerifiedNativeChatCommands } from '../../../../shared/native-chat-agent-profiles'
import { surfaceSkillInvocationUserTurns } from '../../../../shared/native-chat-command-envelope'
import { surfaceSkillInvocationUserTurns } from '../../../../shared/native-chat/native-chat-command-envelope'
import {
createIncrementalAssembler,
reset as resetAssembler
+1 -1
View File
@@ -7,7 +7,7 @@
import type { AgentType } from './agent-status-types'
import { stripAnsiEscapeSequences } from './ansi-escape-sequences'
import { getVerifiedNativeChatCommands } from './native-chat-agent-profiles'
import { parseNativeChatCommandEnvelope } from './native-chat-command-envelope'
import { parseNativeChatCommandEnvelope } from './native-chat/native-chat-command-envelope'
import { isTextBlock, type NativeChatMessage } from './native-chat-types'
const LOCAL_COMMAND_STDOUT = /^\s*<local-command-stdout>([\s\S]*?)<\/local-command-stdout>\s*$/
@@ -3,7 +3,7 @@
import type { AgentType } from './agent-status-types'
import { getVerifiedNativeChatCommands } from './native-chat-agent-profiles'
import { surfaceSkillInvocationUserTurns } from './native-chat-command-envelope'
import { surfaceSkillInvocationUserTurns } from './native-chat/native-chat-command-envelope'
import { surfaceNativeChatCommandOutputs } from './native-chat-command-output'
import { normalizeImageTranscriptMessages } from './native-chat-image-transcript-markers'
import type { NativeChatMessage } from './native-chat-types'
@@ -8,7 +8,7 @@ import './native-chat-ask-row.spec'
import './native-chat-tool-pairing.spec'
import './native-chat-live-line.spec'
import './native-chat-merge-pairs.spec'
import './native-chat-command-envelope.spec'
import './native-chat/native-chat-command-envelope.spec'
import './native-chat-streaming.spec'
import './native-chat-subagent-group-header.spec'
import './native-chat-tool-result-orphans.spec'
@@ -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 {
parseNativeChatCommandEnvelope,
surfaceSkillInvocationUserTurns
@@ -5,7 +5,7 @@
// dropping its envelope makes the assistant appear to answer an empty
// conversation. Surface non-catalog envelopes back as plain user text.
import { isTextBlock, type NativeChatMessage } from './native-chat-types'
import { isTextBlock, type NativeChatMessage } from '../native-chat-types'
const COMMAND_NAME = /<command-name>([\s\S]*?)<\/command-name>/
const COMMAND_ARGS = /<command-args>([\s\S]*?)<\/command-args>/