diff options
Diffstat (limited to 'docs/docs')
-rw-r--r-- | docs/docs/concepts/core.md | 14 | ||||
-rw-r--r-- | docs/docs/concepts/gui.md | 19 | ||||
-rw-r--r-- | docs/docs/concepts/history.md | 12 | ||||
-rw-r--r-- | docs/docs/concepts/ide.md | 19 | ||||
-rw-r--r-- | docs/docs/concepts/llm.md | 22 | ||||
-rw-r--r-- | docs/docs/concepts/policy.md | 13 | ||||
-rw-r--r-- | docs/docs/concepts/recipe.md | 14 | ||||
-rw-r--r-- | docs/docs/concepts/sdk.md | 62 | ||||
-rw-r--r-- | docs/docs/concepts/server.md | 11 | ||||
-rw-r--r-- | docs/docs/concepts/state.md | 9 | ||||
-rw-r--r-- | docs/docs/concepts/step.md | 36 | ||||
-rw-r--r-- | docs/docs/create-a-recipe.md | 64 | ||||
-rw-r--r-- | docs/docs/getting-started.md | 39 | ||||
-rw-r--r-- | docs/docs/how-continue-works.md | 10 | ||||
-rw-r--r-- | docs/docs/install.md | 27 | ||||
-rw-r--r-- | docs/docs/intro.md | 21 | ||||
-rw-r--r-- | docs/docs/telemetry.md | 21 | ||||
-rw-r--r-- | docs/docs/walkthroughs/create-a-recipe.md | 91 | ||||
-rw-r--r-- | docs/docs/walkthroughs/share-a-recipe.md | 9 | ||||
-rw-r--r-- | docs/docs/walkthroughs/use-a-recipe.md | 16 | ||||
-rw-r--r-- | docs/docs/walkthroughs/use-the-gui.md | 12 |
21 files changed, 385 insertions, 156 deletions
diff --git a/docs/docs/concepts/core.md b/docs/docs/concepts/core.md deleted file mode 100644 index d60f46ac..00000000 --- a/docs/docs/concepts/core.md +++ /dev/null @@ -1,14 +0,0 @@ -# Core
-
-The `Core` connects the SDK and GUI with the IDE (i.e. in VS Code, a web browser, etc), enabling the steps to make changes to your code and accelerate your software development workflows.
-
-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.
-
-**Q: does this make sense as a concept?**
diff --git a/docs/docs/concepts/gui.md b/docs/docs/concepts/gui.md index f9cff697..ff99839f 100644 --- a/docs/docs/concepts/gui.md +++ b/docs/docs/concepts/gui.md @@ -1,13 +1,18 @@ # GUI
-The `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: Make sure codebase aligns with this terminology**
-**From GUI to Core**
+:::info
+The **Continue GUI** lets you transparently review every automated step, providing the opportunity to undo and rerun any that ran incorrectly.
+:::
-- Natural language instructions from the developer
-- Hover / clicked on a step
-- Other user input
+## Details
-**From Core to GUI**
+GUI displays every step taken by Continue in a way that lets you easily review, reverse, refine, re-run. Provides a natural language prompt where you can request edits in natural language or initiate recipes with slash commands. Communicates with the Continue server via GUI Protocol. Is a React app, which will eventually be published as a standalone npm package, importable as a simple React component.
-- Updates to state (e.g. a new step)
+- **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)
diff --git a/docs/docs/concepts/history.md b/docs/docs/concepts/history.md index e6c2a5ea..7f028e14 100644 --- a/docs/docs/concepts/history.md +++ b/docs/docs/concepts/history.md @@ -1,5 +1,13 @@ # History
-`History` is the ordered record of all past steps.
+**TODO: Better explain in one sentence what this is and what its purpose is**
-**Q: What step data and metadata is stored in the history?**
\ No newline at end of file +:::info
+The **history** is the ordered record of all past steps
+:::
+
+## Details
+
+History stores a list ("timeline") of HistoryNodes. Each HistoryNode contains the Step with parameters, the Observation returned by the step, and the depth of the step (just so we can understand the tree structure, and what called what, and display as a tree if we wanted). History has a current_index, which can be smaller than the length of the timeline if some steps have been reversed (in which case GUI displays them with lower opacity). History class mostly responsible for maintaining order of history during reversals, grabbing most recent steps, or other things that should be bottlenecked through reliable access methods.
+
+- What step data and metadata is stored in the history?
diff --git a/docs/docs/concepts/ide.md b/docs/docs/concepts/ide.md index 4684c362..1816d09b 100644 --- a/docs/docs/concepts/ide.md +++ b/docs/docs/concepts/ide.md @@ -1,10 +1,27 @@ # IDE
+**TODO: Better explain in one sentence what this is and what its purpose is**
+
+:::info
+The **IDE** is the text editor where you manually edit your code.
+:::
+
+## Details
+
+SDK provides "IDEProtocol" class so that steps can interact with VS Code, etc... in an IDE-agnostic way. Communicates with editor through websockets protocol. All that's needed to make continue work with a new IDE/editor is to implement the protocol on the side of the editor.
+
+- `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 VS Code, but is designed to work with any IDE that implements the protocol as is done in `extension/src/continueIdeClient.ts`.
+
## Supported IDEs
### VS Code
-The VS Code extension implementation can be found at `/continue/extension/src`
+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
diff --git a/docs/docs/concepts/llm.md b/docs/docs/concepts/llm.md index 8c2dbcba..6e5fccc1 100644 --- a/docs/docs/concepts/llm.md +++ b/docs/docs/concepts/llm.md @@ -1,7 +1,23 @@ # LLM
-`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: Better explain in one sentence what this is and what its purpose is**
-**Q: should we call this LLM? Perhaps just model?**
+:::info
+An **LLM** is short for Large Language Model, which includes models like GPT-4, StarCoder, and others
+:::
-**Q: should this abstraction be connected to autopilot?**
+## Details
+
+Just a class with a "complete" method. Right now have HuggingFaceInferenceAPI and OpenAI subclasses. Need credentials as of now. Different models useful in different places, so we provide easy access to multiple of them, right now just gpt3.5 and starcoder, but can add others super easily.
+
+- `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)
+- Steps and recipes are implemented with specific models
+- Need to credentials for OpenAI models
+
+## Supported Models
+
+### `gpt-4`
+
+### `gpt-turbo-3.5`
+
+### `StarCoder`
diff --git a/docs/docs/concepts/policy.md b/docs/docs/concepts/policy.md index 6fbbc8d7..ea515673 100644 --- a/docs/docs/concepts/policy.md +++ b/docs/docs/concepts/policy.md @@ -1,7 +1,14 @@ # Policy
-The policy determines what step to run next
+**TODO: Better explain in one sentence what this is and what its purpose is**
-**Q: what else do folks need to understand about policies?**
+:::info
+A **policy** is decides what step to run next and is associated with a [autopilot](./autopilot.md)
+:::
-**Q: what is the future plan for policies?**
\ No newline at end of file +## Details
+
+A relic of my original plan that ended up being the place to define slash commands, the command run on startup, and other weird stuff that you might want to inject after certain other steps. This may be the place where "hooks" turn out to be implemented. Much of this may be configurable through `continue.json/yaml` config file (this is where steps that run on GUI opening are currently configured.). Simply takes the history and returns a single step to run next. Can return None if no step to take next. Then user input will kick it off again eventually. Autopilot has a single policy that it follows, so definitely a global/user-configurable type of thing.
+
+- 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
diff --git a/docs/docs/concepts/recipe.md b/docs/docs/concepts/recipe.md index bc171b1d..da2b6264 100644 --- a/docs/docs/concepts/recipe.md +++ b/docs/docs/concepts/recipe.md @@ -1,7 +1,15 @@ # Recipe
-An ordered sequence of steps that are intended to accomplish some complete task
+**TODO: Better explain in one sentence what this is and what its purpose is**
-Actually just a step that is composed of only other steps / recipes.
+:::info
+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.
+:::
-Altnerative names: workflow, plugin
\ No newline at end of file +## Details
+
+When enough steps are strung together they become a recipe. Can kick off with slash command, can share/download somehow.
+
+- 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.
diff --git a/docs/docs/concepts/sdk.md b/docs/docs/concepts/sdk.md index e5ca2f99..30da2e79 100644 --- a/docs/docs/concepts/sdk.md +++ b/docs/docs/concepts/sdk.md @@ -1,48 +1,62 @@ # SDK
-The `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**
-## SDK methods
+:::info
+The **Continue SDK** gives 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.
+:::
-### run_step
+## Details
-### edit_file
+- 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)
-Edits a file
+## Properties
-#### Parameters
+### `sdk.ide`
-- `filepath` (required): the location of the file that should be edited
-- `prompt` (required): instructions for how the LLM should edit the file
+`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 VS Code, Sublime, Code, or any other editor you use.
-### run
+### `sdk.models`
-Runs a command
+`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")`.
-#### Parameters
+### `sdk.history`
-- `command` (required): the command that should be run
+`sdk.history` is the `History` object that contains all information about previously run steps`. See the documentation page to learn more.
-### wait_for_user_confirmation
+## Methods
-Waits for the user to review the steps that ran before running the next steps
+### `run_step`
-#### Paramaters
+`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.
-- `question` (required): asks the user to confirm something specific
+The below methods are all just shorthand for very common steps.
-### ide.getOpenFiles
+### `apply_filesystem_edit`
-Gets the name of the files that are open in the IDE currently
+`apply_filesystem_edit` takes a FileSystemEdit (subclasses include Add/DeleteFile/Directory and EditFile) and runs the `FileSystemEditStep`.
-### sdk.ide.readFile
+### `wait_for_user_input` and `wait_for_user_confirmation`
-Gets the contents of the file located at the `filepath`
+`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.
-#### Paramaters
+### `run`
-- `filepath` (required): the location of the file that should be read
+`run` will run either a single command or a list of shell commands.
-### sdk.ide.get_recent_edits
+### `edit_file`
-**Q: what does this method do?**
\ No newline at end of file +`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`
+
+`add/delete_file/directory` do just that.
+
+### `get_user_secret`
+
+`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 before moving on.
diff --git a/docs/docs/concepts/server.md b/docs/docs/concepts/server.md new file mode 100644 index 00000000..e609fc6d --- /dev/null +++ b/docs/docs/concepts/server.md @@ -0,0 +1,11 @@ +# Server
+
+**TODO: Better explain in one sentence what this is and what its purpose is**
+
+:::info
+The **Continue Server** holds the main event loop, responsible for connecting [IDE](./ide.md) (i.e. in VS Code, GitHub Codespaces, a web browser text editor, etc), [SDK](./sdk.md), and [GUI](./gui.md), and deciding which steps to take next.
+:::
+
+## Details
+
+The Continue server communicates with the IDE and GUI through websockets, acting as the communication bridge and main event loop. The `Autopilot` class is where most of this happens, accepting user input, calling on a policy to decide the next step, and injecting the `ContinueSDK` to run steps.
diff --git a/docs/docs/concepts/state.md b/docs/docs/concepts/state.md deleted file mode 100644 index d48dbe88..00000000 --- a/docs/docs/concepts/state.md +++ /dev/null @@ -1,9 +0,0 @@ -# State
-
-*Note: this is only a proposed concept at this point*
-
-Steps can add, edit, and remove observations / memories stored in state.
-
-Allows you to pass context of previous steps, other files, etc.
-
-Alternative names: memory, observation store
\ No newline at end of file diff --git a/docs/docs/concepts/step.md b/docs/docs/concepts/step.md index d381f06e..1758fdd8 100644 --- a/docs/docs/concepts/step.md +++ b/docs/docs/concepts/step.md @@ -1,6 +1,20 @@ # Step
-A step is
+**TODO: Better explain in one sentence what this is and what its purpose is**
+
+:::info
+A **step** is a simple action that the LLM should take as part of a sequence that collectively completes some task
+:::
+
+## 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).
+- Steps can be composed together
## Step methods
@@ -20,7 +34,9 @@ the code that should run when the step is reversed the code that should run when the step is rerun with feedback
-## Steps
+**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
### Core
@@ -28,26 +44,26 @@ the code that should run when the step is rerun with feedback #### EditCodeStep
-#### ManualEditStep
+### ManualEditStep
-### Community
+## Community
-#### CreateTableStep
+### CreateTableStep
Create a table in TypeORM
-#### MigrationStep
+### MigrationStep
Create and run an alembic migration
-##### Parameters
+#### Parameters
-- `edited_file`:
+- `edited_file`:
-#### WritePytestsStep
+### WritePytestsStep
Write unit tests for this file.
-##### Parameters
+#### Parameters
- for_filepath (required): the path of the file that unit tests should be created for
\ No newline at end of file diff --git a/docs/docs/create-a-recipe.md b/docs/docs/create-a-recipe.md deleted file mode 100644 index 21d937b5..00000000 --- a/docs/docs/create-a-recipe.md +++ /dev/null @@ -1,64 +0,0 @@ -# Create a Recipe
-
-## 1. Create a step
-
-### 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
-
-Steps can include optional parameters that allow users to configure them
-
-```python
-from continueos import ContinueSDK
-
-class CreatePytestsStep(Step):
-
- input_file_path: str
- output_file_prefix: str
- output_dir_path: str
-
- async def run(self, sdk: ContinueSDK):
-
- code = await sdk.ide.readFile(self.input_file_path)
- sdk.run_step(CreateDirStep(output_dir_path))
- sdk.run_step(WritePytestsStep(code, output_file_prefix, output_dir_path))
-```
-
-### Adjust for different OS
-
-You might want to implement your steps, so that they can run on Linux, MacOS, and Windows.
-
-```python
-from continueos import ContinueSDK
-import platform
-
-class SetUpVenvStep(Step):
-
- async def run(self, sdk: ContinueSDK):
-
- os = platform.system()
-
- if os == "Windows":
- await sdk.run("python -m venv env; .\\env\\Scripts\\activate")
- else:
- await sdk.run("python3 -m venv env && source env/bin/activate") # MacOS and Linux
-```
-
-## 2. Compose steps together
-
-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()
- )
-```
\ No newline at end of file diff --git a/docs/docs/getting-started.md b/docs/docs/getting-started.md new file mode 100644 index 00000000..90d6f8dc --- /dev/null +++ b/docs/docs/getting-started.md @@ -0,0 +1,39 @@ +# Getting started
+
+## GitHub Codespaces Demo
+
+[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/continuedev/continue-codespaces-demo?quickstart=1)
+
+1. Click the `Open in GitHub Codespaces` badge above
+
+:::tip
+We don't want to waste your time with install and env setup before you try Continue, so we set up a GitHub Codespace for you, which **won’t cost you anything**. If you are using GitHub Free for personal accounts, you can [use Codespaces for 120 hours per month for free](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts)
+:::
+
+2. Select the `Create new codespace` button and wait a couple minutes while it launches and installs the Continue extension. Once complete, it should look like this:
+
+**TODO: Insert an image of Continue when it has opened**
+
+3. Try playing with Continue as you write some Python code to understand a dataset with Pandas
+
+**TODO: Design and set up Pandas stuff scenario in codespaces**
+
+4. There are a few recipes you should also try
+ a. In the first directory, try out Pytest recipe
+ b. In the second directory, try out Write comments for the highlighted code recipe
+ c. In the third directory, try out dlt CreatePipeline recipe
+
+**TODO: Design and add these recipes in codespaces**
+
+## Next Steps
+
+If you're ready to use Continue locally, install `Continue` packaged as a VS Code extension, as described [here](./install.md).
+
+If you'd like to continue exploring in GitHub Codespaces, you can learn more with our walkthroughs:
+
+How to...
+
+- [Use the GUI](./walkthroughs/use-the-gui.md)
+- [Invoke a recipe](./walkthroughs/use-a-recipe.md)
+- [Create a recipe](./walkthroughs/create-a-recipe.md)
+- [Share a recipe](./walkthroughs/share-a-recipe.md)
diff --git a/docs/docs/how-continue-works.md b/docs/docs/how-continue-works.md index e6648cbc..2d5f09a8 100644 --- a/docs/docs/how-continue-works.md +++ b/docs/docs/how-continue-works.md @@ -4,13 +4,13 @@ ## Overview
-The `Continue` library consists of an [SDK](./concepts/sdk.md), a [GUI](./concepts/gui.md), and a [Core](./concepts/core.md) that brings everything together.
+The `Continue` library consists of an [SDK](./concepts/sdk.md), a [GUI](./concepts/gui.md), and a [Server](./concepts/server.md) that brings everything together.
The [SDK](./concepts/sdk.md) gives you access to the tools (e.g. open a directory, edit a file, call a model, etc.) needed to define steps that integrate LLMs into your IDE.
The [GUI](./concepts/gui.md) lets you transparently review every automated step, providing the opportunity to undo and rerun any that ran incorrectly.
-The [Core](./concepts/core.md) holds the main event loop, responsible for connecting IDE, SDK, and GUI and deciding which steps to take next.
+The [Server](./concepts/server.md) holds the main event loop, responsible for connecting IDE, SDK, and GUI and deciding which steps to take next.
## Details
@@ -19,7 +19,7 @@ The [Core](./concepts/core.md) holds the main event loop, responsible for connec - Continue connects any code editor (primarily VS Code right now) to a server (the Continue server) that can take actions in the editor in accordance with defined recipes at the request of a user through the GUI
- What this looks like:
- The Continue VS Code extension runs the ContinueIdeProtocol, launches the Continue Python server in the background, and opens the Continue GUI in a side-panel.
- - The Continue server is the brain, communication center, and source of truth, interacting with VS Code through the ContinueIdeProtocol and with the GUI through the GUIProtocol.
+ - The Continue server is the brain, communication center, and source of truth, interacting with VS Code through the ContinueIdeProtocol and with the GUI through the NotebookProtocol.
- Communication between the extension and GUI happens through the Continue server.
- When you type a natural language command in the GUI, this is sent to the Continue server, where the `Autopilot` class takes action, potentially using the ContinueIdeProtocol to request actions be taken in the IDE, and then updates the GUI to display the new history.
- `core` directory contains major concepts
@@ -32,6 +32,6 @@ The [Core](./concepts/core.md) holds the main event loop, responsible for connec - `util` for very misc. stuff
- `chroma` for chroma code that deals with codebase embeddings
- `models` contains all the Pydantic models and `generate_json_schema.py`, a script that converts them to JSONSchema .json files in `schema/json`
-- `server` runs the servers that communicate with a) the React app (`gui.py`) and b) the IDE (`ide.py`)
-- `ide_protocol.py` is just the abstract version of what is implemented in `ide.py`, and `main.py` runs both `gui.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
+- `server` runs the servers that communicate with a) the React app (`notebook.py`) and b) the IDE (`ide.py`)
+- `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
- We use OpenAPI/JSONSchema to define types so that it's really easy to bring them across language barriers. Use Pydantic types, then run `poetry run typegen` from the root of continuedev folder to generate JSONSchema json files in the `schema/json` folder. Then `npm run typegen` from the extension folder generates the types that are used within the extension.
diff --git a/docs/docs/install.md b/docs/docs/install.md new file mode 100644 index 00000000..7e36ffd5 --- /dev/null +++ b/docs/docs/install.md @@ -0,0 +1,27 @@ +# Installation
+
+:::note
+If you want to try `Continue` before installing, check out the [GitHub Codespaces Demo](./getting-started.md)
+:::
+
+## Install `Continue` locally in VS Code
+
+1. Click `Install` on the `Continue` extension in the Visual Studio Marketplace [here](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
+
+2. This will open the `Continue` extension page in VS Code, where you will need to click `Install` again
+
+3. Once you do this, you will see a message in the bottom right hand corner of VS Code that says `Setting up Continue extension...`. After a couple minutes, the `Continue` extension will then open up
+
+**TODO: Finish writing out this step-by-step**
+
+## How to install from source
+
+Please follow the [README instructions in the repo](https://github.com/continuedev/continue/blob/main/README.md) to install `Continue` from source.
+
+## Next steps
+
+Now that you have installed locally in VS Code, you can learn more with our walkthroughs:
+- [Use the GUI](./walkthroughs/use-the-gui.md)
+- [Use a recipe](./walkthroughs/use-a-recipe.md)
+- [Create a recipe](./walkthroughs/create-a-recipe.md)
+- [Share a recipe](./walkthroughs/share-a-recipe.md)
diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 854385af..b1ce4c72 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -1,21 +1,20 @@ # Introduction -## Scripts reimagined in the age of LLMs +![continue-cover-logo](/img/continue-cover-logo.png) -### Automate more steps of your software development workflows using LLMs +## Quickstart -#### An open-source framework to accelerate your use of LLMs while coding +1. Try out `Continue` in the [GitHub Codespaces Demo](./getting-started.md) +2. Install `Continue` packaged as a [VS Code extension](./install.md) -1. Leverage steps created by others in your workflows as you code. -2. Customize steps and compose them together to fit your workflows. -3. Review, reverse, and rerun steps to use LLMs with confidence. +## What is `Continue`? -## How Continue works +**`Continue` is the open-source library for accelerating software development with language models** -The Continue framework consists of a `SDK`, a `GUI`, and a `Core` that brings everything together. +You define the scenarios where Large Language Models ([LLMs](./concepts/llm.md)) like GPT-4 and StarCoder should act as an autopilot, helping you complete software development tasks. You use [recipes](./concepts/recipe.md) created by others to automate more steps in your workflows. If a [recipe](./concepts/recipe.md) does not exist or work exactly like you want, you can use the [Continue SDK](./concepts/sdk.md) to create custom [steps](./concepts/step.md) and compose them into personalized [recipes](./concepts/recipe.md). Whether you are using a [recipe](./concepts/recipe.md) created by yourself or someone else, you can review, reverse, and rerun [steps](./concepts/step.md) with the [Continue GUI](./concepts/gui.md), which helps you guide the work done by LLMs and learn when to use and trust them. -The `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. +## Why do developers use `Continue`? -The `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. +Many developers have begun to use models like [GPT-4](https://openai.com/research/gpt-4) through [ChatGPT](https://openai.com/blog/chatgpt) while coding; however, the experience is painful because of how much manual copying, pasting, and editing is required to supply them with context and transfer the generated solutions to your codebase. `Continue` eliminates this pain by deeply integrating LLMs into your IDE amd workflows. -The `Core` connects the SDK and GUI with the IDE (i.e. in VS Code, a web browser, etc), enabling the steps to make changes to your code and accelerate your software development workflows.
\ No newline at end of file +`Continue` accelerates how developers build, ship, and maintain software, while giving them the control to define when LLMs should take actions and the confidence to trust LLMs. In short, it enables developers to do what they have always done: work together to create better and better abstractions that make it easier and easier to automate the repetitive work that people want computers to do. diff --git a/docs/docs/telemetry.md b/docs/docs/telemetry.md new file mode 100644 index 00000000..c5e938dd --- /dev/null +++ b/docs/docs/telemetry.md @@ -0,0 +1,21 @@ +# Telemetry
+
+## Overview
+
+`Continue` collects and reports **anonymous** usage information. This data is essential to understanding how we should improve the library. You can opt out of it at any time.
+
+## What we track
+
+We track the following...
+
+- Steps that are run and their parameters
+
+## How to opt out
+
+Create a `continue.json` file in the root of your workspace and add the following:
+
+```json
+{
+ "allow_anonymous_telemetry": false
+}
+```
diff --git a/docs/docs/walkthroughs/create-a-recipe.md b/docs/docs/walkthroughs/create-a-recipe.md new file mode 100644 index 00000000..0cf1892e --- /dev/null +++ b/docs/docs/walkthroughs/create-a-recipe.md @@ -0,0 +1,91 @@ +# Create a recipe
+
+**TODO: Describe step-by-step how to create a recipe**
+
+Points to include
+
+- Where to create recipes
+- How to create a step
+- How to create recipe
+- Using models
+
+## 1. Create a step
+
+### a. 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
+
+### 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()
+ )
+```
+
+## Additional considerations
+
+### 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
+
+Steps can include optional parameters that allow users to configure them
+
+```python
+from continuedev import ContinueSDK
+
+class CreatePytestsStep(Step):
+
+ input_file_path: str
+ output_file_prefix: str
+ output_dir_path: str
+
+ async def run(self, sdk: ContinueSDK):
+
+ code = await sdk.ide.readFile(self.input_file_path)
+ sdk.run_step(CreateDirStep(output_dir_path))
+ sdk.run_step(WritePytestsStep(code, output_file_prefix, output_dir_path))
+```
+
+### Adjust for different OS
+
+You might want to implement your steps, so that they can run on Linux, MacOS, and Windows.
+
+```python
+from continuedev import ContinueSDK
+import platform
+
+class SetUpVenvStep(Step):
+
+ async def run(self, sdk: ContinueSDK):
+
+ os = platform.system()
+
+ if os == "Windows":
+ await sdk.run("python -m venv env; .\\env\\Scripts\\activate")
+ else:
+ await sdk.run("python3 -m venv env && source env/bin/activate") # MacOS and Linux
+```
diff --git a/docs/docs/walkthroughs/share-a-recipe.md b/docs/docs/walkthroughs/share-a-recipe.md new file mode 100644 index 00000000..a5f7ef50 --- /dev/null +++ b/docs/docs/walkthroughs/share-a-recipe.md @@ -0,0 +1,9 @@ +# Share a recipe
+
+**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 new file mode 100644 index 00000000..e230030e --- /dev/null +++ b/docs/docs/walkthroughs/use-a-recipe.md @@ -0,0 +1,16 @@ +# Use a recipe
+
+**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 new file mode 100644 index 00000000..c244b461 --- /dev/null +++ b/docs/docs/walkthroughs/use-the-gui.md @@ -0,0 +1,12 @@ +# Use the GUI
+
+**TODO: Describe how to use the `Continue GUI`**
+
+Points to include
+- Recipes
+- Steps
+- Single turn at the moment
+- Opening the (set of) file(s) you want to edit
+- Then giving natural language instructions
+- Reversing
+- Modifying with feedback
\ No newline at end of file |