101
// so we will treat `true` === `undefined`
102
if (when && when.type !== ContextKeyExprType.True) {
104
return false;
105
}
107
>
// Use implication instead of strict equality so that a removal still matches
108
>
// when the default keybinding's when clause becomes more specific across
109
>
// updates (e.g. "inChatInput" → "inChatInput && !withinEditSessionDiff").
110
>
// See https://github.com/microsoft/vscode/issues/293802
111
>
const defaultWhen = defaultKb.when.substituteConstants();
112
>
const removalWhen = when.substituteConstants();
113
>
if (!KeybindingResolver.whenIsEntirelyIncluded(defaultWhen, removalWhen)) {
114
return false;
115
}
117
return true;
118