fix(feishu): skip typing indicator on old messages after context compaction (#30418)
This commit is contained in:
committed by
Peter Steinberger
parent
5b06c8c6e3
commit
7fbc40f821
@@ -168,6 +168,7 @@ export type FeishuMessageEvent = {
|
||||
chat_type: "p2p" | "group";
|
||||
message_type: string;
|
||||
content: string;
|
||||
create_time?: string;
|
||||
mentions?: Array<{
|
||||
key: string;
|
||||
id: {
|
||||
@@ -1168,6 +1169,11 @@ export async function handleFeishuMessage(params: {
|
||||
...mediaPayload,
|
||||
});
|
||||
|
||||
// Parse message create_time (Feishu uses millisecond epoch string).
|
||||
const messageCreateTimeMs = event.message.create_time
|
||||
? parseInt(event.message.create_time, 10)
|
||||
: undefined;
|
||||
|
||||
const { dispatcher, replyOptions, markDispatchIdle } = createFeishuReplyDispatcher({
|
||||
cfg,
|
||||
agentId: route.agentId,
|
||||
@@ -1179,6 +1185,7 @@ export async function handleFeishuMessage(params: {
|
||||
rootId: ctx.rootId,
|
||||
mentionTargets: ctx.mentionTargets,
|
||||
accountId: account.accountId,
|
||||
messageCreateTimeMs,
|
||||
});
|
||||
|
||||
log(`feishu[${account.accountId}]: dispatching to agent (session=${route.sessionKey})`);
|
||||
|
||||
Reference in New Issue
Block a user