-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat: add PR Creator mode and PR workflow enhancements #8708
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
- Add PR Creator built-in mode for generating professional PR descriptions - Add offer_pr message after task completion (except in PR Creator mode) - Add pr_reviewer_upsell message after PR Creator completes - Add translations for new UI elements - Update message types to support new features
Review SummaryI've reviewed the PR and found 2 issues that should be addressed: Issues Found
Overall AssessmentThe PR successfully implements the PR Creator mode and workflow enhancements. The implementation is mostly solid, with good integration between the backend and frontend. However, the race condition issue should be addressed to ensure reliable operation in all scenarios, and the translation strings need to be properly localized. Changes OverviewBackend:
Frontend:
|
} | ||
|
||
// Send offer_pr message if not in PR Creator mode | ||
if (cline.taskMode !== "pr-creator") { |
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.
Potential race condition: For new tasks (not from history), taskMode
is initialized asynchronously but accessed synchronously here. The taskMode
getter throws an error if accessed before initialization completes. While this may work in practice due to the async nature of the LLM request loop, it's not guaranteed that taskModeReady
will resolve before attempt_completion
is called. Consider using await cline.getTaskMode()
instead to safely handle the async initialization.
"offerPr": { | ||
"title": "Create Pull Request", | ||
"description": "Would you like to create a pull request for these changes?", | ||
"switchToPrCreator": "Switch to PR Creator" | ||
}, | ||
"prReviewerUpsell": { | ||
"message": "Get Roo to review this in the Cloud", | ||
"createLink": "Create a PR Reviewer Agent" | ||
} |
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.
The translation strings for offerPr
and prReviewerUpsell
are in English rather than Spanish. This same issue affects all non-English locale files in this commit (ca, de, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW). These strings should be properly translated to their respective languages to maintain i18n consistency.
This PR implements three interconnected features to enhance the pull request workflow:
Features
1. PR Creator Built-in Mode
2. Offer PR After Task Completion
3. PR Reviewer Cloud Agent Upsell
Changes
Backend:
packages/types/src/mode.ts
- Added PR Creator mode to DEFAULT_MODESpackages/types/src/message.ts
- Added new message types: offer_pr and pr_reviewer_upsellsrc/core/tools/attemptCompletionTool.ts
- Added logic to send appropriate messages based on modeFrontend:
webview-ui/src/components/chat/ChatRow.tsx
- Added handlers for new message typeswebview-ui/src/i18n/locales/en/chat.json
- Added translations for new UI elementsTesting