mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
fix: use Instance.directory instead of process.cwd() in read tool
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user