### Description opencode desktop 在打开一个不存在的目录(如 D:\WenObsidianVault,D盘已移除)后,该路径会永久残留,无法通过 UI 删除。即使: - 手动删除 `AppData\Roaming\ai.opencode.desktop` 下的 workspace `.dat` 文件 - 卸载程序并删除安装目录 - 重新安装 该路径仍然会出现在 opencode 中。 ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link 路径信息至少存储在 4 个地方,散落在不同文件的不同 JSON 字段中,没有统一的删除入口: 1. `opencode.workspace.D--WenObsidi.k9vod1.dat` — 工作区文件 2. `opencode.global.dat` / `notification` — 通知历史记录 3. `opencode.global.dat` / `server.recentlyClosed` — 最近关闭的项目列表 4. `opencode.global.dat` / `layout` (sessionView) — 会话视图布局状态 即使找到了第 1 个文件删掉,其余 3 处残留还在,重装后 opencode 仍会加载该路径。 **复现步骤** 1. 在某个已存在的工作目录(如 D:\somefolder)中打开 opencode desktop 2. 移除该盘符或目录(如拔掉 D 盘) 3. 重启 opencode desktop 4. 该路径仍然在 UI 中显示,无法删除 5. 卸载 opencode 并删除 `Programs\@opencode-aidesktop` 安装目录 6. 重装 opencode 7. 步骤 4 的路径仍然出现 **建议修复方向** 1. **UI 层面**:工作区列表增加右键菜单 "删除此工作区",或设置页面提供已打开项目的删除入口 2. **卸载程序**:卸载时询问用户是否清除 `%AppData%\ai.opencode.desktop\` 下的用户数据 3. **存储层面**:工作区路径统一存储(当前散落在 4 个位置),不要各个模块各自存一份 **环境** - opencode desktop 版本:[请补充] - 操作系统:Windows ### Operating System _No response_ ### Terminal _No response_
Activity
github-actions commentedon Jul 10, 2026
This issue might be a duplicate of existing issues. Please check:
tomideas commentedon Jul 27, 2026
我用AI试了能删项目的方法(即UI 中不再显示), 你可以参考。
删除 OpenCode 专案的方法:
%APPDATA%\ai.opencode.desktop\opencode.global.dat"server"那行,里面有一段"local":[{...}]{"worktree":"...","expanded":true}(含后面逗号)风险只有一个要记住:
global.dat→ 随便改,只影响侧边栏显示%LOCALAPPDATA%\share\opencode\opencode.db→ 不能碰,那是所有对话记录,删了就永久没github-actions commentedon Sep 26, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.