File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
openhands-sdk/openhands/sdk/conversation Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -199,15 +199,24 @@ def _create_event_panel(self, event: Event) -> Panel | None:
199199 }
200200 role_color = role_colors .get (event .llm_message .role , "white" )
201201
202- # Use "to" for user messages (user sending to agent)
203- # and "from" for assistant messages
204- direction = "to" if event .llm_message .role == "user" else "from"
205- title_text = f"[bold { role_color } ]Message { direction } "
206- if self ._name_for_visualization :
207- title_text += f"{ self ._name_for_visualization } Agent"
202+ # "User Message To [Name] Agent" for user
203+ # "Message from [Name] Agent" for agent
204+ agent_name = (
205+ f"{ self ._name_for_visualization } "
206+ if self ._name_for_visualization
207+ else ""
208+ )
209+
210+ if event .llm_message .role == "user" :
211+ title_text = (
212+ f"[bold { role_color } ]User Message to "
213+ f"{ agent_name } Agent[/bold { role_color } ]"
214+ )
208215 else :
209- title_text += event .source .capitalize ()
210- title_text += f"[/bold { role_color } ]"
216+ title_text = (
217+ f"[bold { role_color } ]Message from "
218+ f"{ agent_name } Agent[/bold { role_color } ]"
219+ )
211220 return Panel (
212221 content ,
213222 title = title_text ,
You can’t perform that action at this time.
0 commit comments