Przeglądaj źródła

fix: use Instance.directory instead of process.cwd() in read tool

Aiden Cline 2 tygodni temu
rodzic
commit
6cf2c3e3db

+ 0 - 2
packages/opencode/bunfig.toml

@@ -3,5 +3,3 @@ preload = ["@opentui/solid/preload"]
 [test]
 preload = ["./test/preload.ts"]
 timeout = 10000  # 10 seconds (default is 5000ms)
-# Enable code coverage
-coverage = true

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

@@ -24,7 +24,7 @@ export const ReadTool = Tool.define("read", {
   async execute(params, ctx) {
     let filepath = params.filePath
     if (!path.isAbsolute(filepath)) {
-      filepath = path.join(process.cwd(), filepath)
+      filepath = path.join(Instance.directory, filepath)
     }
     const title = path.relative(Instance.worktree, filepath)