feat: 新增配置与提示词偏好页

后端新增 preferences 与 prompt_customizations 表及对应接口,
支持 BYOK 模型渠道密钥落库(仅回显掩码)与按任务类型定制
平台提示词模板;前端新增 /settings 页面及入口。
This commit is contained in:
tongtong committed 2026-09-21 14:29:54 +08:00
1 parent ae6cdf1551
commit b9df2f84ab
27 files changed
+1515 -22

No files matched your search

+14 -5
View File
@@ -14,11 +14,13 @@ import (
)
type Deps struct {
Canvas *CanvasHandler
Task *TaskHandler
Event *EventHandler
Config config.Config
FileDir string
Canvas *CanvasHandler
Task *TaskHandler
Event *EventHandler
Preference *PreferenceHandler
Prompt *PromptHandler
Config config.Config
FileDir string
}
func NewRouter(deps Deps) *gin.Engine {
@@ -42,6 +44,13 @@ func NewRouter(deps Deps) *gin.Engine {
api.GET("/tasks", deps.Task.List)
api.POST("/tasks", deps.Task.Create)
api.POST("/tasks/:id/cancel", deps.Task.Cancel)
api.GET("/preferences", deps.Preference.Get)
api.PUT("/preferences", deps.Preference.Update)
api.GET("/prompts", deps.Prompt.List)
api.PATCH("/prompts/:operation", deps.Prompt.Customize)
api.DELETE("/prompts/:operation", deps.Prompt.Reset)
}
if deps.FileDir != "" {