Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 24 additions & 25 deletions docs/cody/clients/feature-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,27 @@

## Chat

| **Feature** | **VS Code** | **JetBrains** | **Web** | **CLI** |
| ---------------------------------------- | ----------- | ------------- | -------------------- | ------- |
| Chat with Cody | ✅ | ✅ | ✅ | ✅ |
| Chat history | ✅ | ✅ | ✅ | ❌ |
| Clear chat history | ✅ | ✅ | ✅ | ❌ |
| Edit sent messages | ✅ | ❌ | ✅ | ❌ |
| Show context files | ✅ | ✅ | ✅ | ❌ |
| @-file | ✅ | ✅ | ✅ | ❌ |
| @-symbol | ✅ | ❌ | ✅ | ❌ |
| Ollama support (experimental) | ✅ | ✅ | ❌ | ❌ |
| LLM Selection | ✅ | ✅ | ✅ | ❌ |
| **Context Selection** | | | | |
| Single-repo context | ✅ | ✅ | ✅ | ❌ |
| Multi-repo context | ❌ | ❌ | ✅ (public code only) | ❌ |
| Local context | ✅ | ✅ | ❌ | ✅ |
| OpenCtx context providers (experimental) | ✅ | ❌ | ❌ | ❌ |
| **Prompts and Commands** | | | |
| Access to prompts and Prompt library | ✅ | ✅ | ✅ | ❌ |
| Custom commands | ✅ | ❌ | ❌ | ❌ |
| Edit code | ✅ | ✅ | ❌ | ❌ |
| Generate unit test | ✅ | ✅ | ❌ | ❌ |
| Ask Cody to Fix | ✅ | ✅ | ❌ | ❌ |
| **Feature** | **VS Code** | **JetBrains** | **Web** | **Visual Studio** | **CLI** |
| ---------------------------------------- | ----------- | ------------- | -------------------- | ----------------- | ------- |
| Chat with Cody | ✅ | ✅ | ✅ | ✅ | ✅ |
| Chat history | ✅ | ✅ | ✅ | ✅ | ❌ |
| Clear chat history | ✅ | ✅ | ✅ | ✅ | ❌ |
| Edit sent messages | ✅ | ❌ | ✅ | ✅ | ❌ |
| Show context files | ✅ | ✅ | ✅ | ✅ | ❌ |
| @-file | ✅ | ✅ | ✅ | ✅ | ❌ |
| @-symbol | ✅ | ❌ | ✅ | ✅ | ❌ |
| Ollama support (experimental) | ✅ | ✅ | ❌ | ✅ | ❌ |
| LLM Selection | ✅ | ✅ | ✅ | ✅ | ❌ |
| **Context Selection** | | | | | |
| Single-repo context | ✅ | ✅ | ✅ | ✅ | ❌ |
| Multi-repo context | ❌ | ❌ | ✅ (public code only) | ❌ | ❌ |
| Local context | ✅ | ✅ | ❌ | ✅ | ✅ |
| OpenCtx context providers (experimental) | ✅ | ❌ | ❌ | ❌ | ❌ |
| **Prompts and Commands** | | | | | |
| Access to prompts and Prompt library | ✅ | ✅ | ✅ | ✅ | ❌ |
| Edit code | ✅ | ✅ | ❌ | ✅ | ❌ |
| Generate unit test | ✅ | ✅ | ❌ | ✅ | ❌ |
| Ask Cody to Fix | ✅ | ✅ | ❌ | ❌ | ❌ |

## Code Autocomplete

Expand All @@ -46,10 +45,10 @@ Few exceptions that apply to Cody Pro and Cody Enterprise users:

<Accordion title="For Cody Enterprise">

