fix(cron): enable completion direct send for text-only announce delivery (#29151)

This commit is contained in:
Dennis Goldfinger
2026-02-28 18:09:07 +01:00
committed by GitHub
parent fe9a7c4082
commit 3096837238
4 changed files with 18 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
import "./isolated-agent.mocks.js";
import { beforeEach, describe, expect, it } from "vitest";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { runSubagentAnnounceFlow } from "../agents/subagent-announce.js";
import {
createCliDeps,
@@ -56,6 +56,10 @@ describe("runCronIsolatedAgentTurn forum topic delivery", () => {
expect(res.status).toBe("ok");
expect(runSubagentAnnounceFlow).toHaveBeenCalledTimes(1);
const announceArgs = vi.mocked(runSubagentAnnounceFlow).mock.calls[0]?.[0] as
| { expectsCompletionMessage?: boolean }
| undefined;
expect(announceArgs?.expectsCompletionMessage).toBe(true);
expect(deps.sendMessageTelegram).not.toHaveBeenCalled();
});
});