fix: harden Feishu comment-thread delivery (#59129)

* fix: harden Feishu comment-thread delivery

* fix: harden Feishu comment-thread delivery (#59129) (thanks @wittam-01)

---------

Co-authored-by: George Zhang <georgezhangtj97@gmail.com>
This commit is contained in:
wittam-01
2026-04-02 15:31:52 +08:00
committed by GitHub
parent a5cd921053
commit ce0ff42ff5
9 changed files with 1559 additions and 111 deletions

View File

@@ -8,7 +8,7 @@ import { resolveFeishuRuntimeAccount } from "./accounts.js";
import { createFeishuClient } from "./client.js";
import { createFeishuCommentReplyDispatcher } from "./comment-dispatcher.js";
import { buildFeishuCommentTarget } from "./comment-target.js";
import { replyComment } from "./drive.js";
import { deliverCommentThreadText } from "./drive.js";
import { maybeCreateDynamicAgent } from "./dynamic-agent.js";
import {
resolveDriveCommentEventTurn,
@@ -108,11 +108,12 @@ export async function handleFeishuCommentEvent(
);
},
sendPairingReply: async (text) => {
await replyComment(client, {
await deliverCommentThreadText(client, {
file_token: turn.fileToken,
file_type: turn.fileType,
comment_id: turn.commentId,
content: text,
is_whole_comment: turn.isWholeComment,
});
},
onReplyError: (err) => {
@@ -221,6 +222,7 @@ export async function handleFeishuCommentEvent(
fileToken: turn.fileToken,
fileType: turn.fileType,
commentId: turn.commentId,
isWholeComment: turn.isWholeComment,
});
log(