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

Method Reload

agent/x/agentmcp/manager.go:174–183  ·  view source on GitHub ↗

Reload ensures the tool cache reflects the current config. If config files differ from the last snapshot, a singleflight differential reconnect is driven and Reload waits for it. If the snapshot is current, Reload returns immediately. Starting and running the reload is manager-scoped. Caller conte

(ctx context.Context, paths []string)

Source from the content-addressed store, hash-verified

172// may bound only that caller's wait for the reload result. They are
173// never passed to, and must not suppress, the reload body.
174func (m *Manager) Reload(ctx context.Context, paths []string) error {
175 ch, started, err := m.startReloadIfNeeded(paths)
176 if err != nil {
177 return err
178 }
179 if !started {
180 return nil
181 }
182 return m.waitReload(ctx, ch, 0)
183}
184
185// MarkStartupSettled marks startup scripts as terminal for MCP
186// config purposes. Missing config files after this point are a real

Calls 2

startReloadIfNeededMethod · 0.95
waitReloadMethod · 0.95