mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
Fix for re-creating deleted conversation (#12152)
This commit is contained in:
parent
6d14ce420e
commit
fe1026ee8a
@ -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}',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user