| 1 | package agent |
| 2 | |
| 3 | import "reasonix/internal/provider" |
| 4 | |
| 5 | // outcomeRunState preserves explicit execution evidence before image enrichment. |
| 6 | // The fallback covers older and synthetic outcomes that have no image prepass. |
| 7 | func outcomeRunState(o toolOutcome) provider.ToolRunState { |
| 8 | if o.runState != "" { |
| 9 | return o.runState |
| 10 | } |
| 11 | if !o.executed { |
| 12 | return provider.ToolRunNotStarted |
| 13 | } |
| 14 | return provider.ToolResultRunState(provider.Message{Content: o.output + "\n" + o.errMsg}) |
| 15 | } |
| 16 |