Skip to content

Commit

Permalink
new docs updates (continuedev#1168)
Browse files Browse the repository at this point in the history
* update GIF and model reccs

* docs update

* adjusting intro language

* finishing refactor

---------

Co-authored-by: Nate Sesti <[email protected]>
  • Loading branch information
TyDunn and sestinj committed Apr 24, 2024
1 parent ecee7a3 commit 4331e26
Show file tree
Hide file tree
Showing 36 changed files with 703 additions and 975 deletions.
56 changes: 31 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,55 @@

<p></p>

![Editing With Continue](media/readme.gif)
## Easily understand code sections

</div>
![understand](docs/static/img/understand.gif)

VS Code: `cmd+L` (MacOS) / `ctrl+L` (Windows)

JetBrains: `cmd+J` (MacOS) / `ctrl+J` (Windows)

## Tab to autocomplete code suggestions

![autocomplete](docs/static/img/autocomplete.gif)

## Task and tab autocomplete
VS Code: `tab` (MacOS) / `tab` (Windows)

### Answer coding questions
JetBrains: `tab` (MacOS) / `tab` (Windows)

Highlight + select sections of code and ask Continue for another perspective
## Refactor functions where you are coding

- “what does this forRoot() static function do in nestjs?”
- “why is the first left join in this query necessary here?”
- “how do I run a performance benchmark on this rust binary?”
![inline](docs/static/img/inline.gif)

### Edit in natural language
VS Code: `cmd+I` (MacOS) / `ctrl+I` (Windows)

Highlight + select a section of code and instruct Continue to refactor it
JetBrains: `cmd+I` (MacOS) / `ctrl+I` (Windows)

- “/edit rewrite this to return a flattened list from a 3x3 matrix”
- “/edit refactor these into an angular flex layout on one line"
- “/edit define a type here for a list of lists of dictionaries”
## Ask questions about your codebase

### Generate files from scratch
![codebase](docs/static/img/codebase.gif)

Open a blank file and let Continue start new Python scripts, React components, etc.
VS Code: `@codebase` (MacOS) / `@codebase` (Windows)

- “/edit get me started with a basic supabase edge function”
- “/edit implement a c++ shortest path algo in a concise way”
- “/edit create a docker compose file with php and mysql server"
JetBrains: Support coming soon

### And much more!
## Quickly use documentation as context

- Try out [experimental support for local tab autocomplete](https://continue.dev/docs/walkthroughs/tab-autocomplete) in VS Code
- Use [built-in context providers](https://continue.dev/docs/customization/context-providers#built-in-context-providers) or create your own [custom context providers](https://continue.dev/docs/customization/context-providers#building-your-own-context-provider)
- Use [built-in slash commands](https://arc.net/l/quote/zbhwfjmp) or create your own [custom slash commands](https://continue.dev/docs/customization/slash-commands#custom-slash-commands)
![docs](docs/static/img/docs.gif)

VS Code: `@docs` (MacOS) / `@docs` (Windows)

JetBrains: `@docs` (MacOS) / `@docs` (Windows)

</div>

## Getting Started

#### Download for [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)
### Download for [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)

You can try out Continue for free using a proxy server that securely makes calls with our API key to models like GPT-4, Gemini Pro, and Phind CodeLlama via OpenAI, Google, and Together respectively.
You can try out Continue with our free trial models before configuring your setup.

Once you're ready to use your own API key or a different model / provider, press the `+` button in the bottom left to add a new model to your `config.json`. Learn more about the models and providers [here](https://continue.dev/docs/model-setup/overview).
Learn more about the models and providers [here](https://continue.dev/docs/setup/overview).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion core/autocomplete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All of the configuration options available for chat models are available to use
}
```

If you aren't yet familiar with the available options, you can learn more in our [overview](../model-setup/overview.md).
If you aren't yet familiar with the available options, you can learn more in our [overview](../setup/overview.md).

### What model should I use?

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/customization/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ keywords: [custom, slash commands, models, context providers]

# Overview

Continue can be deeply customized by editing `~/.continue/config.json` (`%userprofile%\.continue\config.json` for Windows) and `config.ts` on your machine. These files are created the first time you run Continue. To open `config.json`, click the gear icon in the bottom right corner of the Continue sidebar.
Continue can be deeply customized by editing `config.json` and `config.ts` on your machine. You can find these files in the `~/.continue/` directory on MacOS and the `%userprofile%\.continue` directory on Windows. These files are created the first time you run Continue.

Currently, you can customize the following:

- [Models](../model-setup/select-model.md) and [providers](../model-setup/select-provider.md)
- [Context Providers](./context-providers.md) - Type '@' to easily add attachments to your prompt. Define which sources you want to reference, including GitHub Issues, terminal output, or automatically retrieved snippets from your codebase.
- [Slash Commands](./slash-commands.md) - Call custom prompts or programs written with our SDK by typing `/`.
- [Other Configuration](../reference/config.mdx) - Configure other settings like the system message and temperature.
- [Models](../setup/select-model.md) and [providers](../setup/select-provider.md)
- [Context Providers](./context-providers.md)
- [Slash Commands](./slash-commands.md)
- [Other configuration options](../reference/config.mdx)

If you'd like to share Continue configuration with others, you can add a `.continuerc.json` to the root of your project. It has the same JSON Schema definition as `config.json`, and will automatically be applied on top of the local `config.json`.
152 changes: 34 additions & 118 deletions docs/docs/how-to-use-continue.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,146 +6,62 @@ keywords: [how to, edit, refactor, boilerplate, context]

# 🧑‍🎓 How to use Continue

:::info
**TL;DR: Using LLMs as you code can accelerate you if you leverage them in the right situations. However, they can also cause you to get lost and confused if you trust them when you should not. This page outlines when and where we think you should and should not use Continue.**
:::
## Easily understand code sections

## Introduction
![understand](/img/understand.gif)

Continue will only be as helpful as the LLM you are using to power the edits and explanations. LLMs sometimes hallucinate, so it might make up a library or invent some syntax that does not exist. If something suggested is not working or seems odd to you, it’s best to double check with a Google search to make sure you are not falling into a rabbit hole.
- VS Code: `cmd+L` (MacOS) / `ctrl+L` (Windows)
- JetBrains: `cmd+J` (MacOS) / `ctrl+J` (Windows)

As you use Continue more, you will learn when to trust it. A great way to get started is to just play with it and start to get a sense of what works and what does not. Continue always ask you to accept / reject any changes it suggests, so you can always undo if something goes wrong.
## Tab to autocomplete code suggestions

If you are trying to use it for a new task and don’t have a sense of how much Continue can help you complete it, it can often be helpful to start like this:
![autocomplete](/img/autocomplete.gif)

'Highlight' refers to the act of selecting a text range in a file and pressing 'cmd+shift+M' (Macos) or 'ctrl+shift+M' (Windows) to include it in the Continue chat message.
- VS Code: `tab` (MacOS) / `tab` (Windows)
- JetBrains: `tab` (MacOS) / `tab` (Windows)

1. Highlight the code section(s) that you don’t understand and type "tell me how this code works" in the input box
2. If the explanation seems reasonable, then, while still highlighting the code section(s), type "how would you change this code to [INSERT TASK]?"
3. If this explanation is also pretty good, then, while still highlighting the code section(s), type `/edit [INSERT TASK]`. If you like the suggested diff, use `cmd+shift+enter` to accept the changes.
4. If it does not work on first attempt, use `cmd+shift+backspace` to reject the changes and try again—often it will make a different suggestion each time
5. If it is not giving you what you want after another attempt, reject and try again with more specific / clear instructions, articulating exactly what you want it to do and not to do
6. If this still does not work, then you likely need to break down the task into smaller sub-tasks and ask the LLM to do each of those one at a time or just do it yourself manually
## Refactor functions where you are coding

Remember: You are responsible for all code that you ship, whether it was written by you or by an LLM that you directed. This means it is crucial that you review what the LLM writes. To make this easier, we provide natural language descriptions of the actions the LLM took in the Continue GUI.
![inline](/img/inline.gif)

## When to use Continue
- VS Code: `cmd+I` (MacOS) / `ctrl+I` (Windows)
- JetBrains: `cmd+I` (MacOS) / `ctrl+I` (Windows)

Here are tasks that Continue excels at helping you complete:
## Ask questions about your codebase

### Laborious edits
![codebase](/img/codebase.gif)

Continue works well in situations where find and replace does not work (i.e. “/edit change all of these to be like that”)
- VS Code: `@codebase` (MacOS) / `@codebase` (Windows)
- JetBrains: Support coming soon

Examples
## Quickly use documentation as context

- "/edit Use 'Union' instead of a vertical bar here"
- “/edit Make this use more descriptive variable names”
![docs](/img/docs.gif)

### Writing files from scratch
- VS Code: `@docs` (MacOS) / `@docs` (Windows)
- JetBrains: `@docs` (MacOS) / `@docs` (Windows)

Continue can help you get started building React components, Python scripts, Shell scripts, Makefiles, unit tests, etc.
## Kick off actions with slash commands

Examples
![slash](/img/slash.gif)

- /edit write a python script to get posthog events"
- /edit add a react component for syntax highlighted code"
- VS Code: `/edit` (MacOS) / `/edit` (Windows)
- JetBrains: `/edit` (MacOS) / `/edit` (Windows)

### Creating boilerplate from scratch
Learn more about slash commands [here](./customization/slash-commands.md)

Continue can go even further. For example, it can help build the scaffolding for a Python package, which includes a typer cli app to sort the arguments and print them back out.
## Add classes, files, and more to context

Examples
![classes](/img/classes.gif)

- “/edit use this schema to write me a SQL query that gets recently churned users”
- “/edit create a shell script to back up my home dir to /tmp/"
- VS Code: `@files` (MacOS) / `@files` (Windows)
- JetBrains: `@files` (MacOS) / `@files` (Windows)

### Fix highlighted code
Learn more about context providers [here](./customization/context-providers.md).

After selecting the code section(s), try to refactor it with Continue (e.g “/edit change the function to work like this” or “/edit do this everywhere”)
## Understand terminal errors immediately

Examples
![error](/img/error.gif)

- “/edit migrate this digital ocean terraform file into one that works for GCP”
- “/edit rewrite this function to be async”

### Ask about highlighted code or an entire file

If you don't understand how some code works, highlight it and ask "how does this code work?"

Examples

- “where in the page should I be making this request to the backend?”
- “how can I communicate between these iframes?”

### Ask about errors

Continue can also help explain errors / exceptions and offer possible solutions. When you come across an error / exception in your terminal, press `cmd+shift+r` (MacOS) / `ctrl+shift+r` (Windows). This will throw the stack trace into Continue and ask for it to explain the issue to you.

### Figure out what shell command to run

Instead of switching windows and getting distracted, you can ask things like "How do I find running process on port 8000?"

Examples

- "what is the load_dotenv library name?"
- "how do I find running process on port 8000?"

### Ask single-turn open-ended questions

Instead of leaving your IDE, you can ask open-ended questions that you don't expect to turn into multi-turn conversations.

Examples

- “how can I set up a Prisma schema that cascades deletes?”
- "what is the difference between dense and sparse embeddings?"

### Editing small existing files

You can highlight an entire file and ask Continue to improve it as long as the file is not too large.

Examples

- “/edit here is a connector for postgres, now write one for kafka”
- "/edit Rewrite this API call to grab all pages"

### Using context from multiple other files

Similar to how you would make changes manually, focus on one file at a time. But if there is key information in other files, highlight those sections of code too to be used as additional context

### Tasks with a few steps

There are many more tasks that Continue can help you complete. Typically, these will be tasks that don't involve too many steps to complete.

Examples

- “/edit make an IAM policy that creates a user with read-only access to S3”
- “/edit change this plot into a bar chart in this dashboard component”

## When to not use Continue

Here are tasks that Continue is **not** helpful with today:

### Deep debugging

If you are 20 minutes into debugging a complicated issue across many files, then Continue won’t be able to help you connect the dots yet. That said, Continue can provide ideas of what you might do at different points if you share what you have figured out along the way and ask for ideas of what to try.

### Multi-file edits in parallel

At the moment, Continue can only edit one file at a time. If you figure out which files need to change, you can direct Continue to help you change them one at a time though.

### Using context of the entire file

If files get too large, it can be difficult for Continue to fit them into the limited LLM context windows. Try to highlight the section of code that include the relevant context. It's rare that you need the entire file.

### Editing large files

Similarly, if you try to edit too many lines at once, you might run into context window limits. It also will likely be very slow to apply the suggestions.

### Highlighting really long lines

If you highlight very long lines (e.g. a complex SVG), you might also run into issues like those above.

### Tasks with many steps

There are other tasks that Continue won't be able to take on entirely at once. However, typically, if you figure out how to break the task into sub-tasks, you can get help from Continue with those.
- VS Code: `cmd+shift+R` (MacOS) / `ctrl+shift+R` (Windows)
- JetBrains: Support coming soon
24 changes: 11 additions & 13 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ keywords: [introduction, intro, continue, autopilot, chatgpt]

# 💻 Introduction

![continue-cover-logo](/img/continue-cover-logo.png)
![continue-cover-logo](/img/intro.png)

**Continue is an open-source autopilot for [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)—the easiest way to code with any LLM**

Many developers have begun to use 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 act natively in your IDE as you complete your workflows.
**Continue keeps developers in flow. Our open-source [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension) extensions enable you to easily create your own modular AI software development system that you can improve.**

Some examples of what you can achieve are:

- Use cmd/ctrl + I to generate boilerplate code from natural language
- Use our local tab-autocomplete to get inline suggestions and write boilerplate code quickly
- Highlight code, describe how to refactor it, and have changes streamed into your editor
- Ask high-level questions about your codebase, with Continue automatically finding relevant files
- Quickly generate unit tests for any function or class
- Ask a quick question to get immediate answers without leaving your editor
- Have your current changes reviewed for mistakes that the compiler can't catch
- Type '@' to reference dozens of different sources while communicating with the LLM
- [Easily understand code sections](how-to-use-continue.md#easily-understand-code-sections)
- [Tab to autocomplete code suggestions](how-to-use-continue.md#tab-to-autocomplete-code-suggestions)
- [Refactor functions where you are coding](how-to-use-continue.md#refactor-functions-where-you-are-coding)
- [Ask questions about your codebase](how-to-use-continue.md#ask-questions-about-your-codebase)
- [Quickly use documentation as context](how-to-use-continue.md#quickly-use-documentation-as-context)
- [Kick off actions with slash commands](how-to-use-continue.md#kick-off-actions-with-slash-commands)
- [Add classes, files, and more to context](how-to-use-continue.md#add-classes-files-and-more-to-context)
- [Understand terminal errors immediately](how-to-use-continue.md#understand-terminal-errors-immediately)

Continue lets you do all of this with any LLM, whether open-source, commercial, local, or remote. And we provide numerous points of configuration so that you can customize the extension to fit into your existing workflows.
Continue enables you to use the right model for the job, whether it's open-source or commercial, running local or remote, and used for chat, autocomplete, or embeddings. And we provide numerous points of configuration, so that you can customize the extension to fit into your existing workflows.
19 changes: 0 additions & 19 deletions docs/docs/model-setup/overview.md

This file was deleted.

Loading

0 comments on commit 4331e26

Please sign in to comment.