Skip to content

Commit

Permalink
Merge branch 'main' into sg-5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
MaedahBatool authored Feb 14, 2024
2 parents aff0fef + 9e92f9c commit 9d87dcb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/cody/capabilities/ignore-context.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Cody Ignore

<Callout type="note">This feature is currently in the Experimental stage and only supported with VS Code extension.</Callout>

This guide will walk you through the process of ignoring specific files or folders in your codebase when using Cody.

## Enabling Unstable Features

To use the ignore context feature, you first need to enable unstable features in Cody. Here's how:

1. Open your settings in Cody Extension
2. Next go to the `settings.json` file
3. Add a new line: `"cody.unstableFeatures": true`.

This will enable experimental features, including the ignore context feature.

## Using the Ignore Context Feature

To ignore specific files or folders from the context taken by Cody, you need to create a `ignore` file in your project. Here's how:

1. Create a new folder in your project root named `.cody`.
2. Inside the `.cody` folder, create a file named `ignore`.
3. In the `ignore` file, specify the files or folders you want to ignore.

The `.codyignore` file works similarly to a `.gitignore` file. If you want to ignore a file named `secret.json`, you would add `secret.json` to your `.codyignore` file. If you're going to ignore a folder called `lib/shared`, you would add `lib/shared/` to your `.codyignore` file.

Once a file or folder is added to the `.codyignore` file, Cody will no longer provide autocomplete suggestions for that file or folder, and it will not appear in your chat results.
3 changes: 3 additions & 0 deletions docs/cody/capabilities/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Cody offers a rich set of capabilities and features that help you write better c
- Autocomplete: Suggests code completions as you type, utilizing context from your code, open files, and file history
- Commands & Custom Commands: Provide predefined, reusable prompts for common actions, such as documenting code, explaining code, generating unit tests, and identifying code smells
- Debug code: Helps you with identifying and fixing code errors and bugs.
- Cody Ignore: Helps you ignore selected files or folders from chat and autocomplete result

Learn more about each by exploring their respective documentation:

Expand All @@ -23,4 +24,6 @@ Learn more about each by exploring their respective documentation:

<QuickLink title="Debug Code" icon='presets' href="/cody/capabilities/debug-code" description="Identify and fix code errors and bugs." />

<QuickLink title="Cody Ignore" icon='presets' href="/cody/capabilities/ignore-context" description="Cody can ignore selected files or folders from chat and autocomplete results." />

</QuickLinks>
1 change: 1 addition & 0 deletions docs/cody/core-concepts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@

<QuickLink title="Cody Gateway" icon='lightbulb' href="/cody/capabilities/debug-code" description="Identify and fix code errors and bugs." />

<QuickLink title="Cody Gateway" icon='lightbulb' href="/cody/capabilities/ignore-context" description="Cody can ignore selected files or folders from chat and autocomplete results." />
</QuickLinks>
4 changes: 4 additions & 0 deletions docs/cody/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ Cody's main features include:
<td><a href="cody/capabilities/debug-code">Debug code</a></td>
<td>Cody can debug your code in the editor and also helps you identify code smells</td>
</tr>
<tr>
<td><a href="cody/capabilities/ignore-context">Cody Ignore</a></td>
<td>Cody can ignore selected files or folders from chat and autocomplete results</td>
</tr>
</tbody>
</table>

Expand Down
1 change: 1 addition & 0 deletions src/data/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const navigation: NavigationItem[] = [
{ title: "Autocomplete", href: "/cody/capabilities/autocomplete", },
{ title: "Commands", href: "/cody/capabilities/commands", },
{ title: "Debug Code", href: "/cody/capabilities/debug-code", },
{ title: "Cody Ignore", href: "/cody/capabilities/ignore-context", },
]
},
{
Expand Down

0 comments on commit 9d87dcb

Please sign in to comment.