refactor: Update credential synchronization to async Gitea fetch and simplify root HTML serving.

This commit is contained in:
2026-03-24 02:26:23 +00:00
parent cb729809a9
commit 2480846e31
3 changed files with 27 additions and 12 deletions

View File

@@ -10,7 +10,7 @@ from fastapi.templating import Jinja2Templates
from dotenv import load_dotenv
from starlette.concurrency import run_in_threadpool
from ai_agent import query_agent
from ai_agent import query_agent_async
from config import get_config, save_config
from credential_manager import fetch_from_gitea_repo_async
from orchestrator import (
@@ -58,7 +58,7 @@ async def get_system_status(is_auth: bool = Depends(verify_password)):
async def web_chat(message: dict, is_auth: bool = Depends(verify_password)):
user_text = message.get("text", "")
if not user_text: return {"reply": "Vazio."}
reply = query_agent(user_text)
reply = await query_agent_async(user_text)
return {"reply": reply}
@app.post("/api/orchestrate")