Skip to content
TypeScript

refactor(web): remove unused model picker hint helpers (#10072)

Julius Marmingeab0933a41ae3
diff --git a/apps/web/src/keybindings.test.ts b/apps/web/src/keybindings.test.ts
index 6390269ea0d..df005571193 100644
--- a/apps/web/src/keybindings.test.ts
+++ b/apps/web/src/keybindings.test.ts
@@ -19,7 +19,6 @@ import {
isTerminalSplitVerticalShortcut,
isTerminalToggleShortcut,
resolveShortcutCommand,
- shouldShowModelPickerJumpHints,
shouldShowThreadJumpHintsForModifiers,
shortcutLabelForCommand,
terminalDeleteShortcutData,
@@ -541,21 +540,6 @@ describe("model picker navigation helpers", () => {
assert.strictEqual(modelPickerJumpIndexFromCommand("modelPicker.jump.3"), 2);
assert.isNull(modelPickerJumpIndexFromCommand("thread.jump.1"));
});
-
- it("shows jump hints only while the model picker context is active", () => {
- assert.isFalse(
- shouldShowModelPickerJumpHints(event({ metaKey: true }), DEFAULT_BINDINGS, {
- platform: "MacIntel",
- context: { modelPickerOpen: false },
- }),
- );
- assert.isTrue(
- shouldShowModelPickerJumpHints(event({ metaKey: true }), DEFAULT_BINDINGS, {
- platform: "MacIntel",
- context: { modelPickerOpen: true },
- }),
- );
- });
});
describe("chat/editor shortcuts", () => {
diff --git a/apps/web/src/keybindings.ts b/apps/web/src/keybindings.ts
index 62f107a4daa..1b4fa072d5a 100644
--- a/apps/web/src/keybindings.ts
+++ b/apps/web/src/keybindings.ts
@@ -329,32 +329,6 @@ export function modelPickerJumpIndexFromCommand(command: string): number | null
return index === -1 ? null : index;
}
-export function shouldShowModelPickerJumpHints(
- event: ShortcutEventLike,
- keybindings: ResolvedKeybindingsConfig,
- options?: ShortcutMatchOptions,
-): boolean {
- return shouldShowModelPickerJumpHintsForModifiers(event, keybindings, options);
-}
-
-export function shouldShowModelPickerJumpHintsForModifiers(
- modifiers: ShortcutModifierStateLike,
- keybindings: ResolvedKeybindingsConfig,
- options?: ShortcutMatchOptions,
-): boolean {
- const platform = resolvePlatform(options);
-
- for (const command of MODEL_PICKER_JUMP_KEYBINDING_COMMANDS) {
- const shortcut = findEffectiveShortcutForCommand(keybindings, command, options);
- if (!shortcut) continue;
- if (matchesShortcutModifiers(modifiers, shortcut, platform)) {
- return true;
- }
- }
-
- return false;
-}
-
export function isTerminalToggleShortcut(
event: ShortcutEventLike,
keybindings: ResolvedKeybindingsConfig,