MCPcopy Index your code
hub / github.com/coder/coder / GetPaths

Method GetPaths

agent/agentgit/pathstore.go:90–104  ·  view source on GitHub ↗

GetPaths returns all paths tracked for a chat, deduplicated and sorted lexicographically.

(chatID uuid.UUID)

Source from the content-addressed store, hash-verified

88// GetPaths returns all paths tracked for a chat, deduplicated
89// and sorted lexicographically.
90func (ps *PathStore) GetPaths(chatID uuid.UUID) []string {
91 ps.mu.RLock()
92 defer ps.mu.RUnlock()
93
94 m := ps.chatPaths[chatID]
95 if len(m) == 0 {
96 return nil
97 }
98 out := make([]string, 0, len(m))
99 for p := range m {
100 out = append(out, p)
101 }
102 slices.Sort(out)
103 return out
104}
105
106// Len returns the number of chat IDs that have tracked paths.
107func (ps *PathStore) Len() int {

Calls

no outgoing calls