惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
B
Blog
A
About on SuperTechFans
大猫的无限游戏
大猫的无限游戏
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
IT之家
IT之家
D
Docker
Google DeepMind News
Google DeepMind News
罗磊的独立博客
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
博客园 - 叶小钗
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
博客园 - 司徒正美
Engineering at Meta
Engineering at Meta

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
chore(deadcode): share telegram send runtime loader · ope...
vincentkoc · 2026-06-21 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -6,6 +6,7 @@ import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";

66

import { listSkillCommandsForAgents } from "openclaw/plugin-sdk/skill-commands-runtime";

77

import type { TelegramBotDeps } from "./bot-deps.js";

88

import { syncTelegramMenuCommands } from "./bot-native-command-menu.js";

9+

import { loadTelegramSendModule } from "./send-runtime.js";

910
1011

export type TelegramNativeCommandDeps = Pick<

1112

TelegramBotDeps,

@@ -19,13 +20,6 @@ export type TelegramNativeCommandDeps = Pick<

1920

getPluginCommandSpecs?: typeof getPluginCommandSpecs;

2021

};

2122
22-

let telegramSendRuntimePromise: Promise<typeof import("./send.js")> | undefined;

23-
24-

async function loadTelegramSendRuntime() {

25-

telegramSendRuntimePromise ??= import("./send.js");

26-

return await telegramSendRuntimePromise;

27-

}

28-
2923

export const defaultTelegramNativeCommandDeps: TelegramNativeCommandDeps = {

3024

get getRuntimeConfig() {

3125

return getRuntimeConfig;

@@ -46,7 +40,7 @@ export const defaultTelegramNativeCommandDeps: TelegramNativeCommandDeps = {

4640

return getPluginCommandSpecs;

4741

},

4842

async editMessageTelegram(...args) {

49-

const { editMessageTelegram } = await loadTelegramSendRuntime();

43+

const { editMessageTelegram } = await loadTelegramSendModule();

5044

return await editMessageTelegram(...args);

5145

},

5246

};

Original file line numberDiff line numberDiff line change

@@ -92,6 +92,7 @@ import { withTelegramStartupProbeSlot } from "./startup-probe-limiter.js";

9292

import { detectTelegramLegacyStateMigrations } from "./state-migrations.js";

9393

import { collectTelegramStatusIssues } from "./status-issues.js";

9494

import { parseTelegramTarget } from "./targets.js";

95+

import { loadTelegramSendModule } from "./send-runtime.js";

9596

import {

9697

createTelegramThreadBindingManager,

9798

setTelegramThreadBindingIdleTimeoutBySessionKey,

@@ -104,14 +105,8 @@ import { parseTelegramTopicConversation } from "./topic-conversation.js";

104105

type TelegramSendFn = typeof import("./send.js").sendMessageTelegram;

105106

type TelegramUpdateOffsetRuntime = typeof import("../update-offset-runtime-api.js");

106107
107-

let telegramSendModulePromise: Promise<typeof import("./send.js")> | undefined;

108108

let telegramUpdateOffsetRuntimePromise: Promise<TelegramUpdateOffsetRuntime> | undefined;

109109
110-

async function loadTelegramSendModule() {

111-

telegramSendModulePromise ??= import("./send.js");

112-

return await telegramSendModulePromise;

113-

}

114-
115110

async function loadTelegramUpdateOffsetRuntime() {

116111

telegramUpdateOffsetRuntimePromise ??= import("../update-offset-runtime-api.js");

117112

return await telegramUpdateOffsetRuntimePromise;

Original file line numberDiff line numberDiff line change

@@ -24,24 +24,17 @@ import { resolveTelegramInlineButtons } from "./button-types.js";

2424

import { splitTelegramHtmlChunks } from "./format.js";

2525

import { resolveTelegramInteractiveTextFallback } from "./interactive-fallback.js";

2626

import { parseTelegramReplyToMessageId, parseTelegramThreadId } from "./outbound-params.js";

27+

import { loadTelegramSendModule, type TelegramSendModule } from "./send-runtime.js";

2728

import { normalizeTelegramOutboundTarget, parseTelegramTarget } from "./targets.js";

2829
2930

export const TELEGRAM_TEXT_CHUNK_LIMIT = 4000;

3031

export const TELEGRAM_POLL_OPTION_LIMIT = 10;

3132
3233

type TelegramSendFn = typeof import("./send.js").sendMessageTelegram;

33-

type TelegramSendModule = typeof import("./send.js");

3434

type TelegramSendOpts = Parameters<TelegramSendFn>[2];

3535

type ResolveTelegramSendFn = (deps?: OutboundSendDeps) => Promise<TelegramSendFn>;

3636

type LoadTelegramSendModuleFn = () => Promise<TelegramSendModule>;

3737
38-

let telegramSendModulePromise: Promise<typeof import("./send.js")> | undefined;

39-
40-

async function loadTelegramSendModule(): Promise<TelegramSendModule> {

41-

telegramSendModulePromise ??= import("./send.js");

42-

return await telegramSendModulePromise;

43-

}

44-
4538

async function resolveDefaultTelegramSend(deps?: OutboundSendDeps): Promise<TelegramSendFn> {

4639

return (

4740

resolveOutboundSendDep<TelegramSendFn>(deps, "telegram") ??

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,9 @@

1+

// Telegram plugin module owns the lazy send runtime import.

2+

export type TelegramSendModule = typeof import("./send.js");

3+
4+

let telegramSendModulePromise: Promise<TelegramSendModule> | undefined;

5+
6+

export async function loadTelegramSendModule(): Promise<TelegramSendModule> {

7+

telegramSendModulePromise ??= import("./send.js");

8+

return await telegramSendModulePromise;

9+

}

Original file line numberDiff line numberDiff line change

@@ -22,6 +22,7 @@ import { logVerbose } from "openclaw/plugin-sdk/runtime-env";

2222

import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";

2323

import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";

2424

import { getTelegramRuntime } from "./runtime.js";

25+

import { loadTelegramSendModule } from "./send-runtime.js";

2526

import { resolveTelegramToken } from "./token.js";

2627
2728

const DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS = 24 * 60 * 60 * 1000;

@@ -31,14 +32,8 @@ const STORE_VERSION = 1;

3132

export const TELEGRAM_THREAD_BINDINGS_NAMESPACE = "telegram.thread-bindings";

3233

export const TELEGRAM_THREAD_BINDINGS_MAX_ENTRIES = 5_000;

3334
34-

let telegramSendModulePromise: Promise<typeof import("./send.js")> | undefined;

3535

let threadBindingStoreForTest: PluginStateSyncKeyedStore<TelegramThreadBindingRecord> | undefined;

3636
37-

async function loadTelegramSendModule() {

38-

telegramSendModulePromise ??= import("./send.js");

39-

return await telegramSendModulePromise;

40-

}

41-
4237

type TelegramBindingTargetKind = "subagent" | "acp";

4338
4439

type TelegramThreadBindingRecord = {