mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 02:17:31 +00:00
refactor: colocate native-chat noise filtering (#36824)
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { isNoiseMessage, stripNoiseMessages } from '../../../src/shared/native-chat-noise'
|
||||
import {
|
||||
isNoiseMessage,
|
||||
stripNoiseMessages
|
||||
} from '../../../src/shared/native-chat/native-chat-noise'
|
||||
import type { NativeChatMessage } from '../../../src/shared/native-chat-types'
|
||||
|
||||
function msg(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { formatAgentTypeLabel } from '../../../src/shared/agent-type-label'
|
||||
import type { NativeChatEmptyStateCopy } from '../../../src/shared/native-chat/native-chat-empty-state'
|
||||
import { isRootAgentJournalItem } from '../../../src/shared/agent-session-journal-producer'
|
||||
import { stripNoiseMessages } from '../../../src/shared/native-chat-noise'
|
||||
import { stripNoiseMessages } from '../../../src/shared/native-chat/native-chat-noise'
|
||||
import { nativeChatStreamingMessage } from '../../../src/shared/native-chat/native-chat-streaming'
|
||||
import { isWordlessProviderFrameMessage } from '../../../src/shared/native-chat/native-chat-provider-frame-summary'
|
||||
import {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
NATIVE_CHAT_INTERRUPTED_STATUS_TEXT,
|
||||
type NativeChatMessage
|
||||
} from '../../shared/native-chat-types'
|
||||
import { stripNoiseMessages } from '../../shared/native-chat-noise'
|
||||
import { stripNoiseMessages } from '../../shared/native-chat/native-chat-noise'
|
||||
import { decodeClaudeTranscriptLine } from './transcript-line-decoders-claude'
|
||||
import { decodeCodexTranscriptLine } from './transcript-line-decoders-codex'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs'
|
||||
import { join } from 'node:path'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { surfaceNativeChatCommandOutputs } from '../../shared/native-chat/tools/native-chat-command-output'
|
||||
import { stripNoiseMessages } from '../../shared/native-chat-noise'
|
||||
import { stripNoiseMessages } from '../../shared/native-chat/native-chat-noise'
|
||||
import type { NativeChatMessage } from '../../shared/native-chat-types'
|
||||
import { decodeClaudeTranscriptLine } from './transcript-line-decoders-claude'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AgentType, NativeChatTurnLifecycle } from '../../shared/native-chat-types'
|
||||
import { resolveNativeChatTranscriptAgent } from '../../shared/native-chat/native-chat-agent-support'
|
||||
import { isNoiseMessage } from '../../shared/native-chat-noise'
|
||||
import { isNoiseMessage } from '../../shared/native-chat/native-chat-noise'
|
||||
import { claudeBashInputAsTypedCommand } from '../../shared/claude-bash-input'
|
||||
import {
|
||||
asRecord,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { mkdtemp, rm, writeFile } from 'node:fs/promises'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { join } from 'node:path'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { stripNoiseMessages } from '../../shared/native-chat-noise'
|
||||
import { stripNoiseMessages } from '../../shared/native-chat/native-chat-noise'
|
||||
import { mergeNativeChatMessages } from '../../shared/native-chat/native-chat-merge'
|
||||
import { foldToolMessages } from '../../shared/native-chat/tools/native-chat-tool-fold'
|
||||
import { pairToolBlocks } from '../../shared/native-chat/tools/native-chat-tool-pairs'
|
||||
|
||||
@@ -37,7 +37,7 @@ import { projectStructuredItemToNativeChat } from '../../../../shared/structured
|
||||
import { isAdmissibleAgentJournalRenderItem } from '../../../../shared/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 { isNoiseMessage } from '../../../../shared/native-chat-noise'
|
||||
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-types'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { expect, it } from 'vitest'
|
||||
import type { NativeChatMessage } from '../../../../shared/native-chat-types'
|
||||
import { createNativeChatMessageListProjection } from './native-chat-message-list-projection'
|
||||
import { orderNativeChatMessages } from './native-chat-message-grouping'
|
||||
import { stripNoiseMessages } from './native-chat-noise'
|
||||
import { stripNoiseMessages } from '../../../../shared/native-chat/native-chat-noise'
|
||||
import { foldToolMessages } from '../../../../shared/native-chat/tools/native-chat-tool-fold'
|
||||
import { pairToolBlocks } from '../../../../shared/native-chat/tools/native-chat-tool-pairs'
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export { isNoiseMessage, stripNoiseMessages } from '../../../../shared/native-chat-noise'
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
commandMarkersAsMessages,
|
||||
readCommandMarkerCache
|
||||
} from './native-chat-command-marker'
|
||||
import { stripNoiseMessages } from './native-chat-noise'
|
||||
import { stripNoiseMessages } from '../../../../shared/native-chat/native-chat-noise'
|
||||
|
||||
function userMessage(id: string, text: string, timestamp = 1): NativeChatMessage {
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import type { NativeChatMessage } from '../../../../shared/native-chat-types'
|
||||
import { stripNoiseMessages } from './native-chat-noise'
|
||||
import { stripNoiseMessages } from '../../../../shared/native-chat/native-chat-noise'
|
||||
import {
|
||||
foldToolMessages,
|
||||
splitNativeChatBlocks
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { nativeChatSemanticRowId, type NativeChatMessage } from './native-chat-types'
|
||||
import { compareAgentJournalPositions } from './agent-session-journal-position'
|
||||
import { agentJournalItemSubagentId } from './agent-session-journal-producer'
|
||||
import { stripNoiseMessages } from './native-chat-noise'
|
||||
import { stripNoiseMessages } from './native-chat/native-chat-noise'
|
||||
import { foldToolMessages } from './native-chat/tools/native-chat-tool-fold'
|
||||
import { foldSubagentItems } from './native-chat/transcript/native-chat-subagent-items'
|
||||
import { nativeChatTurnMembership, type NativeChatTurnJournal } from './native-chat-turn-membership'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { isKnownHarnessInjectedUserTurnText } from './harness-injected-user-turns'
|
||||
import { isTextBlock, type NativeChatMessage } from './native-chat-types'
|
||||
import { isKnownHarnessInjectedUserTurnText } from '../harness-injected-user-turns'
|
||||
import { isTextBlock, type NativeChatMessage } from '../native-chat-types'
|
||||
|
||||
function messageText(message: NativeChatMessage): string {
|
||||
return message.blocks
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { AgentStatusEntry } from '../agent-status-types'
|
||||
import { isInterruptedStatusMessage, type NativeChatMessage } from '../native-chat-types'
|
||||
import type { NativeChatSettledTurn, NativeChatSettledTurns } from '../native-chat-turn-status'
|
||||
import { isNoiseMessage } from '../native-chat-noise'
|
||||
import { isNoiseMessage } from './native-chat-noise'
|
||||
import { shouldShowNativeChatWorking } from './native-chat-working-suppression'
|
||||
|
||||
/** shown prompts have a card in this pane; unshown prompts require input in the agent’s terminal. */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { surfaceNativeChatCommandOutputs } from './native-chat-command-output'
|
||||
import { stripNoiseMessages } from '../../native-chat-noise'
|
||||
import { stripNoiseMessages } from '../native-chat-noise'
|
||||
import type { NativeChatMessage } from '../../native-chat-types'
|
||||
|
||||
// The two user rows OpenClaude 0.31.0 writes for `/context` (its caveat row is
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
type NativeChatMessage
|
||||
} from '../../native-chat-types'
|
||||
import { isKnownHarnessInjectedUserTurnText } from '../../harness-injected-user-turns'
|
||||
import { isNoiseMessage } from '../../native-chat-noise'
|
||||
import { isNoiseMessage } from '../native-chat-noise'
|
||||
import {
|
||||
CODEX_PLAN_UPDATED_FRAME_KIND,
|
||||
isWordlessProviderFrameMessage
|
||||
|
||||
Reference in New Issue
Block a user