diff options
author | Ty Dunn <ty@tydunn.com> | 2023-06-01 23:04:33 +0200 |
---|---|---|
committer | Ty Dunn <ty@tydunn.com> | 2023-06-01 23:04:33 +0200 |
commit | 6ca9c1b2205fe2cfa0cb0195ebc4ea3e0fbfcf5f (patch) | |
tree | 604dade3f96648ffd4937c1ed8765014937ed660 /docs | |
parent | 07f34516bba67e47c60e9fc1012507cd68bfead8 (diff) | |
download | sncontinue-6ca9c1b2205fe2cfa0cb0195ebc4ea3e0fbfcf5f.tar.gz sncontinue-6ca9c1b2205fe2cfa0cb0195ebc4ea3e0fbfcf5f.tar.bz2 sncontinue-6ca9c1b2205fe2cfa0cb0195ebc4ea3e0fbfcf5f.zip |
pages within categoriees
Diffstat (limited to 'docs')
-rw-r--r-- | docs/docs/concepts/autopilot.md | 23 | ||||
-rw-r--r-- | docs/docs/concepts/core.md | 22 | ||||
-rw-r--r-- | docs/docs/concepts/gui.md | 23 | ||||
-rw-r--r-- | docs/docs/concepts/history.md | 10 | ||||
-rw-r--r-- | docs/docs/concepts/ide.md | 46 | ||||
-rw-r--r-- | docs/docs/concepts/llm.md | 17 | ||||
-rw-r--r-- | docs/docs/concepts/policy.md | 17 | ||||
-rw-r--r-- | docs/docs/concepts/recipe.md | 20 | ||||
-rw-r--r-- | docs/docs/concepts/sdk.md | 86 | ||||
-rw-r--r-- | docs/docs/concepts/step.md | 20 | ||||
-rw-r--r-- | docs/docs/walkthroughs/create-a-recipe.md | 67 | ||||
-rw-r--r-- | docs/docs/walkthroughs/share-a-recipe.md | 8 | ||||
-rw-r--r-- | docs/docs/walkthroughs/use-a-recipe.md | 15 | ||||
-rw-r--r-- | docs/docs/walkthroughs/use-the-gui.md | 11 |
14 files changed, 208 insertions, 177 deletions
diff --git a/docs/docs/concepts/autopilot.md b/docs/docs/concepts/autopilot.md index c49e221e..725e0d88 100644 --- a/docs/docs/concepts/autopilot.md +++ b/docs/docs/concepts/autopilot.md @@ -1,17 +1,20 @@ # Autopilot
-*TODO: Explain in detail what this is and what its purpose is*
+## Overview
-## One sentence definition
+**TODO: Better explain in one sentence what this is and what its purpose is**
-The `autopilot` class is the main loop, completing Steps and then deciding the next step and repeating.
+The `autopilot` class is the main loop, completing steps and then deciding the next step and repeating
-## What else to know
+## Details
-An autopilot takes user input from the React app. You can see this happening in `server/notebook.py`. It basically queues user inputs, pops off the most recent, runs that as a "UserInputStep", uses its Policy to run other steps until the next step is None, and then pops off the next user input. When nothing left, just waits for more.
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-`Autopilot` contains the
-- History
-- LLM
-- Policy
-- IDE
\ No newline at end of file +- An autopilot takes user input from the React app
+- You can see this happening in `server/notebook.py`
+- It basically queues user inputs, pops off the most recent, runs that as a "UserInputStep", uses its Policy to run other steps until the next step is None, and then pops off the next user input. When nothing left, just waits for more
+- `Autopilot` contains the
+ - History
+ - LLM
+ - Policy
+ - IDE
\ No newline at end of file diff --git a/docs/docs/concepts/core.md b/docs/docs/concepts/core.md index eaadd5ff..b8cc1d50 100644 --- a/docs/docs/concepts/core.md +++ b/docs/docs/concepts/core.md @@ -1,20 +1,18 @@ # Core
-*TODO: Explain in detail what this is and what its purpose is*
+## Overview
-## One sentence definition
+**TODO: Better explain in one sentence what this is and what its purpose is**
The `Continue Core` connects the [SDK](./sdk.md) and [GUI](./gui.md) with the [IDE](./ide.md) (i.e. in VS Code, GitHub Codespaces, a web browser text editor, etc), enabling the steps to make changes to your code and accelerate your software development workflows.
-## What else to know
+## Details
-The `Core` includes
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-- IDE protocol
-- GUI protocol
-- SDK
-- Autopilot
-
-There is a two-way sync between an IDE and the GUI that happens through Core.
-
-**Q: does this make sense as a concept?**
\ No newline at end of file +- The `Core` includes
+ - IDE protocol
+ - GUI protocol
+ - SDK
+ - Autopilot
+- There is a two-way sync between an IDE and the GUI that happens through Core
\ No newline at end of file diff --git a/docs/docs/concepts/gui.md b/docs/docs/concepts/gui.md index 81d6fbbf..4847572b 100644 --- a/docs/docs/concepts/gui.md +++ b/docs/docs/concepts/gui.md @@ -1,19 +1,20 @@ # GUI
-*TODO: Explain in detail what this is and what its purpose is*
+**TODO: Make sure codebase aligns with this terminology**
-## One sentence definition
+## Overview
-The `Continue GUI` enables you to guide steps and makes everything transparent, so you can review all steps that were automated, giving you the opportunity to undo and rerun any that ran incorrectly.
+**TODO: Explain in one sentence what this is and what its purpose is**
-## What else to know
+The `Continue GUI` enables you to guide steps and makes everything transparent, so you can review all steps that were automated, giving you the opportunity to undo and rerun any that ran incorrectly.
-**From GUI to Core**
-- Natural language instructions from the developer
-- Hover / clicked on a step
-- Other user input
+## Details
-**From Core to GUI**
-- Updates to state (e.g. a new step)
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-**Q: do we call this the Continue GUI or Notebook?**
\ No newline at end of file +- **From GUI to Core**
+ - Natural language instructions from the developer
+ - Hover / clicked on a step
+ - Other user input
+- **From Core to GUI**
+ - Updates to state (e.g. a new step)
\ No newline at end of file diff --git a/docs/docs/concepts/history.md b/docs/docs/concepts/history.md index 518e847c..8b29b241 100644 --- a/docs/docs/concepts/history.md +++ b/docs/docs/concepts/history.md @@ -1,11 +1,13 @@ # History
-*TODO: Explain in detail what this is and what its purpose is*
+## Overview
-## One sentence definition
+**TODO: Better explain in one sentence what this is and what its purpose is**
The `history` is the ordered record of all past steps.
-## What else to know
+## Details
-**Q: What step data and metadata is stored in the history?**
\ No newline at end of file +**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
+
+- What step data and metadata is stored in the history?
\ No newline at end of file diff --git a/docs/docs/concepts/ide.md b/docs/docs/concepts/ide.md index 85e72dc9..56bece8e 100644 --- a/docs/docs/concepts/ide.md +++ b/docs/docs/concepts/ide.md @@ -1,63 +1,67 @@ # IDE
-## One sentence definition
+## Overview
-The `IDE` is
+**TODO: Better explain in one sentence what this is and what its purpose is**
-## What else to know
+The `IDE` is the text editor where you manually edit your code.
-*TODO: Explain in detail what this is and what its purpose is*
+## Details
-## Supported IDEs
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-### VS Code
+- `ide_protocol.py` is just the abstract version of what is implemented in `ide.py`, and `main.py` runs both `notebook.py` and `ide.py` as a single FastAPI server. This is the entry point to the Continue server, and acts as a bridge between IDE and React app
+- extension directory contains 1. The VS Code extension, whose code is in `extension/src`, with `extension.ts` being the entry point, and 2. the Continue React app, in the `extension/react-app` folder. This is displayed in the sidebar of VSCode, but is designed to work with any IDE that implements the protocol as is done in `extension/src/continueIdeClient.ts`.
-The VS Code extension implementation can be found at `/continue/extension/src`
+### Supported IDEs
-### GitHub Codespaces
+#### VS Code
-- `ide_protocol.py` is just the abstract version of what is implemented in `ide.py`, and `main.py` runs both `notebook.py` and `ide.py` as a single FastAPI server. This is the entry point to the Continue server, and acts as a bridge between IDE and React app
-- extension directory contains 1. The VS Code extension, whose code is in `extension/src`, with `extension.ts` being the entry point, and 2. the Continue React app, in the `extension/react-app` folder. This is displayed in the sidebar of VSCode, but is designed to work with any IDE that implements the protocol as is done in `extension/src/continueIdeClient.ts`.
+You can install the VS Code extension [here](../install.md)
+
+#### GitHub Codespaces
+
+You can install the GitHub Codespaces extension [here](../getting-started.md)
-## IDE Protocol methods
+### IDE Protocol methods
-### handle_json
+#### handle_json
Handle a json message
-### showSuggestion
+#### showSuggestion
Show a suggestion to the user
-### getWorkspaceDirectory
+#### getWorkspaceDirectory
Get the workspace directory
-### setFileOpen
+#### setFileOpen
Set whether a file is open
-### openNotebook
+#### openNotebook
Open a notebook
-### showSuggestionsAndWait
+#### showSuggestionsAndWait
Show suggestions to the user and wait for a response
-### onAcceptRejectSuggestion
+#### onAcceptRejectSuggestion
Called when the user accepts or rejects a suggestion
-### onTraceback
+#### onTraceback
Called when a traceback is received
-### onFileSystemUpdate
+#### onFileSystemUpdate
Called when a file system update is received
-### onCloseNotebook
+#### onCloseNotebook
Called when a notebook is closed
diff --git a/docs/docs/concepts/llm.md b/docs/docs/concepts/llm.md index b3a0fca2..d7d62b37 100644 --- a/docs/docs/concepts/llm.md +++ b/docs/docs/concepts/llm.md @@ -1,16 +1,21 @@ # LLM
-## One sentence definition
+## Overview
+
+**TODO: Better explain in one sentence what this is and what its purpose is**
An `LLM` is short for Large Language Model, which includes models like GPT-4, StarCoder, and others.
-## What else to know
+## Details
+
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
+- `LLM` is the large language model that can be used in steps to automate that require some judgement based on context (e.g. generating code based on docs, explaining an error given a stack trace, etc)
-*TODO: Explain in detail what this is and what its purpose is*
+### Supported Models
-`LLM` is the large language model that can be used in steps to automate that require some judgement based on context (e.g. generating code based on docs, explaining an error given a stack trace, etc)
+#### `gpt-4`
-**Q: should we call this LLM? Perhaps just model?**
+#### `gpt-turbo-3.5`
-**Q: should this abstraction be connected to autopilot?**
\ No newline at end of file +#### `StarCoder`
\ No newline at end of file diff --git a/docs/docs/concepts/policy.md b/docs/docs/concepts/policy.md index 4bd3ed5e..9658f6b4 100644 --- a/docs/docs/concepts/policy.md +++ b/docs/docs/concepts/policy.md @@ -1,17 +1,14 @@ # Policy
-## One sentence definition
+## Overview
-A `policy` is decides what step to run next and is associated with a [autopilot](./autopilot.md).
-
-## What else to know
+**TODO: Better explain in one sentence what this is and what its purpose is**
-The Policy is where slash commands are defined. The Policy is a global thing, so probably something we'll want to make user-configurable if we don't significantly change it.
-
-*TODO: Explain in detail what this is and what its purpose is*
+A `policy` is decides what step to run next and is associated with a [autopilot](./autopilot.md).
-The policy determines what step to run next
+## Details
-**Q: what else do folks need to understand about policies?**
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-**Q: what is the future plan for policies?**
\ No newline at end of file +- The Policy is where slash commands are defined
+- The Policy is a global thing, so probably something we'll want to make user-configurable if we don't significantly change it
\ No newline at end of file diff --git a/docs/docs/concepts/recipe.md b/docs/docs/concepts/recipe.md index aa48a2a5..3bc59b53 100644 --- a/docs/docs/concepts/recipe.md +++ b/docs/docs/concepts/recipe.md @@ -1,19 +1,15 @@ # Recipe
-## One sentence definition
+## Overview
-A `recipe` is a sequence of [steps](./step.md) composed into a workflow that developers use and share with others.
+**TODO: Better explain in one sentence what this is and what its purpose is**
-## What else to know
+A `recipe` is an ordered sequence of [steps](./step.md) that are intended to accomplish some complete task, comprising a workflow that developers use and share with others.
-Although technically just a step itself, since they also subclass the Step class, recipes differentiate themselves from normal steps by ending their name with `Recipe` by
+## Details
-Technically, everything is a step since everything subclasses the step class. Steps can be composed together. Once steps are composed into a workflow that developers use and share with others, that step is called a recipe and, by convention, it ends with Recipe to signal this
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-*TODO: Explain in detail what this is and what its purpose is*
-
-An ordered sequence of steps that are intended to accomplish some complete task
-
-Actually just a step that is composed of only other steps / recipes.
-
-Altnerative names: workflow, plugin
\ No newline at end of file +- Although technically just a step itself, since they also subclass the Step class, recipes differentiate themselves from normal steps by ending their name with `Recipe` by
+- Technically, everything is a step since everything subclasses the step class. Steps can be composed together. Once steps are composed into a workflow that developers use and share with others, that step is called a recipe and, by convention, it ends with Recipe to signal this
+- Actually just a step that is composed of only other steps / recipes.
\ No newline at end of file diff --git a/docs/docs/concepts/sdk.md b/docs/docs/concepts/sdk.md index ed276dc0..caf012ed 100644 --- a/docs/docs/concepts/sdk.md +++ b/docs/docs/concepts/sdk.md @@ -1,86 +1,64 @@ # SDK
-## One sentence definition
+## Overview
-The `Continue SDK` gives you access to tools (e.g. open a directory, edit a file, call an LLM, etc), which you can use when defining how a step should work and composing them with other steps.
+**TODO: Better explain in one sentence what this is and what its purpose is**
-## What else to know
+The `Continue SDK` give you all the tools you need to automate software development tasks in one convenient and standard location (e.g. open a directory, edit a file, call an LLM, etc), which you can use when defining how a step should work and composing them with other steps.
-The ContinueSDK has a `run_step` method, which allows Steps to be composable. The reason you want to run it with `run_step` instead of creating a Step and calling `step.run(...)` is so Continue can automatically keep track of the order of all steps run, and allow for reversibility, etc... The ContinueSDK also contains functions for very common steps, like `edit_file`, `add_file`, `run` (to run shell commands), and a few others. `sdk.history` lets you access the history of past steps. `sdk.llm` lets you use the Autopilot's language model like `sdk.llm.complete`. `sdk.ide` lets you take any action within the connected IDE (this is where the IDE protocol is called).
+## Details
-_TODO: Explain in detail what this is and what its purpose is_
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-> The `ContinueSDK`'s purpose is to give you all the tools you need to automate software development tasks in one convenient and standard location.
+- The ContinueSDK has a `run_step` method, which allows Steps to be composable
+- The reason you want to run it with `run_step` instead of creating a Step and calling `step.run(...)` is so Continue can automatically keep track of the order of all steps run, and allow for reversibility, etc...
+- The ContinueSDK also contains functions for very common steps, like `edit_file`, `add_file`, `run` (to run shell commands), and a few others
+- `sdk.history` lets you access the history of past steps
+- `sdk.llm` lets you use the Autopilot's language model like `sdk.llm.complete`
+- `sdk.ide` lets you take any action within the connected IDE (this is where the IDE protocol is called)
-_TODO: Detail all the SDK methods and how to use them_
+### Properties
-_Properties:_
+#### `sdk.ide`
`sdk.ide` is an instance of the class `AbstractIdeProtocolServer`, which contains all the methods you might need to interact with the IDE. This includes things like reading, editing, saving, and opening files as well as getting the workspace directory, displaying suggestions, and more. The goal is to have an IDE agnostic way of interacting with IDEs, so that Steps are portable across VSCode, Sublime, Code, or any other editor you use.
+#### `sdk.models`
+
`sdk.models` is an instance of the `Models` class, containing many of the most commonly used LLMs or other foundation models. You can instantiate a model (starcoder for example) (this is too awkward rn, I know) by calling `starcoder = await sdk.models.starcoder()`. Right now, all of the models are `LLM`s, meaning that they offer the `complete` method, used like `bubble_sort_code = await starcoder.complete("# Write a bubble sort function below, in Python:\n")`.
+#### `sdk.history`
+
`sdk.history` is the `History` object that contains all information about previously run steps`. See the documentation page to learn more.
-_Methods:_
+### Methods
+
+#### `run_step`
`run_step` is what allows Steps to be composable. While at the core, steps are run by calling `step.run(continue_sdk)`, using `sdk.run_step(step)` automatically fills in the `ContinueSDK` parameter, takes care of recording the step in history, and automatically updates the GUI.
The below methods are all just shorthand for very common steps.
-`apply_filesystem_edit` takes a FileSystemEdit (subclasses include Add/DeleteFile/Directory and EditFile) and runs the `FileSystemEditStep`.
-
-`wait_for_user_input` and `wait_for_user_confirmation` both run steps that will open a cell prompting the user for some input, in the former case asking for a text input, and in the latter case just asking for confirmation through a button click. We are considering allowing for more complex forms in the future, potentially even dynamically generated by LLMs, so please reach out if this would be useful.
-
-`run` will run either a single command or a list of shell commands.
-
-`edit_file` takes a filename and prompt, then will use the EditCodeStep to apply the edits requested in natural language in the prompt to the file. The EditCodeStep uses StarCoder to do this; if you have reason to customize this functionality, you can define a custom step and call that.
-
-`add/delete_file/directory` do just that.
-
-`get_user_secret` will retrieve a secret from the local .env file or, if it doesn't exist, prompt the user to enter the secret, then store this in the .env file.
-
-## SDK methods
-
-### run_step
+#### `apply_filesystem_edit`
-### edit_file
-
-Edits a file
-
-#### Parameters
-
-- `filepath` (required): the location of the file that should be edited
-- `prompt` (required): instructions for how the LLM should edit the file
-
-### run
-
-Runs a command
-
-#### Parameters
-
-- `command` (required): the command that should be run
-
-### wait_for_user_confirmation
-
-Waits for the user to review the steps that ran before running the next steps
+`apply_filesystem_edit` takes a FileSystemEdit (subclasses include Add/DeleteFile/Directory and EditFile) and runs the `FileSystemEditStep`.
-#### Paramaters
+#### `wait_for_user_input` and `wait_for_user_confirmation`
-- `question` (required): asks the user to confirm something specific
+`wait_for_user_input` and `wait_for_user_confirmation` both run steps that will open a cell prompting the user for some input, in the former case asking for a text input, and in the latter case just asking for confirmation through a button click. We are considering allowing for more complex forms in the future, potentially even dynamically generated by LLMs, so please reach out if this would be useful.
-### ide.getOpenFiles
+#### `run`
-Gets the name of the files that are open in the IDE currently
+`run` will run either a single command or a list of shell commands.
-### sdk.ide.readFile
+#### `edit_file`
-Gets the contents of the file located at the `filepath`
+`edit_file` takes a filename and prompt, then will use the EditCodeStep to apply the edits requested in natural language in the prompt to the file. The EditCodeStep uses StarCoder to do this; if you have reason to customize this functionality, you can define a custom step and call that.
-#### Paramaters
+#### `add/delete_file/directory`
-- `filepath` (required): the location of the file that should be read
+`add/delete_file/directory` do just that.
-### sdk.ide.get_recent_edits
+#### `get_user_secret`
-**Q: what does this method do?**
+`get_user_secret` will retrieve a secret from the local .env file or, if it doesn't exist, prompt the user to enter the secret, then store this in the .env file.
diff --git a/docs/docs/concepts/step.md b/docs/docs/concepts/step.md index 97973a06..fe044556 100644 --- a/docs/docs/concepts/step.md +++ b/docs/docs/concepts/step.md @@ -1,16 +1,22 @@ # Step
-*TODO: Explain in detail what this is and what its purpose is*
+## Overview
-## One sentence definition
+**TODO: Better explain in one sentence what this is and what its purpose is**
-A `step` is
+A `step` is a simple action that the LLM should take as part of a sequence that collectively completes some task
-## What else to know
+## Details
-A `Step` is a Pydantic class inheriting from `Step`. Steps implement the `run` method, which takes a ContinueSDK as its only parameter. The ContinueSDK gives all the utilities you need to easily write recipes (Steps). It also implements the `describe` method, which just computes a textual description of what happened when the `run` method was called. Can save attributes in `run` if you want, or just have a default `describe`, or not even implement it, in which case the name of the class is used. Any parameters to a Step are defined as attributes to the class without a double leading underscore (those with this are private).
+**TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs**
-Steps can be composed together
+- A `Step` is a Pydantic class inheriting from `Step`
+- Steps implement the `run` method, which takes a ContinueSDK as its only parameter
+- The ContinueSDK gives all the utilities you need to easily write recipes (Steps)
+- It also implements the `describe` method, which just computes a textual description of what happened when the `run` method was called
+- Can save attributes in `run` if you want, or just have a default `describe`, or not even implement it, in which case the name of the class is used
+- Any parameters to a Step are defined as attributes to the class without a double leading underscore (those with this are private).
+- Steps can be composed together
### Step methods
@@ -30,7 +36,7 @@ the code that should run when the step is reversed the code that should run when the step is rerun with feedback
-*TODO: Move list / description of all steps and recipes to the place where people will be able to use and update them*
+**TODO: Move the below list / description of all steps and recipes to the place where people will be able to use, update, share them**
### Steps & recipes
diff --git a/docs/docs/walkthroughs/create-a-recipe.md b/docs/docs/walkthroughs/create-a-recipe.md index a2805782..ac89ae4e 100644 --- a/docs/docs/walkthroughs/create-a-recipe.md +++ b/docs/docs/walkthroughs/create-a-recipe.md @@ -1,22 +1,52 @@ # Create a recipe
-_TODO: Describe step-by-step how to create a recipe_
+**TODO: Describe step-by-step how to create a recipe**
-> Creating a recipe is the same as creating a step, except that you may choose to break it up into intermediate steps. Start by creating a subclass of Step. You should first consider what will be the parameters of your recipe. These are defined as attributes in the step, as with `input_file_path: str` below. Next, write the `run` method. This method takes the ContinueSDK as a parameter, giving you all the tools you need to write your recipe/steps (if it's missing something, let us know, we'll add it!). You can write any code inside the run method; this is what will happen when your recipe is run, line for line. As you're writing the run method, you want to consider how to break it up into sub-steps; each step will be displayed as a cell in the GUI, so this makes a difference to the end user. To break something off into a sub-step, simply make a new subclass of Step just like this one, with parameters and a run method, and call it inside of the parent step using `await sdk.run_step(MySubStep(<parameters>))`. To understand all of the other things you can do inside of a step with the `ContinueSDK`, see its documentation page.
+Points to include
+- Where to create recipes
+- How to create a step
+- How to create recipe
+- Using models
-> Finally, every Step is displayed with a description of what it has done. If you'd like to override the default description of your steps, which is just the class name, then implement the `describe` method. You can:
+## 1. Create a step
-- Return a static string
-- Store state in a class attribute (prepend with a double underscore, which signifies (through Pydantic) that this is not a parameter for the Step, just internal state) during the run method, and then grab this in the describe method.
-- Use state in conjunction with the `models` parameter of the describe method to autogenerate a description with a language model. For example, if you'd used an attribute called `__code_written` to store a string representing some code that was written, you could implement describe as `return (await models.gpt35()).complete(f"{self.__code_written}\n\nSummarize the changes made in the above code.")`.
+### a. Start by creating a subclass of Step
-## 1. Create a step
+You should first consider what will be the parameters of your recipe. These are defined as attributes in the step, as with `input_file_path: str` below
-### Using the SDK
+### b. Next, write the `run` method
+
+This method takes the ContinueSDK as a parameter, giving you all the tools you need to write your recipe/steps (if it's missing something, let us know, we'll add it!). You can write any code inside the run method; this is what will happen when your recipe is run, line for line. As you're writing the run method, you want to consider how to break it up into sub-steps; each step will be displayed as a cell in the GUI, so this makes a difference to the end user. To break something off into a sub-step, simply make a new subclass of Step just like this one, with parameters and a run method, and call it inside of the parent step using `await sdk.run_step(MySubStep(<parameters>))`. To understand all of the other things you can do inside of a step with the `ContinueSDK`, see its documentation page.
+
+### c. Finally, every Step is displayed with a description of what it has done
+
+If you'd like to override the default description of your steps, which is just the class name, then implement the `describe` method. You can:
+ - Return a static string
+ - Store state in a class attribute (prepend with a double underscore, which signifies (through Pydantic) that this is not a parameter for the Step, just internal state) during the run method, and then grab this in the describe method.
+ - Use state in conjunction with the `models` parameter of the describe method to autogenerate a description with a language model. For example, if you'd used an attribute called `__code_written` to store a string representing some code that was written, you could implement describe as `return (await models.gpt35()).complete(f"{self.__code_written}\n\nSummarize the changes made in the above code.")`.
+
+## 2. Compose steps together into a complete recipe
+
+Creating a recipe is the same as creating a step, except that you may choose to break it up into intermediate steps
+
+By convention, the name of every recipe ends with `Recipe`.
+
+```python
+class CreatePipelineRecipe(Step):
+
+ async def run(self, sdk: ContinueSDK):
+ await sdk.run_step(
+ WaitForUserInputStep(prompt="What API do you want to load data from?") >>
+ SetupPipelineStep() >>
+ ValidatePipelineStep()
+ )
+```
-You will want to use the SDK when you are opening directories, editing files, using models, etc.
+## Additional considerations
-This will ensure that these actions are recorded as steps, so they are reviewable, reversable, and rerunnable.
+### Using the SDK
+
+You will want to use the SDK when you are opening directories, editing files, using models, etc. This will ensure that these actions are recorded as steps, so they are reviewable, reversable, and rerunnable.
### Allow for configurability
@@ -57,20 +87,3 @@ class SetUpVenvStep(Step): else:
await sdk.run("python3 -m venv env && source env/bin/activate") # MacOS and Linux
```
-
-## 2. Compose steps together into a complete recipe
-
-R
-
-By convention, the name of every recipe ends with `Recipe`.
-
-```python
-class CreatePipelineRecipe(Step):
-
- async def run(self, sdk: ContinueSDK):
- await sdk.run_step(
- WaitForUserInputStep(prompt="What API do you want to load data from?") >>
- SetupPipelineStep() >>
- ValidatePipelineStep()
- )
-```
diff --git a/docs/docs/walkthroughs/share-a-recipe.md b/docs/docs/walkthroughs/share-a-recipe.md index 1d5e2f60..a5f7ef50 100644 --- a/docs/docs/walkthroughs/share-a-recipe.md +++ b/docs/docs/walkthroughs/share-a-recipe.md @@ -1,3 +1,9 @@ # Share a recipe
-*TODO: Describe step-by-step how to share a recipe*
\ No newline at end of file +**TODO: Describe step-by-step how to share a recipe**
+
+Points to include
+- Where to create recipes
+- What you need to contribute them (README, style, etc)
+- How to push them
+- How to get them reviewed
\ No newline at end of file diff --git a/docs/docs/walkthroughs/use-a-recipe.md b/docs/docs/walkthroughs/use-a-recipe.md index fc653eea..e230030e 100644 --- a/docs/docs/walkthroughs/use-a-recipe.md +++ b/docs/docs/walkthroughs/use-a-recipe.md @@ -1,3 +1,16 @@ # Use a recipe
-*TODO: Describe step-by-step how to use a recipe*
\ No newline at end of file +**TODO: Describe how to use a recipe**
+
+Points to include
+- How to get recipes
+- Slash commands
+- READMEs with instructions for each recipe?
+- Using GUI
+- Reviewing
+- Reversing
+- Rerunning
+- Follow the instructions
+- Customizing recipe
+- Recipes on per model basis (make sure you have added API key)
+- Creating a recipe from scratch (link)
\ No newline at end of file diff --git a/docs/docs/walkthroughs/use-the-gui.md b/docs/docs/walkthroughs/use-the-gui.md index a7263159..770b19d3 100644 --- a/docs/docs/walkthroughs/use-the-gui.md +++ b/docs/docs/walkthroughs/use-the-gui.md @@ -1,3 +1,12 @@ # Use the GUI
-*TODO: Describe step-by-step how to use the `Continue GUI`*
\ No newline at end of file +**TODO: Describe how to use the `Continue GUI`**
+
+Points to include
+- Recipes
+- Steps
+- Giving natural language instructions
+- Single turn at the moment
+- Opening the (set of) file(s) you want to edit
+- Reversing
+- Modifying with feedback
\ No newline at end of file |