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

This commit is contained in:
Aiden Cline
2026-01-26 20:57:42 -05:00
parent b59aec6f04
commit 6cf2c3e3db
2 changed files with 1 additions and 3 deletions

View File

@@ -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

View File

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