feat: make /transfer bidirectional across telegram and tui

This commit is contained in:
William Valentin
2026-02-18 07:55:08 -08:00
parent d48adbe0b0
commit 16af5e75fd
13 changed files with 262 additions and 17 deletions
+1
View File
@@ -89,6 +89,7 @@ describe('parseCommand', () => {
it('parses /transfer command', () => {
expect(parseCommand('/transfer telegram')).toEqual({ type: 'transfer', target: 'telegram' });
expect(parseCommand('/transfer')).toEqual({ type: 'transfer', target: '' });
});
it('parses /queue commands', () => {
+5 -2
View File
@@ -94,6 +94,9 @@ export function parseCommand(input: string): Command | null {
}
// Transfer
if (trimmed === '/transfer') {
return { type: 'transfer', target: '' };
}
if (trimmed.startsWith('/transfer ')) {
const target = trimmed.slice('/transfer '.length).trim();
return { type: 'transfer', target };
@@ -172,7 +175,7 @@ Commands:
/verbose Toggle verbose mode (show raw streaming and tool output)
/status Show session info and token usage
/fullscreen, /fs Switch to fullscreen mode
/transfer <dest> Transfer session to another frontend
/transfer <dest> Transfer session to another frontend (telegram|tui)
/quit, /exit Exit TUI
`.trim();
}
@@ -224,7 +227,7 @@ export const COMMAND_TOOLTIPS: Record<string, string> = {
'/pair': 'Generate/list/revoke DM pairing codes',
'/queue': 'Show or update per-session queue policy',
'/elevate': 'Show or manage elevated mode',
'/transfer': 'Transfer session to another frontend',
'/transfer': 'Transfer session to another frontend (telegram|tui)',
'/quit': 'Exit TUI',
'/exit': 'Exit TUI',
};