Skip to content

Commit fd40983

Browse files
committed
fix(crestodian): use truncateUtf16Safe for config get output truncation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 6ad8a77 commit fd40983

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/crestodian/operations.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { buildAgentMainSessionKey, normalizeAgentId } from "../routing/session-k
1111
import type { RuntimeEnv } from "../runtime.js";
1212
import type { TuiResult } from "../tui/tui-types.js";
1313
import { resolveUserPath, shortenHomePath } from "../utils.js";
14+
import { truncateUtf16Safe } from "@openclaw/normalization-core/utf16-slice";
1415
import { appendCrestodianAuditEntry, resolveCrestodianAuditPath } from "./audit.js";
1516
import type { CrestodianOverview } from "./overview.js";
1617

@@ -962,7 +963,7 @@ export async function executeCrestodianOperation(
962963
const rendered = JSON.stringify(redacted, null, 2) ?? "null";
963964
runtime.log(
964965
rendered.length > CONFIG_GET_OUTPUT_MAX_CHARS
965-
? `${operation.path} = ${rendered.slice(0, CONFIG_GET_OUTPUT_MAX_CHARS)}\n… (truncated)`
966+
? `${operation.path} = ${truncateUtf16Safe(rendered, CONFIG_GET_OUTPUT_MAX_CHARS)}\n… (truncated)`
966967
: `${operation.path} = ${rendered}`,
967968
);
968969
return { applied: false };

0 commit comments

Comments
 (0)