summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/concepts/agent.md8
-rw-r--r--docs/docs/concepts/autopilot.md30
-rw-r--r--docs/docs/concepts/gui.md4
-rw-r--r--docs/docs/concepts/ide.md14
-rw-r--r--docs/docs/how-continue-works.md37
5 files changed, 76 insertions, 17 deletions
diff --git a/docs/docs/concepts/agent.md b/docs/docs/concepts/agent.md
deleted file mode 100644
index bbcc6f57..00000000
--- a/docs/docs/concepts/agent.md
+++ /dev/null
@@ -1,8 +0,0 @@
-# Autopilot
-
-`Autopilot` contains the
-
-- History
-- LLM
-- Policy
-- IDE
diff --git a/docs/docs/concepts/autopilot.md b/docs/docs/concepts/autopilot.md
new file mode 100644
index 00000000..71090eb0
--- /dev/null
+++ b/docs/docs/concepts/autopilot.md
@@ -0,0 +1,30 @@
+# Autopilot
+
+**TODO: Better explain in one sentence what this is and what its purpose is**
+
+:::info
+The **autopilot** is the main loop, completing steps and then deciding the next step and repeating
+:::
+
+## Details
+
+The Autopilot class is the center of Continue. Every step is initiated from the Autopilot, which provides it with a ContinueSDK.
+
+- Records history
+- Allows reversal
+- Injects SDK
+- Has policy to decide what step to take next
+- Accepts user input and acts on it
+- Main event loop
+- Contains main classes that are provided through the SDK, including LLM, History, IDE
+
+---
+
+- An autopilot takes user input from the React app
+- You can see this happening in `server/gui.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
diff --git a/docs/docs/concepts/gui.md b/docs/docs/concepts/gui.md
index dfdc2a7a..f9cff697 100644
--- a/docs/docs/concepts/gui.md
+++ b/docs/docs/concepts/gui.md
@@ -3,11 +3,11 @@
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.
**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)
-**Q: do we call this the Continue GUI or Notebook?** \ No newline at end of file
+- Updates to state (e.g. a new step)
diff --git a/docs/docs/concepts/ide.md b/docs/docs/concepts/ide.md
index 980b589d..4684c362 100644
--- a/docs/docs/concepts/ide.md
+++ b/docs/docs/concepts/ide.md
@@ -24,9 +24,9 @@ Get the workspace directory
Set whether a file is open
-### openNotebook
+### openGUI
-Open a notebook
+Open a gui
### showSuggestionsAndWait
@@ -44,13 +44,13 @@ Called when a traceback is received
Called when a file system update is received
-### onCloseNotebook
+### onCloseGUI
-Called when a notebook is closed
+Called when a gui is closed
-### onOpenNotebookRequest
+### onOpenGUIRequest
-Called when a notebook is requested to be opened
+Called when a gui is requested to be opened
### getOpenFiles
@@ -78,4 +78,4 @@ Apply a file edit
### saveFile
-Save a file \ No newline at end of file
+Save a file
diff --git a/docs/docs/how-continue-works.md b/docs/docs/how-continue-works.md
new file mode 100644
index 00000000..e6648cbc
--- /dev/null
+++ b/docs/docs/how-continue-works.md
@@ -0,0 +1,37 @@
+# How `Continue` works
+
+![Continue Architecture Diagram](/img/continue-architecture.png)
+
+## 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 [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.
+
+## Details
+
+**TODO: Refactor all of this and make it fit with language above**
+
+- 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.
+ - 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
+ - This includes Autopilot, Policy, SDK (all in their own files so far)
+ - It also includes `main.py`, which contains History, HistoryNode, Step, and others
+ - You'll find `env.py` here too, which 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`
+- `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
+- 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.