From e86a9f3ee93d6ea0d19e0af04c5a63b41ca72582 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 4 Dec 2024 06:28:43 +0800 Subject: refactor: do not refresh documents when `.edit rag-docs` (#1032) --- src/config/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config/mod.rs') diff --git a/src/config/mod.rs b/src/config/mod.rs index 2eecf62..db210ab 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1356,7 +1356,7 @@ impl Config { if new_document_paths.is_empty() || new_document_paths == document_paths { bail!("No changes") } - rag.refresh_document_paths(&new_document_paths, config, abort_signal) + rag.refresh_document_paths(&new_document_paths, false, config, abort_signal) .await?; config.write().rag = Some(Arc::new(rag)); Ok(()) @@ -1368,7 +1368,7 @@ impl Config { None => bail!("No RAG"), }; let document_paths = rag.document_paths().to_vec(); - rag.refresh_document_paths(&document_paths, config, abort_signal) + rag.refresh_document_paths(&document_paths, true, config, abort_signal) .await?; config.write().rag = Some(Arc::new(rag)); Ok(()) -- cgit v1.2.3