Skip to content
Draft
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
4 changes: 0 additions & 4 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ export const globalSettingsSchema = z.object({
listApiConfigMeta: z.array(providerSettingsEntrySchema).optional(),
pinnedApiConfigs: z.record(z.string(), z.boolean()).optional(),

lastShownAnnouncementId: z.string().optional(),
customInstructions: z.string().optional(),
taskHistory: z.array(historyItemSchema).optional(),
dismissedUpsells: z.array(z.string()).optional(),

// Image generation settings (experimental) - flattened for simplicity
imageGenerationProvider: z.enum(["openrouter", "roo"]).optional(),
Expand Down Expand Up @@ -320,8 +318,6 @@ export const isGlobalStateKey = (key: string): key is Keys<GlobalState> =>
export const EVALS_SETTINGS: RooCodeSettings = {
apiProvider: "openrouter",

lastShownAnnouncementId: "jul-09-2025-3-23-0",

pinnedApiConfigs: {},

autoApprovalEnabled: true,
Expand Down
10 changes: 0 additions & 10 deletions packages/types/src/vscode-extension-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export interface ExtensionMessage {
| "showEditMessageDialog"
| "commands"
| "insertTextIntoTextarea"
| "dismissedUpsells"
| "organizationSwitchResult"
| "interactionRequired"
| "customToolsResult"
Expand Down Expand Up @@ -175,7 +174,6 @@ export interface ExtensionMessage {
context?: string
commands?: Command[]
queuedMessages?: QueuedMessage[]
list?: string[] // For dismissedUpsells
organizationId?: string | null // For organizationSwitchResult
tools?: SerializedCustomToolDefinition[] // For customToolsResult
skills?: SkillMetadata[] // For skills response
Expand Down Expand Up @@ -251,7 +249,6 @@ export type ExtensionState = Pick<
| "listApiConfigMeta"
| "pinnedApiConfigs"
| "customInstructions"
| "dismissedUpsells"
| "autoApprovalEnabled"
| "alwaysAllowReadOnly"
| "alwaysAllowReadOnlyOutsideWorkspace"
Expand Down Expand Up @@ -314,7 +311,6 @@ export type ExtensionState = Pick<
currentTaskTodos?: TodoItem[] // Initial todos for the current task
apiConfiguration: ProviderSettings
uriScheme?: string
shouldShowAnnouncement: boolean

taskHistory: HistoryItem[]

Expand Down Expand Up @@ -366,7 +362,6 @@ export type ExtensionState = Pick<
hasOpenedModeSelector: boolean
openRouterImageApiKey?: string
messageQueue?: QueuedMessage[]
lastShownAnnouncementId?: string
apiModelId?: string
mcpServers?: McpServer[]
mdmCompliant?: boolean
Expand Down Expand Up @@ -431,7 +426,6 @@ export interface WebviewMessage {
| "askResponse"
| "terminalOperation"
| "clearTask"
| "didShowAnnouncement"
| "selectImages"
| "exportCurrentTask"
| "shareCurrentTask"
Expand Down Expand Up @@ -552,8 +546,6 @@ export interface WebviewMessage {
| "queueMessage"
| "removeQueuedMessage"
| "editQueuedMessage"
| "dismissUpsell"
| "getDismissedUpsells"
| "openMarkdownPreview"
| "updateSettings"
| "allowedCommands"
Expand Down Expand Up @@ -648,8 +640,6 @@ export interface WebviewMessage {
visibility?: ShareVisibility // For share visibility
hasContent?: boolean // For checkRulesDirectoryResult
checkOnly?: boolean // For deleteCustomMode check
upsellId?: string // For dismissUpsell
list?: string[] // For dismissedUpsells response
organizationId?: string | null // For organization switching
useProviderSignup?: boolean // For rooCloudSignIn to use provider signup flow
codeIndexSettings?: {
Expand Down
10 changes: 1 addition & 9 deletions src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export class ClineProvider

public isViewLaunched = false
public settingsImportedAt?: number
public readonly latestAnnouncementId = "apr-2026-v3.53.0-community-handoff-gpt55-opus47" // v3.53.0 Community handoff, GPT-5.5, Claude Opus 4.7, checkpoint navigation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This param is still read for the announcement component.

public readonly providerSettingsManager: ProviderSettingsManager
public readonly customModesManager: CustomModesManager

Expand Down Expand Up @@ -2057,7 +2056,6 @@ export class ClineProvider

const {
apiConfiguration,
lastShownAnnouncementId,
customInstructions,
alwaysAllowReadOnly,
alwaysAllowReadOnlyOutsideWorkspace,
Expand Down Expand Up @@ -2228,8 +2226,6 @@ export class ClineProvider
ttsSpeed: ttsSpeed ?? 1.0,
enableCheckpoints: enableCheckpoints ?? true,
checkpointTimeout: checkpointTimeout ?? DEFAULT_CHECKPOINT_TIMEOUT_SECONDS,
shouldShowAnnouncement:
telemetrySetting !== "unset" && lastShownAnnouncementId !== this.latestAnnouncementId,
allowedCommands: mergedAllowedCommands,
deniedCommands: mergedDeniedCommands,
soundVolume: soundVolume ?? 0.5,
Expand Down Expand Up @@ -2333,10 +2329,7 @@ export class ClineProvider
*/

async getState(): Promise<
Omit<
ExtensionState,
"clineMessages" | "renderContext" | "hasOpenedModeSelector" | "version" | "shouldShowAnnouncement"
>
Omit<ExtensionState, "clineMessages" | "renderContext" | "hasOpenedModeSelector" | "version">
> {
const stateValues = this.contextProxy.getValues()
const customModes = await this.customModesManager.getCustomModes()
Expand Down Expand Up @@ -2407,7 +2400,6 @@ export class ClineProvider
// Return the same structure as before.
return {
apiConfiguration: providerSettings,
lastShownAnnouncementId: stateValues.lastShownAnnouncementId,
customInstructions: stateValues.customInstructions,
apiModelId: stateValues.apiModelId,
alwaysAllowReadOnly: stateValues.alwaysAllowReadOnly ?? false,
Expand Down
1 change: 0 additions & 1 deletion src/core/webview/__tests__/ClineProvider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ describe("ClineProvider", () => {
version: "1.0.0",
clineMessages: [],
taskHistory: [],
shouldShowAnnouncement: false,
apiConfiguration: {
apiProvider: "openrouter",
},
Expand Down
39 changes: 0 additions & 39 deletions src/core/webview/webviewMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -770,10 +770,6 @@ export const webviewMessageHandler = async (
await provider.clearTask()
await provider.postStateToWebview()
break
case "didShowAnnouncement":
await updateGlobalState("lastShownAnnouncementId", provider.latestAnnouncementId)
await provider.postStateToWebview()
break
case "selectImages":
const images = await selectImages()
await provider.postMessageToWebview({
Expand Down Expand Up @@ -3225,41 +3221,6 @@ export const webviewMessageHandler = async (
break
}

case "dismissUpsell": {
if (message.upsellId) {
try {
// Get current list of dismissed upsells
const dismissedUpsells = getGlobalState("dismissedUpsells") || []

// Add the new upsell ID if not already present
let updatedList = dismissedUpsells
if (!dismissedUpsells.includes(message.upsellId)) {
updatedList = [...dismissedUpsells, message.upsellId]
await updateGlobalState("dismissedUpsells", updatedList)
}

// Send updated list back to webview (use the already computed updatedList)
await provider.postMessageToWebview({
type: "dismissedUpsells",
list: updatedList,
})
} catch (error) {
// Fail silently as per Bruno's comment - it's OK to fail silently in this case
provider.log(`Failed to dismiss upsell: ${error instanceof Error ? error.message : String(error)}`)
}
}
break
}
case "getDismissedUpsells": {
// Send the current list of dismissed upsells to the webview
const dismissedUpsells = getGlobalState("dismissedUpsells") || []
await provider.postMessageToWebview({
type: "dismissedUpsells",
list: dismissedUpsells,
})
break
}

case "openMarkdownPreview": {
if (message.text) {
try {
Expand Down
16 changes: 1 addition & 15 deletions webview-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const App = () => {
didHydrateState,
showWelcome,
settingsImportedAt,
shouldShowAnnouncement,
telemetrySetting,
telemetryKey,
machineId,
Expand All @@ -66,7 +65,6 @@ const App = () => {
// Create a persistent state manager
const marketplaceStateManager = useMemo(() => new MarketplaceViewStateManager(), [])

const [showAnnouncement, setShowAnnouncement] = useState(false)
const [tab, setTab] = useState<Tab>("chat")
const handledImportRef = useRef<number | undefined>(undefined)

Expand Down Expand Up @@ -164,13 +162,6 @@ const App = () => {

useEvent("message", onMessage)

useEffect(() => {
if (shouldShowAnnouncement && tab === "chat") {
setShowAnnouncement(true)
vscode.postMessage({ type: "didShowAnnouncement" })
}
}, [shouldShowAnnouncement, tab])

useEffect(() => {
const isRecoverableTab = tab === "settings" || tab === "marketplace"

Expand Down Expand Up @@ -246,12 +237,7 @@ const App = () => {
targetTab={currentMarketplaceTab as "mcp" | "mode" | undefined}
/>
)}
<ChatView
ref={chatViewRef}
isHidden={tab !== "chat"}
showAnnouncement={showAnnouncement}
hideAnnouncement={() => setShowAnnouncement(false)}
/>
<ChatView ref={chatViewRef} isHidden={tab !== "chat"} />
{deleteMessageDialogState.hasCheckpoint ? (
<MemoizedCheckpointRestoreDialog
open={deleteMessageDialogState.isOpen}
Expand Down
5 changes: 0 additions & 5 deletions webview-ui/src/__tests__/App.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ describe("App", () => {
mockUseExtensionState.mockReturnValue({
didHydrateState: true,
showWelcome: false,
shouldShowAnnouncement: false,
experiments: {},
language: "en",
telemetrySetting: "enabled",
Expand All @@ -191,7 +190,6 @@ describe("App", () => {
const createSetupIncompleteState = () => ({
didHydrateState: true,
showWelcome: true,
shouldShowAnnouncement: false,
experiments: {},
language: "en",
telemetrySetting: "enabled",
Expand All @@ -209,7 +207,6 @@ describe("App", () => {
mockUseExtensionState.mockReturnValue({
didHydrateState: true,
showWelcome: true,
shouldShowAnnouncement: false,
experiments: {},
language: "en",
telemetrySetting: "enabled",
Expand Down Expand Up @@ -242,7 +239,6 @@ describe("App", () => {
mockUseExtensionState.mockReturnValue({
didHydrateState: true,
showWelcome: true,
shouldShowAnnouncement: false,
experiments: {},
language: "en",
telemetrySetting: "enabled",
Expand All @@ -262,7 +258,6 @@ describe("App", () => {
mockUseExtensionState.mockReturnValue({
didHydrateState: true,
showWelcome: true,
shouldShowAnnouncement: false,
experiments: {},
language: "en",
telemetrySetting: "enabled",
Expand Down
Loading
Loading