Skip to content

Commit b348612

Browse files
Joaquín Rualesjruales
authored andcommitted
Revert to generic 'Open Command Palette' when command not found, instead of reverting to JSON code block
1 parent 537b8ae commit b348612

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/extension/context/node/resolvers/vscodeContext.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,15 @@ export async function parseSettingsAndCommands(workbenchService: IWorkbenchServi
112112
const allcommands = (await workbenchService.getAllCommands(/* filterByPreCondition */true));
113113
const commandItem = allcommands.find(commandItem => commandItem.command === item.details?.key);
114114
if (!commandItem) {
115-
return [];
115+
// If we can't find the command on the list, just open the command palette without any pre-filled filter
116+
parsedMetadata.push({
117+
commandToRun: {
118+
command: 'workbench.action.quickOpen',
119+
arguments: [`>`],
120+
title: l10n.t("Open Command Palette"),
121+
}
122+
});
123+
return parsedMetadata;
116124
}
117125
parsedMetadata.push({
118126
commandToRun: {

0 commit comments

Comments
 (0)