From a81957dfd3c66b5f956e2402cd2e5bc454941daa Mon Sep 17 00:00:00 2001 From: Zahid Ali Date: Fri, 22 Nov 2024 23:27:51 +0500 Subject: [PATCH 1/7] Updated hover card for text (#812) ## Pull Request approval You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel. --- src/components/mdx/CustomLink.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/mdx/CustomLink.tsx b/src/components/mdx/CustomLink.tsx index d4c2dbad7..c36a747f1 100644 --- a/src/components/mdx/CustomLink.tsx +++ b/src/components/mdx/CustomLink.tsx @@ -61,7 +61,7 @@ export const CustomLink: React.FC = ({ return ( - + {children} From 9b99f04be4fb6d497fb4748b7ab13f2f9f206a8d Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Fri, 22 Nov 2024 12:16:43 -0800 Subject: [PATCH 2/7] Improve LB docs memory (#814) ## Pull Request approval You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel. --- baseai/memory/docs/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/baseai/memory/docs/index.ts b/baseai/memory/docs/index.ts index a73490fde..83daa1550 100644 --- a/baseai/memory/docs/index.ts +++ b/baseai/memory/docs/index.ts @@ -5,10 +5,9 @@ const memoryDocs = (): MemoryI => ({ name: 'docs', description: 'Docs folder of sourcegraph docs repository as an auto-synced memory', config: { - deployedCommitHash: '7a147cfb18f19d5584ffb3805b678db47191960a', - useGitRepo: true, - dirToTrack: path.posix.join('.', 'docs'), - extToTrack: [".md",".mdx"] + useGitRepo: true, + dirToTrack: path.posix.join('.', 'docs'), + extToTrack: [".md", ".mdx"] } }); From 6903e06158190e1c6c884ff405b9414e16bcf46c Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Fri, 22 Nov 2024 19:05:22 -0800 Subject: [PATCH 3/7] Docs to sunset commands --- docs/cody/capabilities/chat.mdx | 16 +- docs/cody/capabilities/commands.mdx | 263 +------------------- docs/cody/capabilities/debug-code.mdx | 6 +- docs/cody/capabilities/ignore-context.mdx | 2 - docs/cody/capabilities/index.mdx | 2 +- docs/cody/clients/cody-with-sourcegraph.mdx | 6 + docs/cody/clients/feature-reference.mdx | 48 ++-- docs/cody/clients/install-jetbrains.mdx | 60 ++--- docs/cody/clients/install-visual-studio.mdx | 19 +- docs/cody/clients/install-vscode.mdx | 39 +-- docs/cody/quickstart.mdx | 2 +- docs/cody/troubleshooting.mdx | 2 +- docs/cody/usage-and-pricing.mdx | 3 +- src/data/navigation.ts | 2 +- 14 files changed, 80 insertions(+), 390 deletions(-) diff --git a/docs/cody/capabilities/chat.mdx b/docs/cody/capabilities/chat.mdx index 8a22999c9..50da4d15d 100644 --- a/docs/cody/capabilities/chat.mdx +++ b/docs/cody/capabilities/chat.mdx @@ -86,21 +86,9 @@ Smart Apply also supports the executing of commands in the terminal. When you as Cody keeps a history of your chat sessions. You can view it by clicking the **History** button in the chat panel. You can **Export** it to a JSON file for later use or click the **Delete all** button to clear the chat history. -## Prompts and Commands +## Prompts -Cody offers quick, ready-to-use [prompts and commands](/cody/capabilities/commands) for common actions to write, describe, fix, and smell code. These allow you to run predefined actions with smart context-fetching anywhere in the editor, like: - -- **New Chat**: Ask Cody a question -- **Document Code**: Add code documentation -- **Edit Code**: Edit code with instructions -- **Explain Code**: Describe your code with more details -- **Generate Unit Tests**: Write tests for your code - - - -Read more about [prompts and commands](/cody/capabilities/commands). +Cody offers quick, ready-to-use [prompts](/cody/capabilities/commands) for common actions to write, describe, fix, and smell code. Read more about [prompts](/cody/capabilities/commands) here. ## Ask Cody to write code diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index 5194b6ea6..f1465cdd9 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -1,10 +1,6 @@ -# Prompts and Commands +# Prompts -

Learn how prompts and commands can kick-start your workflow with Cody.

- -## Prompts - -Prompts and Prompts Library are currently available in Cody's VS Code extension and the Sourcegraph Web UI. Some functionalities that are mentioned on this page need to be enabled by adding the following feature flag and setting it to true: _prompt-creation-v2_. [See here for instructions on how to create a feature flag](https://sourcegraph.com/docs/admin/executors/native_execution#enable). +

Learn how prompts can automate and kick-start your workflow with Cody.

Cody offers quick, ready-to-use **Prompts** to automate key tasks in your workflow. Prompts are created and saved in the **Prompt Library** and can be accessed from the **Tools > Prompt Library** in the top navigation bar in Sourcegraph's web UI. @@ -65,258 +61,3 @@ Promoted Prompts allow admins to highlight Prompts to users at the top of a Prom Promoted Prompts are marked with an icon next to their name and appear at the top of the Prompt list in the Cody chat window in an IDE and the Prompt Library. ![icon-promoted-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/promote-prompt-icon-1024.png) - -## Commands - - Prompts' functionality largely overlaps with commands. We intend to sunset commands in an upcoming release in favor of Prompts and the Prompt Library. - -Cody offers quick, ready-to-use **commands** for common actions to write, describe, fix, and smell code. These allow you to run predefined actions with smart context-fetching anywhere in the editor. Like autocomplete and chat, commands will search for context in your codebase to provide more contextually aware and informed answers. - -Commands are available in VS Code, JetBrains, Visual Studio, and the Sourcegraph web app. Commands can handle tasks like: - -- Edit Code -- Document Code -- Explain Code -- Generate Unit Tests -- Find Code Smells - -## Running commands - -Commands are available in the Cody chat panel under the Prompts drop-down in the editor extensions and on the web. You can run the commands via: - -1. Select code in the editor and use the Cody commands from the Prompts drop-down to run a command: -2. Right-click in the editor and select a command in the **Cody** submenu. - -## Custom commands - -Custom Commands are currently in Beta and only supported in VS Code. - -**Custom Commands** allow you to create your own commands for Cody that are tailored to your development workflows. They are defined in `JSON` format and will enable you to call CLI tools, write custom prompts, and select context to be sent to Cody. This provides a flexible way to configure Cody to handle use cases like: - -- Integrate with your build system to suggest fixes for errors/warnings in the latest build -- Analyze software dependencies output to explain compatibility or suggest upgrades -- Read test command failures to explain and suggest fixes -- Explain code quality output like linter warnings - -### Creating a Custom Command - -You can create a custom command by editing the configuration JSON file or using the command builder within the VS Code editor. To access the command builder within VS Code: - -- Go to Cody settings, then select **Custom Commands Settings** -- Select **New Custom Command** -- Enter the name for your new custom command, such as `my-custom-command` -- Choose the method about how the command should be executed -- Provide the relevant instructions for Cody to follow. This is the `prompt` that Cody will use to pass relevant context to the LLM -- Then, select one or more options for the context Cody should use to generate responses -- Finally, choose whether to save the command locally or share it with your workspace -- Press **Enter** to complete the process, and your custom command is successfully created -- You can hit `esc` key at any time to discard a new custom command - -### Configuring file paths - -Custom Commands can be defined in the following two file paths: - -- **User Settings (`~/.vscode/cody.json`)**: Stored locally. Use this for personal commands to use across all your projects -- **Workspace Settings (`.vscode/cody.json`)**: Stored in your project’s repository. Use this to share commands with others working on the same codebase and for project-specific commands - -If you select User Settings, the new custom command will only be available to you. If you choose Workspace Settings (as an enterprise user), your teammates will also be able to use the custom command. - -For more details on configuring custom commands, see the [examples](#examples) and [configuration properties](#configuration-properties) below. - - - -### `commit-message` - -```json -{ - "commit-message": { - "description": "Commit message for current changes", - "prompt": "Suggest an informative commit message by summarizing code changes from the shared command output. The commit message should follow the conventional commit format and provide meaningful context for future readers.", - "context": { - "selection": false, - "command": "git diff --cached" - } - } -} -``` - -### `compare-tabs` - -```json -{ - "compare-tabs": { - "description": "Compare files in opened tabs", - "prompt": "Examine the shared code snippets from my opened tabs. Then explain the relationship between the code samples by answering these questions: 1. What are the main tasks or functions the code is performing? 2. Are there any similarities in functions or logic across the samples? 3. Does one code snippet call or import another? If so, how do they interact? 4. Are there any notable differences in how they approach similar problems? 5. Overall, how are the code snippets related - do they work together as part of a larger program, solve variants of the same problem, or serve entirely different purposes?", - "context": { - "openTabs": true, - "selection": false - } - } -} -``` - -### `current-dir` - -```json -{ - "current-dir": { - "description": "Explain current directory", - "prompt": "At a high level, explain what this directory is used for.", - "context": { - "currentDir": true, - "selection": false - } - } -} -``` - -### `latest-cody-release` - -```json -{ - "latest-cody-release": { - "description": "Summarize latest Cody release", - "prompt": "What is the latest stable version of Cody? Briefly summarize the changes that were included in that release based on this CHANGELOG excerpt.", - "context": { - "selection": false, - "command": "curl https://raw.githubusercontent.com/sourcegraph/cody/main/vscode/CHANGELOG.md | head -n 50" - } - } -} -``` - -### `readme` - -```json -{ - "readme": { - "description": "Readme for current dir", - "prompt": "Write a detailed README.md file to document the code located in the same directory as my current selection. Summarize what the code in this directory is meant to accomplish. Explain the key files, functions, classes, and features. Use Markdown formatting for headings, code blocks, lists, etc. to make the it organized and readable. Aim for a beginner-friendly explanation that gives a developer unfamiliar with the code a good starting point to understand it. Make sure to include: - Overview of directory purpose - Functionality explanations - Relevant diagrams or visuals if helpful. Write the README content clearly and concisely using complete sentences and paragraphs based on the shared context. Use proper spelling, grammar, and punctuation throughout. Surround your full README text with triple backticks so it renders properly as a code block. Do not make assumptions or fabricating additional details.", - "context": { - "currentDir": true, - "selection": true - } - } -} -``` - -### `recent-git-changes` - -```json -{ - "recent-git-changes": { - "description": "Summarize recent changes", - "prompt": "Summarize the given git changes in 3-5 sentences", - "context": { - "command": "git log -10 --pretty=format:'%h - %an: %s' --stat", - "selection": false - } - } -} -``` - - - - - -#### `commands` (required) - -- An object containing the commands -- Type: `object` -- Example: `{ "commands": {} }` - -#### `commands.` (required) - -- The slash name used for the command -- Type: `string` -- Example: `"summarize"` - -#### `commands..description` - -- A short, sentence-case string description of what the command does -- Type: `string` -- Example: `"Summarize recent git changes"` - -#### `commands..prompt` (required) - -- The set of instructions for Cody -- Type: `string` -- Example: `"Summarize the given git changes in 3-5 sentences"` - -#### `commands..mode` - -- The interaction mode to use -- Type: `string` -- Default: `"ask"` - - Values: - - `"ask"` — Start a new chat session with the command - - `"edit"` — Replace the selected code with the response - - `"insert"` — Insert the response above the selected code - -#### `commands..context` - -- Optional context data to generate and pass to Cody -- Type: `object` -- Default: `{}` - -#### `commands..context.codebase` - -This option is experimental and might change or be removed in the future. - -- Include contextual information from code search based on the prompt of the command -- Type: `boolean` -- Default: `false` - -#### `commands..context.command` - -- Terminal command to run and include the output of -- Type: `string` -- Default: `""` -- Example: ` "git log --since=$(git describe --tags --abbrev=0) --pretty='Commit author: %an%nCommit message: %s%nChange description:%b%n'"` - -#### `commands..context.currentDir` - -- Include snippets from first 10 files in the current directory -- Type: `boolean` -- Default: `false` - -#### `commands..context.currentFile` - -- Include snippets from the current file. If the file is too long, only the content surrounding the current selection will be included -- Type: `boolean` -- Default: `false` - -#### `commands..context.directoryPath` - -- Include snippets from the first five files within the given relative path of the directory. Content will be limited and truncated according to the token limit -- Type: `string` -- Default: `""` -- Example: `"lib/common"` - -#### `commands..context.filePath` - -- Include snippets from the given file path relative to the current workspace. If the file is too long, content will be truncated -- Type: `string` -- Default: `""` -- Example: `"CHANGELOG.md", "test/unit/example.test.ts"` - -#### `commands..context.none` - -- Provide only the prompt, and no additional context. If `true`, overrides all other context settings -- Type: `boolean` -- Default: `false` - -#### `commands..context.openTabs` - -- Include the text content of opened editor tabs -- Type: `boolean` -- Default: `false` - -#### `commands..context.selection` - -- Include currently selected code. When not specified, Cody will try to use visible content from the current file instead -- Type: `boolean` -- Default: `false` - - diff --git a/docs/cody/capabilities/debug-code.mdx b/docs/cody/capabilities/debug-code.mdx index 06191178d..fb9cd4871 100644 --- a/docs/cody/capabilities/debug-code.mdx +++ b/docs/cody/capabilities/debug-code.mdx @@ -23,17 +23,13 @@ sum(3 , 4); When you try to `console.log` the `result`, it does not print the correct summed value. Cody can help you both identify the error and provide a solution to fix it. Let's debug the code snippet. Paste the code snippet inside the Cody chat window and ask Cody to fix it. - - In addition, Cody helps you reduce the chances of getting syntax and typo errors. The Cody IDE extensions provide context-aware suggestions based on your codebase, helping you avoid common mistakes and reduce debugging time. ## Detecting code smell Cody can detect early code smells to ensure coding best practices and quality and provide suggestions to improve your code. By detecting such potential errors early on, you can avoid scalability and code maintainability issues that might arise in the future. -You can detect code smells by the **Find Code Smells** command from the Prompts drop-down menu in the chat panel. +You can detect code smells by the **find-code-smells** prompt from the Prompts drop-down menu in the chat panel. If you want to refine your debugging process, you can create a new prompt from the Prompt Library and use it to debug your code. ## Code Actions diff --git a/docs/cody/capabilities/ignore-context.mdx b/docs/cody/capabilities/ignore-context.mdx index 23c1aa912..b17d5965f 100644 --- a/docs/cody/capabilities/ignore-context.mdx +++ b/docs/cody/capabilities/ignore-context.mdx @@ -92,8 +92,6 @@ The `exclude` field can also include a catch-all condition, such as a `regexp` t Some Cody features, such as using **Prompts**, will not work if the `exclude` rules are defined. They appear to be disabled in the Cody chat interface. If you try running any of these, you'll be prompted with an error message. However, Cody chat will still work; you can use it to ask questions. -![commands-disabled-exclude-rules](https://storage.googleapis.com/sourcegraph-assets/Docs/commands-disabled-082024.png) - ### Both `include` and `exclude` rules are specified When requesting third-party LLMs, Cody can use content from a repository if its name matches any of the `include` patterns and does not match any of the `exclude` patterns. Thus, the `exclude` rules filter only the repositories allowed by the `include` rules. For example, diff --git a/docs/cody/capabilities/index.mdx b/docs/cody/capabilities/index.mdx index 99ab35d09..6216177f4 100644 --- a/docs/cody/capabilities/index.mdx +++ b/docs/cody/capabilities/index.mdx @@ -10,7 +10,7 @@ - + diff --git a/docs/cody/clients/cody-with-sourcegraph.mdx b/docs/cody/clients/cody-with-sourcegraph.mdx index e27c2876b..c43a56bf9 100644 --- a/docs/cody/clients/cody-with-sourcegraph.mdx +++ b/docs/cody/clients/cody-with-sourcegraph.mdx @@ -55,3 +55,9 @@ If Cody's answer isn't helpful, you can try asking again with a different contex ![re-run-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/rerun-prompt-web-0724.jpg) For a detailed breakdown of Cody's capabilities across different clients [read these feature parity docs](/cody/clients/feature-reference). + +## Prompts + +Cody allows you create quick, ready-to-use [prompts](/cody/capabilities/commands) to automate key tasks in your workflow. Prompts are created and saved in the Prompt Library and can be accessed from the **Tools > Prompt Library** in the top navigation bar in your Sourcegraph instance. + +![cody-web-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-web-prompts-1124.png) diff --git a/docs/cody/clients/feature-reference.mdx b/docs/cody/clients/feature-reference.mdx index decdd6316..1f58e5264 100644 --- a/docs/cody/clients/feature-reference.mdx +++ b/docs/cody/clients/feature-reference.mdx @@ -3,30 +3,26 @@

This document compares Cody's features and capabilities across different clients and platforms like VS Code, JetBrains, and Sourcegraph.com (Web UI).

## Chat - -| **Feature** | **VS Code** | **JetBrains** | **Web** | **Visual Studio** | **CLI** | -| ---------------------------------------- | ----------- | ------------- | -------------------- | ----------------- | ------- | -| Chat with Cody | ✅ | ✅ | ✅ | ✅ | ✅ | -| Chat history | ✅ | ✅ | ✅ | ✅ | ❌ | -| Clear chat history | ✅ | ✅ | ✅ | ✅ | ❌ | -| Edit sent messages | ✅ | ✅ | ✅ | ✅ | ❌ | -| SmartApply/Execute | ✅ | ❌ | ❌ | ❌ | ❌ | -| 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 | ✅ | ✅ | ✅ | ✅ | ❌ | -| Promoted Prompts | ✅ | ❌ | ✅ | ❌ | ❌ | -| Edit code | ✅ | ✅ | ❌ | ❌ | ❌ | -| Generate unit test | ✅ | ✅ | ❌ | ❌ | ❌ | -| Ask Cody to Fix | ✅ | ✅ | ❌ | ❌ | ❌ | +| **Feature** | **VS Code** | **JetBrains** | **Visual Studio** | **Web** | **CLI** | +| ---------------------------------------- | ----------- | ------------- | ----------------- | -------------------- | ------- | +| Chat with Cody | ✅ | ✅ | ✅ | ✅ | ✅ | +| Chat history | ✅ | ✅ | ✅ | ✅ | ❌ | +| Clear chat history | ✅ | ✅ | ✅ | ✅ | ❌ | +| Edit sent messages | ✅ | ✅ | ✅ | ✅ | ❌ | +| SmartApply/Execute | ✅ | ❌ | ❌ | ❌ | ❌ | +| 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** | | | | | | +| Access to prompts and Prompt library | ✅ | ✅ | ✅ | ✅ | ❌ | +| Promoted Prompts | ✅ | ❌ | ❌ | ✅ | ❌ | ## Code Autocomplete @@ -41,13 +37,13 @@ Few exceptions that apply to Cody Pro and Cody Enterprise users: -- Multi-repo context is not supported in VS Code, JetBrains, or the Web UI for Cody Pro +- Multi-repo context is not supported in VS Code, JetBrains, Visual Studio or the Web UI for Cody Pro -- Admin LLM selection is suported on VS Code, JetBrains, Visual Studio, and Web both for chat and code autocomplete +- 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, 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 all Cody clients. diff --git a/docs/cody/clients/install-jetbrains.mdx b/docs/cody/clients/install-jetbrains.mdx index 66dd2218e..ab3670a5b 100644 --- a/docs/cody/clients/install-jetbrains.mdx +++ b/docs/cody/clients/install-jetbrains.mdx @@ -76,10 +76,6 @@ function bubbleSort(array){ ``` - As you start typing, Cody will automatically provide suggestions and context-aware completions based on your coding patterns and the code context - These autocomplete suggestions appear as grayed text. To accept the suggestion, press the `Tab` key - - ## Chat @@ -98,6 +94,7 @@ Since your first message to Cody anchors the conversation, you can return to the Users must be on JetBrains v2023.2 and Cody plugin v7.0.0 or above to get the new and improved chat UI. ### Chat History + A chat history icon at the top of your chat input window allows you to navigate between chats (and search chats) without opening the Cody sidebar. ### Changing LLM model for chat @@ -169,7 +166,7 @@ You can @-mention files and web pages in Cody. Cody Enterprise also supports @-m Admins on the Sourcegraph Enterprise instance can use Cody Context Filters to determine which repositories Cody can use as the context in its requests to third-party LLMs. Inside your site configuration, you can define a set of `include` and `exclude` rules that will be used to filter the list of repositories Cody can access. -For repos mentioned in the `exclude` field, Cody's commands are disabled, and you cannot use them for context fetching. If you try running any of these, you'll be prompted with an error message. However, Cody chat will still work, and you can use it to ask questions. +For repos mentioned in the `exclude` field, Cody prompts are disabled, and you cannot use them for context fetching. If you try running any of these, you'll be prompted with an error message. However, Cody chat will still work, and you can use it to ask questions. [Read more about Cody Context Filters here →](/cody/capabilities/ignore-context) @@ -195,43 +192,32 @@ In addition, you can use the following keyboard shortcuts to interact with Cody' -## Prompts and Commands +## Prompts -Cody offers quick, ready-to-use [prompts and commands](/cody/capabilities/commands) for common actions to write, describe, fix, and smell code. These allow you to run predefined actions with smart context-fetching anywhere in the editor, like: +Cody allows you create quick, ready-to-use [prompts](/cody/capabilities/commands) to automate key tasks in your workflow. Prompts are created and saved in the Prompt Library and can be accessed from the **Tools > Prompt Library** in the top navigation bar in your Sourcegraph instance. -- **Edit Code**: Makes inline code edits. You also get the option to select LLM for edit suggestions -- **Document Code**: Create inline docs for your code -- **Generate Unit Test**: Creates inline unit tests for your code -- **Smell Code**: Finds code smells in your file -- **Explain Code**: Expains code in your file +To help you get started, there are a few prompts that are available by default. These can assist you to: -![jetbrains-prompts-commands](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-prompts-commands-102024.png) +- Document code +- Explain code +- Detect code smells +- Generate unit tests -Let's learn about how to use some of these commands: +![jb-default-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-default-prompts-1124.png) ### Inline code edits -You can edit your code directly in your file without opening the chat window. The **Edit Code** command makes direct code edits, refactors, or bug fixes. - -You can run the inline edit command on a selected code snippet or an entire file or generate code on a new line. Use the **Edit Code** command in the Cody sidebar or context menu or the `Shift + Ctrl + Enter` shortcut. This opens a floating editor where you can describe the change you want to make. - -Once you enter your prompt, Cody will perform inline edits that you can **Accept**, **Undo**, or **Show diff** for the change. Click **Edit & Retry** to iterate your prompt and get alternate suggestions. - - +You can directly perform inline edits on your code without opening the chat window. -### Inline unit tests +- Select the code you want to edit +- Then right-click and select **Cody > Edit Code** +- Alternatively, you can press Opt+K (macOS) or Alt+K (Windows) to open the inline editor -The Generate Unit Test command uses the code edit functionality to create unit tests. To generate unit tests for your code, type `Shift + Ctrl + T` or click the **Generate Unit Test** command in the Cody sidebar or from the context menu. +Here, you can describe the change you want to make and select the LLM model you want to use. -When you run this command, it performs the following actions: - -- Check if you’re using a test framework -- Check if you already have a test file created -- Insert new unit tests directly in the existing test file or create a new file if none exists +Once you enter your prompt, Cody will perform inline edits that you can **Accept**, **Undo**, or **Show diff** for the change. Click **Edit & Retry** to iterate your prompt and get alternate suggestions. -You can **Accept**, **Undo**, or **Show diff** for the change. +![jb-inline-code-edit](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-inline-edits-1124.png) ### Inline code fix @@ -239,14 +225,6 @@ Cody with JetBrains can also propose fixes and updates to errors in your code. T All you need to do is select and highlight the code line with the error and click the lightbulb icon. Then select **Ask Cody to Fix**. You can then view the diff and accept or undo the suggested change. -### Document your code - -Like the Edit Code and Generate Unit Test commands, you can generate inline docs for your code without opening the chat window. Doc command is available via hotkey, context menu, and Cody sidebar. Type `Shift + Ctrl + H`, and Cody will generate docs for your selected code snippet or the entire file. - - - ## Updating the plugin JetBrains IDEs will typically notify you when updates are available for installed plugins. Follow the prompts to update the Cody AI plugin to the latest version. @@ -262,7 +240,7 @@ To update your update channel, you can do the following: ## Supported LLM models -Cody Free and Pro users can choose from a list of supported LLM models for Chat and Commands. +Cody Free and Pro users can choose from a list of supported LLM models for chat. ![llm-selection-cody](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-llm-select-0824.jpg) @@ -274,7 +252,7 @@ Enterprise users who have [model configuration](/Cody/clients/model-configuratio Ollama support for JetBrains is in the Experimental stage and is available for Cody Free and Pro Plans. -You can use Ollama models locally for Cody’s chat and commands. This lets you chat without sending messages over the internet to an LLM provider so that you can use Cody offline. To use Ollama locally, you’ll need to install Ollama and download a chat model such as CodeGemma or Llama3. [Read here for detailed instructions](https://sourcegraph.com/github.com/sourcegraph/jetbrains/-/blob/README.md#use-ollama-models-for-chat--commands). +You can use Ollama models locally for Cody’s chat. This lets you chat without sending messages over the internet to an LLM provider so that you can use Cody offline. To use Ollama locally, you’ll need to install Ollama and download a chat model such as CodeGemma or Llama3. [Read here for detailed instructions](https://sourcegraph.com/github.com/sourcegraph/jetbrains/-/blob/README.md#use-ollama-models-for-chat--commands). ## Add/remove account diff --git a/docs/cody/clients/install-visual-studio.mdx b/docs/cody/clients/install-visual-studio.mdx index b18d89235..821edd99f 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 @@ -43,15 +43,15 @@ The chat input field has a default `@-mention` [context chips](#context-retrieva ## 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 Free users can access the latest base models from Anthropic, OpenAI, Google, and Mixtral. At the same time, Cody Pro and Enterprise users can access more extended models. -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. +Local models are also available through Ollama to Cody Free and Cody Pro users. To use a model in Cody chat, 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. +You can read more about it in our [Supported LLM models docs](/cody/capabilities/supported-models). ## Selecting Context with @-mentions -Cody's chat allows you to add files and symbols as context in your messages. +Cody's chat allows you to [add files and symbols as context](/cody/core-concepts/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 @@ -68,10 +68,13 @@ When you have both a repository and files @-mentioned, Cody will search the repo ## 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 allows you create quick, ready-to-use [prompts](/cody/capabilities/commands) to automate key tasks in your workflow. Prompts are created and saved in the Prompt Library and can be accessed from the **Tools > Prompt Library** in the top navigation bar in your Sourcegraph instance. -- Edit your code -- Document your code +To help you get started, there are a few prompts that are available by default. These can assist you to: + +- Document code +- Explain code +- Detect code smells - Generate unit tests ![cody-vs-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-vs-prompts-102024-2.png) diff --git a/docs/cody/clients/install-vscode.mdx b/docs/cody/clients/install-vscode.mdx index 38592181e..5172bac4f 100644 --- a/docs/cody/clients/install-vscode.mdx +++ b/docs/cody/clients/install-vscode.mdx @@ -231,37 +231,22 @@ You can @-mention files, symbols, and web pages in Cody. Cody Enterprise also su Admins on the Sourcegraph Enterprise instance can use the Cody Context Filters to determine which repositories Cody can use as the context in its requests to third-party LLMs. Inside your site configuration, you can define a set of `include` and `exclude` rules that will be used to filter the list of repositories Cody can access. -For repos mentioned in the `exclude` field, Cody's commands are disabled, and you cannot use them for context fetching. If you try running any of these, you'll be prompted with an error message. However, Cody chat will still work, and you can use it to ask questions. +For repos mentioned in the `exclude` field, prompts are disabled, and you cannot use them for context fetching. If you try running any of these, you'll be prompted with an error message. However, Cody chat will still work, and you can use it to ask questions. [Read more about the Cody Context Filters here →](/cody/capabilities/ignore-context) -## Prompts and Commands +## Prompts -Cody offers quick, ready-to-use [prompts and commands](/cody/capabilities/commands) for common actions to write, describe, fix, and smell code. These allow you to run predefined actions with smart context-fetching anywhere in the editor, like: +Cody allows you create quick, ready-to-use [prompts](/cody/capabilities/commands) to automate key tasks in your workflow. Prompts are created and saved in the Prompt Library and can be accessed from the **Tools > Prompt Library** in the top navigation bar in your Sourcegraph instance. -- **New Chat**: Ask Cody a question -- **Document Code**: Add code documentation -- **Edit Code**: Edit code with instructions -- **Explain Code**: Describe your code with more details -- **Generate Unit Tests**: Write tests for your code +To help you get started, there are a few prompts that are available by default. These can assist you to: - +- Document code +- Explain code +- Detect code smells +- Generate unit tests -### Custom Commands - -Custom Commands are currently available in Beta for all users and are currently supported by Cody for the VS Code extension version 0.8 and above. - -For customization and advanced use cases, you can create **Custom Commands** tailored to your requirements. You can also bind keyboard shortcuts to run your custom commands quickly. To bind a keyboard shortcut, open the Keyboard Shortcuts editor and search for `cody.command.custom.` to see the list of your custom commands. - -Settings - -Learn more about Custom Commands [here](/cody/capabilities/commands#custom-commands) +![default-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/default-prompts-1124.png) ## Smart Apply code suggestions @@ -297,7 +282,7 @@ Cody also works with Cursor, Gitpod, IDX, and other similar VS Code forks. To ac ## Supported LLM models -Claude 3.5 Sonnet is the default LLM model for inline edits and prompts. If you've used a different or older LLM model for inline edits or commands before, remember to manually change your model to Claude 3.5 Sonnet. Default model changes only affect new users. +Claude 3.5 Sonnet is the default LLM model for inline edits and prompts. If you've used a different or older LLM model for inline edits before, remember to manually change your model to Claude 3.5 Sonnet. Default model changes only affect new users. Users on Cody **Free** and **Pro** can choose from a list of [supported LLM models](/cody/capabilities/supported-models) for chat. @@ -336,7 +321,7 @@ To get autocomplete suggestions from Ollama locally, follow these steps: - Confirm Cody uses Ollama by looking at the Cody output channel or the autocomplete trace view (in the command palette) -### Cody Chat and Commands with Ollama +### Cody chat with Ollama -To generate chat and commands with Ollama locally, follow these steps: +To generate chat with Ollama locally, follow these steps: - Download [Ollama](https://ollama.com/download) - Start Ollama (make sure the Ollama logo is showing up in your menu bar) diff --git a/docs/cody/quickstart.mdx b/docs/cody/quickstart.mdx index 46c4c0a32..851761e3c 100644 --- a/docs/cody/quickstart.mdx +++ b/docs/cody/quickstart.mdx @@ -27,7 +27,7 @@ To help you automate your key tasks in your development workflow, you get **[Pro The Cody chat interface offers a few more options and settings. [You can read more in these docs](/cody/capabilities/chat). -![cody-chat-interface](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-chat-interface-1124.png) +![cody-chat-interface](https://storage.googleapis.com/sourcegraph-assets/Docs/cody-chat-interface-1124-3.png) ## Chat with Cody diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index b1e961bd1..679019134 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -69,7 +69,7 @@ To troubleshoot further: ### Rate limits -Cody Free provides **unlimited autocomplete suggestions** and **200 chat and command invocations** per user per month. +Cody Free provides **unlimited autocomplete suggestions** and **200 chat invocations** per user per month. On Cody Pro and Enterprise plans, usage is unlimited but controlled by **Fair Usage**. This means that some users occasionally experience a limitation placed on their account. This limitation resets within 24 hours. If this issue persists, contact us through our [community forum](https://community.sourcegraph.com), Discord, or email support@sourcegraph.com. diff --git a/docs/cody/usage-and-pricing.mdx b/docs/cody/usage-and-pricing.mdx index 20f6b0390..870411119 100644 --- a/docs/cody/usage-and-pricing.mdx +++ b/docs/cody/usage-and-pricing.mdx @@ -111,8 +111,7 @@ The following table shows a high-level comparison of the three plans available o | **Features** | **Free** | **Pro** | **Enterprise** | | --------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------- | | **Autocompletion suggestions** | Unlimited | Unlimited | Unlimited | -| **Chat/Command Executions** | 200 per month | Unlimited | Unlimited | -| **Custom Commands** | Supported | Supported | Supported | +| **Chat Executions** | 200 per month | Unlimited | Unlimited | | **Keyword Context (local code)** | Supported | Supported | Supported | | **Developer Limitations** | 1 developer | 1 developer | Scalable, consumption-based pricing | | **LLM Support** | [View latest](/cody/capabilities/supported-models) | [View latest](/cody/capabilities/supported-models) | [View latest](/cody/capabilities/supported-models) | diff --git a/src/data/navigation.ts b/src/data/navigation.ts index 8cd66542f..e49e911ba 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -47,7 +47,7 @@ export const navigation: NavigationItem[] = [ subsections: [ { title: "Chat", href: "/cody/capabilities/chat", }, { title: "Autocomplete", href: "/cody/capabilities/autocomplete", }, - { title: "Prompts & Commands", href: "/cody/capabilities/commands", }, + { title: "Prompts", href: "/cody/capabilities/commands", }, { title: "OpenCtx", href: "/cody/capabilities/openctx", }, { title: "Debug Code", href: "/cody/capabilities/debug-code", }, { title: "Context Filters", href: "/cody/capabilities/ignore-context", }, From 601ddf4555aca9815ebff3cb1567ad5784f369cc Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Mon, 25 Nov 2024 13:23:03 -0800 Subject: [PATCH 4/7] Add docs --- docs/cody/capabilities/commands.mdx | 84 ++++++++++++++++++----------- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index f1465cdd9..c81d6b812 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -2,62 +2,84 @@

Learn how prompts can automate and kick-start your workflow with Cody.

-Cody offers quick, ready-to-use **Prompts** to automate key tasks in your workflow. Prompts are created and saved in the **Prompt Library** and can be accessed from the **Tools > Prompt Library** in the top navigation bar in Sourcegraph's web UI. +Cody offers quick, ready-to-use **Prompts** to automate key tasks in your workflow. Prompts are created and saved in the **Prompt Library** and can be accessed from the top navigation bar in the Sourcegraph.com instance. -From here, you can easily create, edit, share, and discover prompts you’ve created or have been shared within your organization. You can also search for prompts, filter the list to find a specific prompt by owner, and sort by name or recently updated. +To run Prompts and access Prompt Library, you must have the following: -![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-0824.png) +- Free account on Sourcegraph.com or Sourcegraph Enterprise instance with Cody enabled +- Cody extension installed in your IDE (VS Code, JetBrains, Visual Studio) -### Create and edit a prompt +## Prompt Library -Click the **New prompt** button on the **Prompt Library** page to create a new prompt. +The **Prompt Library** allows you to create, edit, share, and save prompts you’ve created or shared within your organization. You can also search for prompts, filter the list to find a specific prompt by the owner, and sort by name or updated recently. + +Go to **Tools > Prompt Library** from the top navigation bar in the Sourcegraph.com instance. Alternatively, you can access the **Prompt Library** from the **Cody** extension in your IDE, which directs you to the Prompt Library page. + +Here, you can view all prompts (shared with you in an organization or created by you) and some core (built-in) prompts to help you get started. + +![prompt-library-overview](https://storage.googleapis.com/sourcegraph-assets/Docs/prompt-library-overview-1124.png) + +### Core (built-in) prompts + +The core (built-in) prompts are available to all users. These prompts are designed to help you start with Cody and provide a starting point for your own prompts. You get the following core (built-in) prompts: + +- document-code +- explain-code +- find-code-smells +- generate-unit-tests + +You can run these prompts by clicking the **play** icon next to the prompt name, **copy the prompt permalink**, or **duplicate the prompt** to make a copy and edit it according to your needs. + +## Create prompts + +Click the **New prompt** button from the **Prompt Library** page. - Select the **Owner** and **Prompt Name** -- Next, write a prompt description -- Finally, fill out the **Prompt template** box with all your prompt instructions +- Write a prompt description +- Next, fill out the **Prompt template** box with all your prompt instructions - You can also add dynamic context that will allow your prompt to use content from different sources like current selection and current file - Select the visibility of the prompt, either **Public** or **Private** +- You can mark your prompt as **draft**. Draft prompts are not visible to other users until you publish it +- Choose the mode of the prompt, whether it will be **Chat only** or can **Edit code** - Once done, click the **Create prompt** button -A few advanced options exist to create a prompt that you can configure. They are in the Advanced section. +There are also a few advanced options that you can configure. -![create-prompt](https://storage.googleapis.com/sourcegraph-assets/Docs/create-prompt-1124.png) +![create-prompt](https://storage.googleapis.com/sourcegraph-assets/Docs/create-prompt-1124-2.png) -The prompt is visible to and usable by: - -- **The prompt's owner**: If the prompt's owner is a user -- **All members of the organization**: If the prompt's owner is an organization -- **Everyone**: If the prompt is marked **Public** (which only site admins can do) +### Draft prompts -Completing this process will do the following: +You can mark your prompt as a draft. A draft prompt is not visible to everyone. You can only view, run, and edit your draft prompts until you publish it. -- The new prompt will be added to the **Prompt Library** page -- The prompt will appear in the Prompts list in the Cody chat panel (in the editor and on the web) +## View prompts -![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-ui-vscode-082024.png) +The new prompt is added to the Prompt Library page and appears in the Prompts list in the Cody chat panel (both in the editor and on the web). If your prompt does not appear in the Prompts list, make sure you've logged in with the same account you used to create it. -### Draft prompts +Once the prompt is visible, it's ready to be used by: -You can mark your prompt as a draft. A draft prompt is not visible to everyone. You can only see and modify your draft prompts via the **Prompt Library** via the Sourcegraph's Web UI. +- **The prompt's owner** if it is a user +- **All members of the organization** if the prompt's owner is an organization +- **Everyone** if the prompt is marked **Public** (which only site admins can do) -### Editing a prompt +![prompts-in-vscode](https://storage.googleapis.com/sourcegraph-assets/Docs/prompts-in-vscode-1124.png) -To edit a prompt, click the Edit button next to the prompt in the Prompt Library and make the necessary changes. You can also use this interface to **transfer ownership** of the prompt or delete it from this view. +## Edit prompts -### Using prompts +To edit a prompt, click the Edit button next to the prompt in the Prompt Library and make the necessary changes. You can also use this interface to **Transfer Ownership** of the prompt or delete it from this view. -Prompts work in the same way as commands. Inside Cody's chat window is a drop-down called **prompts** next to the LLM selector. Use this to select a prompt and run on your codebase. +## Run prompts -![prompts-in-dropdown](https://storage.googleapis.com/sourcegraph-assets/Docs/using-prompts.png) +You can run prompts via: -## Promoted Prompts +- Clicking the play icon next to a prompt in the Prompt Library list +- From the **Prompts** dropdown in the Cody chat panel both in the editor and on the web -Promoted Prompts are supported in VS Code and Cody Web. +However, prompts marked with the **Edit code** mode can only run from the IDE editor. You cannot run these prompts from the Prompt Library in the web UI. For example, the **document-code** built-in prompt can only run the IDE editor. -Promoted Prompts allow admins to highlight Prompts to users at the top of a Prompt list in Cody chat, directing users to use specific Prompts that encourage best practices within the organization. Admins can promote a Prompt by checking the Promoted box in the Prompt edit screen. +## Recommended prompts -![promote-a-prompt](https://storage.googleapis.com/sourcegraph-assets/Docs/promote-promt-1024.png) +Recommended prompts are supported in VS Code and Cody Web. -Promoted Prompts are marked with an icon next to their name and appear at the top of the Prompt list in the Cody chat window in an IDE and the Prompt Library. +**Site admins** can make a prompt as **recommended**. When creating a prompt, mark the **Set as recommended** checkbox. This setting allows admins to highlight prompts they want users to use. Recommended prompts are marked with an icon next to their name and appear at the top of the prompt list in the Cody chat. -![icon-promoted-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/promote-prompt-icon-1024.png) +![icon-recommended-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/recommended-prompts-icon-1124.png) From 94de6d100c80a78d2924a00eafdd28963f73f5a8 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Mon, 25 Nov 2024 13:48:55 -0800 Subject: [PATCH 5/7] Add migration custom commands docs --- docs/cody/capabilities/commands.mdx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index c81d6b812..2ee58323d 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -76,10 +76,20 @@ You can run prompts via: However, prompts marked with the **Edit code** mode can only run from the IDE editor. You cannot run these prompts from the Prompt Library in the web UI. For example, the **document-code** built-in prompt can only run the IDE editor. -## Recommended prompts +## Promoted prompts Recommended prompts are supported in VS Code and Cody Web. -**Site admins** can make a prompt as **recommended**. When creating a prompt, mark the **Set as recommended** checkbox. This setting allows admins to highlight prompts they want users to use. Recommended prompts are marked with an icon next to their name and appear at the top of the prompt list in the Cody chat. +**Site admins** can make a prompt as **promoted**. When creating a prompt, mark the **Set as recommended** checkbox. This setting allows admins to highlight prompts they want users to use. Recommended prompts are marked with an icon next to their name and appear at the top of the prompt list in the Cody chat. ![icon-recommended-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/recommended-prompts-icon-1124.png) + + + +Custom Commands (legacy) have been deprecated and will no longer be supported. + +If you have custom commands, VS Code automatically detects them and notifies you to migrate them to the Prompts Library. There is a **Migrate commands** button in the Cody chat panel. Click it, and your custom commands will be migrated to the Prompts Library. + +Once migrated, you can run it like any other prompt. However, you **cannot** edit the migrated custom command in the Prompts Library. + + From 3cb205e2e1c2926737bf5f88aede04b9af09002c Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Mon, 25 Nov 2024 14:30:57 -0800 Subject: [PATCH 6/7] Promoted prompts --- docs/cody/capabilities/commands.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index 2ee58323d..9e612e30a 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -78,9 +78,9 @@ However, prompts marked with the **Edit code** mode can only run from the IDE ed ## Promoted prompts -Recommended prompts are supported in VS Code and Cody Web. +Promoted prompts are supported in VS Code and Cody Web. -**Site admins** can make a prompt as **promoted**. When creating a prompt, mark the **Set as recommended** checkbox. This setting allows admins to highlight prompts they want users to use. Recommended prompts are marked with an icon next to their name and appear at the top of the prompt list in the Cody chat. +**Site admins** can promote a prompt by enabling the **Promote prompt** checkbox. This setting allows admins to highlight prompts they want users to use. Promoted prompts are marked with an icon next to their name and appear at the top of the prompt list in the Cody chat. ![icon-recommended-prompts](https://storage.googleapis.com/sourcegraph-assets/Docs/recommended-prompts-icon-1124.png) From feffa0c76277523f6c10459ed980fe83d857599c Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Mon, 25 Nov 2024 14:32:36 -0800 Subject: [PATCH 7/7] improve linfo --- docs/cody/capabilities/commands.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cody/capabilities/commands.mdx b/docs/cody/capabilities/commands.mdx index 9e612e30a..a951ccbe8 100644 --- a/docs/cody/capabilities/commands.mdx +++ b/docs/cody/capabilities/commands.mdx @@ -1,6 +1,6 @@ # Prompts -

Learn how prompts can automate and kick-start your workflow with Cody.

+

Learn how prompts can automate and accelerate your workflow with Cody.

Cody offers quick, ready-to-use **Prompts** to automate key tasks in your workflow. Prompts are created and saved in the **Prompt Library** and can be accessed from the top navigation bar in the Sourcegraph.com instance. @@ -86,7 +86,7 @@ However, prompts marked with the **Edit code** mode can only run from the IDE ed -Custom Commands (legacy) have been deprecated and will no longer be supported. +Prompt Library replaces the default and custom commands in Cody. Custom Commands (legacy) have been deprecated and will no longer be supported. If you have custom commands, VS Code automatically detects them and notifies you to migrate them to the Prompts Library. There is a **Migrate commands** button in the Cody chat panel. Click it, and your custom commands will be migrated to the Prompts Library.