Skip to content

Commit 79c1463

Browse files
committed
remove the Hr Agent lower case
1 parent 78c6ff9 commit 79c1463

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/frontend_react/src/components/content/PlanChat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const PlanChat: React.FC<PlanChatProps> = ({
6363
<Body1>
6464
<div className="plan-chat-message-content">
6565
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypePrism]}>
66-
{msg.content || ""}
66+
{TaskService.cleanHRAgent(msg.content) || ""}
6767
</ReactMarkdown>
6868

6969
{!isHuman && (

src/frontend_react/src/services/TaskService.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ export class TaskService {
132132
// Clean up multiple spaces and trim
133133
cleanedText = cleanedText.replace(/\s+/g, ' ').trim();
134134

135+
return cleanedText;
136+
}
137+
138+
static cleanHRAgent(text: string): string {
139+
if (!text) return '';
140+
// Replace any non-alphanumeric character with a space
141+
let cleanedText = text.replace("Hr_Agent", "HR Agent").replace("Hr Agent", "HR Agent").trim();
142+
143+
135144
return cleanedText;
136145
}
137146
/**

0 commit comments

Comments
 (0)