diff options
| author | sigoden <sigoden@gmail.com> | 2024-12-04 06:28:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-04 06:28:43 +0800 |
| commit | e86a9f3ee93d6ea0d19e0af04c5a63b41ca72582 (patch) | |
| tree | 9eaffc728d027b23e0b2be63a6b6be51bbea01c7 /src/config/mod.rs | |
| parent | 46348dfb1d65e6077ebb6441dcfdeeca003c27cb (diff) | |
| download | aichat-e86a9f3ee93d6ea0d19e0af04c5a63b41ca72582.tar.gz | |
refactor: do not refresh documents when `.edit rag-docs` (#1032)
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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(()) |