- Admin LLM selection is suported on VS Code, JetBrains, and Web both for chat and code autocomplete
- Multi-repo context is supported on VS Code, JetBrains, and Web
- Admin LLM selection is suported on VS Code, JetBrains, Visual Studio, and Web both for chat and code autocomplete
- Multi-repo context is supported on VS Code, JetBrains, Visual Studio, and Web
- [Guardrails](/cody/clients/enable-cody-enterprise#guardrails) are supported on VS Code, JetBrains, and Web
- [Repo-based Cody Context Filters](/cody/capabilities/ignore-context#cody-context-filters) are supported on VS Code, JetBrains, and Web
- `@-mention` directories are supported on VS Code, JetBrains, and Web
- `@-mention` directories are supported on VS Code, JetBrains, Visual Studio, and Web

</Accordion>
77 changes: 77 additions & 0 deletions docs/cody/clients/install-visual-studio.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Installing Cody in Visual Studio

<p className="subtitle">Learn how to use Cody and its features with the Visual Studio editor.</p>

<Callout type="info">Cody for Visual Studio is currently in the Experimental stage and currently only supports chat.</Callout>

Cody extension for Visual Studio enhances your coding experience by providing intelligent and contextually aware answers to your questions. This guide will walk you through installing and setting Cody within your Visual Studio editor.

<LinkCards>
<LinkCard href="https://github.com/sourcegraph/cody-vs/" imgSrc="https://storage.googleapis.com/sourcegraph-assets/Docs/visual-studio-v2.svg" imgAlt="Cody for Visual Studio (Experimental)" title="Cody for Visual Studio" description="Install Cody's free extension for Visual Studio." />
</LinkCards>

## Prerequisites

- You have the latest version of [Visual Studio](https://visualstudio.microsoft.com/) installed
- You have a Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account

## Install the Visual Studio extension

- Download the Cody extension for Visual Studio from the [GitHub repository](https://github.com/sourcegraph/cody-vs/releases)
- Run the installer and follow the prompts to install the extension
- Once installed, go to the **Extensions > Manage Extensions** tab in Visual Studio and search for Cody under the **Installed** list for confirmation

## Connect the extension to Sourcegraph

<Callout type="info">Cody for Visual Studio is available for all Cody plans, including Cody Free, Pro, and Enterprise.</Callout>

After a successful installation, go to **Tools** from the main toolbar at the top and click the **Cody Chat** from the drop-down. This opens the dialog box to connect to your Sourcegraph instance.

Cody Free or Pro users can sign in to their Sourcegraph.com accounts through GitHub, GitLab, or Google. Meanwhile, Sourcegraph Enterprise users should connect Cody via their Enterprise instance URL and the Access Token.

Complete these steps, and you'll be ready to start using Cody in Visual Studio.

![install-cody-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-setup-102024-2.png)

## Chat

Cody in Visual Studio allows you to ask questions about your code and get contextually aware answers. The chat window is available in a unified interface next to your code. All your previous and existing chats are stored for later use and can be accessed via the **History** icon from the top menu. You can download them to share or use later in a `.json` file or delete them.

The chat input field has a default `@-mention` [context chips](#context-retrieval). These are automatically populated with the names of the files you have open in your editor. There is also a drop-down for [LLM selection](#llm-selection) and a button to run pre-built [prompts and commands](#prompts).

![cody-vs-chat](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-chat-102024-2.png)

## LLM selection

Cody offers a variety of large language models (LLMs) to power your chat experience. Cody Pro users can select the LLM they want to use for chat and experiment to choose the best model for the job. Choose from Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Sonnet, Claude 3 Haiku, GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo, Google Gemini 1.5 Pro, Gemini 1.5 Flash, and Mixtral, while Cody Free users have access to the latest base models from Anthropic, OpenAI, Google, and Mixtral.

Local models are also available through Ollama to Cody Free and Cody Pro users. To use a model in Cody chat, simply download it and run it in Ollama.

Administrators for Sourcegraph Enterprise instances can also choose between Claude and GPT models to set for their teams.

## Selecting Context with @-mentions

Cody's chat allows you to add files and symbols as context in your messages.

- Type `@-file` and then a filename to include a file as a context
- Type `@#` and then a symbol name to include the symbol's definition as context. Functions, methods, classes, types, etc., are all symbols

![cody-vs-context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-mention-102024-2.png)

### Context retrieval

When you start a new Cody chat, the chat input window opens with a default `@-mention` context chips for all the context it intends to use. This context is based on your current repository and current file (or a file selection if you have code highlighted).

At any point in time, you can edit these context chips or remove them completely if you do not want to use these as context. Any chat without a context chip will instruct Cody to use no codebase context. However, you can always provide an alternate `@-mention` file or symbols to let Cody use it as a new context source.

When you have both a repository and files @-mentioned, Cody will search the repository for context while prioritizing the mentioned files.

## Prompts

Cody offers a variety of pre-built prompts and commands to help you get the most out of your chat experience. You can access these prompts and commands from the chat input field. Using one of these, you can ask Cody to:

- Edit your code
- Document your code
- Generate unit tests

![cody-vs-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-prompts-102024-2.png)
3 changes: 2 additions & 1 deletion docs/cody/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Cody connects seamlessly with codehosts like <a target="blank" href="https://git
You can start using Cody with one of the following clients:

<ProductCards>
<ProductCard href="/cody/clients/install-vscode" imgSrc="https://storage.googleapis.com/sourcegraph-assets/docs/images/cody/vscode.svg" imgAlt="VS Code" title="Cody for VS Code!" description="Install Cody's free extension for VS Code. " />
<ProductCard href="/cody/clients/install-vscode" imgSrc="https://storage.googleapis.com/sourcegraph-assets/docs/images/cody/vscode.svg" imgAlt="VS Code" title="Cody for VS Code" description="Install Cody's free extension for VS Code. " />
<ProductCard href="/cody/clients/install-jetbrains" imgSrc="https://storage.googleapis.com/sourcegraph-assets/docs/images/cody/jb_beam.svg" imgAlt="JetBrains" title="Cody for JetBrains" description="Install Cody's free and open source extension for JetBrains." />
<ProductCard href="/cody/clients/install-visual-studio" imgSrc="https://storage.googleapis.com/sourcegraph-assets/Docs/visual-studio-v2.svg" imgAlt="Visual Studio" title="Cody for Visual Studio (Experimental)" description="Install Cody's free and open source extension for Visual Studio." />
<ProductCard href="/cody/clients/cody-with-sourcegraph" imgSrc="https://storage.googleapis.com/sourcegraph-assets/docs/images/cody/cody-logomark-default.svg" imgAlt="Cody Web" title="Cody for Web" description="Use Cody in the Sourcegraph web app." />
<ProductCard href="/cody/clients/enable-cody-enterprise" imgSrc="https://sourcegraph.com/.assets/img/sourcegraph-mark.svg" imgAlt="Cody Enterprise" title="Cody Enterprise" description="Get in touch with our team to try Cody for Sourcegraph Enterprise." />
</ProductCards>
Expand Down
1 change: 1 addition & 0 deletions src/data/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const navigation: NavigationItem[] = [
subsections: [
{ title: "Cody for VS Code", href: "/cody/clients/install-vscode", },
{ title: "Cody for JetBrains", href: "/cody/clients/install-jetbrains", },
{ title: "Cody for Visual Studio", href: "/cody/clients/install-visual-studio", },
{ title: "Cody for Web", href: "/cody/clients/cody-with-sourcegraph", },
{ title: "Cody for Enterprise", href: "/cody/clients/enable-cody-enterprise", },
{ title: "Model Configuration", href: "/cody/clients/model-configuration", },
Expand Down
Loading