Updated documentation to reflect the new fastest getting started path in VSCode
This commit is contained in:
parent
5295d1214b
commit
f4ba68d5ce
3 changed files with 36 additions and 34 deletions
1
.vscode/launch.json
vendored
1
.vscode/launch.json
vendored
|
|
@ -44,6 +44,7 @@
|
|||
"args": [
|
||||
// Pass a directory to manually test in
|
||||
"${workspaceFolder}/extension/manual-testing-sandbox",
|
||||
"${workspaceFolder}/extension/manual-testing-sandbox/example.ts",
|
||||
"--extensionDevelopmentPath=${workspaceFolder}/extension",
|
||||
],
|
||||
"outFiles": [
|
||||
|
|
|
|||
|
|
@ -2,23 +2,25 @@
|
|||
|
||||
## Table of Contents
|
||||
|
||||
- [❤️ Ways to Contribute](#%EF%B8%8F-ways-to-contribute)
|
||||
- [Contributing to Continue](#contributing-to-continue)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [❤️ Ways to Contribute](#️-ways-to-contribute)
|
||||
- [🐛 Report Bugs](#-report-bugs)
|
||||
- [✨ Suggest Enhancements](#-suggest-enhancements)
|
||||
- [📖 Updating / Improving Documentation](#-updating--improving-documentation)
|
||||
- [🧑💻 Contributing Code](#-contributing-code)
|
||||
- [Setup Development Environment](#setting-up-the-development-environment)
|
||||
- [Environment Setup](#environment-setup)
|
||||
- [Writing Steps](#writing-steps)
|
||||
- [Writing Context Providers](#writing-context-providers)
|
||||
- [📐 Continue Architecture](#-continue-architecture)
|
||||
- [Continue VS Code Client](#continue-vs-code-client)
|
||||
- [Continue IDE Websockets Protocol](#continue-ide-websockets-protocol)
|
||||
- [Continue GUI Websockets Protocol](#continue-gui-websockets-protocol)
|
||||
- [❇️ Core Concepts](#%EF%B8%8F-core-concepts)
|
||||
- [Step](#step)
|
||||
- [Autopilot](#autopilot)
|
||||
- [Observation](#observation)
|
||||
- [Policy](#policy)
|
||||
- [📐 Continue Architecture](#-continue-architecture)
|
||||
- [Continue VS Code Client](#continue-vs-code-client)
|
||||
- [Continue IDE Websockets Protocol](#continue-ide-websockets-protocol)
|
||||
- [Continue GUI Websockets Protocol](#continue-gui-websockets-protocol)
|
||||
- [❇️ Core Concepts](#️-core-concepts)
|
||||
- [`Step`](#step)
|
||||
- [`Autopilot`](#autopilot)
|
||||
- [`Observation`](#observation)
|
||||
- [`Policy`](#policy)
|
||||
|
||||
# ❤️ Ways to Contribute
|
||||
|
||||
|
|
@ -50,17 +52,28 @@ Continue is continuously improving, but a feature isn't complete until it is ref
|
|||
|
||||
## 🧑💻 Contributing Code
|
||||
|
||||
### Setting up the Development Environment
|
||||
### Environment Setup
|
||||
|
||||
There are different levels of setup necessary depending on which part of Continue you are developing. For all of them, first clone the repo:
|
||||
VSCode is assumed for development as Continue is primarily a VSCode tool at the moment. Most of the setup and running is automated through VSCode tasks and launch configurations.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/continuedev/continue
|
||||
```
|
||||
1. Clone and open in VSCode the Continue repo `https://github.com/continuedev/continue`
|
||||
|
||||
If editing only the server (`/continuedev` directory), see the directions in [continuedev/README.md](./continuedev/README.md) to set up the Python server. Once it is running on localhost:8001, you can connect your existing VS Code extension by going to VS Code settings, searching for "Continue: Server URL", and setting it to "http://localhost:8001".
|
||||
2. Open VSCode command pallet (`cmd+shift+p`) and select `Tasks: Run Task` and then select `install-all-dependencies`
|
||||
|
||||
If editing the VS Code extension (`/extension` directory) or GUI (`/extension/react-app`), you can follow the instructions in [`extension/DEV_README.md`](./extension/DEV_README.md) to set up the VS Code extension and GUI in development mode.
|
||||
3. Start debugging:
|
||||
1. Switch to Run and Debug view
|
||||
2. Select `Server + Extension (VSCode)` from drop down
|
||||
3. Hit play button
|
||||
4. This will start both the server and the extension in debug mode and open a new VSCode window with continue extension
|
||||
1. I call the VSCode window with the extension the *Host VSCode*
|
||||
2. The window you started debugging from is reffered to as the *Main VSCode*
|
||||
5. Notice 2 debug sessions are running, one for the server and one for the extension, you can also set breakpoints in both
|
||||
|
||||
4. Lets try using breakpoints:
|
||||
1. *In Main VSCode*:
|
||||
1. Search for `class IdeProtocolServer` and set a breakpoint in `handle_json`, this is the method invoked on every message received from the extension related to selection changes, file opens etc
|
||||
2. Search for a method `sendHighlightedCode` and set a breakpoint in it, it is invoked on every selection change on the extension side
|
||||
2. *In Host VSCode*: Select part of the `example.ts` file, your breakpoint should be hit. If you hit play at this point (or F5) you should see the original breakpoint hit again - congratulations, you debugged an end to end interaction from the extension to the server!
|
||||
|
||||
### Writing Steps
|
||||
|
||||
|
|
|
|||
|
|
@ -6,25 +6,13 @@ This is the Continue VS Code Extension. Its primary jobs are
|
|||
2. Open the Continue React app in a side panel. The React app's source code lives in the `react-app` directory. The panel is opened by the `continue.openContinueGUI` command, as defined in `src/commands.ts`.
|
||||
3. Run a Continue server in the background, which connects to both the IDE protocol and the React app. The server is launched in `src/activation/environmentSetup.ts` by calling Python code that lives in `server/` (unless extension settings define a server URL other than localhost:65432, in which case the extension will just connect to that).
|
||||
|
||||
## How to debug the VS Code Extension
|
||||
# How to run the extension
|
||||
|
||||
1. Clone the Continue repo
|
||||
See [Environment Setup](../CONTRIBUTING.md#environment-setup)
|
||||
|
||||
2. Open a VS Code window with the `continue` directory as your workspace
|
||||
# How to run and debug tests
|
||||
|
||||
3. Package and then start the FastAPI server by following instructions outlined in the `Continue Server` section of the `continuedev/README.md`
|
||||
|
||||
4. Open a VS Code window with the `extension` directory as your workspace
|
||||
|
||||
5. Run `npm run package`
|
||||
|
||||
6. Open `src/activation/activate.ts` file (or any TypeScript file)
|
||||
|
||||
7. Press `F5` on your keyboard to start `Run and Debug` mode
|
||||
|
||||
8. `cmd+shift+p` to look at developer console and select Continue commands
|
||||
|
||||
9. Every time you make changes to the code, you need to run `npm run esbuild` unless you make changes inside of `react-app` and then you need to run `npm run build` from there
|
||||
After following the setup in [Environment Setup](../CONTRIBUTING.md#environment-setup) you can run `npm run test` in the command line or the `Server + Tests (VSCode)` launch configuration in VS Code to debug tests + server.
|
||||
|
||||
## Notes
|
||||
|
||||
Loading…
Add table
Reference in a new issue