mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 21:03:42 +00:00
fix(tui): include hidden paths in @ autocomplete
This commit is contained in:
parent
7a9c668357
commit
ba5eb05f44
2 changed files with 32 additions and 0 deletions
|
|
@ -101,6 +101,13 @@ function walkDirectoryWithFd(
|
|||
"--type",
|
||||
"d",
|
||||
"--full-path",
|
||||
"--hidden",
|
||||
"--exclude",
|
||||
".git",
|
||||
"--exclude",
|
||||
".git/*",
|
||||
"--exclude",
|
||||
".git/**",
|
||||
];
|
||||
|
||||
// Add query as pattern if provided
|
||||
|
|
@ -122,6 +129,11 @@ function walkDirectoryWithFd(
|
|||
const results: Array<{ path: string; isDirectory: boolean }> = [];
|
||||
|
||||
for (const line of lines) {
|
||||
const normalizedPath = line.endsWith("/") ? line.slice(0, -1) : line;
|
||||
if (normalizedPath === ".git" || normalizedPath.startsWith(".git/") || normalizedPath.includes("/.git/")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// fd outputs directories with trailing /
|
||||
const isDirectory = line.endsWith("/");
|
||||
results.push({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue