Skip to content

Commit 9ffc2b0

Browse files
authored
Move cloud types from @roo-code/types to @roo-code/cloud (#7038)
1 parent 6f81b77 commit 9ffc2b0

36 files changed

+129
-225
lines changed

packages/types/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@roo-code/types",
3-
"version": "1.45.0",
3+
"version": "1.46.0",
44
"description": "TypeScript type definitions for Roo Code.",
55
"publishConfig": {
66
"access": "public",

packages/types/src/cloud.ts

Lines changed: 0 additions & 158 deletions
This file was deleted.

packages/types/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./api.js"
2-
export * from "./cloud.js"
32
export * from "./codebase-index.js"
43
export * from "./events.js"
54
export * from "./experiment.js"
@@ -13,7 +12,6 @@ export * from "./message.js"
1312
export * from "./mode.js"
1413
export * from "./model.js"
1514
export * from "./provider-settings.js"
16-
export * from "./sharing.js"
1715
export * from "./task.js"
1816
export * from "./todo.js"
1917
export * from "./telemetry.js"

packages/types/src/sharing.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

pnpm-lock.yaml

Lines changed: 8 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/link-packages.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ const config = {
1414
npmPath: "npm",
1515
watchCommand: "pnpm build:development:watch",
1616
},
17+
{
18+
name: "@roo-code/cloud",
19+
sourcePath: "../Roo-Code-Cloud/packages/sdk",
20+
targetPath: "webview-ui/node_modules/@roo-code/cloud",
21+
npmPath: "npm",
22+
watchCommand: "pnpm build:development:watch",
23+
},
1724
],
1825
}
1926

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,15 @@ import {
2424
type TerminalActionId,
2525
type TerminalActionPromptType,
2626
type HistoryItem,
27-
type CloudUserInfo,
2827
RooCodeEventName,
2928
requestyDefaultModelId,
3029
openRouterDefaultModelId,
3130
glamaDefaultModelId,
32-
ORGANIZATION_ALLOW_ALL,
3331
DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
3432
DEFAULT_WRITE_DELAY_MS,
3533
} from "@roo-code/types"
3634
import { TelemetryService } from "@roo-code/telemetry"
37-
import { CloudService, getRooCodeApiUrl } from "@roo-code/cloud"
35+
import { type CloudUserInfo, CloudService, ORGANIZATION_ALLOW_ALL, getRooCodeApiUrl } from "@roo-code/cloud"
3836

3937
import { Package } from "../../shared/package"
4038
import { findLast } from "../../shared/array"

src/core/webview/__tests__/ClineProvider.spec.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import Anthropic from "@anthropic-ai/sdk"
44
import * as vscode from "vscode"
55
import axios from "axios"
66

7-
import { type ProviderSettingsEntry, type ClineMessage, ORGANIZATION_ALLOW_ALL } from "@roo-code/types"
7+
import { type ProviderSettingsEntry, type ClineMessage } from "@roo-code/types"
88
import { TelemetryService } from "@roo-code/telemetry"
9+
import { ORGANIZATION_ALLOW_ALL } from "@roo-code/cloud"
910

1011
import { ExtensionMessage, ExtensionState } from "../../../shared/ExtensionMessage"
1112
import { defaultModeSlug } from "../../../shared/modes"
@@ -17,11 +18,9 @@ import { safeWriteJson } from "../../../utils/safeWriteJson"
1718

1819
import { ClineProvider } from "../ClineProvider"
1920

20-
// Mock setup must come before imports
21+
// Mock setup must come before imports.
2122
vi.mock("../../prompts/sections/custom-instructions")
2223

23-
vi.mock("vscode")
24-
2524
vi.mock("p-wait-for", () => ({
2625
__esModule: true,
2726
default: vi.fn().mockResolvedValue(undefined),
@@ -95,7 +94,7 @@ vi.mock("../../../services/browser/browserDiscovery", () => ({
9594
testBrowserConnection: vi.fn(),
9695
}))
9796

98-
// Remove duplicate mock - it's already defined below
97+
// Remove duplicate mock - it's already defined below.
9998

10099
const mockAddCustomInstructions = vi.fn().mockResolvedValue("Combined instructions")
101100

@@ -228,7 +227,6 @@ vi.mock("../../../integrations/misc/extract-text", () => ({
228227
}),
229228
}))
230229

231-
// Mock getModels for router model tests
232230
vi.mock("../../../api/providers/fetchers/modelCache", () => ({
233231
getModels: vi.fn().mockResolvedValue({}),
234232
flushModels: vi.fn(),
@@ -324,6 +322,10 @@ vi.mock("@roo-code/cloud", () => ({
324322
},
325323
},
326324
getRooCodeApiUrl: vi.fn().mockReturnValue("https://app.roocode.com"),
325+
ORGANIZATION_ALLOW_ALL: {
326+
allowAll: true,
327+
providers: {},
328+
},
327329
}))
328330

329331
afterAll(() => {

0 commit comments

Comments
 (0)