opencode-codebase-index 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3486,9 +3486,7 @@ var PROJECT_MARKERS = [
3486
3486
  "pom.xml",
3487
3487
  "build.gradle",
3488
3488
  "CMakeLists.txt",
3489
- "Makefile",
3490
- ".opencode",
3491
- ".codebase-index"
3489
+ "Makefile"
3492
3490
  ];
3493
3491
  function hasProjectMarker(projectRoot) {
3494
3492
  for (const marker of PROJECT_MARKERS) {
@@ -17552,9 +17550,15 @@ function appendRoutingHints(output, hints, preferredRole) {
17552
17550
  output.system.push(...hints);
17553
17551
  }
17554
17552
  }
17553
+ function resolveProjectRoot(directory, worktree) {
17554
+ if (worktree && isGitRepo(worktree)) {
17555
+ return worktree;
17556
+ }
17557
+ return directory;
17558
+ }
17555
17559
  var plugin = async ({ directory, worktree }) => {
17556
17560
  try {
17557
- const projectRoot = worktree || directory;
17561
+ const projectRoot = resolveProjectRoot(directory, worktree);
17558
17562
  const rawConfig = loadMergedConfig(projectRoot);
17559
17563
  const config = parseConfig(rawConfig);
17560
17564
  initializeTools2(projectRoot, config);