writeStatuslineState writes a tiny file for the statusline to read.
(root string, intent TaskIntent)
| 748 | |
| 749 | // writeStatuslineState writes a tiny file for the statusline to read. |
| 750 | func writeStatuslineState(root string, intent TaskIntent) { |
| 751 | codemapDir := filepath.Join(root, ".codemap") |
| 752 | status := intent.Category |
| 753 | if intent.RiskLevel != "low" { |
| 754 | status += " " + intent.RiskLevel |
| 755 | } |
| 756 | os.WriteFile(filepath.Join(codemapDir, "status"), []byte(status), 0644) |
| 757 | } |
| 758 | |
| 759 | // emitIntentMarker outputs a structured JSON comment for machine consumption. |
| 760 | func emitIntentMarker(intent TaskIntent) { |