feat(tui): add multiline paste mode in minimal UI
This commit is contained in:
@@ -2,6 +2,7 @@ export type Command =
|
||||
| { type: 'quit' }
|
||||
| { type: 'reset' }
|
||||
| { type: 'help' }
|
||||
| { type: 'multiline' }
|
||||
| { type: 'status' }
|
||||
| { type: 'tools' }
|
||||
| { type: 'research'; task: string }
|
||||
@@ -63,6 +64,11 @@ export function parseCommand(input: string): Command | null {
|
||||
return { type: 'help' };
|
||||
}
|
||||
|
||||
// Multiline paste mode
|
||||
if (trimmed === '/paste' || trimmed === '/multiline') {
|
||||
return { type: 'multiline' };
|
||||
}
|
||||
|
||||
// Status
|
||||
if (trimmed === '/status') {
|
||||
return { type: 'status' };
|
||||
@@ -212,6 +218,7 @@ export function getHelpText(): string {
|
||||
return `
|
||||
Commands:
|
||||
/help, /? Show this help
|
||||
/paste, /multiline Enter multiline mode (finish with single '.' line)
|
||||
/tools Show available tools in this session
|
||||
/model [name] Show or switch model tier (local, default, fast, complex)
|
||||
/model <tier> <p/m> Change tier's provider/model (e.g. /model default anthropic/claude-sonnet-4)
|
||||
@@ -249,6 +256,8 @@ export type ModelAlias = 'local' | 'default' | 'fast' | 'complex' | 'opus' | 'so
|
||||
// List of all slash commands for autocompletion
|
||||
export const SLASH_COMMANDS = [
|
||||
'/help',
|
||||
'/paste',
|
||||
'/multiline',
|
||||
'/tools',
|
||||
'/model',
|
||||
'/backend',
|
||||
@@ -279,6 +288,8 @@ export const SLASH_COMMANDS = [
|
||||
// Command descriptions for tooltips
|
||||
export const COMMAND_TOOLTIPS: Record<string, string> = {
|
||||
'/help': 'Show available commands',
|
||||
'/paste': 'Compose a multiline message; finish with a single "." line',
|
||||
'/multiline': 'Compose a multiline message; finish with a single "." line',
|
||||
'/tools': 'Show authoritative runtime tool list for this session',
|
||||
'/model': 'Show or switch model (local, default, fast, complex)',
|
||||
'/backend': 'Show or switch local backend (ollama, llamacpp)',
|
||||
|
||||
Reference in New Issue
Block a user