mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
refactor: dedupe xai setup record helper
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user