Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/types/src/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const commandIds = [
"historyButtonClicked",
"marketplaceButtonClicked",
"popoutButtonClicked",
"accountButtonClicked",
"cloudButtonClicked",
"settingsButtonClicked",

"openInNewTab",
Expand Down
6 changes: 3 additions & 3 deletions src/activate/registerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ export const registerCommands = (options: RegisterCommandOptions) => {

const getCommandsMap = ({ context, outputChannel, provider }: RegisterCommandOptions): Record<CommandId, any> => ({
activationCompleted: () => {},
accountButtonClicked: () => {
cloudButtonClicked: () => {
const visibleProvider = getVisibleProviderOrLog(outputChannel)

if (!visibleProvider) {
return
}

TelemetryService.instance.captureTitleButtonClicked("account")
TelemetryService.instance.captureTitleButtonClicked("cloud")

visibleProvider.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
visibleProvider.postMessageToWebview({ type: "action", action: "cloudButtonClicked" })
},
plusButtonClicked: async () => {
const visibleProvider = getVisibleProviderOrLog(outputChannel)
Expand Down
2 changes: 1 addition & 1 deletion src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ export class ClineProvider
// Check MDM compliance and send user to account tab if not compliant
// Only redirect if there's an actual MDM policy requiring authentication
if (this.mdmService?.requiresCloudAuth() && !this.checkMdmCompliance()) {
await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
await this.postMessageToWebview({ type: "action", action: "cloudButtonClicked" })
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/core/webview/webviewMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2028,9 +2028,9 @@ export const webviewMessageHandler = async (
await provider.postStateToWebview()
break
}
case "accountButtonClicked": {
// Navigate to the account tab.
provider.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
case "cloudButtonClicked": {
// Navigate to the cloud tab.
provider.postMessageToWebview({ type: "action", action: "cloudButtonClicked" })
break
}
case "rooCloudSignIn": {
Expand Down
10 changes: 5 additions & 5 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
"icon": "$(link-external)"
},
{
"command": "roo-cline.accountButtonClicked",
"title": "%command.account.title%",
"icon": "$(account)"
"command": "roo-cline.cloudButtonClicked",
"title": "%command.cloud.title%",
"icon": "$(cloud)"
},
{
"command": "roo-cline.settingsButtonClicked",
Expand Down Expand Up @@ -234,7 +234,7 @@
"when": "view == roo-cline.SidebarProvider"
},
{
"command": "roo-cline.accountButtonClicked",
"command": "roo-cline.cloudButtonClicked",
"group": "navigation@4",
"when": "view == roo-cline.SidebarProvider"
},
Expand Down Expand Up @@ -276,7 +276,7 @@
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
},
{
"command": "roo-cline.accountButtonClicked",
"command": "roo-cline.cloudButtonClicked",
"group": "navigation@4",
"when": "activeWebviewPanelId == roo-cline.TabPanelProvider"
},
Expand Down
2 changes: 1 addition & 1 deletion src/package.nls.ca.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.de.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.es.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.fr.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.hi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.id.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.it.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.ja.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"command.history.title": "History",
"command.marketplace.title": "Marketplace",
"command.openInEditor.title": "Open in Editor",
"command.account.title": "Account",
"command.cloud.title": "Cloud",
"command.settings.title": "Settings",
"command.documentation.title": "Documentation",
"command.openInNewTab.title": "Open In New Tab",
Expand Down
2 changes: 1 addition & 1 deletion src/package.nls.ko.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.nl.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.pl.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.pt-BR.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.ru.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.tr.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.vi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.zh-CN.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.nls.zh-TW.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/shared/ExtensionMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export interface ExtensionMessage {
| "historyButtonClicked"
| "promptsButtonClicked"
| "marketplaceButtonClicked"
| "accountButtonClicked"
| "cloudButtonClicked"
| "didBecomeVisible"
| "focusInput"
| "switchTab"
Expand Down
4 changes: 2 additions & 2 deletions src/shared/WebviewMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export interface WebviewMessage {
| "toggleApiConfigPin"
| "setHistoryPreviewCollapsed"
| "hasOpenedModeSelector"
| "accountButtonClicked"
| "cloudButtonClicked"
| "rooCloudSignIn"
| "rooCloudSignOut"
| "condenseTaskContextRequest"
Expand Down Expand Up @@ -217,7 +217,7 @@ export interface WebviewMessage {
| "openRouterImageGenerationSelectedModel"
text?: string
editedMessageContent?: string
tab?: "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "account"
tab?: "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "cloud"
disabled?: boolean
context?: string
dataUri?: string
Expand Down
12 changes: 6 additions & 6 deletions webview-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import ModesView from "./components/modes/ModesView"
import { HumanRelayDialog } from "./components/human-relay/HumanRelayDialog"
import { DeleteMessageDialog, EditMessageDialog } from "./components/chat/MessageModificationConfirmationDialog"
import ErrorBoundary from "./components/ErrorBoundary"
import { AccountView } from "./components/account/AccountView"
import { CloudView } from "./components/cloud/CloudView"
import { useAddNonInteractiveClickListener } from "./components/ui/hooks/useNonInteractiveClick"
import { TooltipProvider } from "./components/ui/tooltip"
import { STANDARD_TOOLTIP_DELAY } from "./components/ui/standard-tooltip"

type Tab = "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "account"
type Tab = "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "cloud"

interface HumanRelayDialogState {
isOpen: boolean
Expand Down Expand Up @@ -58,7 +58,7 @@ const tabsByMessageAction: Partial<Record<NonNullable<ExtensionMessage["action"]
mcpButtonClicked: "mcp",
historyButtonClicked: "history",
marketplaceButtonClicked: "marketplace",
accountButtonClicked: "account",
cloudButtonClicked: "cloud",
}

const App = () => {
Expand Down Expand Up @@ -107,7 +107,7 @@ const App = () => {
(newTab: Tab) => {
// Only check MDM compliance if mdmCompliant is explicitly false (meaning there's an MDM policy and user is non-compliant)
// If mdmCompliant is undefined or true, allow tab switching
if (mdmCompliant === false && newTab !== "account") {
if (mdmCompliant === false && newTab !== "cloud") {
// Notify the user that authentication is required by their organization
vscode.postMessage({ type: "showMdmAuthRequiredNotification" })
return
Expand Down Expand Up @@ -249,8 +249,8 @@ const App = () => {
targetTab={currentMarketplaceTab as "mcp" | "mode" | undefined}
/>
)}
{tab === "account" && (
<AccountView
{tab === "cloud" && (
<CloudView
userInfo={cloudUserInfo}
isAuthenticated={cloudIsAuthenticated}
cloudApiUrl={cloudApiUrl}
Expand Down
8 changes: 4 additions & 4 deletions webview-ui/src/__tests__/App.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ vi.mock("@src/components/marketplace/MarketplaceView", () => ({
},
}))

vi.mock("@src/components/account/AccountView", () => ({
AccountView: function AccountView({ onDone }: { onDone: () => void }) {
vi.mock("@src/components/cloud/CloudView", () => ({
CloudView: function CloudView({ onDone }: { onDone: () => void }) {
return (
<div data-testid="account-view" onClick={onDone}>
Account View
<div data-testid="cloud-view" onClick={onDone}>
Cloud View
</div>
)
},
Expand Down
12 changes: 6 additions & 6 deletions webview-ui/src/components/chat/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,34 +245,34 @@ export const ShareButton = ({ item, disabled = false, showLabel = false }: Share
<DialogContent className="max-w-sm">
<DialogHeader className="text-center">
<DialogTitle className="text-lg font-medium text-vscode-foreground">
{t("account:cloudBenefitsTitle")}
{t("cloud:cloudBenefitsTitle")}
</DialogTitle>
</DialogHeader>

<div className="flex flex-col space-y-6">
<div>
<p className="text-md text-vscode-descriptionForeground mb-4">
{t("account:cloudBenefitsSubtitle")}
{t("cloud:cloudBenefitsSubtitle")}
</p>
<ul className="text-sm text-vscode-descriptionForeground space-y-2">
<li className="flex items-start">
<span className="mr-2 text-vscode-foreground">•</span>
{t("account:cloudBenefitSharing")}
{t("cloud:cloudBenefitSharing")}
</li>
<li className="flex items-start">
<span className="mr-2 text-vscode-foreground">•</span>
{t("account:cloudBenefitHistory")}
{t("cloud:cloudBenefitHistory")}
</li>
<li className="flex items-start">
<span className="mr-2 text-vscode-foreground">•</span>
{t("account:cloudBenefitMetrics")}
{t("cloud:cloudBenefitMetrics")}
</li>
</ul>
</div>

<div className="flex flex-col gap-4">
<Button onClick={handleConnectToCloud} className="w-full">
{t("account:connect")}
{t("cloud:connect")}
</Button>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions webview-ui/src/components/chat/__tests__/TaskActions.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ vi.mock("react-i18next", () => ({
"chat:task.connectToCloud": "Connect to Cloud",
"chat:task.connectToCloudDescription": "Sign in to Roo Code Cloud to share tasks",
"chat:task.sharingDisabledByOrganization": "Sharing disabled by organization",
"account:cloudBenefitsTitle": "Connect to Roo Code Cloud",
"account:cloudBenefitsSubtitle": "Sign in to Roo Code Cloud to share tasks",
"account:cloudBenefitHistory": "Access your task history from anywhere",
"account:cloudBenefitSharing": "Share tasks with your team",
"account:cloudBenefitMetrics": "Track usage and costs",
"account:connect": "Connect",
"cloud:cloudBenefitsTitle": "Connect to Roo Code Cloud",
"cloud:cloudBenefitsSubtitle": "Sign in to Roo Code Cloud to share tasks",
"cloud:cloudBenefitHistory": "Access your task history from anywhere",
"cloud:cloudBenefitSharing": "Share tasks with your team",
"cloud:cloudBenefitMetrics": "Track usage and costs",
"cloud:connect": "Connect",
}
return translations[key] || key
},
Expand Down Expand Up @@ -260,7 +260,7 @@ describe("TaskActions", () => {
// Verify popover is not open initially
expect(screen.queryByText("Share with Organization")).not.toBeInTheDocument()

// Simulate user becoming authenticated (e.g., from AccountView)
// Simulate user becoming authenticated (e.g., from CloudView)
mockUseExtensionState.mockReturnValue({
sharingEnabled: true,
cloudIsAuthenticated: true,
Expand Down
Loading
Loading