fix: remove double send in sendMessage
sendMessage ждал responsePromise и отправлял текст ЕЩЁ РАЗ. Но event subscription уже отправил все step-сообщения (с reasoning, tools и text). Убран await matrix.sendReply(context, responseText) — двойная отправка была причиной дубликата.
This commit is contained in:
parent
a91cac7131
commit
1778231a2d
2
index.ts
2
index.ts
|
|
@ -455,7 +455,7 @@ async function runPlugin(ctx: any, options: any, dataDir: string) {
|
|||
|
||||
const responseText = await responsePromise
|
||||
session.outputChars += responseText.length
|
||||
await matrix.sendReply(context, responseText)
|
||||
// Step messages already sent by event subscription — no double send
|
||||
} catch (err: any) {
|
||||
log(`Error processing message: ${String(err)}`)
|
||||
const errMsg = err?.response?.error?.message || String(err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue