enh(run): defer prompt_toolkit import until prompting - #903
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
|
The only red check is the docs dependency-install step, before repository code runs. The job selected Python 3.14; resolving the current full extra pulled litellm 1.92.0, whose pyo3-ffi 0.23.5 build supports at most Python 3.13 and exits during wheel construction. This PR changes only the prompt_toolkit import location and does not modify dependencies or workflows. The other six checks pass, modified lines are covered, and the PR is approved. The docs job should pass once that environment uses Python 3.13 or the upstream PyO3 constraint is updated. |
Co-Authored-By: Aiden <aiden@weco.ai>
7e0158b to
5cb8970
Compare
|
Rebased onto current main at |
|
Re-verified against today's
Nothing outstanding from my side. Happy to rebase onto current |
Summary
This follows a review suggestion from PR #749.
Performance
Measured with Python 3.11 in the same isolated environment, using 31 fresh interpreters after 5 warmups:
minisweagent.run.miniimporte187bcb2)That is a 53.80% reduction (2.16x faster) for fresh module import.
This benchmark measures fresh module import only. CLI help is a correctness gate, not a separately timed metric. It does not measure normal default agent execution, and
prompt_toolkitremains a required dependency.Validation
uvx ruff check --fix .uvx ruff format --check .pylint minisweagent/ --errors-onlygit diff --checkAutoresearch
Supplementary autoresearch: 20-step public dashboard.