From 044ba9b527603c44ec5ec4e4c7311f65cfc426c5 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Tue, 29 Oct 2024 14:55:05 -0700 Subject: [PATCH 1/7] Add docs for Visual Studio --- docs/cody/clients/feature-reference.mdx | 49 +++++++-------- docs/cody/clients/install-visual-studio.mdx | 69 +++++++++++++++++++++ src/data/navigation.ts | 1 + 3 files changed, 94 insertions(+), 25 deletions(-) create mode 100644 docs/cody/clients/install-visual-studio.mdx diff --git a/docs/cody/clients/feature-reference.mdx b/docs/cody/clients/feature-reference.mdx index 84fb4c389..afe1e950e 100644 --- a/docs/cody/clients/feature-reference.mdx +++ b/docs/cody/clients/feature-reference.mdx @@ -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 @@ -46,10 +45,10 @@ Few exceptions that apply to Cody Pro and Cody Enterprise users: -- 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 diff --git a/docs/cody/clients/install-visual-studio.mdx b/docs/cody/clients/install-visual-studio.mdx new file mode 100644 index 000000000..2373a009e --- /dev/null +++ b/docs/cody/clients/install-visual-studio.mdx @@ -0,0 +1,69 @@ +# Installing Cody in Visual Studio + +

Learn how to use Cody and its features with the Visual Studio editor.

+ +Cody for Visual Studio is currently in Experimental stage and currently only support chat. + +Cody extension for Visual Studio enhances your coding experience by providing intelligent and contextually aware ansewers to your questions. This guide will walk you through the steps to install and set up Cody within your Visual Studio editor . + + + + + +## 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 + +Cody for Visual Studio is available for all Cody plans, including Cody Free, Pro, and Enterprise. + +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. While Sourcegraph Enterprise users should connect Cody via their Enterprise instance URL and the Access Token. + +Complete these steps and you're ready to start using Cody in Visual Studio. + +## 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 opened right 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 altogether. + +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). + +## 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 both Cody Free and Cody Pro users. Simply download the model and run it in Ollama to use it in Cody chat. + +Administrators for Sourcegraph Enterprise instances can choose between Claude and GPT models to set for their teams as well. + +## 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 + +### 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 source of context. + +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 diff --git a/src/data/navigation.ts b/src/data/navigation.ts index 0a70c1909..56d86bf1c 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -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", }, From 44bd8badaaa38f711240116b0949e2efa032680c Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Tue, 29 Oct 2024 15:05:10 -0700 Subject: [PATCH 2/7] Add imporvements --- docs/cody/clients/install-visual-studio.mdx | 28 +++++++++++++-------- docs/cody/index.mdx | 3 ++- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/cody/clients/install-visual-studio.mdx b/docs/cody/clients/install-visual-studio.mdx index 2373a009e..fff25e9b5 100644 --- a/docs/cody/clients/install-visual-studio.mdx +++ b/docs/cody/clients/install-visual-studio.mdx @@ -2,9 +2,9 @@

Learn how to use Cody and its features with the Visual Studio editor.

