feat(chat): 支持滑动删除灵感回复与H5回车发送
- 会话列表:水平滑动展开删除、桌面快捷入口、模态确认及失败重试 - 灵感回复:按上下文生成建议,仅加入草稿,保留原输入并取消过期请求 - 输入交互:移除回车发送的屏宽限制,保护中文输入法,支持Shift换行与手机换行按钮
This commit is contained in:
@@ -33,13 +33,16 @@ async function proxy(
|
||||
const { path } = await context.params;
|
||||
const joined = path.join("/");
|
||||
if (
|
||||
!/^(bootstrap|profile|exposure|decisions\/[a-zA-Z0-9_-]+|conversations(?:\/[a-zA-Z0-9_-]+(?:\/(?:stream|stop|branch|messages\/[a-zA-Z0-9_-]+))?)?)$/.test(
|
||||
!/^(bootstrap|profile|exposure|decisions\/[a-zA-Z0-9_-]+|conversations(?:\/[a-zA-Z0-9_-]+(?:\/(?:stream|stop|branch|suggestions|messages\/[a-zA-Z0-9_-]+))?)?)$/.test(
|
||||
joined,
|
||||
)
|
||||
)
|
||||
return Response.json({ message: "接口不存在" }, { status: 404 });
|
||||
if (joined.startsWith("decisions/") && request.method !== "GET")
|
||||
return Response.json({ message: "仅支持读取决策" }, {status:405,headers:{Allow:"GET"}});
|
||||
return Response.json(
|
||||
{ message: "仅支持读取决策" },
|
||||
{ status: 405, headers: { Allow: "GET" } },
|
||||
);
|
||||
if (request.method !== "GET") {
|
||||
const origin = request.headers.get("origin");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user