소스 검색

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

Aiden Cline 3 주 전
부모
커밋
6cf2c3e3db
2개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 2
      packages/opencode/bunfig.toml
  2. 1 1
      packages/opencode/src/tool/read.ts

+ 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)