From 97f477e4dd64165738a6beab74edf09ef355a55a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 3 Jul 2023 19:34:33 -0700 Subject: fix python version on windows, other bugs, jest --- continuedev/src/continuedev/models/filesystem.py | 6 ++++++ continuedev/src/continuedev/steps/chat.py | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'continuedev') diff --git a/continuedev/src/continuedev/models/filesystem.py b/continuedev/src/continuedev/models/filesystem.py index df0b15d7..ca12579c 100644 --- a/continuedev/src/continuedev/models/filesystem.py +++ b/continuedev/src/continuedev/models/filesystem.py @@ -54,6 +54,12 @@ class RangeInFileWithContents(RangeInFile): @staticmethod def from_entire_file(filepath: str, content: str) -> "RangeInFileWithContents": lines = content.splitlines() + if not lines: + return RangeInFileWithContents( + filepath=filepath, + range=Range.from_shorthand(0, 0, 0, 0), + contents="" + ) return RangeInFileWithContents( filepath=filepath, range=Range.from_shorthand( diff --git a/continuedev/src/continuedev/steps/chat.py b/continuedev/src/continuedev/steps/chat.py index 58f43bcf..013cb578 100644 --- a/continuedev/src/continuedev/steps/chat.py +++ b/continuedev/src/continuedev/steps/chat.py @@ -74,11 +74,6 @@ class AddFileStep(Step): await sdk.ide.setFileOpen(os.path.join(sdk.ide.workspace_directory, self.filename)) - open_files = await sdk.ide.getOpenFiles() - if len(open_files) > 0: - currently_open_file = (await sdk.ide.getOpenFiles())[0] - await sdk.ide.setFileOpen(currently_open_file) - class DeleteFileStep(Step): name: str = "Delete File" -- cgit v1.2.3-70-g09d2