diff options
-rw-r--r-- | analyze_binary.py | 27 | ||||
-rw-r--r-- | buildm1.sh | 23 | ||||
-rw-r--r-- | continuedev/src/continuedev/core/context.py | 2 | ||||
-rw-r--r-- | continuedev/src/continuedev/plugins/context_providers/file.py | 3 |
4 files changed, 48 insertions, 7 deletions
diff --git a/analyze_binary.py b/analyze_binary.py new file mode 100644 index 00000000..4fc1c711 --- /dev/null +++ b/analyze_binary.py @@ -0,0 +1,27 @@ +from collections import defaultdict + +# Initialize a dictionary to store the sizes of the folders +folder_sizes = defaultdict(int) + +# Parse the file +with open( + "archive_contents.txt", "r" +) as f: # replace 'file.txt' with your file name + for line in f: + parts = line.split(",") + if len(parts) < 2: + continue + size = int(parts[1].strip()) # get the size + path = parts[-1].strip() # get the path + + # Split the path into its components and accumulate the sizes for each folder + path_parts = path.split("/") + top_level = path_parts[0] + folder_sizes[top_level] += size + +# Sort the folders by size in descending order +sorted_folders = sorted(folder_sizes.items(), key=lambda x: x[1], reverse=True) + +# Print the sorted folders and their sizes +for folder, size in sorted_folders: + print(f"{folder}: {size}") @@ -1,11 +1,22 @@ - #!/bin/sh -# 1. Remove continuedev/.venv +# 1. Remove unwanted stuff +rm -rf build +rm -rf env +rm -rf dist rm -rf continuedev/.venv -# 2. Run pyinstaller run.m1.spec -pyinstaller run.m1.spec +# 2. Create a new virtual environment and activate it +python3 -m venv env +source env/bin/activate + +# 3. Install the required packages +pip install -r continuedev/requirements.txt + +pip install pyinstaller + +# 4. Call PyInstaller from within the virtual environment +env/bin/pyinstaller run.m1.spec -# 3. Reinstall poetry deps -cd continuedev && poetry install
\ No newline at end of file +# 5. Deactivate the virtual environment +deactivate
\ No newline at end of file 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( *[ |