From 461fd4df95c31010871cc4ea7707606fb3a14fb4 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 5 Jul 2023 01:17:58 -0700 Subject: [PATCH] test custom command, don't run shell command --- continuedev/src/continuedev/core/config.py | 5 ++++- continuedev/src/continuedev/steps/chat.py | 6 +----- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/continuedev/src/continuedev/core/config.py b/continuedev/src/continuedev/core/config.py index 9e8541dc6..8f7e0b8c3 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 db3f9d7fc..8f88244c7 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): diff --git a/extension/package-lock.json b/extension/package-lock.json index 2dd7d6d47..82c28a902 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.0.108", + "version": "0.0.109", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.0.108", + "version": "0.0.109", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extension/package.json b/extension/package.json index d4850671a..001a696e9 100644 --- a/extension/package.json +++ b/extension/package.json @@ -14,7 +14,7 @@ "displayName": "Continue", "pricing": "Free", "description": "The open-source coding autopilot", - "version": "0.0.108", + "version": "0.0.109", "publisher": "Continue", "engines": { "vscode": "^1.67.0"