@@ -10,6 +10,7 @@ import {
1010 resolveChannelStreamingBlockEnabled ,
1111 resolveChannelStreamingPreviewToolProgress ,
1212} from "openclaw/plugin-sdk/channel-streaming" ;
13+ import { isAbortRequestText } from "openclaw/plugin-sdk/command-primitives-runtime" ;
1314import type {
1415 OpenClawConfig ,
1516 ReplyToMode ,
@@ -22,15 +23,15 @@ import {
2223} from "openclaw/plugin-sdk/outbound-runtime" ;
2324import { clearHistoryEntriesIfEnabled } from "openclaw/plugin-sdk/reply-history" ;
2425import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload" ;
25- import { isAbortRequestText , type ReplyPayload } from "openclaw/plugin-sdk/reply-runtime " ;
26+ import type { ReplyPayload } from "openclaw/plugin-sdk/reply-payload " ;
2627import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env" ;
2728import {
2829 createSubsystemLogger ,
2930 danger ,
3031 logVerbose ,
3132 sleepWithAbort ,
3233} from "openclaw/plugin-sdk/runtime-env" ;
33- import { defaultTelegramBotDeps , type TelegramBotDeps } from "./bot-deps.js" ;
34+ import type { TelegramBotDeps } from "./bot-deps.js" ;
3435import type { TelegramMessageContext } from "./bot-message-context.js" ;
3536import {
3637 findModelInCatalog ,
@@ -215,9 +216,11 @@ export const dispatchTelegramMessage = async ({
215216 streamMode,
216217 textLimit,
217218 telegramCfg,
218- telegramDeps = defaultTelegramBotDeps ,
219+ telegramDeps : injectedTelegramDeps ,
219220 opts,
220221} : DispatchTelegramMessageParams ) => {
222+ const telegramDeps =
223+ injectedTelegramDeps ?? ( await import ( "./bot-deps.js" ) ) . defaultTelegramBotDeps ;
221224 const {
222225 ctxPayload,
223226 msg,
0 commit comments