summaryrefslogtreecommitdiffstats
path: root/src/repl
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-09-13 18:23:44 +0800
committerGitHub <noreply@github.com>2024-09-13 18:23:44 +0800
commit632d7cdfa32534f55a48aa31fb2512a221040e60 (patch)
tree176f2560ddca292aa95e1c7845e583827d9f5bf2 /src/repl
parentc821652ed98819f09e0ae29269fd5410e256813e (diff)
downloadaichat-632d7cdfa32534f55a48aa31fb2512a221040e60.tar.gz
refactor: improve repl completeion (#865)
Diffstat (limited to 'src/repl')
-rw-r--r--src/repl/completer.rs2
-rw-r--r--src/repl/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/repl/completer.rs b/src/repl/completer.rs
index 7f325bd..0771001 100644
--- a/src/repl/completer.rs
+++ b/src/repl/completer.rs
@@ -42,7 +42,7 @@ impl Completer for ReplCompleter {
.map(|(v, _)| *v)
.collect::<Vec<&str>>()
.join(" ");
- cmd.name.starts_with(&line)
+ cmd.name.starts_with(&line) && cmd.name != ".set"
})
.collect();
diff --git a/src/repl/mod.rs b/src/repl/mod.rs
index 13e147b..2f6c76f 100644
--- a/src/repl/mod.rs
+++ b/src/repl/mod.rs
@@ -147,7 +147,7 @@ lazy_static::lazy_static! {
"Regenerate the last response",
AssertState::pass()
),
- ReplCommand::new(".set", "Adjust settings", AssertState::pass()),
+ ReplCommand::new(".set", "Adjust runtime configuration", AssertState::pass()),
ReplCommand::new(".delete", "Delete roles/sessions/RAGs/agents-config", AssertState::pass()),
ReplCommand::new(".copy", "Copy the last response", AssertState::pass()),
ReplCommand::new(".exit", "Exit the REPL", AssertState::pass()),