feat(sprint6b): блоки D+F — pending_guard, guard-индикаторы в UI, race-condition fix
- _eval_pending_guard() — вычисляет активный guard при незаполненных слотах - pending_guard добавлен в ThreadStateInfo (ответы /chat и /threads/:id) - ValidationEventInfo получил guard_name / missing_slots / guard_description - Sandbox: amber-блок «guard активен», подсветка в validation-событиях - openThread() защищён от race condition: if (activeThreadId !== id) return (исключает отрисовку устаревшего треда после переключения на новый) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -115,6 +115,7 @@ class ThreadStateInfo(BaseModel):
|
||||
suspended_intent: str | None = None
|
||||
resumable_step_code: str | None = None
|
||||
resumable_slots: dict = Field(default_factory=dict)
|
||||
pending_guard: dict | None = None
|
||||
|
||||
|
||||
class BounceInfo(BaseModel):
|
||||
@@ -129,6 +130,9 @@ class ValidationEventInfo(BaseModel):
|
||||
current_step: str
|
||||
requested_step: str
|
||||
reason: str
|
||||
guard_name: str | None = None
|
||||
missing_slots: list[str] = Field(default_factory=list)
|
||||
guard_description: str = ""
|
||||
|
||||
|
||||
class ThreadDetailResponse(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user