feat(tui): add streaming and model switching to minimal mode
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import { formatPrompt, parseCommand, type TuiCommand } from './minimal.js';
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { formatPrompt, parseCommand } from './minimal.js';
|
||||
|
||||
describe('formatPrompt', () => {
|
||||
it('formats default prompt', () => {
|
||||
@@ -13,25 +13,15 @@ describe('formatPrompt', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseCommand', () => {
|
||||
describe('parseCommand (re-exported)', () => {
|
||||
it('parses /quit command', () => {
|
||||
const result = parseCommand('/quit');
|
||||
expect(result).toEqual({ type: 'quit' });
|
||||
});
|
||||
|
||||
it('parses /reset command', () => {
|
||||
const result = parseCommand('/reset');
|
||||
expect(result).toEqual({ type: 'reset' });
|
||||
});
|
||||
|
||||
it('parses /transfer command with target', () => {
|
||||
const result = parseCommand('/transfer telegram');
|
||||
expect(result).toEqual({ type: 'transfer', target: 'telegram' });
|
||||
});
|
||||
|
||||
it('parses /fullscreen command', () => {
|
||||
const result = parseCommand('/fullscreen');
|
||||
expect(result).toEqual({ type: 'fullscreen' });
|
||||
it('parses /model command', () => {
|
||||
const result = parseCommand('/model local');
|
||||
expect(result).toEqual({ type: 'model', name: 'local' });
|
||||
});
|
||||
|
||||
it('parses regular message', () => {
|
||||
|
||||
Reference in New Issue
Block a user