Commit c1f080f
committed
feat: 添加前端对 SystemPromptTemplate 更新的完整支持
## 修改内容
### 后端 (api/server.go)
- handleGetTraderConfig 返回中添加 system_prompt_template 字段
### 前端类型定义 (web/src/types.ts)
- TraderConfigData 接口添加 system_prompt_template 字段
### 前端更新逻辑 (web/src/components/AITradersPage.tsx)
- handleSaveEditTrader 的更新请求中添加 system_prompt_template
## 完整数据流
```
后端数据库
↓ handleGetTraderConfig
前端 TraderConfigData (包含 system_prompt_template)
↓ TraderConfigModal (UI 编辑)
前端 UpdateRequest (包含 system_prompt_template)
↓ handleUpdateTrader
后端更新数据库
```
现在前后端已完全打通,用户可以在 UI 中编辑系统提示词模板了。1 parent b0de71b commit c1f080f
3 files changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
| 841 | + | |
841 | 842 | | |
842 | 843 | | |
843 | 844 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| |||
0 commit comments