Local copy writes the clipboard natively and via OSC 52 at once, racing the terminal (macOS)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- cli
调研方向
找到使用目标“all-available”的 TUI 剪贴板写入操作,并阅读剪贴板服务如何为本地和远程会话处理“best-available”。更改 TUI 的复制行为,避免同时进行本地写入,同时保留 SSH 使用的 OSC 52。完成标准是:重复进行本地复制不再触发 Alacritty 的警告,远程复制仍使用 OSC 52。
由索引模型根据 Issue 内容生成。
描述
Description
Since upgrading from 1.18.30 to 2.1.4, copying text in the TUI often makes Alacritty show:
[WARN] Unable to store text in clipboard: NSPasteboard#writeObjects: returned false
The TUI's clipboard write uses destination: "all-available", which starts the in-process host write and emits OSC 52 at the same moment. Locally, the terminal then writes the same pasteboard concurrently, and one of the two writes is rejected. The text still lands, but the terminal shows the warning.
1.18.30 also did both, but OSC 52 went first and the native write was a spawned osascript, so the two never overlapped.
The clipboard service already has "best-available" (host first, OSC 52 only if the host write fails or the session is remote). Using that for TUI copies would keep OSC 52 for SSH, where it's needed, and avoid the double write locally.
Plugins
@tarquinen/opencode-dcp, plus two local plugins (none touch the clipboard)
OpenCode version
2.1.4 (Homebrew)
Steps to reproduce
- Run
opencodein Alacritty on macOS (defaultterminal.osc52 = "OnlyCopy"), not over SSH. - Select text to copy, a few times.
- Alacritty intermittently shows the warning above.
Operating System
macOS 27.0.1
Terminal
Alacritty 0.17.0
- 主要语言
- TypeScript
- 星标
- 221k
- 派生
- 29.6k
- 平均合并
- 5 小时 22 分钟
- 30 天内合并 PR
- 531
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/opencode#59040 · 1 条评论 ·
维护者通常 1 天内回复
-
reproduced
难度 2/5 1-3 小时 新手友好度 69/100
anomalyco/opencode#58981 · 2 条评论 ·
维护者通常 1 天内回复
-
triaging
难度 2/5 1-3 小时 新手友好度 65/100
anomalyco/opencode#58821 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
anomalyco/opencode#58774 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
anomalyco/opencode#58725 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode 的全部 Issue
相似的 Issue
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
devdotfast/whiteboard#1415 · 1 条评论 ·
维护者通常 1 天内回复
-
area/sessions comp/desktop desktop/sessions P2 type/bug
难度 2/5 1-3 小时 新手友好度 84/100
NousResearch/hermes-agent#145383 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
enhancement p2 setup
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复