feat: add /backend command parsing
Add support for /backend command to show or switch local backend providers. Follows the same pattern as /model command with optional argument support. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,15 @@ describe('parseCommand', () => {
|
||||
expect(parseCommand('/model opus')).toEqual({ type: 'model', name: 'opus' });
|
||||
});
|
||||
|
||||
it('parses /backend command without argument', () => {
|
||||
expect(parseCommand('/backend')).toEqual({ type: 'backend' });
|
||||
});
|
||||
|
||||
it('parses /backend command with argument', () => {
|
||||
expect(parseCommand('/backend llamacpp')).toEqual({ type: 'backend', provider: 'llamacpp' });
|
||||
expect(parseCommand('/backend ollama')).toEqual({ type: 'backend', provider: 'ollama' });
|
||||
});
|
||||
|
||||
it('parses /transfer command', () => {
|
||||
expect(parseCommand('/transfer telegram')).toEqual({ type: 'transfer', target: 'telegram' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user