From 0397be5939079d0a0f6df491637825e7f1583f2f Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 5 May 2026 12:23:21 -0700 Subject: [PATCH] feat(tui): remove /provider alias for /model (#20358) /model is the canonical command; /provider was a redundant alias that dispatched to the same ModelPicker overlay. Drop the alias, the regex branch in useCompletion, and the alias-coverage test. --- ui-tui/src/__tests__/createSlashHandler.test.ts | 8 -------- ui-tui/src/app/slash/commands/session.ts | 1 - ui-tui/src/hooks/useCompletion.ts | 4 ++-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/ui-tui/src/__tests__/createSlashHandler.test.ts b/ui-tui/src/__tests__/createSlashHandler.test.ts index c9447f16d8..53ca44a8fe 100644 --- a/ui-tui/src/__tests__/createSlashHandler.test.ts +++ b/ui-tui/src/__tests__/createSlashHandler.test.ts @@ -18,14 +18,6 @@ describe('createSlashHandler', () => { expect(getOverlayState().picker).toBe(true) }) - it('treats /provider as a local /model alias', () => { - const ctx = buildCtx() - - expect(createSlashHandler(ctx)('/provider')).toBe(true) - expect(getOverlayState().modelPicker).toBe(true) - expect(ctx.gateway.gw.request).not.toHaveBeenCalled() - }) - it('keeps typed /model switches session-scoped by default', async () => { patchUiState({ sid: 'sid-abc' }) diff --git a/ui-tui/src/app/slash/commands/session.ts b/ui-tui/src/app/slash/commands/session.ts index a75419c3b0..9dddd85372 100644 --- a/ui-tui/src/app/slash/commands/session.ts +++ b/ui-tui/src/app/slash/commands/session.ts @@ -62,7 +62,6 @@ export const sessionCommands: SlashCommand[] = [ { help: 'change or show model', - aliases: ['provider'], name: 'model', run: (arg, ctx) => { if (ctx.session.guardBusySessionSwitch('change models')) { diff --git a/ui-tui/src/hooks/useCompletion.ts b/ui-tui/src/hooks/useCompletion.ts index 6bafc35843..d32b0de647 100644 --- a/ui-tui/src/hooks/useCompletion.ts +++ b/ui-tui/src/hooks/useCompletion.ts @@ -21,9 +21,9 @@ export function completionRequestForInput( return null } - // `/model` / `/provider` use the two-step ModelPicker (real curated IDs). + // `/model` uses the two-step ModelPicker (real curated IDs). // Slash completion here only showed short aliases + vendor/family meta. - if (isSlashCommand && /^\/(?:model|provider)(?:\s|$)/.test(input)) { + if (isSlashCommand && /^\/model(?:\s|$)/.test(input)) { return null }