aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/AnswerParser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/ChatBox/AnswerParser.ts')
-rw-r--r--src/client/views/nodes/ChatBox/AnswerParser.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/nodes/ChatBox/AnswerParser.ts b/src/client/views/nodes/ChatBox/AnswerParser.ts
index b18083a27..05d26b8de 100644
--- a/src/client/views/nodes/ChatBox/AnswerParser.ts
+++ b/src/client/views/nodes/ChatBox/AnswerParser.ts
@@ -9,6 +9,7 @@ export class AnswerParser {
const followUpQuestionsRegex = /<follow_up_questions>([\s\S]*?)<\/follow_up_questions>/;
const questionRegex = /<question>(.*?)<\/question>/g;
const groundedTextRegex = /<grounded_text citation_index="([^"]+)">([\s\S]*?)<\/grounded_text>/g;
+ const normalTextRegex = /<normal_text>([\s\S]*?)<\/normal_text>/g;
const answerMatch = answerRegex.exec(xml);
const citationsMatch = citationsRegex.exec(xml);
@@ -49,6 +50,8 @@ export class AnswerParser {
}
}
+ rawTextContent = rawTextContent.replace(normalTextRegex, '$1');
+
// Parse text content (normal and grounded)
let lastIndex = 0;
let match;