some more work
This commit is contained in:
parent
5d389d2412
commit
f7d9d1b2f4
13 changed files with 116 additions and 19 deletions
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
## One sentence definition
|
||||
|
||||
The `autopilot` is
|
||||
|
||||
## What else to know
|
||||
|
||||
`Autopilot` contains the
|
||||
- History
|
||||
- LLM
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
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.
|
||||
## One sentence definition
|
||||
|
||||
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
|
||||
|
||||
The `Core` includes
|
||||
- IDE protocol
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
# 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: Explain in detail what this is and what its purpose is*
|
||||
|
||||
## One sentence definition
|
||||
|
||||
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.
|
||||
|
||||
## What else to know
|
||||
|
||||
**From GUI to Core**
|
||||
- Natural language instructions from the developer
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
`History` is the ordered record of all past steps.
|
||||
## One sentence definition
|
||||
|
||||
The `history` is the ordered record of all past steps.
|
||||
|
||||
## What else to know
|
||||
|
||||
**Q: What step data and metadata is stored in the history?**
|
||||
|
|
@ -1,5 +1,11 @@
|
|||
# IDE
|
||||
|
||||
## One sentence definition
|
||||
|
||||
The `IDE` is
|
||||
|
||||
## What else to know
|
||||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
## Supported IDEs
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
# LLM
|
||||
|
||||
## One sentence definition
|
||||
|
||||
An `LLM` is short for Large Language Model, which includes models like GPT-4, StarCoder, and others.
|
||||
|
||||
## What else to know
|
||||
|
||||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
`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)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
# Policy
|
||||
|
||||
## One sentence definition
|
||||
|
||||
A `policy` is
|
||||
|
||||
## What else to know
|
||||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
The policy determines what step to run next
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
# Recipe
|
||||
|
||||
## One sentence definition
|
||||
|
||||
A `recipe` is a sequence of [steps](./step.md) composed into a workflow that developers use and share with others.
|
||||
|
||||
## What else to know
|
||||
|
||||
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 convention.
|
||||
|
||||
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: Explain in detail what this is and what its purpose is*
|
||||
|
||||
An ordered sequence of steps that are intended to accomplish some complete task
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
# SDK
|
||||
|
||||
## One sentence definition
|
||||
|
||||
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.
|
||||
|
||||
## What else to know
|
||||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
*TODO: Detail all the SDK methods and how to use 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.
|
||||
|
||||
## SDK methods
|
||||
|
||||
### run_step
|
||||
|
|
|
|||
|
|
@ -2,33 +2,41 @@
|
|||
|
||||
*TODO: Explain in detail what this is and what its purpose is*
|
||||
|
||||
A step is
|
||||
## One sentence definition
|
||||
|
||||
## Step methods
|
||||
A `step` is
|
||||
|
||||
### `run` (required)
|
||||
## What else to know
|
||||
|
||||
Steps can be composed together
|
||||
|
||||
### Step methods
|
||||
|
||||
#### `run` (required)
|
||||
|
||||
the code that should run when executed by the policy
|
||||
|
||||
### `description` (optional)
|
||||
#### `description` (optional)
|
||||
|
||||
the definition of what the step does in natural language
|
||||
|
||||
### `reverse` (optional)
|
||||
#### `reverse` (optional)
|
||||
|
||||
the code that should run when the step is reversed
|
||||
|
||||
### `modify` (optional)
|
||||
#### `modify` (optional)
|
||||
|
||||
the code that should run when the step is rerun with feedback
|
||||
|
||||
## Steps
|
||||
*TODO: Move list / description of all steps and recipes to the place where people will be able to use and update them*
|
||||
|
||||
### Core
|
||||
### Steps & recipes
|
||||
|
||||
#### RunCommandStep
|
||||
#### Core
|
||||
|
||||
#### EditCodeStep
|
||||
##### RunCommandStep
|
||||
|
||||
##### EditCodeStep
|
||||
|
||||
#### ManualEditStep
|
||||
|
||||
|
|
|
|||
|
|
@ -8,4 +8,40 @@ The [SDK](./concepts/sdk.md) gives you access to tools (e.g. open a directory, e
|
|||
|
||||
The [GUI](./concepts/gui.md) 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.
|
||||
|
||||
The [Core](./concepts/core.md) 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](./concepts/core.md) 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.
|
||||
|
||||
### continuedev
|
||||
|
||||
`core` folder contains major concepts, including Agent, Observation (sunsetting this potentially), Policy, SDK (all so far in their own files), and in `main.py`, History, HistoryNode, Step, and others. `env.py` is a common place to load environment variables, which can then be imported from here.
|
||||
|
||||
`libs` contains misc. stuff. `llm` for language model utilities. `steps` for builtin Continue steps. `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`.
|
||||
|
||||
`plugins` not really used, was from when I was using pluggy. I'll delete.
|
||||
|
||||
`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.
|
||||
|
||||
### docs
|
||||
|
||||
Self-explanatory, but Docusaurus
|
||||
|
||||
### extension
|
||||
|
||||
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`.
|
||||
|
||||
### schema
|
||||
|
||||
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.
|
||||
|
||||
---
|
||||
|
||||
### GENERAL INFORMATION
|
||||
|
||||
The Continue `Agent` class is the main loop, completing Steps and then deciding the next step and repeating. An Agent has a `Policy`, which decides what step to take next. An Agent 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.
|
||||
|
||||
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.
|
||||
|
||||
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).
|
||||
|
||||
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 Agent'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).
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Installation
|
||||
|
||||
If you want to try out `Continue` without having to install it, check out the [GitHub Codespaces Demo](./getting-started.md)
|
||||
If you want to try `Continue` before installing, check out the [GitHub Codespaces Demo](./getting-started.md)
|
||||
|
||||
## Install `Continue` packaged as a VS Code extension
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ export default function Home() {
|
|||
const {siteConfig} = useDocusaurusContext();
|
||||
return (
|
||||
<Layout
|
||||
title={`${siteConfig.title} Docs`}
|
||||
description="Description will go into a meta tag in <head />">
|
||||
title={`Docs`}
|
||||
description="Documentation for the `Continue` library">
|
||||
<HomepageHeader />
|
||||
<main>
|
||||
<HomepageFeatures />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue