feat: make /transfer bidirectional across telegram and tui
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user