Find .opencode files in workspace search (#2049)

* fix(search): find .opencode workspace files

Workspace autocomplete skips hidden directories unless they are explicitly allowlisted. The missing .opencode entry made provider commands and workflows invisible to file search.

* refactor(search): centralize hidden directory policy
This commit is contained in:
Mohamed Boudra
2026-07-13 22:50:34 +02:00
committed by GitHub
parent 5e2a8b6633
commit b4ab0d9db6
4 changed files with 55 additions and 15 deletions
@@ -24,7 +24,7 @@ export interface SearchDirectoryEntriesOptions {
pathQueryPolicy?: PathQueryPolicy;
rootAliases?: string[];
blankQueryBehavior?: BlankQueryBehavior;
traversableHiddenDirectoryNames?: string[];
traversableHiddenDirectoryNames?: readonly string[];
limit?: number;
maxDepth?: number;
maxEntriesScanned?: number;
@@ -84,6 +84,15 @@ const NO_SEGMENT_INDEX = Number.MAX_SAFE_INTEGER;
const NO_MATCH_OFFSET = Number.MAX_SAFE_INTEGER;
const NO_FUZZY_SCORE = Number.MAX_SAFE_INTEGER;
const NO_MATCH_TIER = 5;
export const WORKSPACE_SEARCH_HIDDEN_DIRECTORIES = [
".agents",
".claude",
".codex",
".github",
".opencode",
".paseo",
".vscode",
] as const;
const IGNORED_DIRECTORY_NAMES = new Set([
"node_modules",
"venv",