summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-12-14 07:00:47 +0800
committerGitHub <noreply@github.com>2024-12-14 07:00:47 +0800
commitbad5084e148ae1a392e3ac1ea96a6217f7f02844 (patch)
treea70283cd4dcd66ac9920a36b4de4a63a5c727dd5 /src/cli.rs
parent737580bb87f3b1d2f040dd7a4ddacca3595915a0 (diff)
downloadaichat-bad5084e148ae1a392e3ac1ea96a6217f7f02844.tar.gz
fix: don't trim the input text (#1056)
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/cli.rs b/src/cli.rs
index c3af5cc..2de6113 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -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;
}