chore: Remove deprecated dead code from Rust runtime - #244
Conversation
|
Thanks for the pull request. A maintainer will review it when available. Please keep the PR focused, explain the why in the description, and make sure local checks pass before requesting review. Contribution guide: https://github.com/AI-Shell-Team/aish/blob/main/CONTRIBUTING.md |
|
This pull request description looks incomplete. Please update the missing sections below before review. Missing items:
|
|
Warning Review limit reached
More reviews will be available in 19 minutes and 7 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR removes deprecated and legacy APIs across three crates. In Changesaish-llm: LiteLLM → LlmClient and legacy agent removal
aish-pty state_capture removal, mark_prompt_ready removal, hostname and ToolRegistry cleanup
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Drop LiteLLMClient, legacy SystemDiagnoseAgent, state_capture, and other unused APIs left behind after the Rust migration. Codex/provider/oauth code is intentionally unchanged for a follow-up wiring PR.
8a53ed3 to
4e3b91d
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/aish-llm/tests/llm_integration_test.rs`:
- Around line 84-86: Rename the variable `ollama_provider` to `mistral_provider`
in the test function. The variable is incorrectly named since it actually
contains the result of detecting the Mistral provider (as confirmed by the
assertions checking for "mistral" and "Mistral AI"), not the Ollama provider.
Update the variable name in the assignment and in all subsequent uses within the
assertions to match the consistent naming pattern used for other provider
variables in the test like `openai_provider`, `anthropic_provider`, and
`google_provider`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4cd26463-e874-4f5b-85ff-0a8bf4220165
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (12)
crates/aish-llm/Cargo.tomlcrates/aish-llm/src/agent.rscrates/aish-llm/src/client.rscrates/aish-llm/src/lib.rscrates/aish-llm/src/session.rscrates/aish-llm/tests/llm_integration_test.rscrates/aish-pty/src/lib.rscrates/aish-pty/src/persistent.rscrates/aish-pty/src/session_interceptor.rscrates/aish-pty/src/state_capture.rscrates/aish-shell/src/ai_handler.rscrates/aish-tools/src/registry.rs
💤 Files with no reviewable changes (9)
- crates/aish-shell/src/ai_handler.rs
- crates/aish-pty/src/session_interceptor.rs
- crates/aish-pty/src/state_capture.rs
- crates/aish-llm/src/session.rs
- crates/aish-pty/src/persistent.rs
- crates/aish-tools/src/registry.rs
- crates/aish-pty/src/lib.rs
- crates/aish-llm/src/agent.rs
- crates/aish-llm/Cargo.toml
Use mistral_provider instead of ollama_provider to match llama3 detection.
Summary
LiteLLMClientand thelitellm-rsdependency; production usesLlmClient.SystemDiagnoseAgent,create_diagnose_subsession, andToolRegistry::default_tools.state_capturemodule and unused stubs (mark_prompt_ready,hostname).Codex/provider/oauth code is intentionally left for a follow-up wiring PR.
Test plan
make format-checkmake lintcargo test -p aish-llm -p aish-tools --lib --testsSummary by CodeRabbit
Refactor
Chores