diff --git a/extensions/anthropic/register.runtime.ts b/extensions/anthropic/register.runtime.ts index 25acd2a3a7c..ba9b57090df 100644 --- a/extensions/anthropic/register.runtime.ts +++ b/extensions/anthropic/register.runtime.ts @@ -366,7 +366,6 @@ async function runAnthropicCliMigrationNonInteractive(ctx: { } export function registerAnthropicPlugin(api: OpenClawPluginApi): void { - const claudeCliProfileId = "anthropic:claude-cli"; const providerId = "anthropic"; const defaultAnthropicModel = "anthropic/claude-sonnet-4-6"; const _anthropicOauthAllowlist = [ diff --git a/extensions/discord/src/monitor/agent-components.ts b/extensions/discord/src/monitor/agent-components.ts index e1728178ef2..0e524b8f660 100644 --- a/extensions/discord/src/monitor/agent-components.ts +++ b/extensions/discord/src/monitor/agent-components.ts @@ -63,9 +63,6 @@ import { resolveInteractionCustomId, resolveModalFieldValues, resolvePinnedMainDmOwnerFromAllowlist, - type AgentComponentContext, - type AgentComponentInteraction, - type AgentComponentMessageInteraction, type ComponentInteractionContext, type DiscordChannelContext, } from "./agent-components-helpers.js"; @@ -104,7 +101,7 @@ async function loadComponentsRuntime() { return await componentsRuntimePromise; } -async function loadReplyRuntime() { +async function _loadReplyRuntime() { replyRuntimePromise ??= import("openclaw/plugin-sdk/reply-runtime"); return await replyRuntimePromise; } diff --git a/extensions/discord/src/monitor/threading.ts b/extensions/discord/src/monitor/threading.ts index 8a6cb67a8a0..bae0d9cc123 100644 --- a/extensions/discord/src/monitor/threading.ts +++ b/extensions/discord/src/monitor/threading.ts @@ -672,34 +672,3 @@ export function resolveDiscordReplyDeliveryPlan(params: { }); return { deliverTarget, replyTarget, replyReference }; } -/** - * Extract text from forwarded message snapshots for thread starter resolution. - * Discord forwarded messages have empty `content` and store the original text - * in `message_snapshots[0].message.content`. - */ -function resolveStarterForwardedText( - snapshots?: Array<{ - message?: { - content?: string | null; - attachments?: unknown[]; - embeds?: Array<{ title?: string | null; description?: string | null }>; - sticker_items?: unknown[]; - }; - }>, -): string { - if (!Array.isArray(snapshots) || snapshots.length === 0) { - return ""; - } - const blocks: string[] = []; - for (const snapshot of snapshots) { - const msg = snapshot.message; - if (!msg) { - continue; - } - const text = msg.content?.trim() || resolveDiscordEmbedText(msg.embeds?.[0]) || ""; - if (text) { - blocks.push(`[Forwarded message]\n${text}`); - } - } - return blocks.join("\n\n"); -} diff --git a/extensions/line/src/bot-handlers.test.ts b/extensions/line/src/bot-handlers.test.ts index e4b3e75fea7..f667296bd92 100644 --- a/extensions/line/src/bot-handlers.test.ts +++ b/extensions/line/src/bot-handlers.test.ts @@ -197,15 +197,6 @@ type LineWebhookContext = Parameters ({ log: vi.fn(), error: vi.fn(), exit: vi.fn() }); -function buildDefaultLineMessageContext() { - return { - ctxPayload: { From: "line:group:group-1" }, - replyToken: "reply-token", - route: { agentId: "default" }, - isGroup: true, - accountId: "default", - }; -} function createReplayMessageEvent(params: { messageId: string; groupId: string; diff --git a/extensions/line/src/setup-core.ts b/extensions/line/src/setup-core.ts index 286d9ea164b..84fb1dc5a07 100644 --- a/extensions/line/src/setup-core.ts +++ b/extensions/line/src/setup-core.ts @@ -9,7 +9,6 @@ import { type LineConfig, } from "./setup-runtime-api.js"; -const channel = "line" as const; export function patchLineAccountConfig(params: { cfg: OpenClawConfig; accountId: string;