feat:用户修改步骤后重新执行实现
This commit is contained in:
@@ -221,6 +221,19 @@ export const useAgentsStore = defineStore('agents', () => {
|
||||
|
||||
// 当前的展示的任务流程
|
||||
const currentTask = ref<IRawStepTask>()
|
||||
|
||||
// 记录用户修改过的步骤索引(用于重新执行)
|
||||
const modifiedSteps = ref<Set<number>>(new Set())
|
||||
function addModifiedStep(stepIndex: number) {
|
||||
modifiedSteps.value.add(stepIndex)
|
||||
}
|
||||
function clearModifiedSteps() {
|
||||
modifiedSteps.value.clear()
|
||||
}
|
||||
function hasModifiedSteps() {
|
||||
return modifiedSteps.value.size > 0
|
||||
}
|
||||
|
||||
function setCurrentTask(task: IRawStepTask) {
|
||||
const existingTask = currentTask.value
|
||||
|
||||
@@ -472,6 +485,11 @@ export const useAgentsStore = defineStore('agents', () => {
|
||||
// 停止填充状态
|
||||
hasStoppedFilling,
|
||||
setHasStoppedFilling,
|
||||
// 重新执行相关
|
||||
modifiedSteps,
|
||||
addModifiedStep,
|
||||
clearModifiedSteps,
|
||||
hasModifiedSteps,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user