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

Function nextStepNumber

coderd/x/chatd/chatdebug/recorder.go:145–152  ·  view source on GitHub ↗
(runID uuid.UUID)

Source from the content-addressed store, hash-verified

143}
144
145func nextStepNumber(runID uuid.UUID) int32 {
146 val, _ := stepCounters.LoadOrStore(runID, &atomic.Int32{})
147 counter, ok := val.(*atomic.Int32)
148 if !ok {
149 panic("chatdebug: invalid step counter type")
150 }
151 return counter.Add(1)
152}
153
154// CleanupStepCounter removes per-run step counter and reference count
155// state. This is used by tests and later stacked branches that have a

Calls 2

LoadOrStoreMethod · 0.80
AddMethod · 0.65