feat: 支持工作流断点续跑并拆分错误信息存储

- 新增同会话+同工作流最近执行失败且参数一致时断点续跑逻辑
- exec_workflow/exec_chat 新增 error 字段存储原始错误,error_message 仅存友好提示
- 新增 UpdateExecChatReq 与 exec_chat_dao Update 方法
- 新增 GetLatestBySessionAndFlow 查询最近执行记录
- 修正 ListDates 分组与排序 SQL 表达式
- 新增 pipeline 配置结构,删除旧设计文档
This commit is contained in:
2026-08-21 09:54:06 +08:00
parent a939c45508
commit cef837a35c
34 changed files with 1519 additions and 515 deletions
+4 -1
View File
@@ -17,7 +17,8 @@ type ExecWorkflow struct {
Status flow.FlowExecutionStatus `orm:"status" json:"status" description:"状态:1-运行中,2-成功,3-失败"`
TotalTokens int `orm:"total_tokens" json:"totalTokens" description:"总token消耗"`
TotalFee float64 `orm:"total_fee" json:"totalFee" description:"总费用"`
ErrorMessage string `orm:"error_message" json:"errorMessage" description:"错误信息"`
ErrorMessage string `orm:"error_message" json:"errorMessage" description:"错误信息(友好提示)"`
Error string `orm:"error" json:"error" description:"错误明细(原始错误)"`
}
type execWorkflowCol struct {
@@ -31,6 +32,7 @@ type execWorkflowCol struct {
TotalTokens string
TotalFee string
ErrorMessage string
Error string
}
var ExecWorkflowCol = execWorkflowCol{
@@ -44,4 +46,5 @@ var ExecWorkflowCol = execWorkflowCol{
TotalTokens: "total_tokens",
TotalFee: "total_fee",
ErrorMessage: "error_message",
Error: "error",
}