From 632d7cdfa32534f55a48aa31fb2512a221040e60 Mon Sep 17 00:00:00 2001 From: sigoden Date: Fri, 13 Sep 2024 18:23:44 +0800 Subject: refactor: improve repl completeion (#865) --- src/repl/completer.rs | 2 +- src/repl/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/repl') 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::>() .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()), -- cgit v1.2.3