summaryrefslogtreecommitdiff
path: root/continuedev
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-05 01:17:58 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-05 01:17:58 -0700
commitf88c33041755bdf50a3a54c37cc38436a4a7c88f (patch)
tree6f92845b8fed5991576e76851b71cee254c929c9 /continuedev
parenta3d1140129d565b9f3bf013f788046440f44f0eb (diff)
downloadsncontinue-f88c33041755bdf50a3a54c37cc38436a4a7c88f.tar.gz
sncontinue-f88c33041755bdf50a3a54c37cc38436a4a7c88f.tar.bz2
sncontinue-f88c33041755bdf50a3a54c37cc38436a4a7c88f.zip
test custom command, don't run shell command
Diffstat (limited to 'continuedev')
-rw-r--r--continuedev/src/continuedev/core/config.py5
-rw-r--r--continuedev/src/continuedev/steps/chat.py6
2 files changed, 5 insertions, 6 deletions
diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py
index 9e8541dc..8f7e0b8c 100644
--- a/continuedev/src/continuedev/core/config.py
+++ b/continuedev/src/continuedev/core/config.py
@@ -71,7 +71,10 @@ class ContinueConfig(BaseModel):
allow_anonymous_telemetry: Optional[bool] = True
default_model: Literal["gpt-3.5-turbo", "gpt-3.5-turbo-16k",
"gpt-4"] = 'gpt-4'
- custom_commands: Optional[List[CustomCommand]] = []
+ custom_commands: Optional[List[CustomCommand]] = [CustomCommand(
+ name="test",
+ 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
on_traceback: Optional[List[OnTracebackSteps]] = [
OnTracebackSteps(step_name="DefaultOnTracebackStep")]
diff --git a/continuedev/src/continuedev/steps/chat.py b/continuedev/src/continuedev/steps/chat.py
index db3f9d7f..8f88244c 100644
--- a/continuedev/src/continuedev/steps/chat.py
+++ b/continuedev/src/continuedev/steps/chat.py
@@ -107,12 +107,8 @@ class RunTerminalCommandStep(Step):
description: str = "Run a terminal command."
command: str
- async def describe(self, models: Models) -> Coroutine[Any, Any, Coroutine[str, None, None]]:
- return f"Ran the terminal command `{self.command}`."
-
async def run(self, sdk: ContinueSDK):
- await sdk.wait_for_user_confirmation(f"Run the following terminal command?\n\n```bash\n{self.command}\n```")
- await sdk.run(self.command)
+ self.description = f"Copy this command and run in your terminal:\n\n```bash\n{self.command}\n```"
class ViewDirectoryTreeStep(Step):