fix(discord): prompt agents to suppress link embeds (#78614) · openclaw/openclaw@197edaa
steipete
·
2026-05-07
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,6 +31,7 @@ describe("group runtime loading", () => {
|
31 | 31 | "You are in a WhatsApp group chat. Your replies are automatically sent to this group chat. Do not use the message tool to send to this same group - just reply normally.", |
32 | 32 | ); |
33 | 33 | expect(groupChatContext).toContain("Minimize empty lines and use normal chat conventions"); |
| 34 | +expect(groupChatContext).not.toContain("wrap bare URLs"); |
34 | 35 | expect(groupChatContext).toContain("prefer delegating bounded side investigations early"); |
35 | 36 | expect(groupChatContext).toContain("Keep the critical path local"); |
36 | 37 | expect(groupChatContext).toContain('reply with exactly "NO_REPLY"'); |
@@ -43,6 +44,8 @@ describe("group runtime loading", () => {
|
43 | 44 | expect(toolOnlyContext).toContain("Normal final replies are private"); |
44 | 45 | expect(toolOnlyContext).toContain("message tool with action=send"); |
45 | 46 | expect(toolOnlyContext).toContain("Be a good group participant"); |
| 47 | +expect(toolOnlyContext).toContain("wrap bare URLs"); |
| 48 | +expect(toolOnlyContext).toContain("<https://example.com>"); |
46 | 49 | expect(toolOnlyContext).toContain("do not call message(action=send)"); |
47 | 50 | expect(toolOnlyContext).not.toContain('reply with exactly "NO_REPLY"'); |
48 | 51 | expect( |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -245,6 +245,9 @@ export function buildGroupChatContext(params: {
|
245 | 245 | lines.push( |
246 | 246 | "Write like a human. Avoid Markdown tables. Minimize empty lines and use normal chat conventions, not document-style spacing. Don't type literal \\n sequences; use real line breaks sparingly.", |
247 | 247 | ); |
| 248 | +if (normalizeOptionalLowercaseString(params.sessionCtx.Provider) === "discord") { |
| 249 | +lines.push("Discord: wrap bare URLs like <https://example.com> to suppress embeds."); |
| 250 | +} |
248 | 251 | lines.push( |
249 | 252 | "When subagent or session-spawn tools are available and a directly requested group-chat task will require several tool calls, prefer delegating bounded side investigations early so the channel gets a responsive path forward. Keep the critical path local, avoid subagents for simple one-step work, and only surface concise group-visible updates when they add value.", |
250 | 253 | ); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。