فهرست منبع

fix(tool): follow symlinks when looking for tools (#2809)

Timo Clasen 5 ماه پیش
والد
کامیت
3d332a06b5
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/opencode/src/tool/registry.ts

+ 1 - 1
packages/opencode/src/tool/registry.ts

@@ -42,7 +42,7 @@ export namespace ToolRegistry {
     const glob = new Bun.Glob("tool/*.{js,ts}")
     const glob = new Bun.Glob("tool/*.{js,ts}")
 
 
     for (const dir of await Config.directories()) {
     for (const dir of await Config.directories()) {
-      for await (const match of glob.scan({ cwd: dir, absolute: true })) {
+      for await (const match of glob.scan({ cwd: dir, absolute: true, followSymlinks: true, dot: true })) {
         const namespace = path.basename(match, path.extname(match))
         const namespace = path.basename(match, path.extname(match))
         const mod = await import(match)
         const mod = await import(match)
         for (const [id, def] of Object.entries<ToolDefinition>(mod)) {
         for (const [id, def] of Object.entries<ToolDefinition>(mod)) {