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

Method storeAdvisorConfig

coderd/x/chatd/configcache.go:507–519  ·  view source on GitHub ↗
(generation uint64, config codersdk.AdvisorConfig)

Source from the content-addressed store, hash-verified

505}
506
507func (c *chatConfigCache) storeAdvisorConfig(generation uint64, config codersdk.AdvisorConfig) {
508 c.mu.Lock()
509 defer c.mu.Unlock()
510
511 if c.advisorConfigGeneration != generation {
512 return
513 }
514
515 c.advisorConfig = &cachedAdvisorConfig{
516 config: config,
517 expiresAt: c.clock.Now().Add(chatConfigAdvisorConfigTTL),
518 }
519}

Callers 1

AdvisorConfigMethod · 0.95

Calls 3

AddMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected