feat(agent): 支持自定义系统提示词进行对话
Some checks failed
Build and Deploy / deploy (push) Has been cancelled

- 前端 API 新增 customSystemPrompt 参数,agentId 变为可选
- 聊天抽屉支持自定义提示词时传递参数并调整宽度
- 我的收藏模态框返回提示词内容供聊天使用
- 后端 Dify 服务优先使用自定义提示词,支持无 agentId 的对话
- Dify 请求 VO 中 agentId 改为非必填,新增 customSystemPrompt 字段
This commit is contained in:
2026-04-11 16:22:11 +08:00
parent e169065653
commit 09a567a542
5 changed files with 35 additions and 13 deletions

View File

@@ -60,6 +60,7 @@ async function loadList() {
promptList.value = res.data.map(item => ({
id: item.id,
name: item.name,
content: item.content,
category: item.category,
useCount: item.useCount || 0
}))
@@ -95,7 +96,8 @@ function handleUse(item) {
emit('chat', {
id: item.id,
name: item.name,
categoryName: item.category || '我的风格'
categoryName: item.category || '我的风格',
customSystemPrompt: item.content
})
handleClose()
}