feat(ui): explicit chat state machine — typing indicator, streaming progress, timeout and error recovery
This commit is contained in:
@@ -34,6 +34,18 @@ class ChatDoneEvent(BaseModel):
|
||||
suggestions: list[str] = []
|
||||
|
||||
|
||||
class ChatErrorEvent(BaseModel):
|
||||
"""SSE error event: a turn that cannot complete (PLAN §4).
|
||||
|
||||
The client's loading-feedback state machine (phase 06) keys off this
|
||||
exact shape — ``{type: "error", detail: str}`` — to flip to the error
|
||||
state and re-enable the send button.
|
||||
"""
|
||||
|
||||
type: str = "error"
|
||||
detail: str
|
||||
|
||||
|
||||
class DocSummary(BaseModel):
|
||||
"""One indexed document as shown on the Sources page / API."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user