Fix for issue where stats are not updated for conversations (#12688)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Tim O'Farrell
2026-01-30 08:12:38 -07:00
committed by GitHub
parent 37d9b672a4
commit 0b8c69fad2
2 changed files with 5 additions and 0 deletions

View File

@@ -126,6 +126,7 @@ async def on_conversation_update(
pr_number=existing.pr_number,
# Preserve parent/child relationship and other metadata
parent_conversation_id=existing.parent_conversation_id,
metrics=conversation_info.stats.get_combined_metrics(),
)
await app_conversation_info_service.save_app_conversation_info(
app_conversation_info

View File

@@ -91,6 +91,10 @@ def mock_conversation_info() -> ConversationInfo:
conversation_info.agent.llm = MagicMock()
conversation_info.agent.llm.model = 'gpt-4'
# Mock stats.get_combined_metrics() structure
conversation_info.stats = MagicMock()
conversation_info.stats.get_combined_metrics.return_value = None
return conversation_info