-Cody for Visual Studio is currently in Experimental stage and currently only support chat. +Cody for Visual Studio is currently in the Experimental stage and currently only supports chat. -Cody extension for Visual Studio enhances your coding experience by providing intelligent and contextually aware ansewers to your questions. This guide will walk you through the steps to install and set up Cody within your Visual Studio editor . +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. @@ -27,23 +27,27 @@ Cody extension for Visual Studio enhances your coding experience by providing in 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. While Sourcegraph Enterprise users should connect Cody via their Enterprise instance URL and the Access Token. +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're ready to start using Cody in Visual Studio. +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.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 opened right 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 altogether. +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.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. +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 both Cody Free and Cody Pro users. Simply download the model and run it in Ollama to use it in Cody chat. +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 choose between Claude and GPT models to set for their teams as well. +Administrators for Sourcegraph Enterprise instances can also choose between Claude and GPT models to set for their teams. ## Selecting Context with @-mentions @@ -52,18 +56,22 @@ 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-%40mention-102024.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 source of context. +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: +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.png) diff --git a/docs/cody/index.mdx b/docs/cody/index.mdx index fe7fcdb26..4ba25bc73 100644 --- a/docs/cody/index.mdx +++ b/docs/cody/index.mdx @@ -17,8 +17,9 @@ Cody connects seamlessly with codehosts like + + From 130a0da1c469a6535a13a9083b30410b0e5893bb Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Tue, 29 Oct 2024 16:19:53 -0700 Subject: [PATCH 3/7] Update images --- docs/cody/clients/install-visual-studio.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/cody/clients/install-visual-studio.mdx b/docs/cody/clients/install-visual-studio.mdx index fff25e9b5..55d2e0224 100644 --- a/docs/cody/clients/install-visual-studio.mdx +++ b/docs/cody/clients/install-visual-studio.mdx @@ -31,7 +31,7 @@ Cody Free or Pro users can sign in to their Sourcegraph.com accounts through Git 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.png) +![install-cody-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-setup-102024-2.png) ## Chat @@ -39,7 +39,7 @@ Cody in Visual Studio allows you to ask questions about your code and get contex 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.png) +![cody-vs-chat](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-chat-102024-2.png) ## LLM selection @@ -56,7 +56,7 @@ 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-%40mention-102024.png) +![cody-vs-context-retrieval](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-mention-102024-2.png) ### Context retrieval @@ -74,4 +74,4 @@ Cody offers a variety of pre-built prompts and commands to help you get the most - Document your code - Generate unit tests -![cody-vs-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-prompts-102024.png) +![cody-vs-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-prompts-102024-2.png) From 51963c0689ba03c74c912a53a35a6adc236462f7 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Wed, 30 Oct 2024 09:55:41 -0700 Subject: [PATCH 4/7] Update docs/cody/clients/feature-reference.mdx Co-authored-by: Kalan <51868853+kalanchan@users.noreply.github.com> --- docs/cody/clients/feature-reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cody/clients/feature-reference.mdx b/docs/cody/clients/feature-reference.mdx index afe1e950e..8f3bea3ad 100644 --- a/docs/cody/clients/feature-reference.mdx +++ b/docs/cody/clients/feature-reference.mdx @@ -22,7 +22,7 @@ | OpenCtx context providers (experimental) | ✅ | ❌ | ❌ | ❌ | ❌ | | **Prompts and Commands** | | | | | | | Access to prompts and Prompt library | ✅ | ✅ | ✅ | ✅ | ❌ | -| Edit code | ✅ | ✅ | ❌ | ✅ | ❌ | +| Edit code | ✅ | ✅ | ❌ | ❌ | ❌ | | Generate unit test | ✅ | ✅ | ❌ | ✅ | ❌ | | Ask Cody to Fix | ✅ | ✅ | ❌ | ❌ | ❌ | From 64a8f4175c4242aeb98ef9fbda8278399dd125a8 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Wed, 30 Oct 2024 09:56:10 -0700 Subject: [PATCH 5/7] Update docs/cody/clients/feature-reference.mdx Co-authored-by: Kalan <51868853+kalanchan@users.noreply.github.com> --- docs/cody/clients/feature-reference.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cody/clients/feature-reference.mdx b/docs/cody/clients/feature-reference.mdx index 8f3bea3ad..799c3c7d6 100644 --- a/docs/cody/clients/feature-reference.mdx +++ b/docs/cody/clients/feature-reference.mdx @@ -23,7 +23,7 @@ | **Prompts and Commands** | | | | | | | Access to prompts and Prompt library | ✅ | ✅ | ✅ | ✅ | ❌ | | Edit code | ✅ | ✅ | ❌ | ❌ | ❌ | -| Generate unit test | ✅ | ✅ | ❌ | ✅ | ❌ | +| Generate unit test | ✅ | ✅ | ❌ | ❌ | ❌ | | Ask Cody to Fix | ✅ | ✅ | ❌ | ❌ | ❌ | ## Code Autocomplete From 1916c86960f064745b13f93c7413a3eb1462bd11 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Wed, 30 Oct 2024 15:09:54 -0700 Subject: [PATCH 6/7] Update icon --- docs/cody/clients/install-visual-studio.mdx | 2 +- docs/cody/index.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cody/clients/install-visual-studio.mdx b/docs/cody/clients/install-visual-studio.mdx index 55d2e0224..f129dfc55 100644 --- a/docs/cody/clients/install-visual-studio.mdx +++ b/docs/cody/clients/install-visual-studio.mdx @@ -7,7 +7,7 @@ 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. - + ## Prerequisites diff --git a/docs/cody/index.mdx b/docs/cody/index.mdx index 4ba25bc73..924369456 100644 --- a/docs/cody/index.mdx +++ b/docs/cody/index.mdx @@ -19,7 +19,7 @@ You can start using Cody with one of the following clients: - + From 2fc0f82d48eb2252c033b3bf9563db6587d845f5 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Wed, 30 Oct 2024 15:21:08 -0700 Subject: [PATCH 7/7] Update image --- docs/cody/clients/install-visual-studio.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cody/clients/install-visual-studio.mdx b/docs/cody/clients/install-visual-studio.mdx index f129dfc55..b18d89235 100644 --- a/docs/cody/clients/install-visual-studio.mdx +++ b/docs/cody/clients/install-visual-studio.mdx @@ -39,7 +39,7 @@ Cody in Visual Studio allows you to ask questions about your code and get contex 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) +![cody-vs-chat](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-visual-studio-1024.png) ## LLM selection