mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-08 09:49:19 +00:00
fix(core): expose Instance.directory to custom tools
This commit is contained in:
@@ -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(Instance.directory, filepath)
|
||||
filepath = path.resolve(Instance.directory, filepath)
|
||||
}
|
||||
const title = path.relative(Instance.worktree, filepath)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user