refactor: dedupe xai setup record helper

This commit is contained in:
Peter Steinberger
2026-04-06 22:26:36 +01:00
parent 9ba1b91936
commit bd71ddabbd
2 changed files with 2 additions and 5 deletions

View File

@@ -1,8 +1,5 @@
import { definePluginEntry } from "@openclaw/plugin-sdk/plugin-entry";
function isRecord(value: unknown): value is Record<string, unknown> {
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
}
import { isRecord } from "./src/tool-config-shared.js";
export default definePluginEntry({
id: "xai",

View File

@@ -1,6 +1,6 @@
import { normalizeXaiModelId } from "../model-id.js";
function isRecord(value: unknown): value is Record<string, unknown> {
export function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}