mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 03:29:23 +08:00
Adapt the journal foundation from PR #1226 and add a read-only mission, handoff and confirmed-record panel. Share its snapshot with turn injection, preserve corrupt files, and serialize worker writes. Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
19 lines
529 B
Python
19 lines
529 B
Python
"""Read-only view of the workspace's conversational learning journal."""
|
|
|
|
from fastapi import APIRouter, HTTPException
|
|
|
|
from deeptutor.services.learning_journal import get_learning_journal_store
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("")
|
|
def overview():
|
|
try:
|
|
return get_learning_journal_store().overview()
|
|
except (OSError, ValueError) as exc:
|
|
raise HTTPException(
|
|
status_code=409,
|
|
detail="Learning journal could not be read. Its original file has been preserved.",
|
|
) from exc
|