diff options
| author | sigoden <sigoden@gmail.com> | 2024-09-13 22:12:36 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-13 22:12:36 +0800 |
| commit | 5a26c59a12e25cc96c6eb44c64395e673207135c (patch) | |
| tree | cb585d8808797ddfe2e36429103773f48e3b5ef7 /src/main.rs | |
| parent | 0fb403a2e9bcf5b2e0bc66c96778eba5a0cc3b2f (diff) | |
| download | aichat-5a26c59a12e25cc96c6eb44c64395e673207135c.tar.gz | |
refactor: role/session/agent should not inherit the global `use_tools` (#868)
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 485b05d..b4b76b6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -233,6 +233,9 @@ async fn shell_execute(config: &GlobalConfig, shell: &Shell, mut input: Input) - config .write() .after_chat_completion(&input, &eval_str, &[])?; + if eval_str.is_empty() { + bail!("No command generated"); + } if config.read().dry_run { config.read().print_markdown(&eval_str)?; return Ok(()); |
