mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
refactor(agents): remove tool display record facade
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
* Redacts and summarizes arguments into short labels/details for chat and UI
|
||||
* tool update streams.
|
||||
*/
|
||||
import {
|
||||
asOptionalObjectRecord as asRecord,
|
||||
} from "@openclaw/normalization-core/record-coerce";
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
normalizeOptionalString,
|
||||
@@ -10,7 +13,6 @@ import {
|
||||
import { parseStrictFiniteNumber } from "../infra/parse-finite-number.js";
|
||||
import { redactToolPayloadText } from "../logging/redact.js";
|
||||
import { resolveExecDetail, type ToolDetailMode } from "./tool-display-exec.js";
|
||||
import { asRecord } from "./tool-display-record.js";
|
||||
|
||||
type ToolDisplayActionSpec = {
|
||||
label?: string;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* Turns common shell commands into short redacted labels for tool timelines and transcripts.
|
||||
*/
|
||||
import { asOptionalObjectRecord as asRecord } from "@openclaw/normalization-core/record-coerce";
|
||||
import { redactToolPayloadText } from "../logging/redact.js";
|
||||
import {
|
||||
binaryName,
|
||||
@@ -17,7 +18,6 @@ import {
|
||||
trimLeadingEnv,
|
||||
unwrapShellWrapper,
|
||||
} from "./tool-display-exec-shell.js";
|
||||
import { asRecord } from "./tool-display-record.js";
|
||||
|
||||
function summarizeKnownExec(words: string[]): string {
|
||||
if (words.length === 0) {
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/**
|
||||
* Compatibility export for tool display payload code that wants the shared
|
||||
* optional-record coercion helper under the shorter local name.
|
||||
*/
|
||||
export { asOptionalObjectRecord as asRecord } from "../../packages/normalization-core/src/record-coerce.js";
|
||||
@@ -3,11 +3,11 @@
|
||||
*
|
||||
* Identifies mutating tool calls and file targets so retry/recovery logic can reason about side effects.
|
||||
*/
|
||||
import { asOptionalObjectRecord as asRecord } from "@openclaw/normalization-core/record-coerce";
|
||||
import {
|
||||
normalizeLowercaseStringOrEmpty,
|
||||
normalizeOptionalLowercaseString,
|
||||
} from "@openclaw/normalization-core/string-coerce";
|
||||
import { asRecord } from "./tool-display-record.js";
|
||||
|
||||
const MUTATING_TOOL_NAMES = new Set([
|
||||
"write",
|
||||
|
||||
Reference in New Issue
Block a user