-
Notifications
You must be signed in to change notification settings - Fork 76
Add docs for Visual Studio #740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
044ba9b
Add docs for Visual Studio
MaedahBatool 44bd8ba
Add imporvements
MaedahBatool 130a0da
Update images
MaedahBatool 51963c0
Update docs/cody/clients/feature-reference.mdx
MaedahBatool 64a8f41
Update docs/cody/clients/feature-reference.mdx
MaedahBatool 1916c86
Update icon
MaedahBatool 2fc0f82
Update image
MaedahBatool File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. | ||
|
|
||
|  | ||
|
|
||
| ## 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). | ||
|
|
||
|  | ||
|
|
||
| ## 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 | ||
|
|
||
|  | ||
|
|
||
| ### 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 | ||
|
|
||
|  |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.