Skip to content

Commit 8114bdc

Browse files
authored
Merge pull request #5195 from Drilmo/fix/filter-internal-verification-tags
fix: filter internal verification tags from user-facing output
2 parents 73b5f79 + 3f3cc47 commit 8114bdc

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"kilo-code": patch
3+
---
4+
5+
Filter internal verification tags from assistant messages before displaying to users
6+
7+
Internal XML tags (`<internal_verification>`) used for skill evaluation control flow were leaking to the chat interface. These tags are now filtered out in `presentAssistantMessage.ts`, similar to how `<thinking>` tags are already handled.

src/core/assistant-message/presentAssistantMessage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ export async function presentAssistantMessage(cline: Task) {
336336
content = content.replace(/<thinking>\s?/g, "")
337337
content = content.replace(/\s?<\/thinking>/g, "")
338338

339+
// Remove internal verification tags (for skill evaluation control flow)
340+
content = content.replace(/<internal_verification>[\s\S]*?<\/internal_verification>/g, "") // kilocode_change
341+
339342
// Remove partial XML tag at the very end of the content (for
340343
// tool use and thinking tags), Prevents scrollview from
341344
// jumping when tags are automatically removed.

0 commit comments

Comments
 (0)