diff --git a/rollup/rollup.config.ts b/rollup/rollup.config.ts index f032c9d0..88201f8a 100644 --- a/rollup/rollup.config.ts +++ b/rollup/rollup.config.ts @@ -89,7 +89,9 @@ const REMOVE_COMMANDS = new Set([ 'debug.startFromConfig', 'debug.installAdditionalDebuggers', 'REMOVE_ROOT_FOLDER_COMMAND_ID', - 'debug.openView' + 'debug.openView', + '_files.windowOpen', + '_files.newWindow' ]) const KEEP_COLORS = new Set([ @@ -159,9 +161,15 @@ function isCallPure (file: string, functionName: string, node: recast.types.name } if (functionName === 'CommandsRegistry.registerCommand') { - if (file.includes('fileActions.contribution') || file.includes('workspaceCommands') || file.includes('mainThreadCLICommands')) { + if (file.includes('workspaceCommands') || file.includes('mainThreadCLICommands')) { return true } + + const firstParam = args[0]! + if (firstParam.type === 'StringLiteral') { + const commandId = firstParam.value + return REMOVE_COMMANDS.has(commandId) + } } // Remove Registry.add calls