diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-06-28 17:36:31 -0700 | 
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-06-28 17:36:31 -0700 | 
| commit | b25b737c50fc819d422d776ad25e7221fa18b884 (patch) | |
| tree | 73a5bf8ba230b6fd6c0ca4b39496aa7a3eb4d1e0 /continuedev/src | |
| parent | 542d9b72d5b413c33d5b670c5d605af71ad74695 (diff) | |
| download | sncontinue-b25b737c50fc819d422d776ad25e7221fa18b884.tar.gz sncontinue-b25b737c50fc819d422d776ad25e7221fa18b884.tar.bz2 sncontinue-b25b737c50fc819d422d776ad25e7221fa18b884.zip  | |
fixes
Diffstat (limited to 'continuedev/src')
| -rw-r--r-- | continuedev/src/continuedev/server/ide.py | 12 | ||||
| -rw-r--r-- | continuedev/src/continuedev/steps/core/core.py | 2 | 
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  | 
