chore(deadcode): remove redundant observation aliases · openclaw/openclaw@8e24695
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | // Covers sanitized provider-error observation fields for embedded-agent runs. |
2 | 2 | import { afterEach, describe, expect, it, vi } from "vitest"; |
3 | 3 | import * as loggingConfigModule from "../logging/config.js"; |
| 4 | +import { sanitizeForConsole } from "./console-sanitize.js"; |
4 | 5 | import { |
5 | 6 | buildApiErrorObservationFields, |
6 | 7 | buildTextObservationFields, |
7 | | -sanitizeForConsole, |
8 | 8 | shouldSuppressRawErrorConsoleSuffix, |
9 | 9 | } from "./embedded-agent-error-observation.js"; |
10 | 10 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,8 +13,6 @@ import {
|
13 | 13 | } from "./embedded-agent-helpers.js"; |
14 | 14 | import { stableStringify } from "./stable-stringify.js"; |
15 | 15 | |
16 | | -export { sanitizeForConsole } from "./console-sanitize.js"; |
17 | | - |
18 | 16 | const MAX_OBSERVATION_INPUT_CHARS = 64_000; |
19 | 17 | const MAX_FINGERPRINT_MESSAGE_CHARS = 8_000; |
20 | 18 | const RAW_ERROR_PREVIEW_MAX_CHARS = 400; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3,9 +3,9 @@
|
3 | 3 | */ |
4 | 4 | import { redactIdentifier } from "../../../logging/redact-identifier.js"; |
5 | 5 | import type { AuthProfileFailureReason } from "../../auth-profiles.js"; |
| 6 | +import { sanitizeForConsole } from "../../console-sanitize.js"; |
6 | 7 | import { |
7 | 8 | buildApiErrorObservationFields, |
8 | | -sanitizeForConsole, |
9 | 9 | shouldSuppressRawErrorConsoleSuffix, |
10 | 10 | } from "../../embedded-agent-error-observation.js"; |
11 | 11 | import type { FailoverReason } from "../../embedded-agent-helpers.js"; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,10 +5,12 @@ import { describe, expect, it, vi } from "vitest";
|
5 | 5 | import type { ContextEngine, ContextEngineRuntimeSettings } from "../../context-engine/types.js"; |
6 | 6 | import { sanitizeToolUseResultPairing } from "../session-transcript-repair.js"; |
7 | 7 | import { castAgentMessage } from "../test-helpers/agent-message-fixtures.js"; |
8 | | -import { MidTurnPrecheckSignal } from "./run/midturn-precheck.js"; |
9 | 8 | import { |
10 | 9 | CONTEXT_LIMIT_TRUNCATION_NOTICE, |
11 | 10 | formatContextLimitTruncationNotice, |
| 11 | +} from "./context-truncation-notice.js"; |
| 12 | +import { MidTurnPrecheckSignal } from "./run/midturn-precheck.js"; |
| 13 | +import { |
12 | 14 | installContextEngineLoopHook, |
13 | 15 | installToolResultContextGuard, |
14 | 16 | markTranscriptPromptText, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -55,8 +55,6 @@ type MidTurnPrecheckOptions = {
|
55 | 55 | onMidTurnPrecheck?: (request: MidTurnPrecheckRequest) => void; |
56 | 56 | }; |
57 | 57 | |
58 | | -export { CONTEXT_LIMIT_TRUNCATION_NOTICE, formatContextLimitTruncationNotice }; |
59 | | - |
60 | 58 | export function markTranscriptPromptText(message: AgentMessage, text: string): void { |
61 | 59 | Object.defineProperty(message, TRANSCRIPT_PROMPT_TEXT_KEY, { |
62 | 60 | configurable: true, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,10 +4,10 @@
|
4 | 4 | import { createInlineCodeState } from "../../packages/markdown-core/src/code-spans.js"; |
5 | 5 | import { emitAgentEvent } from "../infra/agent-events.js"; |
6 | 6 | import { hasAcceptedSessionSpawn } from "./accepted-session-spawn.js"; |
| 7 | +import { sanitizeForConsole } from "./console-sanitize.js"; |
7 | 8 | import { |
8 | 9 | buildApiErrorObservationFields, |
9 | 10 | buildTextObservationFields, |
10 | | -sanitizeForConsole, |
11 | 11 | shouldSuppressRawErrorConsoleSuffix, |
12 | 12 | } from "./embedded-agent-error-observation.js"; |
13 | 13 | import { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。