From 1778231a2dab90849ed71603777d353044749855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=BE=D0=B4=D0=B8=D0=BD=20=D0=A0=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD?= Date: Sat, 26 Sep 2026 10:35:48 +0300 Subject: [PATCH] fix: remove double send in sendMessage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sendMessage ждал responsePromise и отправлял текст ЕЩЁ РАЗ. Но event subscription уже отправил все step-сообщения (с reasoning, tools и text). Убран await matrix.sendReply(context, responseText) — двойная отправка была причиной дубликата. --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index cf27dbc..9d11179 100644 --- a/index.ts +++ b/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)