showWorkingSetSummary displays the current working set from daemon state.
(root string)
| 887 | |
| 888 | // showWorkingSetSummary displays the current working set from daemon state. |
| 889 | func showWorkingSetSummary(root string) { |
| 890 | state := watch.ReadState(root) |
| 891 | if state == nil || state.WorkingSet == nil || state.WorkingSet.Size() == 0 { |
| 892 | return |
| 893 | } |
| 894 | |
| 895 | ws := state.WorkingSet |
| 896 | hot := ws.HotFiles(5) |
| 897 | if len(hot) == 0 { |
| 898 | return |
| 899 | } |
| 900 | |
| 901 | fmt.Println() |
| 902 | fmt.Printf("🔧 Working set: %d files", ws.Size()) |
| 903 | if ws.HubCount() > 0 { |
| 904 | fmt.Printf(" (%d hubs)", ws.HubCount()) |
| 905 | } |
| 906 | fmt.Println() |
| 907 | for _, wf := range hot { |
| 908 | hubStr := "" |
| 909 | if wf.IsHub { |
| 910 | hubStr = " ⚠️HUB" |
| 911 | } |
| 912 | fmt.Printf(" • %s (%d edits, %+d lines%s)\n", wf.Path, wf.EditCount, wf.NetDelta, hubStr) |
| 913 | } |
| 914 | } |
| 915 | |
| 916 | func extractMentionedFiles(prompt string, limit int) []string { |
| 917 | if limit <= 0 { |
no test coverage detected