fix(web): 校正会话上不再出现可用的普通输入框
send() 对校正会话不发 /api/consult,草稿保留并打开校正面。 普通输入框只有禁用态。咨询接口把类型不对改成 409 session_not_consultation。 删除和回退不再直接切到校正会话。
This commit is contained in:
@@ -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: "请刷新会话后重新发送,本次不会扣点。" },
|
||||
|
||||
Reference in New Issue
Block a user