feat(M4.2): 前端会话侧边栏——学科窗口列表/默认流兜底/新建(选学科+继承源)/切换加载历史/判题落库带会话;后端 history 按会话过滤
这个提交包含在:
@@ -24,6 +24,7 @@ class SubmitBody(BaseModel):
|
||||
pretest: bool = False
|
||||
input: str | None = None # pretest 时的自测输入
|
||||
uid: str = "guest"
|
||||
conversation_id: int = 0 # 会话(学科窗口)
|
||||
|
||||
|
||||
def _current(authorization: str | None, session: Session) -> tuple[str, int | None, dict | None]:
|
||||
@@ -51,6 +52,7 @@ async def submit(body: SubmitBody, authorization: str | None = Header(None), ses
|
||||
user_id, "judge", body.code, kind="judge",
|
||||
meta={"rid": result["rid"], "pid": body.pid, "lang": body.lang,
|
||||
"verdict": result.get("verdict", "PENDING"), "score": 0},
|
||||
conversation_id=body.conversation_id if user_id else 0,
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户