fix(opencode): preserve grep symlink paths (#38581)

Co-authored-by: Zach Bruggeman <zbruggeman@ramp.com>
This commit is contained in:
Zach Bruggeman
2026-07-24 09:16:58 -07:00
committed by GitHub
parent 909db63265
commit e63996919b
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -69,7 +69,10 @@ export const GrepTool = Tool.define(
if (result.length === 0) return empty
const rows = result.map((item) => ({
path: path.resolve(cwd, item.entry.path),
path: path.resolve(
requestedInfo?.type === "Directory" ? requested : path.dirname(requested),
item.entry.path,
),
line: item.line,
text: item.text,
}))