diff options
| author | sigoden <sigoden@gmail.com> | 2024-12-14 07:00:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-14 07:00:47 +0800 |
| commit | bad5084e148ae1a392e3ac1ea96a6217f7f02844 (patch) | |
| tree | a70283cd4dcd66ac9920a36b4de4a63a5c727dd5 /src/cli.rs | |
| parent | 737580bb87f3b1d2f040dd7a4ddacca3595915a0 (diff) | |
| download | aichat-bad5084e148ae1a392e3ac1ea96a6217f7f02844.tar.gz | |
fix: don't trim the input text (#1056)
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -73,12 +73,7 @@ pub struct Cli { impl Cli { pub fn text(&self) -> Option<String> { - let text = self - .text - .iter() - .map(|x| x.trim().to_string()) - .collect::<Vec<String>>() - .join(" "); + let text = self.text.to_vec().join(" "); if text.is_empty() { return None; } |
