fix(web): 校正会话上不再出现可用的普通输入框
Independent Staging Quality Gate / validate (push) Canceled after 5m37s
Independent Staging Quality Gate / publish (push) Canceled after 0s

send() 对校正会话不发 /api/consult,草稿保留并打开校正面。
普通输入框只有禁用态。咨询接口把类型不对改成 409 session_not_consultation。
删除和回退不再直接切到校正会话。
This commit is contained in:
jesse-ux
2026-09-17 20:06:25 +08:00
parent f6db3c7709
commit 6d81062be9
17 changed files with 417 additions and 38 deletions
+11 -1
View File
@@ -305,12 +305,22 @@ export async function POST(request: Request) {
{ status: 503 },
);
}
if (!chatSession || chatSession.session_type !== "consultation") {
if (!chatSession) {
return NextResponse.json(
{ error: "咨询会话不存在", message: "请重新进入咨询。" },
{ status: 404 },
);
}
if (chatSession.session_type !== "consultation") {
return NextResponse.json(
{
error: "这是生时校正会话",
code: "session_not_consultation",
message: "请在生时校正里继续。",
},
{ status: 409 },
);
}
if (!chatSession.model_id || chatSession.model_id !== parsed.data.modelId) {
return NextResponse.json(
{ error: "会话模型已经变化", message: "请刷新会话后重新发送,本次不会扣点。" },