style: resolve lint after rebase

This commit is contained in:
Peter Steinberger
2026-04-06 14:49:32 +01:00
parent af62a2c2e4
commit b3f31dee80
5 changed files with 1 additions and 46 deletions

View File

@@ -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 = [

View File

@@ -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;
}

View File

@@ -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");
}

View File

@@ -197,15 +197,6 @@ type LineWebhookContext = Parameters<typeof import("./bot-handlers.js").handleLi
const createRuntime = () => ({ 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;

View File

@@ -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;