refactor(speech-core): remove redundant API back-edge

This commit is contained in:
Peter Steinberger
2026-07-14 06:02:37 +01:00
parent e278a34331
commit 25bc6df8cd
7 changed files with 16 additions and 79 deletions

View File

@@ -83,8 +83,8 @@ vi.mock("openclaw/plugin-sdk/channel-targets", () => ({
},
}));
vi.mock("../api.js", async () => {
const actual = await vi.importActual<typeof import("../api.js")>("../api.js");
vi.mock("openclaw/plugin-sdk/speech-core", async () => {
const actual = await vi.importActual("openclaw/plugin-sdk/speech-core");
const mockProvider: SpeechProviderPlugin = {
id: "mock",
label: "Mock",

View File

@@ -27,17 +27,6 @@ import {
import { isVerbose, logVerbose } from "openclaw/plugin-sdk/runtime-env";
import { tempWorkspaceSync, resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/sandbox";
import { privateFileStoreSync } from "openclaw/plugin-sdk/security-runtime";
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalLowercaseString,
normalizeOptionalString,
} from "openclaw/plugin-sdk/string-coerce-runtime";
import { stripMarkdown } from "openclaw/plugin-sdk/text-chunking";
import {
resolveConfigDir,
resolveUserPath,
truncateUtf16Safe,
} from "openclaw/plugin-sdk/text-utility-runtime";
import {
canonicalizeSpeechProviderId,
getSpeechProvider,
@@ -57,7 +46,18 @@ import {
type TtsDirectiveOverrides,
type TtsDirectiveParseResult,
type TtsConfigResolutionContext,
} from "../api.js";
} from "openclaw/plugin-sdk/speech-core";
import {
normalizeLowercaseStringOrEmpty,
normalizeOptionalLowercaseString,
normalizeOptionalString,
} from "openclaw/plugin-sdk/string-coerce-runtime";
import { stripMarkdown } from "openclaw/plugin-sdk/text-chunking";
import {
resolveConfigDir,
resolveUserPath,
truncateUtf16Safe,
} from "openclaw/plugin-sdk/text-utility-runtime";
import { withSpeakerSelectionCompat } from "../speaker.js";
import {
resolvePrimaryVoiceProviderCandidate,