-
由 Will Chen 提交于
## Summary - Reject blank and whitespace-only `delete_file` paths at schema level. - Add runtime guard to refuse project-root-equivalent delete targets (like `.`, `./`, `.\\`, or normalized `foo/..`). - Add unit tests covering root-path rejection and normal file/directory delete behavior. ## Test plan - [x] `npm test -- src/pro/main/ipc/handlers/local_agent/tools/delete_file.spec.ts` - [x] `npm run fmt && npm run lint:fix && npm run ts` Made with [Cursor](https://cursor.com) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2859" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->