feat(agent): 云端 Agent - 增加上下文预算、任务事实与终态恢复保障
This commit is contained in:
1 parent
3bf21d79af
commit
b52bc9d5f2
61 files changed
+3512
-309
No files matched your search
@@ -29,7 +29,7 @@ func (r *taskTerminalRepositoryStub) Task(string) (*model.Task, error) {
|
||||
return ©, nil
|
||||
}
|
||||
|
||||
func (r *taskTerminalRepositoryStub) UpdateTaskTerminalState(_ string, _ string, _ model.TaskStatus, status model.TaskStatus, stage string, errorText string, completedAt time.Time) (bool, error) {
|
||||
func (r *taskTerminalRepositoryStub) UpdateTaskTerminalDiagnostic(task *model.Task, completedAt time.Time) (bool, error) {
|
||||
r.terminalCalls++
|
||||
if r.terminalConflict {
|
||||
return false, nil
|
||||
@@ -38,9 +38,7 @@ func (r *taskTerminalRepositoryStub) UpdateTaskTerminalState(_ string, _ string,
|
||||
return false, r.terminalError
|
||||
}
|
||||
if r.task != nil {
|
||||
r.task.Status = status
|
||||
r.task.Stage = stage
|
||||
r.task.Error = errorText
|
||||
*r.task = *task
|
||||
r.task.CompletedAt = &completedAt
|
||||
}
|
||||
return true, nil
|
||||
|
||||
Reference in new issue
Block a user