Skip to content

Support referencing files inside Git submodules when using @ mentions in chat #997

Description

@riley-wv

Currently, files inside Git submodules cannot be referenced using @ mentions in chat.

Problem

When a repository contains Git submodules, the file reference system does not resolve paths inside those submodules.

Example repository structure

root/
├─ app/
│  └─ src/
│     └─ index.ts
└─ shared-lib/ (git submodule)
   └─ src/
      └─ utils.ts

Referencing files in the main repository works:

@app/src/index.ts

But referencing files inside a submodule does not resolve:

`@shared-lib/src/utils.ts`

Expected behavior

Files inside Git submodules should be discoverable and referenceable in the same way as normal repository files.

Example:

@app/src/index.ts
@shared-lib/src/utils.ts

Both references should resolve successfully.

Impact

This prevents using the file mention system in projects that rely on Git submodules for shared libraries, infrastructure repositories, or other external components.

Possible direction

The indexing step likely needs to include submodule directories. This may involve:
• Resolving .gitmodules
• Including submodule paths during file indexing
• Treating submodule directories as valid sources for file references

Additional context

If needed I can look into this further and open a PR implementing support.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions