adeshboudh16
bug fix on chat page
dbc9192
from typing import Annotated, Literal, TypedDict
from langgraph.graph.message import add_messages
class InterviewState(TypedDict):
# Static β€” set once at session start
topic_name: str
session_id: str
student_id: str
questions_remaining: list[dict] # [{"question_text": str, "difficulty": str}]
past_best_score: int | None
past_weak_areas: list[str]
# Dynamic β€” mutates during session
messages: Annotated[list, add_messages] # appended via reducer
conversation_summary: str
questions_asked: list[str]
student_weak_areas: list[str]
turn_count: int
awaiting_counter_response: bool
counter_questions_asked: int # global cap β€” max 2 per interview
last_verdict: str | None # "strong" | "shallow" | "wrong" | None
# Terminal β€” set once at end
status: Literal["active", "complete"]
score: int | None
feedback: dict | None