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.cjs CHANGED
@@ -3496,9 +3496,7 @@ var PROJECT_MARKERS = [
3496
3496
  "pom.xml",
3497
3497
  "build.gradle",
3498
3498
  "CMakeLists.txt",
3499
- "Makefile",
3500
- ".opencode",
3501
- ".codebase-index"
3499
+ "Makefile"
3502
3500
  ];
3503
3501
  function hasProjectMarker(projectRoot) {
3504
3502
  for (const marker of PROJECT_MARKERS) {
@@ -17554,9 +17552,15 @@ function appendRoutingHints(output, hints, preferredRole) {
17554
17552
  output.system.push(...hints);
17555
17553
  }
17556
17554
  }
17555
+ function resolveProjectRoot(directory, worktree) {
17556
+ if (worktree && isGitRepo(worktree)) {
17557
+ return worktree;
17558
+ }
17559
+ return directory;
17560
+ }
17557
17561
  var plugin = async ({ directory, worktree }) => {
17558
17562
  try {
17559
- const projectRoot = worktree || directory;
17563
+ const projectRoot = resolveProjectRoot(directory, worktree);
17560
17564
  const rawConfig = loadMergedConfig(projectRoot);
17561
17565
  const config = parseConfig(rawConfig);
17562
17566
  initializeTools2(projectRoot, config);