mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 17:51:22 +00:00
refactor: dedupe tool mutation record helper
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { asRecord } from "./tool-display-record.js";
|
||||
|
||||
const MUTATING_TOOL_NAMES = new Set([
|
||||
"write",
|
||||
"edit",
|
||||
@@ -56,10 +58,6 @@ export type ToolActionRef = {
|
||||
actionFingerprint?: string;
|
||||
};
|
||||
|
||||
function asRecord(value: unknown): Record<string, unknown> | undefined {
|
||||
return value && typeof value === "object" ? (value as Record<string, unknown>) : undefined;
|
||||
}
|
||||
|
||||
function normalizeActionName(value: unknown): string | undefined {
|
||||
if (typeof value !== "string") {
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user