summaryrefslogtreecommitdiff
path: root/continuedev/src
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-23 16:52:07 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-23 16:52:07 -0700
commit598e243fd292dd8851865ab1c3915ca55f4992cc (patch)
tree7c8ebb7a6791a54ad52c6887229cecb70d3ffd8a /continuedev/src
parentf246a05b4d192a3f2ba717541d182ab3bcb830de (diff)
downloadsncontinue-598e243fd292dd8851865ab1c3915ca55f4992cc.tar.gz
sncontinue-598e243fd292dd8851865ab1c3915ca55f4992cc.tar.bz2
sncontinue-598e243fd292dd8851865ab1c3915ca55f4992cc.zip
fix: :bug: fix meilisearch empty body content-type bug
Diffstat (limited to 'continuedev/src')
-rw-r--r--continuedev/src/continuedev/core/context.py2
-rw-r--r--continuedev/src/continuedev/plugins/context_providers/file.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/core/context.py b/continuedev/src/continuedev/core/context.py
index d47ad942..e6642404 100644
--- a/continuedev/src/continuedev/core/context.py
+++ b/continuedev/src/continuedev/core/context.py
@@ -251,7 +251,7 @@ class ContextManager:
async def add_docs():
index = await search_client.get_index(SEARCH_INDEX_NAME)
- await index.add_documents(documents)
+ await index.add_documents(documents or [])
await asyncio.wait_for(add_docs(), timeout=5)
diff --git a/continuedev/src/continuedev/plugins/context_providers/file.py b/continuedev/src/continuedev/plugins/context_providers/file.py
index 3cb63ca3..f4e6e374 100644
--- a/continuedev/src/continuedev/plugins/context_providers/file.py
+++ b/continuedev/src/continuedev/plugins/context_providers/file.py
@@ -77,6 +77,9 @@ class FileContextProvider(ContextProvider):
await self.delete_documents(ids)
async def on_files_renamed(old_filepaths: List[str], new_filepaths: List[str]):
+ if self.sdk.ide.workspace_directory is None:
+ return
+
old_ids = [self.get_id_for_filepath(filepath) for filepath in old_filepaths]
new_docs = await asyncio.gather(
*[