summaryrefslogtreecommitdiff
path: root/continuedev
diff options
context:
space:
mode:
authorTy Dunn <ty@tydunn.com>2023-07-03 19:42:38 -0700
committerTy Dunn <ty@tydunn.com>2023-07-03 19:42:38 -0700
commit524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54 (patch)
treee9a148b84074c211b75e2623a73326e31a6e5bb1 /continuedev
parent49de11a268d047da918ead7f0789b30145e92df1 (diff)
parented85171a423048a2a11a7d2a911dea8c4f332324 (diff)
downloadsncontinue-524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54.tar.gz
sncontinue-524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54.tar.bz2
sncontinue-524c7bd433b8bfcc96ca1d95c6fbd27ce52ccb54.zip
Merge branch 'main' of github.com:continuedev/continue
Diffstat (limited to 'continuedev')
-rw-r--r--continuedev/src/continuedev/models/filesystem.py6
-rw-r--r--continuedev/src/continuedev/steps/chat.py5
2 files changed, 6 insertions, 5 deletions
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"