runInteractive executes the runner on a REPL (Read-Eval-Print Loop)
(ctx context.Context)
| 325 | |
| 326 | // runInteractive executes the runner on a REPL (Read-Eval-Print Loop) |
| 327 | func (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 | |
| 346 | var _ idtui.ShellHandler = (*shellCallHandler)(nil) |
| 347 |
no test coverage detected