fix: tweak group silent caution prompt (#71209)

* Tighten group silent caution prompt

* Deduplicate group silent caution prompt
This commit is contained in:
Tak Hoffman
2026-04-24 14:20:01 -05:00
committed by GitHub
parent e6d04682d3
commit 5c8a5fa8fa
2 changed files with 9 additions and 4 deletions

View File

@@ -92,7 +92,12 @@ describe("group runtime loading", () => {
silentReplyPolicy: "allow",
});
expect(allowed).toContain('reply with exactly "NO_REPLY"');
expect(allowed).toContain("Otherwise stay silent.");
expect(allowed).toContain('your final answer must still be exactly "NO_REPLY"');
expect(allowed).toContain("Never say that you are staying quiet");
expect(allowed).toContain(
"Be extremely selective: reply only when directly addressed or clearly helpful.",
);
expect(allowed).not.toContain("Otherwise stay silent.");
const disallowed = groups.buildGroupIntro({
cfg: {} as OpenClawConfig,
@@ -104,7 +109,7 @@ describe("group runtime loading", () => {
});
expect(disallowed).toContain("Activation: always-on");
expect(disallowed).not.toContain("NO_REPLY");
expect(disallowed).not.toContain("Otherwise stay silent.");
expect(disallowed).not.toContain("Never say that you are staying quiet");
const rewritten = groups.buildGroupIntro({
cfg: {} as OpenClawConfig,
@@ -116,7 +121,7 @@ describe("group runtime loading", () => {
});
expect(rewritten).toContain('reply with exactly "NO_REPLY"');
expect(rewritten).toContain("short fallback reply");
expect(rewritten).not.toContain("Otherwise stay silent.");
expect(rewritten).not.toContain("Be extremely selective");
});
it("loads the group runtime only when requireMention resolution needs it", async () => {

View File

@@ -281,7 +281,7 @@ export function buildGroupIntro(params: {
: undefined;
const cautionLine =
activation === "always" && params.silentReplyPolicy === "allow"
? "Be extremely selective: reply only when directly addressed or clearly helpful. Otherwise stay silent."
? "Be extremely selective: reply only when directly addressed or clearly helpful."
: undefined;
const lurkLine =
"Be a good group participant: mostly lurk and follow the conversation; reply only when directly addressed or you can add clear value. Emoji reactions are welcome when available.";