mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-14 10:41:23 +00:00
refactor: dedupe xai x search config record helper
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import type { OpenClawConfig } from "@openclaw/plugin-sdk/config-runtime";
|
||||
import { isRecord } from "./tool-config-shared.js";
|
||||
|
||||
type JsonRecord = Record<string, unknown>;
|
||||
|
||||
function isRecord(value: unknown): value is JsonRecord {
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
function cloneRecord<T extends JsonRecord | undefined>(value: T): T {
|
||||
if (!value) {
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user