fix(telegram): hide acknowledged failed-tool warnings from chat (#72410)

* fix(telegram): hide acknowledged failed-tool warnings from chat

* fix(clownfish): address review for ghcrawl-207034-agentic-merge (1)

* fix(clownfish): address review for ghcrawl-207034-agentic-merge (1)
This commit is contained in:
Vincent Koc
2026-04-26 23:29:19 -07:00
committed by GitHub
parent ca44ab65e6
commit dcff28d285
4 changed files with 140 additions and 3 deletions

View File

@@ -2887,6 +2887,33 @@ describe("dispatchTelegramMessage draft streaming", () => {
);
});
it("finalizes explicit failed-action replies without a standalone warning delivery", async () => {
const draftStream = createDraftStream(999);
createTelegramDraftStream.mockReturnValue(draftStream);
dispatchReplyWithBufferedBlockDispatcher.mockImplementation(
async ({ dispatcherOptions, replyOptions }) => {
await replyOptions?.onPartialReply?.({ text: "Let me update that file." });
await dispatcherOptions.deliver(
{ text: "I couldn't update the file, so no changes were applied." },
{ kind: "final" },
);
return { queuedFinal: true };
},
);
deliverReplies.mockResolvedValue({ delivered: true });
await dispatchWithContext({ context: createContext(), streamMode: "block" });
expect(editMessageTelegram).toHaveBeenCalledWith(
123,
999,
"I couldn't update the file, so no changes were applied.",
expect.any(Object),
);
expect(deliverReplies).not.toHaveBeenCalled();
expect(draftStream.clear).not.toHaveBeenCalled();
});
it("clears preview for error-only finals", async () => {
const draftStream = createDraftStream(999);
createTelegramDraftStream.mockReturnValue(draftStream);