summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-06-03 10:26:07 -0400
committerNate Sesti <sestinj@gmail.com>2023-06-03 10:26:07 -0400
commit917ba983d604bf9f590265b38e65be5c75643828 (patch)
tree40ecae6ae6fb20dc7d8c4db391335d543b4713c3
parent08eacb7914b392d85ffcfe5b80ee31e3d36c77bc (diff)
downloadsncontinue-917ba983d604bf9f590265b38e65be5c75643828.tar.gz
sncontinue-917ba983d604bf9f590265b38e65be5c75643828.tar.bz2
sncontinue-917ba983d604bf9f590265b38e65be5c75643828.zip
README work
-rw-r--r--continuedev/src/continuedev/recipes/README.md8
-rw-r--r--continuedev/src/continuedev/steps/draft/migration.py11
-rw-r--r--continuedev/src/continuedev/steps/main.py25
-rw-r--r--docs/docs/concepts/step.md10
-rw-r--r--extension/README.md21
5 files changed, 44 insertions, 31 deletions
diff --git a/continuedev/src/continuedev/recipes/README.md b/continuedev/src/continuedev/recipes/README.md
index 5e01cc97..d5a006fb 100644
--- a/continuedev/src/continuedev/recipes/README.md
+++ b/continuedev/src/continuedev/recipes/README.md
@@ -7,3 +7,11 @@ The `recipes` folder contains all recipes, each with the same structure. **If yo
1. Create a new subfolder in `recipes`, with the name of your recipe (for example `MyNewRecipe`).
2. Make 2 files in this folder: 1) a `README.md` describing your recipe and how to use it and 2) a `main.py` including a single class with the name of your recipe (e.g. `MyNewRecipe`).
3. Write any utility code other than the main recipe class in a separate file, which you can import in `main.py`. Particularly if you decide to break the recipe into multiple sub-steps, try to keep these separate.
+
+# Existing Recipes
+
+`ContinueRecipeRecipe` - Write a Continue recipe with Continue.
+
+`CreatePipelineRecipe` - Build a dlt pipeline from scratch for an API of your choice.
+
+`WritePytestsRecipe` - Write Pytest unit tests in a folder adjacent to your Python file.
diff --git a/continuedev/src/continuedev/steps/draft/migration.py b/continuedev/src/continuedev/steps/draft/migration.py
index ea538bb7..b386bed8 100644
--- a/continuedev/src/continuedev/steps/draft/migration.py
+++ b/continuedev/src/continuedev/steps/draft/migration.py
@@ -1,7 +1,6 @@
# When an edit is made to an existing class or a new sqlalchemy class is created,
# this should be kicked off.
-from ..main import EditCodeStep, RunCommandStep
from ...core.main import Step
@@ -15,11 +14,17 @@ class MigrationStep(Step):
recent_edits_string = "\n\n".join(
map(lambda x: x.to_string(), recent_edits))
description = await (await sdk.models.gpt35()).complete(f"{recent_edits_string}\n\nGenerate a short description of the migration made in the above changes:\n")
- await sdk.run_step(RunCommandStep(cmd=f"cd libs && poetry run alembic revision --autogenerate -m {description}"))
+ await sdk.run([
+ "cd libs",
+ "poetry run alembic revision --autogenerate -m " + description,
+ ])
migration_file = f"libs/alembic/versions/{?}.py"
contents = await sdk.ide.readFile(migration_file)
await sdk.run_step(EditCodeStep(
range_in_files=[RangeInFile.from_entire_file(migration_file, contents)],
prompt=f"Here are the changes made to the sqlalchemy classes:\n\n{recent_edits_string}\n\nThis is the generated migration file:\n\n{{code}}\n\nReview the migration file to make sure it correctly reflects the changes made to the sqlalchemy classes.",
))
- await sdk.run_step(RunCommandStep(cmd="cd libs && poetry run alembic upgrade head"))
+ await sdk.run([
+ "cd libs",
+ "poetry run alembic upgrade head",
+ ])
diff --git a/continuedev/src/continuedev/steps/main.py b/continuedev/src/continuedev/steps/main.py
index a0872564..bb720b20 100644
--- a/continuedev/src/continuedev/steps/main.py
+++ b/continuedev/src/continuedev/steps/main.py
@@ -54,31 +54,6 @@ class RunPolicyUntilDoneStep(Step):
return observation
-class RunCommandStep(Step):
- cmd: str
- name: str = "Run command"
- _description: str = None
-
- async def describe(self, models: Models) -> Coroutine[str, None, None]:
- if self._description is not None:
- return self._description
- return self.cmd
-
- async def run(self, sdk: ContinueSDK) -> Coroutine[Observation, None, None]:
- cwd = await sdk.ide.getWorkspaceDirectory()
- result = subprocess.run(
- self.cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
- stdout = result.stdout.decode("utf-8")
- stderr = result.stderr.decode("utf-8")
- print(stdout, stderr)
-
- # If it fails, return the error
- if result.returncode != 0:
- return TextObservation(text=stderr)
- else:
- return TextObservation(text=stdout)
-
-
class FasterEditHighlightedCodeStep(Step):
user_input: str
hide = True
diff --git a/docs/docs/concepts/step.md b/docs/docs/concepts/step.md
index 1e1a0a65..0358a52f 100644
--- a/docs/docs/concepts/step.md
+++ b/docs/docs/concepts/step.md
@@ -40,12 +40,14 @@ the code that should run when the step is rerun with feedback
### Core
-#### RunCommandStep
-
#### EditCodeStep
+Provide a prompt and a list of file ranges to be edited by a language model.
+
### ManualEditStep
+A core step that tracks all user edits in the IDE so that they can be reversed along with other steps
+
## Community
### CreateTableStep
@@ -67,3 +69,7 @@ Write unit tests for this file.
#### Parameters
- for_filepath (required): the path of the file that unit tests should be created for
+
+### AnswerQuestionChromaStep
+
+Type `/ask` and ask any question about your whole codebase. The Chroma embeddings store will help find important snippets and answer your question.
diff --git a/extension/README.md b/extension/README.md
index 9ee59ad3..73f2df3e 100644
--- a/extension/README.md
+++ b/extension/README.md
@@ -2,4 +2,23 @@
**[Continue](https://continue.dev/docs) is the open-source library for accelerating software development with language models**
-You can find the Continue GitHub repo [here](https://github.com/continuedev/continue) \ No newline at end of file
+The Continue VS Code extension lets you make edits with natural langauge, ask questions of your codebase, automatically generate unit tests, and more. Beyond the built-in functionality, you can easily write your own recipes to automate the most repetitive sequences of tasks in your workflow.
+
+## Getting Started
+
+Get started by opening the command pallet with cmd+shift+p and then selecting Continue: Open Debug Panel.
+
+To test a few common recipes, open a blank python file and try the following:
+
+- Ask it to "write me a calculator class in python"
+- /comment to write comments for the class
+- /pytest to write Pytest unit tests in a separate file
+- Ask in natural language for a new method
+
+See [here](https://continue.dev/docs/concepts/recipe) for the full list of recipes currently available to use.
+
+You can find the Continue GitHub repo [here](https://github.com/continuedev/continue)
+
+## Feedback
+
+Have thoughts about Continue? Please [leave an issue](https://github.com/continuedev/continue/issues/new) or email us at hi@continue.dev :)