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 knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"webview-ui": {
"entry": ["src/index.tsx"],
"project": ["src/**/*.{ts,tsx}"]
"project": ["src/**/*.{ts,tsx}", "../src/shared/*.ts"]
},
"packages/{build,cloud,evals,ipc,telemetry,types}": {
"project": ["src/**/*.ts"]
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

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

7 changes: 0 additions & 7 deletions scripts/link-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ const config = {
npmPath: "npm",
watchCommand: "pnpm build:development:watch",
},
{
name: "@roo-code/cloud",
sourcePath: "../Roo-Code-Cloud/packages/sdk",
targetPath: "webview-ui/node_modules/@roo-code/cloud",
npmPath: "npm",
watchCommand: "pnpm build:development:watch",
},
],
}

Expand Down
8 changes: 8 additions & 0 deletions src/shared/cloud.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { CloudUserInfo, OrganizationAllowList, ShareVisibility } from "@roo-code/cloud"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file imports from @roo-code/cloud, but the PR removes this package from dependencies in package.json. This will cause a build failure since the package won't be available.

Is this intentional? If the goal is to fix the webview in dev mode, this approach will just move the error to a different location rather than fixing it.

Consider either:

  1. Keeping @roo-code/cloud as a dependency if it's still needed
  2. Or fully migrating these types to local definitions if the goal is to remove the external dependency


export type { CloudUserInfo, OrganizationAllowList, ShareVisibility }

export const ORGANIZATION_ALLOW_ALL: OrganizationAllowList = {
allowAll: true,
providers: {},
} as const
1 change: 0 additions & 1 deletion webview-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"@radix-ui/react-slider": "^1.2.3",
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-tooltip": "^1.1.8",
"@roo-code/cloud": "^0.13.0",
"@roo-code/types": "workspace:^",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're removing @roo-code/cloud from dependencies here, but the new src/shared/cloud.ts file still imports from this package. This seems contradictory and will cause the build to fail.

Could you clarify the intended approach? Are you trying to move the cloud package to a different location, or completely remove the dependency?

"@tailwindcss/vite": "^4.0.0",
"@tanstack/react-query": "^5.68.0",
Expand Down
18 changes: 0 additions & 18 deletions webview-ui/src/__mocks__/vscode.ts

This file was deleted.

3 changes: 2 additions & 1 deletion webview-ui/src/components/account/AccountView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { useEffect, useRef } from "react"
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"

import { TelemetryEventName } from "@roo-code/types"
import type { CloudUserInfo } from "@roo-code/cloud"

import type { CloudUserInfo } from "@roo/cloud"

import { useAppTranslation } from "@src/i18n/TranslationContext"
import { useExtensionState } from "@src/context/ExtensionStateContext"
Expand Down
3 changes: 2 additions & 1 deletion webview-ui/src/components/chat/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { useTranslation } from "react-i18next"
import { SquareArrowOutUpRightIcon } from "lucide-react"

import { type HistoryItem, TelemetryEventName } from "@roo-code/types"
import type { ShareVisibility } from "@roo-code/cloud"

import type { ShareVisibility } from "@roo/cloud"

import { vscode } from "@/utils/vscode"
import { telemetryClient } from "@/utils/TelemetryClient"
Expand Down
3 changes: 2 additions & 1 deletion webview-ui/src/components/settings/ApiConfigManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import { AlertTriangle } from "lucide-react"

import type { ProviderSettingsEntry } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"

import { useAppTranslation } from "@/i18n/TranslationContext"
import {
Expand Down
3 changes: 2 additions & 1 deletion webview-ui/src/components/settings/ModelPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { Trans } from "react-i18next"
import { ChevronsUpDown, Check, X } from "lucide-react"

import type { ProviderSettings, ModelInfo } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"

import { useAppTranslation } from "@src/i18n/TranslationContext"
import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel"
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/components/settings/providers/Glama.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useCallback } from "react"
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"

import { type ProviderSettings, glamaDefaultModelId } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import type { RouterModels } from "@roo/api"

import { useAppTranslation } from "@src/i18n/TranslationContext"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { useCallback } from "react"
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"

import { type ProviderSettings, ioIntelligenceDefaultModelId, ioIntelligenceModels } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"

import { useAppTranslation } from "@src/i18n/TranslationContext"
import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink"
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/components/settings/providers/LiteLLM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useCallback, useState, useEffect, useRef } from "react"
import { VSCodeTextField, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react"

import { type ProviderSettings, litellmDefaultModelId } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import { RouterName } from "@roo/api"
import { ExtensionMessage } from "@roo/ExtensionMessage"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
azureOpenAiDefaultApiVersion,
openAiModelInfoSaneDefaults,
} from "@roo-code/types"
import { type OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import { ExtensionMessage } from "@roo/ExtensionMessage"

import { useAppTranslation } from "@src/i18n/TranslationContext"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Checkbox } from "vscrui"
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"

import { type ProviderSettings, openRouterDefaultModelId } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import type { RouterModels } from "@roo/api"

import { useAppTranslation } from "@src/i18n/TranslationContext"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { useCallback, useEffect, useState } from "react"
import { VSCodeCheckbox, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"

import { type ProviderSettings, requestyDefaultModelId } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import type { RouterModels } from "@roo/api"

import { vscode } from "@src/utils/vscode"
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/components/settings/providers/Unbound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
import { useQueryClient } from "@tanstack/react-query"

import { type ProviderSettings, unboundDefaultModelId } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import type { RouterModels } from "@roo/api"

import { useAppTranslation } from "@src/i18n/TranslationContext"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ModelInfo } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"

import { filterProviders, filterModels } from "../organizationFilters"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ProviderName, ModelInfo } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"

export const filterProviders = (
providers: Array<{ value: string; label: string }>,
Expand Down
3 changes: 2 additions & 1 deletion webview-ui/src/context/ExtensionStateContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
type ModeConfig,
type ExperimentId,
} from "@roo-code/types"
import { type OrganizationAllowList, ORGANIZATION_ALLOW_ALL } from "@roo-code/cloud"

import { type OrganizationAllowList, ORGANIZATION_ALLOW_ALL } from "@roo/cloud"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import path change from @roo-code/cloud to @roo/cloud looks good and follows the TypeScript path mapping. However, this will only work if the underlying dependency issue is resolved (see my comment on src/shared/cloud.ts).


import { ExtensionMessage, ExtensionState, MarketplaceInstalledMetadata, Command } from "@roo/ExtensionMessage"
import { findLastIndex } from "@roo/array"
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/utils/__tests__/validate.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ProviderSettings } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import { RouterModels } from "@roo/api"

import { getModelValidationError, validateApiConfigurationExcludingModelErrors } from "../validate"
Expand Down
2 changes: 1 addition & 1 deletion webview-ui/src/utils/validate.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import i18next from "i18next"

import type { ProviderSettings } from "@roo-code/types"
import type { OrganizationAllowList } from "@roo-code/cloud"

import type { OrganizationAllowList } from "@roo/cloud"
import { isRouterName, RouterModels } from "@roo/api"

export function validateApiConfiguration(
Expand Down
1 change: 0 additions & 1 deletion webview-ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export default defineConfig(({ mode }) => {
// Ensure source maps are properly included in the build
minify: mode === "production" ? "esbuild" : false,
rollupOptions: {
external: ["vscode"],
output: {
entryFileNames: `assets/[name].js`,
chunkFileNames: (chunkInfo) => {
Expand Down
Loading