mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: use taskMode getter and remove React hooks from switch statement
This commit is contained in:
parent
80fe47b532
commit
eac9f8fee9
2 changed files with 7 additions and 2 deletions
|
|
@ -108,7 +108,7 @@ export async function attemptCompletionTool(
|
|||
}
|
||||
|
||||
// Send offer_pr message if not in PR Creator mode
|
||||
if (cline.mode !== "pr-creator") {
|
||||
if (cline.taskMode !== "pr-creator") {
|
||||
await cline.say("offer_pr", "", undefined, false)
|
||||
} else {
|
||||
// In PR Creator mode, send PR Reviewer upsell after completion
|
||||
|
|
|
|||
|
|
@ -131,7 +131,8 @@ export const ChatRowContent = ({
|
|||
}: ChatRowContentProps) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const { mcpServers, alwaysAllowMcp, currentCheckpoint, mode, apiConfiguration, cloudApiUrl } = useExtensionState()
|
||||
const { mcpServers, alwaysAllowMcp, currentCheckpoint, mode, apiConfiguration, cloudApiUrl, cloudIsAuthenticated } =
|
||||
useExtensionState()
|
||||
const { info: model } = useSelectedModel(apiConfiguration)
|
||||
|
||||
// Function to switch modes
|
||||
|
|
@ -1278,6 +1279,10 @@ export const ChatRowContent = ({
|
|||
</>
|
||||
)
|
||||
case "pr_reviewer_upsell":
|
||||
// Only show if user is authenticated to Cloud
|
||||
if (!cloudIsAuthenticated) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<div className="ml-6 text-sm mt-2">
|
||||
{t("chat:prReviewerUpsell.message")}{" "}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue