summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-11 00:04:05 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-11 00:04:05 -0700
commitcec0a7df727255b61d5edb4208d286dc17e81096 (patch)
treef8e168ae7e7df8c9ab1b2ab4222edc5bc4bde5fd
parent3f9e7a1fa59c4f684aef544436062f8825d77b31 (diff)
downloadsncontinue-cec0a7df727255b61d5edb4208d286dc17e81096.tar.gz
sncontinue-cec0a7df727255b61d5edb4208d286dc17e81096.tar.bz2
sncontinue-cec0a7df727255b61d5edb4208d286dc17e81096.zip
better explanations for /config
-rw-r--r--continuedev/src/continuedev/core/config.py4
-rw-r--r--continuedev/src/continuedev/steps/open_config.py5
2 files changed, 6 insertions, 3 deletions
diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py
index 55f5bc60..f6167638 100644
--- a/continuedev/src/continuedev/core/config.py
+++ b/continuedev/src/continuedev/core/config.py
@@ -131,7 +131,7 @@ def load_global_config() -> ContinueConfig:
config_path = os.path.join(global_dir, 'config.json')
if not os.path.exists(config_path):
with open(config_path, 'w') as f:
- json.dump(ContinueConfig().dict(), f)
+ json.dump(ContinueConfig().dict(), f, indent=4)
with open(config_path, 'r') as f:
try:
config_dict = json.load(f)
@@ -151,7 +151,7 @@ def update_global_config(config: ContinueConfig):
yaml_path = os.path.join(global_dir, 'config.yaml')
if os.path.exists(yaml_path):
with open(config_path, 'w') as f:
- yaml.dump(config.dict(), f)
+ yaml.dump(config.dict(), f, indent=4)
else:
config_path = os.path.join(global_dir, 'config.json')
with open(config_path, 'w') as f:
diff --git a/continuedev/src/continuedev/steps/open_config.py b/continuedev/src/continuedev/steps/open_config.py
index 441cb0e7..87f03e9f 100644
--- a/continuedev/src/continuedev/steps/open_config.py
+++ b/continuedev/src/continuedev/steps/open_config.py
@@ -18,7 +18,10 @@ class OpenConfigStep(Step):
"prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated."
}
],
- ```""")
+ ```
+ `"name"` is the command you will type.
+ `"description"` is the description displayed in the slash command menu.
+ `"prompt"` is the instruction given to the model. The overall prompt becomes "Task: {prompt}, Additional info: {user_input}". For example, if you entered "/test exactly 5 assertions", the overall prompt would become "Task: Write a comprehensive...and sophisticated, Additional info: exactly 5 assertions".""")
async def run(self, sdk: ContinueSDK):
global_dir = os.path.expanduser('~/.continue')