(record *AgentTaskRecord, status, terminationReason string)
| 648 | } |
| 649 | |
| 650 | func (rt *AgentTaskRuntime) setForegroundTaskTerminal(record *AgentTaskRecord, status, terminationReason string) { |
| 651 | if record == nil { |
| 652 | return |
| 653 | } |
| 654 | rt.mu.Lock() |
| 655 | defer rt.mu.Unlock() |
| 656 | current := rt.records[record.TaskID] |
| 657 | if current == nil { |
| 658 | return |
| 659 | } |
| 660 | current.Status = status |
| 661 | current.TerminationReason = terminationReason |
| 662 | current.UpdatedAt = nowSeconds() |
| 663 | } |
| 664 | |
| 665 | func (rt *AgentTaskRuntime) finishReusableIdle(taskID, result string) { |
| 666 | rt.mu.Lock() |
no test coverage detected