diff options
Diffstat (limited to 'continuedev/src/continuedev/libs')
-rw-r--r-- | continuedev/src/continuedev/libs/steps/continue_step.py | 37 | ||||
-rw-r--r-- | continuedev/src/continuedev/libs/steps/react_posthog.py | 0 |
2 files changed, 37 insertions, 0 deletions
diff --git a/continuedev/src/continuedev/libs/steps/continue_step.py b/continuedev/src/continuedev/libs/steps/continue_step.py new file mode 100644 index 00000000..253bb490 --- /dev/null +++ b/continuedev/src/continuedev/libs/steps/continue_step.py @@ -0,0 +1,37 @@ +from textwrap import dedent +from ...models.filesystem import RangeInFile +from .main import EditHighlightedCodeStep +from ...core.main import Step +from ...core.sdk import ContinueSDK + + +class ContinueStepStep(Step): + name: str = "Write your own Continue Step." + prompt: str + + async def run(self, sdk: ContinueSDK): + await sdk.run_step(EditHighlightedCodeStep(user_input=dedent(f"""\ + Here is an example of a Step that runs a command and then edits a file. + + ```python + from ...core.main import Step + from ...core.sdk import ContinueSDK + + class RunCommandAndEditFileStep(Step): + name: str = "Run a command and then edit a file." + command: str + file_path: str + prompt: str + + async def run(self, sdk: ContinueSDK): + await sdk.run([command]) + await sdk.edit_file(filename=self.file_path, prompt=self.prompt) + ``` + + Please edit the code to write your own Step that does the following: + + {self.prommpt} + + It should be a subclass of Step as above, implementing the `run` method, and using pydantic attributes to define the parameters. + + """))) diff --git a/continuedev/src/continuedev/libs/steps/react_posthog.py b/continuedev/src/continuedev/libs/steps/react_posthog.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/continuedev/src/continuedev/libs/steps/react_posthog.py |