refactor(agents): use silent token constant in prompts

This commit is contained in:
sebslight
2026-02-16 08:19:15 -05:00
parent e3e8046a93
commit 553d17f8af
7 changed files with 65 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { SILENT_REPLY_TOKEN } from "../auto-reply/tokens.js";
const agentSpy = vi.fn(async () => ({ runId: "run-main", status: "ok" }));
const sessionsDeleteSpy = vi.fn();
@@ -222,7 +223,7 @@ describe("subagent announce formatting", () => {
expect(msg).toContain("[sessionId: child-session-usage]");
expect(msg).toContain("A completed subagent task is ready for user delivery.");
expect(msg).toContain(
"Reply ONLY: NO_REPLY if this exact result was already delivered to the user in this same turn.",
`Reply ONLY: ${SILENT_REPLY_TOKEN} if this exact result was already delivered to the user in this same turn.`,
);
expect(msg).toContain("step-0");
expect(msg).toContain("step-139");