feat(backend): New "update microagent prompt" API (#8357)

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
This commit is contained in:
sp.wack
2025-06-10 22:10:55 +04:00
committed by GitHub
parent 07862c32cb
commit dca9c7bdc6
7 changed files with 738 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
import uuid
from fastapi import Depends, HTTPException, Request, status
from openhands.core.logger import openhands_logger as logger
@@ -18,6 +20,15 @@ async def get_conversation_store(request: Request) -> ConversationStore | None:
return conversation_store
async def generate_unique_conversation_id(
conversation_store: ConversationStore,
) -> str:
conversation_id = uuid.uuid4().hex
while await conversation_store.exists(conversation_id):
conversation_id = uuid.uuid4().hex
return conversation_id
async def get_conversation(
conversation_id: str, user_id: str | None = Depends(get_user_id)
):