mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
refactor: dedupe elevenlabs talk record helper
This commit is contained in:
@@ -22,7 +22,7 @@ type ElevenLabsApiKeyDeps = {
|
||||
|
||||
export const ELEVENLABS_TALK_PROVIDER_ID = "elevenlabs";
|
||||
|
||||
function isRecord(value: unknown): value is JsonRecord {
|
||||
export function isRecord(value: unknown): value is JsonRecord {
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { ChannelDoctorLegacyConfigRule } from "openclaw/plugin-sdk/channel-contract";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { ELEVENLABS_TALK_PROVIDER_ID, migrateElevenLabsLegacyTalkConfig } from "./config-compat.js";
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
||||
}
|
||||
import {
|
||||
ELEVENLABS_TALK_PROVIDER_ID,
|
||||
isRecord,
|
||||
migrateElevenLabsLegacyTalkConfig,
|
||||
} from "./config-compat.js";
|
||||
|
||||
export function hasLegacyTalkFields(value: unknown): boolean {
|
||||
const talk = isRecord(value) ? value : null;
|
||||
|
||||
Reference in New Issue
Block a user