remove data file

This commit is contained in:
Nate Sesti 2023-08-01 23:14:40 -07:00
parent 0f55a01fd4
commit 48feeb5587
4 changed files with 10 additions and 15 deletions

View file

@ -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

View file

@ -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,

View file

@ -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()
)
"""

View file

@ -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