diff --git a/extensions/feishu/src/comment-shared.ts b/extensions/feishu/src/comment-shared.ts
index 1ae0976a687..41ce3c178e5 100644
--- a/extensions/feishu/src/comment-shared.ts
+++ b/extensions/feishu/src/comment-shared.ts
@@ -1,5 +1,4 @@
import {
- asOptionalRecord,
hasNonEmptyString as sharedHasNonEmptyString,
isRecord as sharedIsRecord,
normalizeOptionalString,
@@ -25,8 +24,6 @@ export const normalizeString = normalizeOptionalString;
export const isRecord = sharedIsRecord;
-export const asRecord = asOptionalRecord;
-
export const hasNonEmptyString = sharedHasNonEmptyString;
export function formatFeishuApiError(
@@ -359,10 +356,6 @@ export function parseCommentContentElements(params: {
};
}
-export function extractCommentElementText(element: unknown): string | undefined {
- return parseCommentContentElements({ elements: [element] }).plainText;
-}
-
export function extractReplyText(
reply: { content?: { elements?: unknown[] } } | undefined,
): string | undefined {
diff --git a/extensions/feishu/src/mention.ts b/extensions/feishu/src/mention.ts
index 86d4e2ad06d..8d477827203 100644
--- a/extensions/feishu/src/mention.ts
+++ b/extensions/feishu/src/mention.ts
@@ -83,20 +83,6 @@ export function isMentionForwardRequest(event: FeishuMessageEvent, botOpenId?: s
return hasBotMention && hasOtherMention;
}
-/**
- * Extract message body from text (remove @ placeholders)
- */
-export function extractMessageBody(text: string, allMentionKeys: string[]): string {
- let result = text;
-
- // Remove all @ placeholders
- for (const key of allMentionKeys) {
- result = result.replace(new RegExp(escapeRegExp(key), "g"), "");
- }
-
- return result.replace(/\s+/g, " ").trim();
-}
-
/**
* Format @mention for text message
*/
@@ -104,13 +90,6 @@ export function formatMentionForText(target: MentionTarget): string {
return `${target.name}`;
}
-/**
- * Format @everyone for text message
- */
-export function formatMentionAllForText(): string {
- return `Everyone`;
-}
-
/**
* Format @mention for card message (lark_md)
*/
@@ -118,13 +97,6 @@ export function formatMentionForCard(target: MentionTarget): string {
return ``;
}
-/**
- * Format @everyone for card message
- */
-export function formatMentionAllForCard(): string {
- return ``;
-}
-
/**
* Build complete message with @mentions (text format)
*/
diff --git a/extensions/feishu/src/monitor.startup.ts b/extensions/feishu/src/monitor.startup.ts
index 2c684038ff1..378cff41dd2 100644
--- a/extensions/feishu/src/monitor.startup.ts
+++ b/extensions/feishu/src/monitor.startup.ts
@@ -72,11 +72,3 @@ export async function fetchBotIdentityForMonitor(
}
return {};
}
-
-export async function fetchBotOpenIdForMonitor(
- account: ResolvedFeishuAccount,
- options: FetchBotOpenIdOptions = {},
-): Promise {
- const identity = await fetchBotIdentityForMonitor(account, options);
- return identity.botOpenId;
-}
diff --git a/extensions/feishu/src/targets.ts b/extensions/feishu/src/targets.ts
index 7f64ca1f1db..dd2c6b29934 100644
--- a/extensions/feishu/src/targets.ts
+++ b/extensions/feishu/src/targets.ts
@@ -53,17 +53,6 @@ export function normalizeFeishuTarget(raw: string): string | null {
return withoutProvider;
}
-export function formatFeishuTarget(id: string, type?: FeishuIdType): string {
- const trimmed = id.trim();
- if (type === "chat_id" || trimmed.startsWith(CHAT_ID_PREFIX)) {
- return `chat:${trimmed}`;
- }
- if (type === "open_id" || trimmed.startsWith(OPEN_ID_PREFIX)) {
- return `user:${trimmed}`;
- }
- return trimmed;
-}
-
export function resolveReceiveIdType(id: string): "chat_id" | "open_id" | "user_id" {
const trimmed = id.trim();
const lowered = normalizeLowercaseStringOrEmpty(trimmed);
diff --git a/extensions/googlechat/src/auth.ts b/extensions/googlechat/src/auth.ts
index 54e68146500..8de0737d137 100644
--- a/extensions/googlechat/src/auth.ts
+++ b/extensions/googlechat/src/auth.ts
@@ -199,8 +199,6 @@ export async function verifyGoogleChatRequest(params: {
return { ok: false, reason: "unsupported audience type" };
}
-export const GOOGLE_CHAT_SCOPE = CHAT_SCOPE;
-
export const __testing = {
resetGoogleChatAuthForTests(): void {
authCache.clear();
diff --git a/extensions/googlechat/src/monitor.ts b/extensions/googlechat/src/monitor.ts
index 5e744289938..aa66233e2e8 100644
--- a/extensions/googlechat/src/monitor.ts
+++ b/extensions/googlechat/src/monitor.ts
@@ -433,7 +433,3 @@ export function resolveGoogleChatWebhookPath(params: {
}) ?? "/googlechat"
);
}
-
-export function computeGoogleChatMediaMaxMb(params: { account: ResolvedGoogleChatAccount }) {
- return params.account.config.mediaMaxMb ?? 20;
-}
diff --git a/extensions/qqbot/src/engine/messaging/streaming-media-send.ts b/extensions/qqbot/src/engine/messaging/streaming-media-send.ts
index a962ee239c7..77dc854545d 100644
--- a/extensions/qqbot/src/engine/messaging/streaming-media-send.ts
+++ b/extensions/qqbot/src/engine/messaging/streaming-media-send.ts
@@ -6,7 +6,6 @@
*/
import type { GatewayAccount } from "../types.js";
-import { normalizeMediaTags } from "../utils/media-tags.js";
import { normalizePath } from "../utils/platform.js";
import {
sendPhoto,
@@ -161,21 +160,6 @@ export function isInsideCodeBlock(text: string, position: number): boolean {
// ============ 媒体标签解析 ============
-/**
- * 检测文本是否包含富媒体标签(忽略代码块内的标签)
- */
-export function hasMediaTags(text: string): boolean {
- const normalized = normalizeMediaTags(text);
- const regex = createMediaTagRegex();
- let match: RegExpExecArray | null;
- while ((match = regex.exec(normalized)) !== null) {
- if (!isInsideCodeBlock(normalized, match.index)) {
- return true;
- }
- }
- return false;
-}
-
/** findFirstClosedMediaTag 的返回值 */
export interface FirstClosedMediaTag {
/** 标签前的纯文本 */