Skip to content

fix: filter .git directory from file mention autocomplete#1461

Open
Br1an67 wants to merge 1 commit intoMoonshotAI:mainfrom
Br1an67:fix/filter-git-dir-from-mentions
Open

fix: filter .git directory from file mention autocomplete#1461
Br1an67 wants to merge 1 commit intoMoonshotAI:mainfrom
Br1an67:fix/filter-git-dir-from-mentions

Conversation

@Br1an67
Copy link

@Br1an67 Br1an67 commented Mar 17, 2026

Problem

When using @ to mention files in the web UI, the .git/ directory's internal objects (objects, refs, pack files, etc.) are included in the autocomplete results, polluting the file list with thousands of irrelevant entries.

Fix

Skip the .git directory when iterating directory entries in the get_session_file endpoint (web/api/sessions.py).

Fixes #1339


Open with Devin

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

When using @ to mention files, .git/ internal objects were shown
in the autocomplete results, polluting the file list with thousands
of irrelevant entries.

Filter out the .git directory from the directory listing endpoint
used by the file mention autocomplete.

Fixes MoonshotAI#1339
@Br1an67 Br1an67 force-pushed the fix/filter-git-dir-from-mentions branch from e16f81d to 8000c17 Compare March 17, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File mention (@) shows internal .git/objects/ files in the list

1 participant