summaryrefslogtreecommitdiffstats
path: root/src/repl
diff options
context:
space:
mode:
Diffstat (limited to 'src/repl')
-rw-r--r--src/repl/mod.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs
index c08afc3..7bf70ea 100644
--- a/src/repl/mod.rs
+++ b/src/repl/mod.rs
@@ -31,7 +31,7 @@ lazy_static::lazy_static! {
const MENU_NAME: &str = "completion_menu";
lazy_static::lazy_static! {
- static ref REPL_COMMANDS: [ReplCommand; 34] = [
+ static ref REPL_COMMANDS: [ReplCommand; 35] = [
ReplCommand::new(".help", "Show this help message", AssertState::pass()),
ReplCommand::new(".info", "View system info", AssertState::pass()),
ReplCommand::new(".model", "Change the current LLM", AssertState::pass()),
@@ -106,6 +106,11 @@ lazy_static::lazy_static! {
AssertState::False(StateFlags::AGENT)
),
ReplCommand::new(
+ ".edit rag-docs",
+ "Edit the RAG documents",
+ AssertState::True(StateFlags::RAG),
+ ),
+ ReplCommand::new(
".rebuild rag",
"Rebuild the RAG to sync document changes",
AssertState::True(StateFlags::RAG),
@@ -360,8 +365,11 @@ impl Repl {
Some(("session", _)) => {
self.config.write().edit_session()?;
}
+ Some(("rag-docs", _)) => {
+ Config::edit_rag_docs(&self.config, self.abort_signal.clone()).await?;
+ }
_ => {
- println!(r#"Usage: .edit <role|session>"#)
+ println!(r#"Usage: .edit <role|session|rag-docs>"#)
}
}
}