mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-14 04:02:26 +00:00
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:
parent
87b113c2e3
commit
0397be5939
3 changed files with 2 additions and 11 deletions
|
|
@ -18,14 +18,6 @@ describe('createSlashHandler', () => {
|
||||||
expect(getOverlayState().picker).toBe(true)
|
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 () => {
|
it('keeps typed /model switches session-scoped by default', async () => {
|
||||||
patchUiState({ sid: 'sid-abc' })
|
patchUiState({ sid: 'sid-abc' })
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ export const sessionCommands: SlashCommand[] = [
|
||||||
|
|
||||||
{
|
{
|
||||||
help: 'change or show model',
|
help: 'change or show model',
|
||||||
aliases: ['provider'],
|
|
||||||
name: 'model',
|
name: 'model',
|
||||||
run: (arg, ctx) => {
|
run: (arg, ctx) => {
|
||||||
if (ctx.session.guardBusySessionSwitch('change models')) {
|
if (ctx.session.guardBusySessionSwitch('change models')) {
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@ export function completionRequestForInput(
|
||||||
return null
|
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.
|
// 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
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue