mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
fix: tweak group silent caution prompt (#71209)
* Tighten group silent caution prompt * Deduplicate group silent caution prompt
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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.";
|
||||
|
||||
Reference in New Issue
Block a user