diff --git a/docs/docs/actions.md b/docs/docs/actions.md deleted file mode 100644 index 79d3dd5f4..000000000 --- a/docs/docs/actions.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Actions -description: Learn more about Action features in Continue ---- diff --git a/docs/docs/autocomplete.md b/docs/docs/autocomplete.md deleted file mode 100644 index 04b42f159..000000000 --- a/docs/docs/autocomplete.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Autocomplete -description: Learn more about the Autocomplete feature in Continue ---- diff --git a/docs/docs/chat.md b/docs/docs/chat.md deleted file mode 100644 index 12cf370f8..000000000 --- a/docs/docs/chat.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Chat -description: Learn more about the Chat feature in Continue ---- diff --git a/docs/docs/chat/context-selection.md b/docs/docs/chat/context-selection.md index c754d26cf..3a95e0e42 100644 --- a/docs/docs/chat/context-selection.md +++ b/docs/docs/chat/context-selection.md @@ -1,7 +1,47 @@ --- title: Context selection -description: \-context selection +description: How context can be selected for Chat keywords: [context] --- # Context selection + +## Input + +Typing a question or instructions into the input box is the only required context. All of the other methods to select and include additional context listed below are optional. + +## Highlighted code + +The highlighted code you’ve selected by pressing `cmd/ctrl+L` will be included in your prompt alongside the input you provide. This is the only section of code that will be provided to the model unless you highlight additional sections or use one of the other selection methods below. + +## Active file + +You can include the currently open file as context by pressing `cmd/ctrl+opt+enter` when you send your request. + +## Specific file + +You can include a specific file in your current workspace as context by typing `@files` and selecting the file. + +## Specific folder + +You can include a folder in your current workspace as context by typing `@directory` and selecting the directory. It works like `@codebase` but only includes the files in the selected directory. + +## Entire codebase + +You can include your entire codebase as context by typing `@codebase`. Learn more about how it works here. + +## Documentation site + +You can include a documentation site as context by typing `@docs` and selecting the documentation site. Learn more about how it works here. + +## Terminal contents + +You can include the contents of the terminal in your IDE as context by typing `@terminal`. + +## Git diff + +You can include all of the changes you've made to your current branch by typing `@diff`. + +## Other context + +Go to reference to see giant list of context providers \ No newline at end of file diff --git a/docs/docs/chat/how-it-works.md b/docs/docs/chat/how-it-works.md index 84f930ad6..3f8e2160d 100644 --- a/docs/docs/chat/how-it-works.md +++ b/docs/docs/chat/how-it-works.md @@ -1,7 +1,17 @@ --- title: How it works -description: \-how it works -keywords: [how] +description: How Chat works +keywords: [how, chat, works] --- # How it works + +Using any selected code sections, all context that you have selected with @, and your input instructions, we prompt the model to provide a response in the sidebar. If you are asking a follow-up, then the all earlier session context is also included. No other additional context is provided to the model. + +The model response is then streamed directly back to the sidebar. Each code section included in the response will be placed into its own code block, which gives you buttons to either “Apply to current file”, “Insert at cursor”, or “Copy” for each section. + +When you press cmd+L at the end of a session, all context is cleared and a new session is started, so that you can begin a new task. If you would like to view the exact prompt that is sent to the model during Chat, you can [view this in the prompt logs](../reference/). + +:::info +TODO: You can learn about how @codebase and how @docs work here and here +::: \ No newline at end of file diff --git a/docs/docs/chat/how-to-use-it.md b/docs/docs/chat/how-to-use-it.md index 09683a3e4..fff3b88a2 100644 --- a/docs/docs/chat/how-to-use-it.md +++ b/docs/docs/chat/how-to-use-it.md @@ -1,7 +1,37 @@ --- title: How to use it -description: How to use -keywords: [how] +description: How to use Chat +keywords: [how, use, chat] --- +import Admonition from "@theme/Admonition"; + # How to use it + +Chat makes it easy to ask for help from an LLM without needing to leave the IDE. You send it a task, including any relevant information, and it replies with the text / code most likely to complete the task. If it does not give you want you want, then you can send follow up messages to clarify and adjust its approach until the task is completed. + +Chat is best used to understand and iterate on code or as a replacement for search engine queries. + +## Type a request and press enter + +You send it a question, and it replies with an answer. You tell it to solve a problem, and it provides you a solution. You ask for some code, and it generates it. + +## Highlight a code section to include as context + +You select a code section with your mouse, press `cmd/ctrl+L`, and then ask for it to be explained to you or request it to be refactored in some way. + +## Reference context with the @ symbol + +If there is information from the codebase, documentation, IDE, or other tools that you want to include as context, you can type @ to select and include it as context. + +## Apply generated code to your file + +When the LLM replies with code, you can hover over the top right of the code block and select “Apply to current file” to update the existing code in the editor to this new version. + +## Start a fresh session for a new task + +Once you complete a task and want to start a new one, press `cmd/ctrl+L` to begin a new session, ensuring only relevant context for the next task is provided to the LLM. + +## Switch between different models + +If you have configured multiple models, you can switch between models using the dropdown or by pressing `cmd/ctrl + ’` \ No newline at end of file diff --git a/docs/docs/chat/model-setup.md b/docs/docs/chat/model-setup.md index e564f7419..e3e20711a 100644 --- a/docs/docs/chat/model-setup.md +++ b/docs/docs/chat/model-setup.md @@ -1,7 +1,210 @@ --- title: Model setup -description: \-model setup +description: How to set up Chat model keywords: [model] --- +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + # Model setup + +:::info +This page recommends models and providers for Chat. Read more about how to set up your `config.json` [here](../reference/config.mdx). +::: + +## Best overall experience + +For the best overall Chat experience, you will want to use a 400B+ parameter model or one of the frontier models. + +#### Claude Sonnet 3.5 from Anthropic + +Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../reference/Model%20Providers/anthropicllm.md). + +```json title="config.json" + "models": [ + { + "title": "Claude 3.5 Sonnet", + "provider": "anthropic", + "model": "claude-3-5-sonnet-20240620", + "apiKey": "[ANTHROPIC_API_KEY]" + } + ] +``` + +#### Llama 3.1 405B from Meta + +If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../reference/Model%20Providers/togetherllm.md) or [Groq](../reference/Model%20Providers/groq.md)) or self-host it (e.g. using [vLLM](../reference/Model%20Providers/vllm.md) or [Ollama](../reference/Model%20Providers/ollama.md)). + + + + + + ```json title="config.json" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "together", + "model": "llama3.1-405b", + "apiKey": "[TOGETHER_API_KEY]" + } + ] + ``` + + + + + + ```json title="config.json" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "groq", + "model": "llama3.1-405b", + "apiKey": "[GROQ_API_KEY]" + } + ] + ``` + + + + + + ```json title="config.json" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "vllm", + "model": "llama3.1-405b" + } + ] + ``` + + + + + + ```json title="config.json" + "models": [ + { + "title": "Llama 3.1 405B", + "provider": "ollama", + "model": "llama3.1-405b" + } + ] + ``` + + + + + +#### GPT-4o from OpenAI + +If you prefer to use a model from [OpenAI](../reference/Model%20Providers/openai.md), then we recommend GPT-4o. + +```json title="config.json" + "models": [ + { + "title": "GPT-4o", + "provider": "openai", + "model": "", + "apiKey": "[OPENAI_API_KEY]" + } + ] +``` + +#### Gemini 1.5 Pro from Google + +If you prefer to use a model from [Google](../reference/Model%20Providers/geminiapi.md), then we recommend Gemini 1.5 Pro. + +```json title="config.json" + "models": [ + { + "title": "Gemini 1.5 Pro", + "provider": "gemini", + "model": "gemini-1.5-pro-latest", + "apiKey": "[GEMINI_API_KEY]" + } + ] +``` + +## Local, offline experience + +For the best local, offline Chat experience, you will want to use a model that is large but fast enough on your machine. + +#### Llama 3.1 8B + +If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../reference/Model%20Providers/ollama.md) or [LM Studio](../reference/Model%20Providers/lmstudio.md)). + + + + + + ```json title="config.json" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "ollama", + "model": "llama3.1-8b" + } + ] + ``` + + + + + + ```json title="config.json" + "models": [ + { + "title": "Llama 3.1 8B", + "provider": "lmstudio", + "model": "llama3.1-8b" + } + ] + ``` + + + + + + +#### DeepSeek Coder 2 16B + +If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../reference/Model%20Providers/ollama.md) or [LM Studio](../reference/Model%20Providers/lmstudio.md)). + + + + + + ```json title="config.json" + "models": [ + { + "title": "DeepSeek Coder 2 16B", + "provider": "ollama", + "model": "deepseek-coder-v2:16b" + } + ] + ``` + + + + + + ```json title="config.json" + "models": [ + { + "title": "DeepSeek Coder 2 16B", + "provider": "lmstudio", + "model": "deepseek-coder-v2:16b" + } + ] + ``` + + + + + +## Other experiences + +There are many more models and providers you can use with Chat beyond those mentioned above. Read more [here](../reference). \ No newline at end of file diff --git a/docs/docs/edit.md b/docs/docs/edit.md deleted file mode 100644 index 45ec1aeee..000000000 --- a/docs/docs/edit.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: Edit -description: Learn more about the Edit feature in Continue -keywords: [edit, cmd l] ---- - -![edit](/img/edit.gif) - -## How to use it - -Edit is a convenient way to modify code without leaving your current file. Highlight a block of code, describe your code changes, and a diff will be streamed inline to your file which you can accept or reject. - -Edit is best used for small, quick changes such as: - -- Writing comments -- Generating unit tests -- Refactoring functions or methods - -### Highlight code and activate - -Highlight the block of code you would like to modify, and press `cmd/ctrl + i` to activate the edit input. - -### Describe code changes - -Describe the changes you would like the model to make to your highlighted code. For edits, a good prompt should be relatively short and concise. For longer, more complex tasks, we recommend [using chat](./chat.md). - -### Accept or reject changes - -Proposed changes appear as inline diffs within your highlighted text. - -You can navigate through each proposed change, accepting or rejecting them using `cmd/ctrl + opt + y` (to accept) or `cmd/ctrl + opt + n` (to reject). - -You can also accept or reject all changes at once using `cmd/ctrl + shift + enter` (to accept) or `cmd/ctrl + shift + delete` (to reject). - -If you want to request a new suggestion for the same highlighted code section, you can use `cmd/ctrl + i` to re-prompt the model. - -## Model setup - -By default, Edit uses the [same model as Chat](./chat.md) since we recommend a similar, 400B+ parameter model for code edits. - -You can configure a different model to be used for edits by updating your [`config.json`](./reference/config.mdx). - -## Context selection - -### Input - -The input you provide is included in the prompt. - -### Highlighted code - -The highlighted code you’ve selected is included in the prompt. This is the only section of code that the model will attempt to edit. - -### Current file - -The entire contents of the file containing your highlighted code selection are included as additional context. This gives the model a broader understanding of the code's environment. If the file is too large to fit within the context window, we will trim the file's contents to fit. - -## How it works - -Using the highlighted code, the contents of the file containing your highlight, and your input instructions, we prompt the model to edit the code according to your instructions. No other additional context is provided to the model. - -The model response is then streamed directly back to the highlighted range in your code, where we apply a diff formatting to show the proposed changes. - -If you accept the diff, we remove the previously highlighted lines, and if you reject the diff, we remove the proposed changes. - -If you would like to view the exact prompt that is sent to the model during an edit, you can [view this in the prompt logs](./troubleshooting.md#check-the-logs). diff --git a/docs/docs/quickstart/install.md b/docs/docs/getting-started/install.md similarity index 100% rename from docs/docs/quickstart/install.md rename to docs/docs/getting-started/install.md diff --git a/docs/docs/quickstart/overview.mdx b/docs/docs/getting-started/overview.mdx similarity index 100% rename from docs/docs/quickstart/overview.mdx rename to docs/docs/getting-started/overview.mdx diff --git a/docs/docs/index.md b/docs/docs/index.md index 9522baaaa..91c08c137 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -3,4 +3,4 @@ id: index slug: / --- -This index page should automatically redirect to [/docs/intro](./introduction.md) +This index page should automatically redirect to [/docs/intro](./intro.md) diff --git a/docs/docs/intro.md b/docs/docs/intro.md new file mode 100644 index 000000000..6d242a68d --- /dev/null +++ b/docs/docs/intro.md @@ -0,0 +1,15 @@ +--- +title: Introduction +description: The open-source AI code assistant for developers +keywords: [continue, AI, code assistant, autocomplete, chat, VS Code, JetBrains] +--- + +# Introduction + +![Continue Logo](/img/intro.png) + +**Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom experiences inside [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)** +- [Chat](/chat/how-to-use-it.md) to understand and iterate on code in the sidebar +- [Autocomplete](/autocomplete/how-to-use-it.md) to recieve inline code suggestions as you type +- [Edit](/edit/how-to-use-it.md) to modify code without leaving your current file +- [Actions](/actions/how-to-use-it.md) to establish shortcuts for common use cases \ No newline at end of file diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md deleted file mode 100644 index 8f14f7a7c..000000000 --- a/docs/docs/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Introduction ---- diff --git a/docs/sidebars.js b/docs/sidebars.js index 2e1db157c..b8ce11f24 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -3,21 +3,21 @@ const sidebars = { docsSidebar: [ - "introduction", + "intro", { type: "category", - label: "Quickstart", + label: "Getting Started", collapsible: true, collapsed: true, items: [ { type: "doc", - id: "quickstart/install", + id: "getting-started/install", label: "Install", }, { type: "doc", - id: "quickstart/overview", + id: "getting-started/overview", label: "Overview", }, ], diff --git a/docs/static/img/intro.png b/docs/static/img/intro.png index 64f65b845..7a8c769ef 100644 Binary files a/docs/static/img/intro.png and b/docs/static/img/intro.png differ