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

Function RunFromContext

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

RunFromContext returns the debug run context stored in ctx.

(ctx context.Context)

Source from the content-addressed store, hash-verified

43
44// RunFromContext returns the debug run context stored in ctx.
45func RunFromContext(ctx context.Context) (*RunContext, bool) {
46 rc, ok := ctx.Value(runContextKey{}).(*RunContext)
47 if !ok {
48 return nil, false
49 }
50 return rc, true
51}
52
53// ContextWithStep stores sc in ctx.
54func ContextWithStep(ctx context.Context, sc *StepContext) context.Context {

Callers 9

TestRunFromContextAbsentFunction · 0.92
startCompactionDebugRunFunction · 0.92
GenerateMethod · 0.85
StreamMethod · 0.85
GenerateObjectMethod · 0.85
StreamObjectMethod · 0.85
beginStepFunction · 0.85

Calls 1

ValueMethod · 0.45

Tested by 3

TestRunFromContextAbsentFunction · 0.74