(ctx context.Context, logger slog.Logger)
| 338 | } |
| 339 | |
| 340 | func (r *Runner) handleMessagePartEvent(ctx context.Context, logger slog.Logger) { |
| 341 | if r.sawTurnFirstOutput { |
| 342 | return |
| 343 | } |
| 344 | r.sawTurnFirstOutput = true |
| 345 | r.result.sawFirstOutput = true |
| 346 | firstOutputDuration := time.Since(r.turnStartTime) |
| 347 | r.cfg.Metrics.ChatTimeToFirstOutputSeconds.WithLabelValues(r.currentPhase).Observe(firstOutputDuration.Seconds()) |
| 348 | logger.Info(ctx, "chat received first output", |
| 349 | slog.F("phase", r.currentPhase), |
| 350 | slog.F("duration", firstOutputDuration), |
| 351 | ) |
| 352 | } |
| 353 | |
| 354 | func (r *Runner) handleRetryEvent(ctx context.Context, logger slog.Logger, retry *codersdk.ChatStreamRetry) { |
| 355 | r.result.retryCount++ |
no test coverage detected