better explanations for /config

This commit is contained in:
Nate Sesti 2023-07-11 00:04:05 -07:00
parent 3f9e7a1fa5
commit cec0a7df72
2 changed files with 6 additions and 3 deletions

View file

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

View file

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