Skip to content

Conversation

@mrubens
Copy link
Collaborator

@mrubens mrubens commented Dec 28, 2024

This adds a new "Enhance Prompt" feature when using OpenRouter, providing an intelligent way to improve prompt quality before sending a message. It's currently hardcoded to use OpenAI 4o through OpenRouter for the prompt enhancing since that seems to perform better than the other models. In the future I'd like to make it easier to select different models for the prompt enhancing and for it to work outside of OpenRouter, but configuring multiple models was more complicated than I had time for this week.


Important

Add "Enhance Prompt" feature using OpenRouter's API with UI integration and tests.

  • Feature:
    • Add "Enhance Prompt" feature using OpenRouter with OpenAI 4o.
    • Implement enhancePrompt function in enhance-prompt.ts.
    • Add completePrompt method to OpenRouterHandler in openrouter.ts.
  • UI:
    • Add "Enhance Prompt" button in ChatTextArea.tsx.
    • Handle enhanced prompt responses in ChatTextArea.tsx.
  • Tests:
    • Add tests for enhancePrompt in enhance-prompt.test.ts.
    • Add tests for "Enhance Prompt" button in ChatTextArea.test.tsx.
  • Misc:
    • Update Cline.ts to use enhancePrompt method.
    • Add enhancedPrompt message type to ExtensionMessage.ts and WebviewMessage.ts.

This description was created by Ellipsis for ab20656. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Dec 28, 2024

🦋 Changeset detected

Latest commit: ab20656

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
roo-cline Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mrubens mrubens merged commit 22254c4 into main Dec 29, 2024
4 checks passed
@mrubens mrubens deleted the enhanced_prompt_open_router branch December 29, 2024 06:10
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.

3 participants