diff options
| author | sigoden <sigoden@gmail.com> | 2024-09-10 19:57:12 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-10 19:57:12 +0800 |
| commit | 03193e38449f1e8d53225f984dac1878e8296017 (patch) | |
| tree | cde0d2dfd71ae6370e84ed2980b96456650766bf /src | |
| parent | e181ae9b0d4814a7c005c94837426126dde63c6c (diff) | |
| download | aichat-03193e38449f1e8d53225f984dac1878e8296017.tar.gz | |
refactor: remove the icons for the execution shell command (#854)
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 780678d..7b39b9e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -241,25 +241,25 @@ async fn shell_execute(config: &GlobalConfig, shell: &Shell, mut input: Input) - loop { let answer = Select::new( eval_str.trim(), - vec!["✅ Execute", "🔄️ Revise", "📖 Explain", "❌ Cancel"], + vec!["Execute", "Revise", "Explain", "Cancel"], ) .prompt()?; match answer { - "✅ Execute" => { + "Execute" => { debug!("{} {:?}", shell.cmd, &[&shell.arg, &eval_str]); let code = run_command(&shell.cmd, &[&shell.arg, &eval_str], None)?; if code != 0 { process::exit(code); } } - "🔄️ Revise" => { + "Revise" => { let revision = Text::new("Enter your revision:").prompt()?; let text = format!("{}\n{revision}", input.text()); input.set_text(text); return shell_execute(config, shell, input).await; } - "📖 Explain" => { + "Explain" => { let role = config.read().retrieve_role(EXPLAIN_SHELL_ROLE)?; let input = Input::from_str(config, &eval_str, Some(role)); let abort = create_abort_signal(); @@ -269,6 +269,7 @@ async fn shell_execute(config: &GlobalConfig, shell: &Shell, mut input: Input) - } else { call_chat_completions(&input, client.as_ref(), config).await?; } + println!(); continue; } _ => {} |
