This commit is contained in:
Nate Sesti 2023-06-29 09:51:55 -07:00
commit 178c784639
18 changed files with 132 additions and 250 deletions

View file

@ -1,8 +1,8 @@
<h1 align="center"> Continue </h1>
<h1 align="center">Continue</h1>
<div align="center">
**[Continue](https://continue.dev/docs) is the open-source library for accelerating software development with language models**
**[Continue](https://continue.dev/docs) is the open-source autopilot for software development—a [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue) that brings the power of ChatGPT to your IDE**
</div>
@ -15,53 +15,33 @@
</div>
## Task, not tab, auto-complete
### Edit in natural language
Highlight a section of code and instruct Continue to refactor it
- `/edit Make this use more descriptive variable names`
- `/edit Rewrite this API call to grab all pages`
- `/edit Use 'Union' instead of a vertical bar here`
### Get possible explainations
Ask Continue about a part of your code to get another perspective
- `/explain what might cause this error?`
- `/explain what is the load_dotenv library name?`
- `/explain how do I find running process on port 8000?`
### Generate files from scratch
Let Continue build the scaffolding of Python scripts, React components, and more
- `Create a shell script to back up my home dir to /tmp/`
- `Write Python in a new file to get Posthog events`
- `Add a React component for syntax highlighted code`
## Getting Started
### Install for VS Code
### [Download for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
Learn how to install locally in VS Code [here](https://continue.dev/docs/getting-started)
### GitHub Codespaces
Explore Continue in GitHub Codespaces [here](https://continue.dev/docs/getting-started) if you'd like to try without downloading for VS Code.
## How to contribute
Open a [new GitHub Issue](https://github.com/continuedev/continue/issues/new) or comment on [an existing one](https://github.com/continuedev/continue/issues). Let us know what you would like to contribute, and we will help you make it happen!
## Install from source
#### 1. Clone this repo
Recommended: Run this command to use SSH
```bash
git clone git@github.com:continuedev/continue.git
```
Alternative: Run this command to use HTTPS
```bash
git clone https://github.com/continuedev/continue
```
#### 2. Install Continue
Run this command to use the install script
```bash
cd continue/extension/scripts && python3 install_from_source.py
```
# Understanding the codebase
- [Continue Server README](./continuedev/README.md): learn about the core of Continue, which can be downloaded as a [PyPI package](https://pypi.org/project/continuedev/)
- [VS Code Extension README](./extension/README.md): learn about the capabilities of our extension—the first implementation of Continue's IDE Protocol—which makes it possible to use use Continue in VS Code and GitHub Codespaces
- [Continue GUI README](./extension/react-app/): learn about the React app that lets users interact with the server and is placed adjacent to the text editor in any suppported IDE
- [Schema README](./schema): learn about the JSON Schema types generated from Pydantic models, which we use across the `continuedev/` and `extension/` directories
- [Continue Docs README](./docs): learn how our [docs](https://continue.dev/docs) are written and built
- [How to debug the VS Code Extension README](./extension/src/README.md): learn how to set up the VS Code extension, so you can debug it
# License
## License
[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE)

View file

@ -24,3 +24,40 @@ Start it by running the following commands:
## Writing Steps
See the `src/continuedev/libs/steps` folder for examples of writing a Continue step. See our documentation for tutorials.
## How to contribute
Open a [new GitHub Issue](https://github.com/continuedev/continue/issues/new) or comment on [an existing one](https://github.com/continuedev/continue/issues). Let us know what you would like to contribute, and we will help you make it happen!
## Install from source
#### 1. Clone this repo
Recommended: Run this command to use SSH
```bash
git clone git@github.com:continuedev/continue.git
```
Alternative: Run this command to use HTTPS
```bash
git clone https://github.com/continuedev/continue
```
#### 2. Install Continue
Run this command to use the install script
```bash
cd continue/extension/scripts && python3 install_from_source.py
```
# Understanding the codebase
- [Continue Server README](./continuedev/README.md): learn about the core of Continue, which can be downloaded as a [PyPI package](https://pypi.org/project/continuedev/)
- [VS Code Extension README](./extension/README.md): learn about the capabilities of our extension—the first implementation of Continue's IDE Protocol—which makes it possible to use use Continue in VS Code and GitHub Codespaces
- [Continue GUI README](./extension/react-app/): learn about the React app that lets users interact with the server and is placed adjacent to the text editor in any suppported IDE
- [Schema README](./schema): learn about the JSON Schema types generated from Pydantic models, which we use across the `continuedev/` and `extension/` directories
- [Continue Docs README](./docs): learn how our [docs](https://continue.dev/docs) are written and built
- [How to debug the VS Code Extension README](./extension/src/README.md): learn how to set up the VS Code extension, so you can debug it

View file

@ -83,7 +83,7 @@ def compile_chat_messages(model: str, msgs: List[ChatMessage], prompt: Union[str
prompt_tokens += count_tokens(model, json.dumps(function))
msgs = prune_chat_history(model,
msgs, MAX_TOKENS_FOR_MODEL[model], prompt_tokens + 1000 + count_tokens(model, system_message))
msgs, MAX_TOKENS_FOR_MODEL[model], prompt_tokens + DEFAULT_MAX_TOKENS + count_tokens(model, system_message))
history = []
if system_message:
history.append({

View file

@ -166,7 +166,7 @@ class DefaultModelEditCodeStep(Step):
# Overflow won't happen, but prune_chat_messages in count_tokens.py will cut out this whole thing, instead of us cutting out only as many lines as we need.
model_to_use = sdk.models.default
BUFFER_FOR_FUNCTIONS = 200
BUFFER_FOR_FUNCTIONS = 400
total_tokens = model_to_use.count_tokens(
full_file_contents + self._prompt + self.user_input) + BUFFER_FOR_FUNCTIONS + DEFAULT_MAX_TOKENS

View file

@ -0,0 +1,7 @@
# Collecting data
You might have noticed the `Data Collection` toggle at the bottom of the Continue GUI. If you turn it on, it automatically collects accepted and rejected suggestions, so you can fine-tune an LLM to give better answers.
Right now, it stores them in a JSON file on your computer. Going forward, we plan to enable you to join them with data from other developers on your team and help you fine-tune an LLM to better follow your team's best practices.
If you are interested in working with us to fine-tune models based on your coding data, reach out to hi@continue.dev!

View file

@ -1,17 +0,0 @@
# Contributing data
You might have noticed the toggle at the bottom of the Continue GUI. Right now, all it does is send anonymous telemetry about whether it is on or off. **No data is being collected.** We are using it to gather feedback as to whether or not developers would be willing to contribute data about their software development workflows to an open-source dataset.
If there are enough developers who signal interest, we will then move forward with collecting data from those who opt-in and make the dataset publicly accessible. Our hope is that this dataset could then be used by anyone to train a new class of [foundation models](https://fsi.stanford.edu/publication/opportunities-and-risks-foundation-models) for software development that can help us not only “tab autocomplete” but also “task autocomplete” as we create software.
There will be many discussions and iterations with the community before we consider collecting the dataset in order to ensure that the approach works for them, and in no situation will any action taken prior to this point cause users to have their data collected without clear, additional consent. If you have thoughts or questions about this, please reach out to us at contribute@continue.dev. We want to hear from you!
In summary, this is what you should do:
- Toggle data contribution `on` when you would be willing to share your software development data to a public dataset **in the future**
![contribute-data-on](/img/contribute-data-on.png)
- Toggle data contribution `off` when you would not be willing to share your software development data to a public dataset **in the future**
![icontribute-data-off](/img/contribute-data-off.png)

View file

@ -2,17 +2,15 @@
## Recommended: Install in VS Code
1. Click `Install` on the Continue extension in the Visual Studio Marketplace [here](https://marketplace.visualstudio.com/items?itemName=Continue.continue)
1. Click `Install` on the **[Continue extension in the Visual Studio Marketplace](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 30-90 seconds, the Continue extension will then open up. It should look like this when it is complete:
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 30-90 seconds, the Continue extension will then open up:
![vscode-install](/img/continue-screenshot.png)
You can also open the Continue panel with `cmd+k` on Mac / `ctrl+k` on Windows
4. If it's your first time using Continue, it will open a file called `calculator.py` where you can play around with Continue's functionality.
4. If it's your first time using Continue, it will open a file called `calculator.py` with instructions:
![codespaces-install](/img/continue-screenshot2.png)

View file

@ -2,12 +2,10 @@
![Continue Architecture Diagram](/img/continue-architecture.png)
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 `Continue` library consists of an **SDK**, a **GUI**, and a **Server** that brings everything together.
1. 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 and workflows.
1. The **SDK** 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 and workflows.
2. The [GUI](./concepts/gui.md) lets you transparently review every automated step, providing the opportunity to undo and rerun any that ran incorrectly.
2. The **GUI**lets you transparently review every automated step, providing the opportunity to undo and rerun any that ran incorrectly.
3. The [Server](./concepts/server.md) is responsible for connecting the IDE, SDK, and GUI together as well as deciding which steps to take next.
The Continue Server take actions in the IDE code editor as directed by recipes, which are written using the Continue SDK and run by a user using the Continue GUI.
3. The **Server** is responsible for connecting the GUI and SDK to the IDE as well as deciding which steps to take next.

View file

@ -2,18 +2,8 @@
![continue-cover-logo](/img/continue-cover-logo.png)
## Quickstart
**Continue is the open-source autopilot for software development—a [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue) that brings the power of ChatGPT to your IDE**
**Install Continue packaged as a [VS Code extension](./getting-started.md)**
You determine when Large Language Models (LLMs) like [GPT-4](https://openai.com/research/gpt-4) should act as an autopilot, helping you complete software development tasks. You highlight some code and then use slash commands like `/edit` and `/explain` + natural language instructions to tell the language model what to do.
## What is Continue?
**Continue is the open-source library for accelerating software development with language models**
You determine when Large Language Models (LLMs) like GPT-4 should act as an autopilot, helping you complete software development tasks. You open a file or highlight some code and then use slash commands like `/edit`, `/explain`, and `/comment` and naturual language instructions to tell the language model what to do. If an error or exception occurs when you run Python or JavaScript code, Continue will automatically tell you in plain English what to try to address it. You can also review, reverse, and rerun steps with the Continue GUI, which helps you guide the work done by LLMs and learn when to use and trust them.
## Why do developers use Continue?
Many developers have begun to use [GPT-3.5](https://platform.openai.com/docs/models/gpt-3-5) and [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 provide the necessary context and incorporate the generated solutions and advice into your codebase. Continue eliminates this pain by enabling LLMs to natively act in your IDE as you complete your workflows.
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.
Many developers have begun to use [ChatGPT](https://openai.com/blog/chatgpt) while coding; however, the experience is painful because of how much copying, pasting, and editing is required to provide the context and incorporate the generated answers into your codebase. Continue eliminates this pain by enabling LLMs to natively act in your IDE as you complete your workflows.

View file

@ -2,15 +2,11 @@
## 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.
We use [Posthog](https://posthog.com/), an open source platform for product analytics, to collect and store the data. You can review the code [here](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/util/telemetry.py).
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. We use [Posthog](https://posthog.com/), an open source platform for product analytics, to collect and store the data. You can review the code [here](https://github.com/continuedev/continue/tree/main/continuedev/src/continuedev/libs/util/telemetry.py).
## What we track
We track
- the steps that are run and their parameters
- if the data contribution toggle is switched on / off
We track the steps that are run and their parameters and if the data collection toggle is switched on / off.
## How to opt out

View file

@ -61,7 +61,7 @@ const config = {
navbar: {
title: "Continue",
logo: {
alt: "My Site Logo",
alt: "Continue Logo",
src: "img/logo.svg",
},
items: [
@ -88,11 +88,19 @@ const config = {
label: "Introduction",
to: "/intro",
},
{
label: "VS Code",
to: "https://marketplace.visualstudio.com/items?itemName=Continue.continue",
},
],
},
{
title: "Community",
items: [
{
label: "Discord",
href: "https://discord.gg/DvACJvjx",
},
{
label: "Twitter",
href: "https://twitter.com/continuedev",
@ -106,6 +114,10 @@ const config = {
label: "GitHub",
href: "https://github.com/continuedev/continue",
},
{
label: "Website",
href: "https://continue.dev",
},
],
},
],

View file

@ -13,7 +13,7 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
docsSidebar: ["intro", "getting-started", "how-continue-works", "telemetry", "contributing-data"],
docsSidebar: ["intro", "getting-started", "how-continue-works", "telemetry", "collecting-data"],
};
module.exports = sidebars;

View file

@ -1,61 +0,0 @@
import React from "react";
import clsx from "clsx";
import styles from "./styles.module.css";
const FeatureList = [
{
title: "Understand and edit code",
Svg: require("@site/static/img/undraw_docusaurus_mountain.svg").default,
description: (
<>
Seamlessly ask language models to help you complete steps in your software development tasks
</>
),
},
{
title: "Customizable for your team",
Svg: require("@site/static/img/undraw_docusaurus_tree.svg").default,
description: (
<>
Define when and how LLMs should act to accelerate steps in your team-specific workflows
</>
),
},
{
title: "Break down your work step-by-step",
Svg: require("@site/static/img/undraw_docusaurus_react.svg").default,
description: (
<>
Use the Continue GUI to review, reverse, and rerun steps that LLMs and you have taken together
</>
),
},
];
function Feature({ Svg, title, description }) {
return (
<div className={clsx("col col--4")}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<p>{description}</p>
</div>
</div>
);
}
export default function HomepageFeatures() {
return (
<section className={styles.features}>
<div className="container">
<div className="row">
{FeatureList.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
);
}

View file

@ -1,11 +0,0 @@
.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}
.featureSvg {
height: 200px;
width: 200px;
}

View file

@ -1,43 +0,0 @@
import React from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import HomepageFeatures from "@site/src/components/HomepageFeatures";
import styles from "./index.module.css";
function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx("hero hero--primary", styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/getting-started"
>
Download for VS Code
</Link>
</div>
</div>
</header>
);
}
export default function Home() {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`Docs`}
description="Documentation for the `Continue` library"
>
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}

View file

@ -1,23 +0,0 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.heroBanner {
padding: 4rem 0;
text-align: center;
position: relative;
overflow: hidden;
}
@media screen and (max-width: 996px) {
.heroBanner {
padding: 2rem;
}
}
.buttons {
display: flex;
align-items: center;
justify-content: center;
}

View file

@ -1,19 +1,30 @@
# Continue
**[Continue](https://continue.dev/docs/) is the open-source library for accelerating software development with language models**
**[Continue](https://continue.dev/docs) is the open-source autopilot for software development—a [VS Code extension](https://marketplace.visualstudio.com/items?itemName=Continue.continue) that brings the power of ChatGPT to your IDE**
## Getting Started
## Task, not tab, auto-complete
After install is complete, the Continue extension will automatically open. You can also open it by pressing `cmd+k` on Mac / `ctrl+k` on Windows and then selecting `Continue: Open Continue GUI`.
### Edit in natural language
To learn how to use it, try to use Continue for the following after `calculator.py` opens:
- "Write me a calculator class"
- Ask for a new method (e.g. "exp", "mod", "sqrt")
- Type /comment to write comments for the entire class
- Ask about how the class works, how to write it in another language, etc.
Highlight a section of code and instruct Continue to refactor it
- `/edit Make this use more descriptive variable names`
- `/edit Rewrite this API call to grab all pages`
- `/edit Use 'Union' instead of a vertical bar here`
Give Continue a star on GitHub [here](https://github.com/continuedev/continue)
### Get possible explainations
## Feedback
Ask Continue about a part of your code to get another perspective
- `/explain what might cause this error?`
- `/explain what is the load_dotenv library name?`
- `/explain how do I find running process on port 8000?`
Have thoughts about Continue? Please [leave an issue](https://github.com/continuedev/continue/issues/new) or email us at hi@continue.dev :)
### Generate files from scratch
Let Continue build the scaffolding of Python scripts, React components, and more
- `Create a shell script to back up my home dir to /tmp/`
- `Write Python in a new file to get Posthog events`
- `Add a React component for syntax highlighted code`
## License
[Apache 2.0 © 2023 Continue Dev, Inc.](./LICENSE)

View file

@ -1,4 +1,12 @@
[[redirects]]
from = "/docs/*"
to = "/:splat"
status = 200
from = "/docs/*"
to = "/:splat"
status = 200
[[redirects]]
from = "/"
to = "/docs/intro"
[[redirects]]
from = "/docs"
to = "/docs/intro"