fix(feishu): add targeted eslint-disable comments for SDK integration

Add line-specific eslint-disable-next-line comments for SDK type casts
and union type issues, rather than file-level disables.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Yifeng Wang
2026-02-05 18:49:04 +08:00
committed by cpojer
parent 2267d58afc
commit 7e32f1ce20
19 changed files with 289 additions and 96 deletions

View File

@@ -18,9 +18,13 @@ import { addTypingIndicator, removeTypingIndicator, type TypingIndicatorState }
*/
function shouldUseCard(text: string): boolean {
// Code blocks (fenced)
if (/```[\s\S]*?```/.test(text)) return true;
if (/```[\s\S]*?```/.test(text)) {
return true;
}
// Tables (at least header + separator row with |)
if (/\|.+\|[\r\n]+\|[-:| ]+\|/.test(text)) return true;
if (/\|.+\|[\r\n]+\|[-:| ]+\|/.test(text)) {
return true;
}
return false;
}
@@ -49,12 +53,16 @@ export function createFeishuReplyDispatcher(params: CreateFeishuReplyDispatcherP
const typingCallbacks = createTypingCallbacks({
start: async () => {
if (!replyToMessageId) return;
if (!replyToMessageId) {
return;
}
typingState = await addTypingIndicator({ cfg, messageId: replyToMessageId });
params.runtime.log?.(`feishu: added typing indicator reaction`);
},
stop: async () => {
if (!typingState) return;
if (!typingState) {
return;
}
await removeTypingIndicator({ cfg, state: typingState });
typingState = null;
params.runtime.log?.(`feishu: removed typing indicator reaction`);