Skip to content

Commit ad9c65e

Browse files
Fix conversation display by using correct API response fields
- Use agent.kind instead of agent.name (API returns kind: 'Agent') - Display created_at timestamp instead of non-existent conversation_stats - Add fallback for both kind and name fields to handle API variations - Fix both conversation list and detail views Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 6b090e8 commit ad9c65e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

example/src/components/ConversationManager.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,10 @@ export const ConversationManager: React.FC = () => {
325325
Status: {conversation.agent_status}
326326
</div>
327327
<div className="conversation-stats">
328-
Events: {conversation.conversation_stats?.total_events || 0} |
329-
Messages: {conversation.conversation_stats?.message_events || 0}
328+
Created: {conversation.created_at ? new Date(conversation.created_at).toLocaleString() : 'Unknown'}
330329
</div>
331330
<div className="conversation-agent">
332-
Agent: {conversation.agent?.name || 'Unknown'}
331+
Agent: {(conversation.agent as any)?.kind || conversation.agent?.name || 'Unknown'}
333332
</div>
334333
</div>
335334
<div className="conversation-actions">
@@ -368,7 +367,7 @@ export const ConversationManager: React.FC = () => {
368367
></span>
369368
{conv.agent_status}
370369
</p>
371-
<p><strong>Agent:</strong> {conv.agent?.name}</p>
370+
<p><strong>Agent:</strong> {(conv.agent as any)?.kind || conv.agent?.name || 'Unknown'}</p>
372371
<p><strong>Model:</strong> {conv.agent?.llm?.model}</p>
373372
<p><strong>Total Events:</strong> {conversationEvents.length}</p>
374373
<p><strong>Messages:</strong> {conversationEvents.filter(e => e.event_type === 'message').length}</p>

0 commit comments

Comments
 (0)