mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-03 02:11:48 +00:00
fix(models): consolidate provider and model into /model command
This commit is contained in:
parent
ac0325c257
commit
a0b62e0c5a
6 changed files with 83 additions and 34 deletions
|
|
@ -43,6 +43,28 @@ describe('createSlashHandler', () => {
|
|||
})
|
||||
})
|
||||
|
||||
it('honors TUI picker session scope without adding --global', async () => {
|
||||
patchUiState({ sid: 'sid-abc' })
|
||||
|
||||
const ctx = buildCtx({
|
||||
gateway: {
|
||||
...buildGateway(),
|
||||
rpc: vi.fn(() => Promise.resolve({ value: 'anthropic/claude-sonnet-4.6' }))
|
||||
}
|
||||
})
|
||||
|
||||
expect(
|
||||
createSlashHandler(ctx)(
|
||||
'/model anthropic/claude-sonnet-4.6 --provider openrouter --tui-session'
|
||||
)
|
||||
).toBe(true)
|
||||
expect(ctx.gateway.rpc).toHaveBeenCalledWith('config.set', {
|
||||
key: 'model',
|
||||
session_id: 'sid-abc',
|
||||
value: 'anthropic/claude-sonnet-4.6 --provider openrouter'
|
||||
})
|
||||
})
|
||||
|
||||
it('does not duplicate --global for explicit persistent model switches', () => {
|
||||
patchUiState({ sid: 'sid-abc' })
|
||||
const ctx = buildCtx()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue