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

Function ContextWithStep

coderd/x/chatd/chatdebug/context.go:54–59  ·  view source on GitHub ↗

ContextWithStep stores sc in ctx.

(ctx context.Context, sc *StepContext)

Source from the content-addressed store, hash-verified

52
53// ContextWithStep stores sc in ctx.
54func ContextWithStep(ctx context.Context, sc *StepContext) context.Context {
55 if sc == nil {
56 panic("chatdebug: nil StepContext")
57 }
58 return context.WithValue(ctx, stepContextKey{}, sc)
59}
60
61// StepFromContext returns the debug step context stored in ctx.
62func StepFromContext(ctx context.Context) (*StepContext, bool) {

Callers 4

beginStepFunction · 0.85

Calls

no outgoing calls

Tested by 3