MCPcopy Create free account
hub / github.com/dagger/dagger / runInteractive

Method runInteractive

cmd/dagger/shell.go:327–344  ·  view source on GitHub ↗

runInteractive executes the runner on a REPL (Read-Eval-Print Loop)

(ctx context.Context)

Source from the content-addressed store, hash-verified

325
326// runInteractive executes the runner on a REPL (Read-Eval-Print Loop)
327func (h *shellCallHandler) runInteractive(ctx context.Context) error {
328 h.repl = true
329
330 ctx, cancel := context.WithCancel(ctx)
331 defer cancel()
332 h.cancel = cancel
333
334 // give ourselves a blank slate by zooming into a passthrough span
335 ctx, shellSpan := Tracer().Start(ctx, "shell", telemetry.Passthrough())
336 defer shellSpan.End()
337 Frontend.SetPrimary(dagui.SpanID{SpanID: shellSpan.SpanContext().SpanID()})
338 slog.SetDefault(slog.SpanLogger(ctx, InstrumentationLibrary))
339
340 // Start the shell loop (either in LLM mode or normal shell mode)
341 Frontend.Shell(ctx, h)
342
343 return nil
344}
345
346var _ idtui.ShellHandler = (*shellCallHandler)(nil)
347

Callers 2

RunAllMethod · 0.95

Calls 9

SetDefaultFunction · 0.92
SpanLoggerFunction · 0.92
TracerFunction · 0.70
StartMethod · 0.65
SetPrimaryMethod · 0.65
ShellMethod · 0.65
EndMethod · 0.45
SpanIDMethod · 0.45
SpanContextMethod · 0.45

Tested by

no test coverage detected