Repository navigation
Replies: 4 comments 3 replies
|
我也踩过这个坑,这个坑和大模型还有dsh都没关系的。因为删除命令是写脚本执行的,不是大模型或者dsh执行的。 |
|
A recycle bin is the right layer for this, and the layer matters: a mistyped path that swallows the parent directory is a target-identification error, and no rule that reads the command text can decide whether the target was meant. Your case (the classic "the test directory didn't exist, so the deletion took the folder above it") is exactly the one a text guard cannot reach. For completeness, because this class keeps being reported in both directions: the npm package So the two contributions do not overlap, which is the useful part: a guard can only refuse, and it can only refuse what the text proves; a recycle bin preserves what nothing could have judged. If your plugin routes deletions to a temporary store and restores on demand, that is the recovery layer that a Two notes that may be useful to whoever takes this upstream: the shipped tool description already requires verifying the resolved absolute path before a delete ( |
|
其实你说的功能就是git, 不需要dsh再重复做这种功能, 安装个git用git管理就行了, git回收站好用一万倍, 然后再用git worktree就更好了 |
|
不要随便开完全权限, 风险很高的. |
Uh oh!
There was an error while loading. Please reload this page.
昨天deepseek加dsh把我整个项目文件夹删了,他执行代码,删除测试文件的时候,经典的路径拼错了,包含了上级文件夹,甚至没有创建测试文件夹,把整个文件夹删了。
整个项目没有备份,已经全毁了,full权限下是否可以加个放到一个临时文件夹的回收站的删除。
我现在已经通过插件的形式实现了。
为了安全,即便被ai误删,也可以恢复,而不是通过fs 命令行直接删除
All reactions