[FEATURE]: Desktop: add Undo to Archive current session

未关闭
#65,242 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
desktop, frontend

调研方向

Start at the Desktop command palette action for Archive current session and the toast layer that can host Undo; read #62601 for the shortcut context and the reference plugin for intended behavior. Confirm where the target session id and running/waiting state are available before committing the archive. Done means the session stays open with a ~5s Undo toast, expiry archives the originally targeted session and closes its tab, tab switches do not retarget, and running or waiting sessions are skipped.

由索引模型根据 Issue 内容生成。

描述

area/desktop platform/macos type/feature version/v2
Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

Give OpenCode Desktop’s Archive current session command a short undo window. I use the keyboard to clear finished conversations as I work, and I want to be able to catch an accidental press without opening the archive or confirming every time.

  1. Invoke Archive current session from the command palette or a configurable shortcut. I use ⌘⇧M on Mac, including while the composer has focus.
  2. Keep the session open and show a toast with Undo for about five seconds. Undo cancels the pending archive; nothing has been changed on the server.
  3. If the timer expires, archive the session that was originally targeted and close its tab. Switching tabs shouldn’t change the target. If the session has started running or is waiting for input, skip the archive.

#62601 tracks restoring the Desktop shortcut. This request is for the undo window and what happens before the archive is committed.

I built this as a small reference plugin for OpenCode Desktop 2.3.2 on macOS. I’d like to switch to the built-in command once this behavior is available.


Drafted by OpenCode and posted with my approval.

主要语言
TypeScript
星标
227k
派生
30.7k
平均合并
3 小时 57 分钟
30 天内合并 PR
484

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

anomalyco/opencode 的其他 Issue

查看 anomalyco/opencode 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。