feat: 添加工作流取消与临时文件管理功能

- 新增临时文件(FileTemp)的实体、DAO和DTO,支持文件临时存储与批量操作
- 实现工作流执行取消功能,使用sync.Map管理context.CancelFunc,支持按会话取消运行中的流程
- 将流程执行状态"暂停"变更为"取消",并处理取消导致的错误
- 引入IsDialogue标识区分对话模式,调整判断/文案/图片节点的表单数据组装逻辑
- 重构ComposeMessagesReq,使用BuildType替代IsBuild和ModelTypeId
- 优化HTML内容提取逻辑,修复文案纯文本与图片URL的标签过滤及标签命名
- 在结果汇总节点中使用事务更新执行状态并批量保存输出文件记录
This commit is contained in:
2026-05-15 09:37:23 +08:00
parent 2c3cbab11d
commit b1ee117f6c
18 changed files with 730 additions and 336 deletions

View File

@@ -0,0 +1,24 @@
package entity
import (
"gitea.com/red-future/common/beans"
)
type FileTemp struct {
beans.SQLBaseDO `orm:",inherit"` // 嵌入基础字段Id, TenantId, Creator, CreatedAt, Updater, UpdatedAt, DeletedAt
BusinessId string `orm:"business_id" json:"businessId"`
FileUrl string `orm:"file_url" json:"fileUrl"`
}
type fileTempCol struct {
beans.SQLBaseCol
BusinessId string
FileUrl string
}
var FileTempCol = fileTempCol{
SQLBaseCol: beans.DefSQLBaseCol,
BusinessId: "business_id",
FileUrl: "file_url",
}

View File

@@ -9,7 +9,6 @@ type SkillTemplate struct {
Name string `orm:"name" json:"name"`
Description string `orm:"description" json:"description"`
Category string `orm:"category" json:"category"`
FileName string `orm:"file_name" json:"fileName"`
FileUrl string `orm:"file_url" json:"fileUrl"`
}
@@ -18,7 +17,6 @@ type skillTemplateCol struct {
beans.SQLBaseCol
Name string
Description string
Category string
FileName string
FileUrl string
}
@@ -27,7 +25,6 @@ var SkillTemplateCol = skillTemplateCol{
SQLBaseCol: beans.DefSQLBaseCol,
Name: "name",
Description: "description",
Category: "category",
FileName: "file_name",
FileUrl: "file_url",
}

View File

@@ -7,7 +7,6 @@ type SkillUser struct {
Name string `orm:"name" json:"name"`
Description string `orm:"description" json:"description"`
Category string `orm:"category" json:"category"`
FileName string `orm:"file_name" json:"fileName"`
FileUrl string `orm:"file_url" json:"fileUrl"`
}
@@ -16,7 +15,6 @@ type skillUserCol struct {
beans.SQLBaseCol
Name string
Description string
Category string
FileName string
FileUrl string
}
@@ -25,7 +23,6 @@ var SkillUserCol = skillUserCol{
SQLBaseCol: beans.DefSQLBaseCol,
Name: "name",
Description: "description",
Category: "category",
FileName: "file_name",
FileUrl: "file_url",
}