Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 3 additions & 4 deletions baseai/memory/docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
});

Expand Down
16 changes: 2 additions & 14 deletions docs/cody/capabilities/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

<video width="1920" height="1080" loop playsInline controls style={{ width: '100%', height: 'auto' }}>
<source src="https://storage.googleapis.com/sourcegraph-assets/Docs/Media/cody-prompts-102024-2.mp4" type="video/mp4" />
</video>

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

Expand Down
335 changes: 54 additions & 281 deletions docs/cody/capabilities/commands.mdx

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions docs/cody/capabilities/debug-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<video width="1920" height="1080" loop playsInline controls style={{ width: '100%', height: 'auto' }}>
<source src="https://storage.googleapis.com/sourcegraph-assets/Docs/Media/fix-code.mp4" type="video/mp4" />
</video>

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

Expand Down
2 changes: 0 additions & 2 deletions docs/cody/capabilities/ignore-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docs/cody/capabilities/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<QuickLink title="Autocomplete" icon='installation' href="/cody/capabilities/autocomplete" description="Suggests code completions as you type, utilizing context from your code, open files, and file history." />

<QuickLink title="Prompts & Commands" icon='theming' href="/cody/capabilities/commands" description="Automate key tasks in your workflow with premade and customizable prompts." />
<QuickLink title="Prompts & Prompt Library" icon='theming' href="/cody/capabilities/commands" description="Automate key tasks in your workflow with premade and customizable prompts." />

<QuickLink title="OpenCtx Context Providers" icon='presets' href="/cody/capabilities/openctx" description="Add additional context sources from outside of your code base by leveraging OpenCtx Providers." />

Expand Down
6 changes: 6 additions & 0 deletions docs/cody/clients/cody-with-sourcegraph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<Callout type="tip">For a detailed breakdown of Cody's capabilities across different clients [read these feature parity docs](/cody/clients/feature-reference).</Callout>

## 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)
48 changes: 22 additions & 26 deletions docs/cody/clients/feature-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,26 @@
<p className="subtitle">This document compares Cody's features and capabilities across different clients and platforms like VS Code, JetBrains, and Sourcegraph.com (Web UI).</p>

## 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

Expand All @@ -41,13 +37,13 @@ Few exceptions that apply to Cody Pro and Cody Enterprise users:

<Accordion title="For Cody Pro">

- 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

</Accordion>

<Accordion title="For Cody Enterprise">

- 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.
Expand Down
Loading