File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff 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 && (
Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments