Skip to content

[BUG] CodeCompanion tools should work with relative paths. #260

@dyamon

Description

@dyamon

Describe the bug

The vectorcode_query tool for the CodeCompanion integration is set to return absolute paths to files, here and here.

This does not align with the general policy in CodeCompanion in which paths should be relative to the cwd. (see olimorris/codecompanion.nvim#1633).

To Reproduce

This causes failures consistently when prompting something like:

@{vectorcode_query} for files containing the definition of SomeObject and @{insert_edit_into_file} a boolean valid field.

because the @{insert_edit_into_file} tool expects a relative path.

Expected behavior

On one hand, CodeCompanion should probably be able to accept any path and then make them relative.
Still, since relative paths are the default in VectorCode, it might be easier to just remove the --absolute flag altogether.

Platform information:

OS: Linux

$ nvim -v
NVIM v0.11.3
Build type: Release
LuaJIT 2.1.1741730670

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions