summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yaml2
-rw-r--r--continuedev/src/continuedev/core/sdk.py2
-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.py11
4 files changed, 10 insertions, 15 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index 0d51d0c0..7787ddad 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -113,7 +113,7 @@ jobs:
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- git commit -am "Update package.json version [skip ci]"
+ git commit -am "ci: 💚 Update package.json version [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
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