mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 08:41:23 +00:00
build: fix ineffective dynamic imports with lazy boundaries (#33690)
Merged via squash.
Prepared head SHA: 38b3c23d6f
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
a4850b1b8f
commit
21e8d88c1d
@@ -3,6 +3,14 @@ import type { OpenClawConfig } from "../config/config.js";
|
||||
import { logVerbose, shouldLogVerbose } from "../globals.js";
|
||||
import { isDeliverableMessageChannel } from "../utils/message-channel.js";
|
||||
|
||||
let deliverRuntimePromise: Promise<typeof import("../infra/outbound/deliver-runtime.js")> | null =
|
||||
null;
|
||||
|
||||
function loadDeliverRuntime() {
|
||||
deliverRuntimePromise ??= import("../infra/outbound/deliver-runtime.js");
|
||||
return deliverRuntimePromise;
|
||||
}
|
||||
|
||||
export const DEFAULT_ECHO_TRANSCRIPT_FORMAT = '📝 "{transcript}"';
|
||||
|
||||
function formatEchoTranscript(transcript: string, format: string): string {
|
||||
@@ -43,7 +51,7 @@ export async function sendTranscriptEcho(params: {
|
||||
const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
|
||||
|
||||
try {
|
||||
const { deliverOutboundPayloads } = await import("../infra/outbound/deliver.js");
|
||||
const { deliverOutboundPayloads } = await loadDeliverRuntime();
|
||||
await deliverOutboundPayloads({
|
||||
cfg,
|
||||
channel: normalizedChannel,
|
||||
|
||||
1
src/media-understanding/providers/image-runtime.ts
Normal file
1
src/media-understanding/providers/image-runtime.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { describeImageWithModel } from "./image.js";
|
||||
Reference in New Issue
Block a user