fix(auto-reply): strip delivery hints from leading metadata · openclaw/openclaw@65e6d9c
obviyus
·
2026-06-14
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -140,6 +140,16 @@ What should I grab on the way?`;
|
140 | 140 | expect(stripLeadingInboundMetadata(input)).toBe("What should I grab on the way?"); |
141 | 141 | }); |
142 | 142 | |
| 143 | +it("strips message-tool delivery hints before leading metadata blocks", () => { |
| 144 | +const input = `${MESSAGE_TOOL_ONLY_DELIVERY_HINT}\n\n${CONV_BLOCK}\n\nActual user message`; |
| 145 | +expect(stripLeadingInboundMetadata(input)).toBe("Actual user message"); |
| 146 | +}); |
| 147 | + |
| 148 | +it("strips message-tool delivery hints before leading user text", () => { |
| 149 | +const input = `${MESSAGE_TOOL_ONLY_DELIVERY_HINT}\n\nActual user message`; |
| 150 | +expect(stripLeadingInboundMetadata(input)).toBe("Actual user message"); |
| 151 | +}); |
| 152 | + |
143 | 153 | it("strips an active-memory prompt prefix block from leading-only history views even when earlier text precedes it", () => { |
144 | 154 | const input = `Queued earlier user turn\n\n${ACTIVE_MEMORY_PREFIX_BLOCK}\n\nWhat should I grab on the way?`; |
145 | 155 | expect(stripLeadingInboundMetadata(input)).toBe( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。