fix(tui): align slash command parsing and handlers

This commit is contained in:
William Valentin
2026-02-16 12:22:40 -08:00
parent fd7ad7bfb0
commit 1d16cd54e6
4 changed files with 176 additions and 0 deletions
+6
View File
@@ -94,6 +94,11 @@ describe('parseCommand', () => {
expect(parseCommand('/queue set mode followup')).toEqual({ type: 'queue', action: 'set', args: 'mode followup' });
});
it('parses /elevate command', () => {
expect(parseCommand('/elevate')).toEqual({ type: 'elevate' });
expect(parseCommand('/elevate 10m test --yes')).toEqual({ type: 'elevate', args: '10m test --yes' });
});
it('parses regular message', () => {
expect(parseCommand('Hello Flynn')).toEqual({ type: 'message', content: 'Hello Flynn' });
});
@@ -114,6 +119,7 @@ describe('getHelpText', () => {
expect(help).toContain('/usage');
expect(help).toContain('/verbose');
expect(help).toContain('/queue');
expect(help).toContain('/elevate');
expect(help).toContain('/quit');
});
});