-
Notifications
You must be signed in to change notification settings - Fork 460
Allow canceling / reverting prompt enhancement #1267
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 81148d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for canceling and reverting prompt enhancements in the chat UI.
- Introduces
cancelEnhancement
andrevertEnhancement
labels in all locales. - Updates
ChatTextArea
to store original/enhanced prompt state and handle cancel/revert flows. - Adds unit and E2E tests covering enhancement, cancellation, and revert behaviors.
Reviewed Changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
webview-ui/src/i18n/locales/*/kilocode.json | Added enhancePrompt translations for all locales |
webview-ui/src/components/chat/ChatTextArea.tsx | Implemented prompt cancellation and revert logic |
webview-ui/src/components/chat/tests/ChatTextArea.spec.tsx | Added tests for cancel/revert prompt enhancement |
apps/playwright-e2e/tests/enhance-prompt.test.ts | New E2E tests for prompt enhancement flows |
apps/playwright-e2e/tests/chat-with-response-refactored.test.ts | New refactored chat E2E test |
apps/playwright-e2e/playwright.config.ts | Adjusted retry settings |
apps/playwright-e2e/helpers/test-setup-helpers.ts | Extracted shared test setup helper |
apps/playwright-e2e/helpers/enhance-prompt-helpers.ts | Helper functions for E2E prompt enhancement tests |
apps/playwright-e2e/helpers/chat-helpers.ts | Helper functions for E2E chat interactions |
Comments suppressed due to low confidence (1)
webview-ui/src/components/chat/ChatTextArea.tsx:1480
- The translation key namespace appears incorrect; verify whether it should be
t("chat:enhancePrompt.cancelEnhancement")
instead oft("kilocode:chat.enhancePrompt.cancelEnhancement")
.
title={
14246b7
to
354d9d2
Compare
related? RooCodeInc/Roo-Code#5742 |
3f8688a
to
d7a8933
Compare
@chrarnoldus, oh yeah! Looks like they built a rough version of this based on the native undo! I'll see what parts of this make sense to keep around |
473383d
to
0a08647
Compare
0a08647
to
4d7d434
Compare
Extract common setup logic into a dedicated helper function `setupTestEnvironment`. Introduce new helper files for chat interactions and consolidate exports. This improves test readability and reduces duplication in E2E tests.
4d7d434
to
91a0a89
Compare
Adds the ability to revert an enhanced prompt back to its original state. This includes: - New state management in `ChatTextArea` to track original and enhanced prompts. - Logic to switch the enhance button between "enhance", "cancel", and "revert" states. - New Playwright E2E tests to cover the full enhancement workflow, including cancellation and reverting. - Updates to i18n files for new button labels.
91a0a89
to
81148d5
Compare
Allow canceling / reverting prompt enhancement!