Change:
Type: <bBug</bany open windows. to File Open Recent and click Clear Recently Opened. VS Code version: Code 1.83.1 (, 2023-10-10T23:46:55.789Z) OS version: Darwin x64 20.6.0
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
/verified

Discussion:
this.fallbackMenuHandlers['workbench.action.openWorkspace'] = (menuItem, win, event) => this.nativeHostMainService.pickWorkspaceAndOpen(undefined, { forceNewWindow: this.isOptionClick(event), telemetryExtraData: { from: telemetryFrom } }); // Recent Menu Items <del> this.fallbackMenuHandlers['workbench.action.clearRecentFiles'] = () => this.workspacesHistoryMainService.clearRecentlyOpened(); </del> <ins> this.fallbackMenuHandlers['workbench.action.clearRecentFiles'] = () => this.workspacesHistoryMainService.clearRecentlyOpened({ confirm: true /* ask for confirmation */ }); </ins> // Help Menu Items const youTubeUrl = this.productService.youTubeUrl;

import { IWorkspaceIdentifier, WORKSPACE_EXTENSION } from 'vs/platform/workspace/common/workspace'; import { IWorkspacesManagementMainService } from 'vs/platform/workspaces/electron-main/workspacesManagementMainService'; import { ResourceMap } from 'vs/base/common/map'; <ins> import { IDialogMainService } from 'vs/platform/dialogs/electron-main/dialogMainService'; </ins> export const IWorkspacesHistoryMainService = createDecorator<IWorkspacesHistoryMainService>('workspacesHistoryMainService');

addRecentlyOpened(recents: IRecent[]): Promise<void>; getRecentlyOpened(): Promise<IRecentlyOpened>; removeRecentlyOpened(paths: URI[]): Promise<void>; <del> clearRecentlyOpened(): Promise<void>; </del> <ins> clearRecentlyOpened(options?: { confirm?: boolean }): Promise<void>; </ins> } export class WorkspacesHistoryMainService extends Disposable implements IWorkspacesHistoryMainService {

@ILogService private readonly logService: ILogService, @IWorkspacesManagementMainService private readonly workspacesManagementMainService: IWorkspacesManagementMainService, @ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService, <del> @IApplicationStorageMainService private readonly applicationStorageMainService: IApplicationStorageMainService </del> <ins> @IApplicationStorageMainService private readonly applicationStorageMainService: IApplicationStorageMainService, @IDialogMainService private readonly dialogMainService: IDialogMainService </ins> ) { super();

} } <del> async clearRecentlyOpened(): Promise<void> { </del> <ins> async clearRecentlyOpened(options?: { confirm?: boolean }): Promise<void> { if (options?.confirm) { const { response } = await this.dialogMainService.showMessageBox({ type: 'warning', buttons: [ localize({ key: 'clearButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Clear"), localize({ key: 'cancel', comment: ['&& denotes a mnemonic'] }, "&&Cancel") ], message: localize('confirmClearRecentsMessage', "Do you want to clear all recently opened files and workspaces?"), detail: localize('confirmClearDetail', "This action is irreversible!"), cancelId: 1 }); if (response !== 0) { return; } } </ins> await this.saveRecentlyOpened({ workspaces: [], files: [] }); app.clearRecentDocuments();

group: 'z_clear', command: { id: ClearRecentFilesAction.ID, <del> title: localize({ key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] }, "&&Clear Recently Opened") </del> <ins> title: localize({ key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] }, "&&Clear Recently Opened...") </ins> }, order: 1 });

constructor() { super({ id: ClearRecentFilesAction.ID, <del> title: { value: localize('clearRecentFiles', "Clear Recently Opened"), original: 'Clear Recently Opened' }, </del> <ins> title: { value: localize('clearRecentFiles', "Clear Recently Opened..."), original: 'Clear Recently Opened...' }, </ins> f1: true, category: Categories.File });