aws / aws/amazon-q-developer-cli
Feature Request: Real-time dynamic prompt switching between chat and shell modes
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
This feature request is for implementing real-time prompt switching in the Amazon Q CLI chat interface to provide better visual feedback when
switching between chat and shell command modes.
Partially similar to #1037
## Current Behavior
The CLI currently uses a static > prompt for all interactions, regardless of whether the user is entering chat queries or shell commands (prefixed with !).
## Proposed Feature
Implement dynamic prompt switching that:
• Shows > (magenta) for normal chat interactions
• Automatically switches to $ (green) when user types ! to indicate shell mode
• Switches back to > when backspacing on empty line in shell mode
• Maintains prompt state after shell command execution
• Supports real-time switching without requiring Enter key
## Benefits
• Improved user experience with clear visual indication of current mode
• Better alignment with standard shell conventions ($ for shell prompts)
• Real-time feedback reduces confusion about current input mode
• Maintains consistency with existing profile and warning indicators
## Implementation Details
The feature would use raw terminal input handling with crossterm for real-time character processing and colored prompt generation that
preserves existing functionality for profiles, warnings, and tangent mode indicators.
Contributor guide
Assessment
This issue has not been assessed yet.