Cody ignore feature not working

When asking for a general overview of an Elixir codebase Cody seems fixated on looking in the assets/ and deps/ folders for context, when it would be better served looking at .ex files. I’ve tried to exclude the folders in the ignore file but Cody doesn’t seem to be detecting the file.

Contents of cody.json:

{
    "cody.unstableFeatures": true,
    "cody.internal.unstable": true,
    "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"
        }
    }
}

Contents of .cody/ignore:

/deps/*
/assets/*
deps/*
assets/*
deps/
assets/
/deps
/assets
deps/swoosh
README.md

This is with enhanced context enabled, embeddings and search both indexed.

Cody 1.12.0

Hello @chris-wickens

Thank you for raising this issue. The Cody ignore feature is experimental. Take with caution.

For a guide on how to enable it, have a look at https://community.sourcegraph.com/t/how-to-enable-cody-ignore

Sorry for the inconvenient.

2 Likes

Thanks @chris-wickens for the detailed question did @PriNova’s solution work for you?

@chris-wickens it might not be working as expected because the "cody.internal.unstable": true setting should go into your VS Code User settings JSON and not cody.json, which is used for configuring custom commands.

Can you try moving the configuration from your cody.json file to your VS Code User Settings JSON file and see if that works?

1 Like

Thanks Beatrix, the cody.internal.unstable flag was in my user settings already but removing it from cody.json seems to have done the trick - either that or I restarted enough times for it to start working. Cody now ignores the folders I specify but unfortunately only adds a few files for context, so it’s not great at giving an overview. It is working much better for specific questions though. Thanks everybody for your help!

2 Likes