diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-08-01 23:14:40 -0700 | 
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-08-01 23:14:40 -0700 | 
| commit | 48feeb55877aa95e91707beca228237fba74543a (patch) | |
| tree | e829b1d255abebae999a3fb5141e78605357046a /continuedev/src | |
| parent | 0f55a01fd452152097fbd5ef65eb46a35d9f819d (diff) | |
| download | sncontinue-48feeb55877aa95e91707beca228237fba74543a.tar.gz sncontinue-48feeb55877aa95e91707beca228237fba74543a.tar.bz2 sncontinue-48feeb55877aa95e91707beca228237fba74543a.zip | |
remove data file
Diffstat (limited to 'continuedev/src')
| -rw-r--r-- | continuedev/src/continuedev/core/sdk.py | 2 | ||||
| -rw-r--r-- | continuedev/src/continuedev/libs/constants/default_config.py (renamed from continuedev/src/continuedev/libs/constants/default_config.py.txt) | 10 | ||||
| -rw-r--r-- | continuedev/src/continuedev/libs/util/paths.py | 11 | 
3 files changed, 9 insertions, 14 deletions
| diff --git a/continuedev/src/continuedev/core/sdk.py b/continuedev/src/continuedev/core/sdk.py index a5b16168..57e2c099 100644 --- a/continuedev/src/continuedev/core/sdk.py +++ b/continuedev/src/continuedev/core/sdk.py @@ -54,7 +54,7 @@ class ContinueSDK(AbstractContinueSDK):              formatted_err = '\n'.join(traceback.format_exception(e))              msg_step = MessageStep(                  name="Invalid Continue Config File", message=formatted_err) -            msg_step.description = f"Falling back to default config settings.\n```\n{formatted_err}\n```\n\nIt's possible this error was caused by an update to the Continue config format. If you'd like to see the new recommended default `config.py`, check [here](https://github.com/continuedev/continue/blob/main/continuedev/src/continuedev/libs/constants/default_config.py.txt)." +            msg_step.description = f"Falling back to default config settings.\n```\n{formatted_err}\n```\n\nIt's possible this error was caused by an update to the Continue config format. If you'd like to see the new recommended default `config.py`, check [here](https://github.com/continuedev/continue/blob/main/continuedev/src/continuedev/libs/constants/default_config.py)."              sdk.history.add_node(HistoryNode(                  step=msg_step,                  observation=None, diff --git a/continuedev/src/continuedev/libs/constants/default_config.py.txt b/continuedev/src/continuedev/libs/constants/default_config.py index cf8b0324..9d6d4270 100644 --- a/continuedev/src/continuedev/libs/constants/default_config.py.txt +++ b/continuedev/src/continuedev/libs/constants/default_config.py @@ -1,9 +1,10 @@ -""" +default_config = """\ +\"\"\"  This is the Continue configuration file.  If you aren't getting strong typing on these imports,  be sure to select the Python interpreter in ~/.continue/server/env. -""" +\"\"\"  import subprocess @@ -24,11 +25,11 @@ from continuedev.plugins.steps.main import EditHighlightedCodeStep  class CommitMessageStep(Step): -    """ +    \"\"\"      This is a Step, the building block of Continue.      It can be used below as a slash command, so that      run will be called when you type '/commit'. -    """ +    \"\"\"      async def run(self, sdk: ContinueSDK):          # Get the root directory of the workspace @@ -124,3 +125,4 @@ config = ContinueConfig(      # You can use them to design agents, or deeply customize Continue      policy=DefaultPolicy()  ) +""" diff --git a/continuedev/src/continuedev/libs/util/paths.py b/continuedev/src/continuedev/libs/util/paths.py index 6385dc6f..a659f044 100644 --- a/continuedev/src/continuedev/libs/util/paths.py +++ b/continuedev/src/continuedev/libs/util/paths.py @@ -1,6 +1,6 @@  import os -import sys  from ..constants.main import CONTINUE_SESSIONS_FOLDER, CONTINUE_GLOBAL_FOLDER, CONTINUE_SERVER_FOLDER +from ..constants.default_config import default_config  def find_data_file(filename): @@ -32,20 +32,13 @@ def getSessionFilePath(session_id: str):      return path -def getDefaultConfigFile() -> str: -    default_config_path = find_data_file(os.path.join( -        "..", "constants", "default_config.py.txt")) -    with open(default_config_path, 'r') as f: -        return f.read() - -  def getConfigFilePath() -> str:      path = os.path.join(getGlobalFolderPath(), "config.py")      os.makedirs(os.path.dirname(path), exist_ok=True)      if not os.path.exists(path):          with open(path, 'w') as f: -            f.write(getDefaultConfigFile()) +            f.write(default_config)      return path | 
