feat: refine voice studio attention workflow

This commit is contained in:
2026-04-21 14:19:51 +08:00
parent 8b50674d04
commit 9f74a93274
7 changed files with 1025 additions and 48 deletions

View File

@@ -1,5 +1,7 @@
"""Voice co-creation session APIs."""
from typing import Literal
from fastapi import (
APIRouter,
Depends,
@@ -82,6 +84,10 @@ async def list_voice_sessions(
le=settings.voice_session_max_list_limit,
),
active_only: bool = Query(default=False),
needs_attention: bool = Query(default=False),
attention_reason: (
Literal["pending_confirmation", "safety_intervention", "failed_turn"] | None
) = Query(default=None),
active_first: bool = Query(default=True),
user: User = Depends(require_user),
db: AsyncSession = Depends(get_db),
@@ -92,6 +98,8 @@ async def list_voice_sessions(
db,
limit=limit,
active_only=active_only,
needs_attention=needs_attention,
attention_reason=attention_reason,
active_first=active_first,
)