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:
Vincent Koc
2026-02-20 18:41:32 -08:00
committed by GitHub
parent 0e068194ad
commit 9a6b26d427
5 changed files with 69 additions and 4 deletions

View File

@@ -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);