summaryrefslogtreecommitdiff
path: root/continuedev/src/continuedev/core
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-06 12:39:20 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-06 12:39:20 -0700
commite9d090f2b218105632a75e8a7cfb49c9bdc4e98e (patch)
tree0522b2ac2326a7f6cb71002e7795de8f041b8eb3 /continuedev/src/continuedev/core
parent7207da47c790aab81f59e777b9d02769b46fb7f4 (diff)
parentd24071fea080e6555e51bd516476c1a733975634 (diff)
downloadsncontinue-e9d090f2b218105632a75e8a7cfb49c9bdc4e98e.tar.gz
sncontinue-e9d090f2b218105632a75e8a7cfb49c9bdc4e98e.tar.bz2
sncontinue-e9d090f2b218105632a75e8a7cfb49c9bdc4e98e.zip
Merge branch 'main' of https://github.com/continuedev/continue
Diffstat (limited to 'continuedev/src/continuedev/core')
-rw-r--r--continuedev/src/continuedev/core/autopilot.py2
-rw-r--r--continuedev/src/continuedev/core/config.py2
-rw-r--r--continuedev/src/continuedev/core/policy.py2
3 files changed, 4 insertions, 2 deletions
diff --git a/continuedev/src/continuedev/core/autopilot.py b/continuedev/src/continuedev/core/autopilot.py
index 4466a01e..6e4326f0 100644
--- a/continuedev/src/continuedev/core/autopilot.py
+++ b/continuedev/src/continuedev/core/autopilot.py
@@ -75,7 +75,7 @@ class Autopilot(ContinueBaseModel):
def get_available_slash_commands(self) -> List[Dict]:
custom_commands = list(map(lambda x: {
- "name": x.name, "description": x.prompt}, self.continue_sdk.config.custom_commands)) or []
+ "name": x.name, "description": x.description}, self.continue_sdk.config.custom_commands)) or []
slash_commands = list(map(lambda x: {
"name": x.name, "description": x.description}, self.continue_sdk.config.slash_commands)) or []
return custom_commands + slash_commands
diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py
index ff7b8cb0..55f5bc60 100644
--- a/continuedev/src/continuedev/core/config.py
+++ b/continuedev/src/continuedev/core/config.py
@@ -15,6 +15,7 @@ class SlashCommand(BaseModel):
class CustomCommand(BaseModel):
name: str
prompt: str
+ description: str
class OnTracebackSteps(BaseModel):
@@ -73,6 +74,7 @@ class ContinueConfig(BaseModel):
"gpt-4"] = 'gpt-4'
custom_commands: Optional[List[CustomCommand]] = [CustomCommand(
name="test",
+ description="This is an example custom command. Use /config to edit it and create more",
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. Give the tests just as chat output, don't edit any file.",
)]
slash_commands: Optional[List[SlashCommand]] = DEFAULT_SLASH_COMMANDS
diff --git a/continuedev/src/continuedev/core/policy.py b/continuedev/src/continuedev/core/policy.py
index fc9266ab..6ee2d03f 100644
--- a/continuedev/src/continuedev/core/policy.py
+++ b/continuedev/src/continuedev/core/policy.py
@@ -46,7 +46,7 @@ def parse_custom_command(inp: str, config: ContinueConfig) -> Union[None, Step]:
slash_command = parse_slash_command(custom_cmd.prompt, config)
if slash_command is not None:
return slash_command
- return CustomCommandStep(name=custom_cmd.name, prompt=custom_cmd.prompt, user_input=after_command)
+ return CustomCommandStep(name=custom_cmd.name, description=custom_cmd.description, prompt=custom_cmd.prompt, user_input=after_command)
return None