mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
style: resolve lint after rebase
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user