summaryrefslogtreecommitdiff
path: root/continuedev
diff options
context:
space:
mode:
Diffstat (limited to 'continuedev')
-rw-r--r--continuedev/src/continuedev/server/ide.py12
-rw-r--r--continuedev/src/continuedev/steps/core/core.py2
2 files changed, 9 insertions, 5 deletions
diff --git a/continuedev/src/continuedev/server/ide.py b/continuedev/src/continuedev/server/ide.py
index 6a94326a..ff0b2a24 100644
--- a/continuedev/src/continuedev/server/ide.py
+++ b/continuedev/src/continuedev/server/ide.py
@@ -253,10 +253,14 @@ class IdeProtocolServer(AbstractIdeProtocolServer):
async def getUserSecret(self, key: str) -> str:
"""Get a user secret"""
- resp = await self._send_and_receive_json({
- "key": key
- }, GetUserSecretResponse, "getUserSecret")
- return resp.value
+ try:
+ resp = await self._send_and_receive_json({
+ "key": key
+ }, GetUserSecretResponse, "getUserSecret")
+ return resp.value
+ except Exception as e:
+ print("Error getting user secret", e)
+ return ""
async def saveFile(self, filepath: str):
"""Save a file"""
diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py
index ad72212d..800f43b5 100644
--- a/continuedev/src/continuedev/steps/core/core.py
+++ b/continuedev/src/continuedev/steps/core/core.py
@@ -406,7 +406,7 @@ class DefaultModelEditCodeStep(Step):
continue
# Because really short lines might be expected to be repeated, this is only a !heuristic!
# Stop when it starts copying the file_suffix
- elif line.strip() == line_below_highlighted_range.strip() and len(line.strip()) > 4 and not line.strip() == original_lines_below_previous_blocks[0].strip():
+ elif line.strip() == line_below_highlighted_range.strip() and len(line.strip()) > 4 and not (len(original_lines_below_previous_blocks) > 0 and line.strip() == original_lines_below_previous_blocks[0].strip()):
repeating_file_suffix = True
break