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.
This commit is contained in:
Teknium 2026-05-05 12:23:21 -07:00 committed by GitHub
parent 87b113c2e3
commit 0397be5939
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 11 deletions

View file

@ -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' })

View file

@ -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')) {

View file

@ -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
}