Skip to content

Add Rust CLI suggestion functionality #1320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dallonasnes
Copy link

@dallonasnes dallonasnes commented Jun 12, 2025

what: Adds canned prompt suggestions to the Rust CLI, similar to the existing TypeScript CLI functionality.

Note: Uses Left/Right arrow keys for suggestion navigation instead of Tab, since Tab is reserved for TUI focus management between panes.

why: Closes #1259

how:

  • Implement canned prompt suggestions similar to TypeScript CLI
  • Add suggestion detection and rendering in chat_composer.rs
  • Use Option for type-safe selection indexing
  • Auto-hide suggestions when user starts typing
  • Add comprehensive test coverage

I have read the CLA Document and I hereby sign the CLA

@bolinfest I'm happy to add in giving the user the option to hide suggestions or add their own as a follow to this PR

video demos below

Rust CLI with suggestions (this branch)
https://github.com/user-attachments/assets/680b6b47-ff11-4fd4-a743-56d0509ef230

Rust CLI without suggestions (main branch)
https://github.com/user-attachments/assets/ecd28d00-361c-4f15-abd7-6705a769cd73

Typescript CLI on main
https://github.com/user-attachments/assets/4306c617-842a-4fc8-80cf-3868757fc5a8

Screenshot 2025-06-12 at 7 55 42 PM

Copy link

github-actions bot commented Jun 12, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@dallonasnes
Copy link
Author

recheck

@dallonasnes dallonasnes force-pushed the dallon/rust-cli-suggestion branch from 65bae80 to c61c5ad Compare June 12, 2025 22:20
@dallonasnes
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@dallonasnes
Copy link
Author

recheck

github-actions bot added a commit that referenced this pull request Jun 12, 2025
@dallonasnes dallonasnes force-pushed the dallon/rust-cli-suggestion branch 2 times, most recently from c4f6c14 to 98964ed Compare June 12, 2025 22:50
  - Implement canned prompt suggestions similar to TypeScript CLI
  - Add suggestion detection and rendering in chat_composer.rs
  - Use Option<usize> for type-safe selection indexing
  - Auto-hide suggestions when user starts typing
  - Add test coverage
@dallonasnes dallonasnes force-pushed the dallon/rust-cli-suggestion branch from 98964ed to 655511e Compare June 12, 2025 22:50
@dallonasnes
Copy link
Author

@cliff-openai do you also do reviews in this repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide suggested prompts
1 participant