Skip to content

Commit 6b090e8

Browse files
Add debugging logs and update ConversationInfo interface
- Add debug logging to see actual conversation data structure - Update ConversationInfo interface to include stats field from API response - Add optional fields like title, created_at, updated_at to match API Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 87c22d3 commit 6b090e8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

example/src/components/ConversationManager.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const ConversationManager: React.FC = () => {
5151
setError(null);
5252
try {
5353
const conversationList = await manager.getAllConversations();
54+
console.log('Loaded conversations:', conversationList); // Debug log
5455
setConversations(conversationList.map(conv => ({ ...conv, isLoading: false })));
5556
} catch (err) {
5657
setError(err instanceof Error ? err.message : 'Failed to load conversations');
@@ -307,6 +308,7 @@ export const ConversationManager: React.FC = () => {
307308
key={conversation.id}
308309
className={`conversation-item ${selectedConversation === conversation.id ? 'selected' : ''}`}
309310
onClick={() => {
311+
console.log('Selected conversation:', conversation); // Debug log
310312
setSelectedConversation(conversation.id);
311313
loadConversationDetails(conversation.id);
312314
}}

src/models/conversation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ export interface ConversationInfo {
2020
agent: AgentBase;
2121
workspace: any;
2222
persistence_dir: string;
23-
conversation_stats: ConversationStats;
23+
conversation_stats?: ConversationStats;
24+
stats?: any; // API returns stats instead of conversation_stats
25+
title?: string;
26+
created_at?: string;
27+
updated_at?: string;
2428
[key: string]: any;
2529
}
2630

0 commit comments

Comments
 (0)