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

Function newChatConfigCache

coderd/x/chatd/configcache.go:100–111  ·  view source on GitHub ↗
(ctx context.Context, db database.Store, clock quartz.Clock)

Source from the content-addressed store, hash-verified

98}
99
100func newChatConfigCache(ctx context.Context, db database.Store, clock quartz.Clock) *chatConfigCache {
101 return &chatConfigCache{
102 db: db,
103 clock: clock,
104 ctx: ctx,
105 modelConfigs: make(map[uuid.UUID]cachedModelConfig),
106 userPrompts: tlru.New[uuid.UUID](
107 tlru.ConstantCost[string],
108 chatConfigUserPromptEntryLimit,
109 ),
110 }
111}
112
113// singleflightDoChan wraps a singleflight group's DoChan method,
114// allowing the caller to abandon the wait if their context is

Calls 1

NewMethod · 0.65