agent mode docs cont

This commit is contained in:
Dallin Romney 2025-03-25 15:00:34 -07:00
parent 11ec309eec
commit bf4bd35705
10 changed files with 141 additions and 0 deletions

View file

@ -0,0 +1,10 @@
---
title: Context selection
description: How context can be selected for Chat
keywords: [context]
sidebar_position: 3
---
## Input
Adding context in Agent mode is identical to [adding context in Chat](../chat/context-selection.md). Tool call responses are included in the chat history as context items.

View file

@ -0,0 +1,33 @@
---
title: How it works
description: How Agent works
keywords: [how, agent, works]
sidebar_position: 4
---
Agent offers all the functionality of chat, while also including tools in the request to the model and an interface for handling tool calls and responses.
## Built-In Tools
Continue includes several built-in tools which provide the model access to IDE functionality:
- **Read File**: read the contents of a file within the project
- **Read Currently Open File**: read the contents of the currently open file
- **Create New File**: Create a new file within the project, with path and contents specified by the model
- **Exact Search**: perform a `ripgrep` search within the project
- **Run Terminal Command**: run a terminal command from the workspace root
- **Search Web**: Perform a web search to get top results
- **View Diff**: View the current working git diff
- **View Repo Map**: request a copy of the repository map - same as the [Repo Map Context Provider](../customize/context-providers.mdx#repository-map)
- **View Subdirectory**: request a copy of a repo map for a specific directory within the project
When Agent is turned off, tools are not included in the request to the model.
## Model Support
![agent mode not supported](/img/mode-select-agent-not-supported.png)
<!--
:::
Using tools is typically much more expensive than exluding them - TODO add a note like this somewhere
::: -->

View file

@ -0,0 +1,15 @@
---
title: How to customize
description: How to customize Chat
keywords: [customize, chat]
sidebar_position: 5
---
There are a number of different ways to customize Chat:
- You can add a [`rules` block](../hub/blocks/block-types.md#rules) to your assistant to give the model persistent instructions through the system prompt. See the [rules deep dive](../customize/deep-dives/rules.md) for more information.
- You can configure [`@Codebase`](../customize/deep-dives/codebase.mdx)
- You can configure [`@Docs`](../customize/deep-dives/docs.mdx)
- You can configure and create custom [tools](../customize/tools.mdx)
- You can [build your own context provider](../customize/tutorials/build-your-own-context-provider.mdx)
- You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.mdx)

View file

@ -0,0 +1,45 @@
---
title: Agent
description: How to use Agent
sidebar_label: How to use it
keywords: [how, use, agent]
sidebar_position: 1
---
![agent mode](/img/agent.gif)
## How to use it
To enable Agent, click the Mode selector below the chat input and select `Agent`
![selecting agent mode](/img/mode-select-agent-not-supported.png)
s
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 what 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 <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) to send it to the LLM, 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. You can learn more about how to use this in [Chat context selection](context-selection.md).
## Apply generated code to your file
When the LLM replies with edits to a file, you can click the “Apply” button. This will update the existing code in the editor to reflect the suggested changes.
## Start a fresh session for a new task
Once you complete a task and want to start a new one, press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) to begin a new session, ensuring only relevant context for the next task is provided to the LLM.
## Switch between different models
you have configured multiple models, you can switch between models using the dropdown or by pressing <kbd>cmd/ctrl</kbd> + <kbd>’</kbd>

View file

@ -0,0 +1,24 @@
---
title: Model setup
description: How to set up a Chat model
keywords: [model]
sidebar_position: 2
---
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";
For the best chat experience we recommend Claude 3.7 Sonnet from Anthropic.
Add Claude 3.7 Sonnet to your assistant from the hub [here](https://hub.continue.dev/anthropic/claude-3-7-sonnet). You can get an API key from the [Anthropic console](https://console.anthropic.com/settings/keys).
Other recommended chat models include:
- [GPT-4o from OpenAI](https://hub.continue.dev/openai/gpt-4o)
- [Grok-2 from xAI](https://hub.continue.dev/xai/grok-2)
- [Gemini 2.0 Flash from Google](https://hub.continue.dev/google/gemini-2.0-flash)
- [Llama 3.1 8b from Meta on Ollama](https://hub.continue.dev/ollama/llama3.1-8b) for a fully local experience
{/* HUB_TODO nonexistent blocks */}
{/* - Deepseek Coder 2 from deepseek on [Ollama](https://hub.continue.dev/explore/models) or [LM Studio](https://hub.continue.dev/explore/models) */}
For more details about setup and recommended models, see [here](../customize/model-roles/chat.mdx).

View file

@ -462,6 +462,10 @@ const config = {
to: "/chat/how-to-use-it",
from: "/chat",
},
{
to: "/agent/how-to-use-it",
from: "/agent",
},
{
to: "/edit/how-to-use-it",
from: "/edit",

View file

@ -35,6 +35,16 @@ const sidebars = {
},
],
},
{
type: "category",
label: "Agent",
items: [
{
type: "autogenerated",
dirName: "agent",
},
],
},
{
type: "category",
label: "Edit",

BIN
docs/static/img/agent.gif vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
docs/static/img/mode-select-agent.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB