Skip to content

Conversation

@abbasmir12
Copy link

@abbasmir12 abbasmir12 commented Aug 23, 2025

🚀 Enhance Your Rough Prompt, Now Available in Qwen

This PR adds a new prompt enhancement feature that allows users to improve their prompts using AI assistance.

✨ Features Added

  • 🤖 AI-Powered Prompt Enhancement: Users can press Ctrl+B to send their current prompt to Qwen AI for improvement
  • Seamless Integration: Enhanced prompts automatically replace the original text in the input field
  • Visual Feedback: Footer shows enhancement status ("Enhance Prompt (Ctrl+B)" when idle, "Enhancing..." during processing)
  • Keyboard Shortcut: Ctrl+B trigger that avoids conflicts with existing shortcuts

🔧 Technical Implementation

  • New Hook: usePromptEnhancement for handling AI prompt improvement requests
  • Key Binding: Added ENHANCE_PROMPT command to the keyboard shortcut system
  • UI Integration: Updated InputPrompt and Footer components with enhancement functionality
  • Error Handling: Proper loading states and error management

🧪 Testing

  • All existing tests pass (32/32)
  • Updated UI snapshots to reflect new functionality
  • No regressions in existing features

📝 How to Use

  1. Type your prompt in the input field
  2. Press Ctrl+B to enhance the prompt
  3. Watch the enhanced version replace your original text
  4. Submit the improved prompt

💡 Summary: This feature helps users write clearer, more effective prompts by leveraging AI assistance directly within the interface.

- Add usePromptEnhancement hook for AI-powered prompt improvement
- Implement Ctrl+B keyboard shortcut for prompt enhancement
- Add visual feedback in Footer component showing enhancement status
- Integrate with Qwen AI to enhance user prompts for better clarity
- Update UI tests and snapshots to reflect new functionality
- Resolve keyboard shortcut conflicts by using available Ctrl+B binding
The feature allows users to press Ctrl+B while typing to send their
current prompt to Qwen AI for enhancement, replacing the original
text with an improved version.
@abbasmir12
Copy link
Author

@koalazf99 Your Majesty, if you have a moment, may I kindly request you to take a look at this feature? I have other PR as well but it's not reviewed yet!

@pomelo-nwu
Copy link
Collaborator

@abbasmir12 I checkout your remote branch and tested it—it works great! I'm wondering if you'd be willing to submit the PR to the upstream gemini-cli first? That way, we can simply sync from it. Also, a small styling suggestion: consider adding a magic wand 🪄 before "Enhancing..." to make it more eye-catching!
image
image

Copy link
Collaborator

@pomelo-nwu pomelo-nwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@abbasmir12
Copy link
Author

abbasmir12 commented Aug 29, 2025

@pomelo-nwu Thank you sincerely for taking the time to review this and for your kind words about the work. At this stage, I don’t plan to submit the PR upstream since it’s designed specifically for Qwen-Code 😉. I’d really appreciate it if this PR could be merged whenever it works best for you. Grateful again!

@abbasmir12
Copy link
Author

abbasmir12 commented Aug 29, 2025

@pomelo-nwu Your Majesty Kindly if u can check my another PR #352 which also resolves an important issue! It has been 2 weeks since I opened the PR but no one reviewed yet and also the issue still persist

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.

2 participants