Skip to content

Commit fc966af

Browse files
allquixoticclaude
andcommitted
feat(chat)!: remove remaining Cloud upsells + apply formatter drift (3.53.11)
Task 1 — purge remaining upsell plumbing: * ChatView.tsx — drop the dead useCloudUpsell hook call + <CloudUpsellDialog> render (nothing in ChatView calls openUpsell after the prior banner removal). * webviewMessageHandler.ts — remove dismissUpsell / getDismissedUpsells cases. No remaining webview code dispatches them. * vscode-extension-host.ts — drop "dismissUpsell" / "getDismissedUpsells" from WebviewMessage types, "dismissedUpsells" from ExtensionMessage + ExtensionState picks, and the upsellId?/list? fields that only existed for these handlers. * global-settings.ts — drop dismissedUpsells: z.array(z.string()).optional() from globalSettingsSchema. * All 18 cloud.json locales — drop the "upsell" object (its only two keys, autoApprovePowerUser and taskList, were already orphaned with no code references after the banner removal). Kept intact (legitimate user-initiated flows): * useCloudUpsell hook + CloudUpsellDialog component — still used by ShareButton to prompt sign-in when user clicks Share unauthenticated. * renderCloudBenefitsContent — still rendered by CloudView as the sign-in landing page on the Cloud tab itself, which users open intentionally. Task 2 — formatter drift cleanup: Re-ran `pnpm format` across the monorepo. The prettier-driven whitespace changes (inlined single-line imports, removed stray blank lines in catch blocks) are purely cosmetic — no functional impact. Both check-types and lint pass cleanly across all 13 packages. Full test sweep: 1253 webview + 5431 src + 115 types tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ceb2f26 commit fc966af

83 files changed

Lines changed: 74 additions & 279 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/types/src/global-settings.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export const globalSettingsSchema = z.object({
8383
pinnedApiConfigs: z.record(z.string(), z.boolean()).optional(),
8484
customInstructions: z.string().optional(),
8585
taskHistory: z.array(historyItemSchema).optional(),
86-
dismissedUpsells: z.array(z.string()).optional(),
8786

8887
// Image generation settings (experimental) - flattened for simplicity
8988
imageGenerationProvider: z.enum(["openrouter", "roo"]).optional(),

packages/types/src/vscode-extension-host.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ export interface ExtensionMessage {
8787
| "showEditMessageDialog"
8888
| "commands"
8989
| "insertTextIntoTextarea"
90-
| "dismissedUpsells"
9190
| "organizationSwitchResult"
9291
| "interactionRequired"
9392
| "customToolsResult"
@@ -178,7 +177,6 @@ export interface ExtensionMessage {
178177
context?: string
179178
commands?: Command[]
180179
queuedMessages?: QueuedMessage[]
181-
list?: string[] // For dismissedUpsells
182180
organizationId?: string | null // For organizationSwitchResult
183181
tools?: SerializedCustomToolDefinition[] // For customToolsResult
184182
skills?: SkillMetadata[] // For skills response
@@ -266,7 +264,6 @@ export type ExtensionState = Pick<
266264
| "listApiConfigMeta"
267265
| "pinnedApiConfigs"
268266
| "customInstructions"
269-
| "dismissedUpsells"
270267
| "autoApprovalEnabled"
271268
| "yoloMode"
272269
| "alwaysAllowReadOnly"
@@ -562,8 +559,6 @@ export interface WebviewMessage {
562559
| "queueMessage"
563560
| "removeQueuedMessage"
564561
| "editQueuedMessage"
565-
| "dismissUpsell"
566-
| "getDismissedUpsells"
567562
| "openMarkdownPreview"
568563
| "updateSettings"
569564
| "allowedCommands"
@@ -659,8 +654,6 @@ export interface WebviewMessage {
659654
visibility?: ShareVisibility // For share visibility
660655
hasContent?: boolean // For checkRulesDirectoryResult
661656
checkOnly?: boolean // For deleteCustomMode check
662-
upsellId?: string // For dismissUpsell
663-
list?: string[] // For dismissedUpsells response
664657
organizationId?: string | null // For organization switching
665658
useProviderSignup?: boolean // For rooCloudSignIn to use provider signup flow
666659
codeIndexSettings?: {

src/__tests__/nested-delegation-resume.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ vi.mock("safe-stable-stringify", () => ({
88
default: (obj: any) => JSON.stringify(obj),
99
}))
1010

11-
1211
// vscode mock for Task/Provider imports
1312
vi.mock("vscode", () => {
1413
const window = {

src/api/providers/__tests__/bedrock-error-handling.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Mock BedrockRuntimeClient and commands
32
const mockSend = vi.fn()
43

src/api/providers/__tests__/gemini.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ describe("GeminiHandler", () => {
1313
let handler: GeminiHandler
1414

1515
beforeEach(() => {
16-
1716
// Create mock functions
1817
const mockGenerateContentStream = vitest.fn()
1918
const mockGenerateContent = vitest.fn()
@@ -244,5 +243,4 @@ describe("GeminiHandler", () => {
244243
expect(cost).toBeUndefined()
245244
})
246245
})
247-
248246
})

src/api/providers/__tests__/mistral.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Mock Mistral client - must come before other imports
32
const mockCreate = vi.fn()
43
const mockComplete = vi.fn()

src/api/providers/__tests__/openai-native.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,6 @@ describe("OpenAiNativeHandler", () => {
11001100
}
11011101
})
11021102
})
1103-
11041103
})
11051104

11061105
// Additional tests for GPT-5 streaming event coverage

src/api/providers/fetchers/__tests__/modelCache.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Mocks must come first, before imports
22

3-
43
// Mock NodeCache to allow controlling cache behavior
54
vi.mock("node-cache", () => {
65
const mockGet = vi.fn().mockReturnValue(undefined)

src/api/providers/gemini.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ import {
99
} from "@google/genai"
1010
import type { JWTInput } from "google-auth-library"
1111

12-
import {
13-
type ModelInfo,
14-
type GeminiModelId,
15-
geminiDefaultModelId,
16-
geminiModels,
17-
} from "@roo-code/types"
12+
import { type ModelInfo, type GeminiModelId, geminiDefaultModelId, geminiModels } from "@roo-code/types"
1813
import { safeJsonParse } from "@roo-code/core"
1914

2015
import type { ApiHandlerOptions } from "../../shared/api"
@@ -331,7 +326,6 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
331326
}
332327
}
333328
} catch (error) {
334-
335329
if (error instanceof Error) {
336330
throw new Error(t("common:errors.gemini.generate_stream", { error: error.message }))
337331
}
@@ -437,7 +431,6 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
437431

438432
return text
439433
} catch (error) {
440-
441434
if (error instanceof Error) {
442435
throw new Error(t("common:errors.gemini.generate_complete_prompt", { error: error.message }))
443436
}

src/api/providers/mistral.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ import { Anthropic } from "@anthropic-ai/sdk"
22
import { Mistral } from "@mistralai/mistralai"
33
import OpenAI from "openai"
44

5-
import {
6-
type MistralModelId,
7-
mistralDefaultModelId,
8-
mistralModels,
9-
MISTRAL_DEFAULT_TEMPERATURE,
10-
} from "@roo-code/types"
5+
import { type MistralModelId, mistralDefaultModelId, mistralModels, MISTRAL_DEFAULT_TEMPERATURE } from "@roo-code/types"
116

127
import { ApiHandlerOptions } from "../../shared/api"
138

0 commit comments

Comments
 (0)