feat: implement model management commands and overlays for enhanced user interaction
This commit is contained in:
@@ -34,6 +34,9 @@ pub fn apply_command(command: Command) -> Vec<Action> {
|
||||
Command::Mode(mode) => {
|
||||
vec![Action::SwitchMode(mode)]
|
||||
}
|
||||
Command::ClearConfirm => {
|
||||
vec![Action::OpenOverlay(Overlay::ClearConfirm)]
|
||||
}
|
||||
Command::Clear => {
|
||||
vec![Action::SystemNote {
|
||||
kind: "clear".to_string(),
|
||||
@@ -43,12 +46,27 @@ pub fn apply_command(command: Command) -> Vec<Action> {
|
||||
Command::Login { provider } => {
|
||||
vec![Action::StartOAuth { provider }]
|
||||
}
|
||||
Command::Edit(path) if path == "." || path.is_empty() => {
|
||||
vec![Action::SystemNote {
|
||||
kind: "info".to_string(),
|
||||
message: "Usage: /edit <path>\nOpens a file for inline editing.\nExample: /edit src/main.rs".to_string(),
|
||||
}]
|
||||
}
|
||||
Command::Edit(path) => {
|
||||
vec![Action::OpenEditor { path }]
|
||||
}
|
||||
Command::McpAdd { name, command } => {
|
||||
vec![Action::McpAdd { name, command }]
|
||||
}
|
||||
Command::ModelList => {
|
||||
vec![Action::ModelList]
|
||||
}
|
||||
Command::ModelUse { provider } => {
|
||||
vec![Action::ModelUse { provider }]
|
||||
}
|
||||
Command::ModelAdd { name, base_url } => {
|
||||
vec![Action::ModelAdd { name, base_url }]
|
||||
}
|
||||
Command::Unknown(cmd) => {
|
||||
vec![Action::SystemNote {
|
||||
kind: "error".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user