MCPcopy Create free account
hub / github.com/JordanCoin/codemap / showWorkingSetSummary

Function showWorkingSetSummary

cmd/hooks.go:889–914  ·  view source on GitHub ↗

showWorkingSetSummary displays the current working set from daemon state.

(root string)

Source from the content-addressed store, hash-verified

887
888// showWorkingSetSummary displays the current working set from daemon state.
889func 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
916func extractMentionedFiles(prompt string, limit int) []string {
917 if limit <= 0 {

Callers 1

hookPromptSubmitFunction · 0.85

Calls 4

ReadStateFunction · 0.92
SizeMethod · 0.80
HotFilesMethod · 0.80
HubCountMethod · 0.80

Tested by

no test coverage detected