mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-30 22:23:37 +00:00
refactor(plugins): drop unused web-channel send wrapper
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// Runtime web-channel plugin helpers expose web-channel tools through activated plugin runtimes.
|
||||
import type { OpenClawConfig } from "../../config/types.openclaw.js";
|
||||
import {
|
||||
getDefaultLocalRoots as getDefaultLocalRootsImpl,
|
||||
loadWebMedia as loadWebMediaImpl,
|
||||
@@ -60,23 +59,6 @@ type WebChannelHeavyRuntimeModule = {
|
||||
runtime?: unknown,
|
||||
accountId?: string,
|
||||
) => Promise<void>;
|
||||
sendMessageWhatsApp: (
|
||||
to: string,
|
||||
body: string,
|
||||
options: {
|
||||
verbose: boolean;
|
||||
cfg?: OpenClawConfig;
|
||||
mediaUrl?: string;
|
||||
mediaAccess?: {
|
||||
localRoots?: readonly string[];
|
||||
readFile?: (filePath: string) => Promise<Buffer>;
|
||||
};
|
||||
mediaLocalRoots?: readonly string[];
|
||||
mediaReadFile?: (filePath: string) => Promise<Buffer>;
|
||||
gifPlayback?: boolean;
|
||||
accountId?: string;
|
||||
},
|
||||
) => Promise<{ messageId: string; toJid: string }>;
|
||||
monitorWebChannel: (...args: unknown[]) => Promise<unknown>;
|
||||
monitorWebInbox: (...args: unknown[]) => Promise<unknown>;
|
||||
startWebLoginWithQr: (...args: unknown[]) => Promise<unknown>;
|
||||
@@ -234,13 +216,6 @@ export function webAuthExists(
|
||||
return getLightExport("webAuthExists")(...args);
|
||||
}
|
||||
|
||||
/** Sends a web-channel message through the heavy runtime API. */
|
||||
export function sendWebChannelMessage(
|
||||
...args: Parameters<WebChannelHeavyRuntimeModule["sendMessageWhatsApp"]>
|
||||
): ReturnType<WebChannelHeavyRuntimeModule["sendMessageWhatsApp"]> {
|
||||
return loadWebChannelHeavyModule().then((loaded) => loaded.sendMessageWhatsApp(...args));
|
||||
}
|
||||
|
||||
/** Formats a web-channel runtime error through the light runtime API. */
|
||||
export function formatError(
|
||||
...args: Parameters<WebChannelLightRuntimeModule["formatError"]>
|
||||
|
||||
Reference in New Issue
Block a user