feat(tui): add streaming and model switching to minimal mode

This commit is contained in:
William Valentin
2026-02-05 10:53:41 -08:00
parent 435146344e
commit f115407af3
2 changed files with 110 additions and 90 deletions
+6 -16
View File
@@ -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', () => {