Fix for re-creating deleted conversation (#12152)

This commit is contained in:
Tim O'Farrell 2025-12-24 12:13:29 -07:00 committed by GitHub
parent 6d14ce420e
commit fe1026ee8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,7 +42,7 @@ from openhands.app_server.user.specifiy_user_context import (
)
from openhands.app_server.user.user_context import UserContext
from openhands.integrations.provider import ProviderType
from openhands.sdk import Event
from openhands.sdk import ConversationExecutionStatus, Event
from openhands.sdk.event import ConversationStateUpdateEvent
from openhands.server.user_auth.default_user_auth import DefaultUserAuth
from openhands.server.user_auth.user_auth import (
@ -111,6 +111,11 @@ async def on_conversation_update(
conversation_info.id, sandbox_info, app_conversation_info_service
)
# If the conversation is being deleted, no action is required...
# Later we may consider deleting the conversation if it exists...
if conversation_info.execution_status == ConversationExecutionStatus.DELETING:
return Success()
app_conversation_info = AppConversationInfo(
id=conversation_info.id,
title=existing.title or f'Conversation {conversation_info.id.hex}',