feat(llm): двухфазный жизненный цикл сессий, двусторонний Diff, Topic Drift Guard и актуализация документации
This commit is contained in:
@@ -82,5 +82,12 @@ def update_draft_endpoint(
|
||||
if not state or state.get("state_type") != "PROMPT_PREVIEW":
|
||||
raise HTTPException(status_code=400, detail="Нет активного превью для редактирования")
|
||||
|
||||
db_set_session_state(req.session_id, "PROMPT_PREVIEW", {"draft_text": req.draft_text.strip()})
|
||||
# Сохраняем чистый текст с пометкой MANUAL_EDIT
|
||||
db_set_session_state(req.session_id, "PROMPT_PREVIEW", {
|
||||
"draft_text": req.draft_text.strip(),
|
||||
"action": "MANUAL_EDIT",
|
||||
"section_id": None,
|
||||
"item_id": None,
|
||||
"content": ""
|
||||
})
|
||||
return {"status": "success", "message": "Черновик успешно обновлен в сессии"}
|
||||
Reference in New Issue
Block a user