mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 06:21:26 +00:00
fix(ui): strip inbound metadata blocks and guard reply-tag streaming (clean rewrite) (#22346)
* fix(ui): strip inbound metadata blocks from user messages * chore: clean up metadata-strip format and changelog credit * Update src/shared/chat-envelope.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
@@ -21,6 +21,9 @@ import {
|
||||
const stripTrailingDirective = (text: string): string => {
|
||||
const openIndex = text.lastIndexOf("[[");
|
||||
if (openIndex < 0) {
|
||||
if (text.endsWith("[")) {
|
||||
return text.slice(0, -1);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
const closeIndex = text.indexOf("]]", openIndex + 2);
|
||||
|
||||
Reference in New Issue
Block a user