feat(web): 重构前端UI并支持OpenAI协议
- 添加账号管理详情页(基本信息、提示词、CapCut、参考图标签页) - 重构资产页面,按项目组分开展示图片/视频 - 聊天界面支持深度思考内容折叠展示、复制、删除消息 - 设置页面支持Agent配置(Anthropic/OpenAI协议)和工具配置 - 后端支持OpenAI兼容协议流式输出和DeepSeek思考模式 - 添加对话置顶/删除功能、数据库迁移、资产清单API - 添加账号参考图上传/删除、技能配置持久化、连接测试API
This commit is contained in:
@@ -19,7 +19,7 @@ pipelineRouter.get('/conversations', (req, res) => {
|
||||
sql += ' WHERE title LIKE ?';
|
||||
params.push(`%${search}%`);
|
||||
}
|
||||
sql += ' ORDER BY updated_at DESC LIMIT 100';
|
||||
sql += ' ORDER BY pinned DESC, updated_at DESC LIMIT 100';
|
||||
const rows = getDb().prepare(sql).all(...params);
|
||||
res.json(rows);
|
||||
});
|
||||
@@ -36,13 +36,19 @@ pipelineRouter.delete('/conversations/:id', (req, res) => {
|
||||
res.status(204).send();
|
||||
});
|
||||
|
||||
// Rename conversation
|
||||
// Update conversation (rename / toggle pin)
|
||||
pipelineRouter.patch('/conversations/:id', (req, res) => {
|
||||
const { title } = req.body;
|
||||
if (!title) return res.status(400).json({ error: 'title required' });
|
||||
getDb().prepare(
|
||||
'UPDATE conversations SET title = ?, updated_at = datetime(\'now\') WHERE id = ?'
|
||||
).run(title, req.params.id);
|
||||
const { title, pinned } = req.body;
|
||||
if (title !== undefined) {
|
||||
getDb().prepare(
|
||||
'UPDATE conversations SET title = ?, updated_at = datetime(\'now\') WHERE id = ?'
|
||||
).run(title, req.params.id);
|
||||
}
|
||||
if (pinned !== undefined) {
|
||||
getDb().prepare(
|
||||
'UPDATE conversations SET pinned = ?, updated_at = datetime(\'now\') WHERE id = ?'
|
||||
).run(pinned ? 1 : 0, req.params.id);
|
||||
}
|
||||
res.json({ ok: true });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user