Skip to content

Conversation

@xpzouying
Copy link
Contributor

@xpzouying xpzouying commented Jan 25, 2026

AI 模型有时会用 ReadFile 读取目录路径,导致 Invalid path 错误。

在工具描述开头添加明确声明:只能读取文件,不能读取目录。


AI models sometimes use ReadFile to read directory paths, causing Invalid path errors.

Add an explicit statement at the beginning of the tool description: only files can be read, not directories.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional flag.

Open in Devin Review

@xpzouying xpzouying force-pushed the fix/improve-readfile-directory-handling branch 2 times, most recently from fd62007 to cbeed9a Compare January 25, 2026 07:32
@xpzouying xpzouying force-pushed the fix/improve-readfile-directory-handling branch from cbeed9a to 19f15f2 Compare January 25, 2026 07:40
@xpzouying
Copy link
Contributor Author

image

@xxchan
Copy link
Collaborator

xxchan commented Jan 28, 2026

请问你使用的模型是?


What model are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants