MCPcopy
hub / github.com/idank/explainshell / _handle_output

Function _handle_output

explainshell/extraction/runner.py:554–562  ·  view source on GitHub ↗

Tally results and invoke callbacks in the main thread.

(output: _BatchOutput)

Source from the content-addressed store, hash-verified

552 manifest.set_total_batches(total_batches)
553
554 def _handle_output(output: _BatchOutput) -> None:
555 """Tally results and invoke callbacks in the main thread."""
556 result.stats.input_tokens += output.usage.input_tokens
557 result.stats.output_tokens += output.usage.output_tokens
558 result.stats.reasoning_tokens += output.usage.reasoning_tokens
559 for entry in output.entries:
560 _tally(result, entry)
561 if on_result:
562 on_result(entry.gz_path, entry)
563
564 inflight = _InflightBatches()
565

Callers 1

run_batchFunction · 0.85

Calls 2

_tallyFunction · 0.85
on_resultFunction · 0.50

Tested by

no test coverage detected