Skip to content

v1.4.2 | Oops

Choose a tag to compare

@yuzeguitarist yuzeguitarist released this 18 Apr 06:48

Deck


Release Notes v1.4.2

新增 / Added

  • Smart Rule AI 管理工具
    Deck AI 现在不仅能创建 Smart Rule,也可以列出、读取、修改和删除已有规则;App 内审批面板与 deckclip chat/deckclip 终端审批也会显示对应的规则预览、变更摘要和删除警告。
    Deck AI can now do more than create Smart Rules. It can also list, read, modify, and delete existing rules, and both the in-app approval sheet and the deckclip chat approval overlay now show rule previews, change summaries, and delete warnings.

  • Deck CLI AI 聊天审批
    deckclip chat 中,遇到脚本插件创建/修改/删除、剪贴板写入/删除、Smart Rule 生成等需要授权的操作时,现在会直接弹出审批面板;你可以在终端里查看摘要与预览,并用 Y / Enter 批准、N / Esc 拒绝。
    deckclip chat now shows an approval overlay for actions that require authorization, including creating, modifying, or deleting script plugins, writing or deleting clipboard items, and generating Smart Rules. You can review the summary and preview in the terminal, then approve with Y / Enter or reject with N / Esc.

  • 审批补丁结构化预览
    修改脚本插件时,补丁现在会按文件、hunk 与增删行数展示;支持普通 diff 与 *** Begin Patch 风格补丁,也能识别文件移动(move)并显示旧路径到新路径的变更关系。
    Patch previews for script plugin changes are now structured by file, hunk, and added or removed lines. Both regular diffs and *** Begin Patch style patches are supported, and file moves are recognized with old-to-new path mapping.

  • 审批代码高亮
    审批面板会对 manifest.json、JSON 和 JavaScript 代码块做基础语法高亮,长预览也支持独立滚动。
    The approval overlay now applies basic syntax highlighting to manifest.json, JSON, and JavaScript blocks, and long previews can be scrolled independently.

优化 / Improvements

  • Smart Rule 自动删除粒度
    “多久之后自动删除” 现在最低支持 1 分钟;在 5 分钟以内可直接选择 1 / 2 / 3 / 4 / 5 分钟,超过 5 分钟后继续沿用原来的 5 分钟步进逻辑。AI 生成或修改规则时也同步支持 1 分钟的最小自动删除时间。
    “Auto delete after” now supports a minimum of 1 minute. Within the first 5 minutes, you can choose 1 / 2 / 3 / 4 / 5 minutes directly, while values above 5 minutes continue to use the original 5-minute step cadence. AI-generated or AI-modified rules now support the same 1-minute minimum.

  • 聊天过程工具状态反馈
    AI 在搜索剪贴板、保存记忆、读写会话上下文、运行脚本插件等阶段时,顶部状态与对话尾部会显示更明确的进行中文案;连续搜索还会带上递增计数,减少“像卡住了一样”的观感。
    During clipboard search, memory saving, session context reads or writes, script plugin execution, and similar steps, the chat UI now shows clearer in-progress status text in both the header and transcript tail. Repeated searches also display an incrementing count to reduce the feeling that the session is stuck.

  • macOS 审批键盘体验
    审批面板打开时,会临时切到可输入 ASCII 的键盘布局,关闭后再恢复原输入法;在中文输入法等场景下,Y / N 快捷批准或拒绝更可靠。
    When the approval overlay opens on macOS, Deck temporarily switches to an ASCII-capable keyboard layout and restores the previous input source afterward, making Y / N approval shortcuts more reliable under Chinese IMEs and similar input methods.

  • 聊天模块结构与可维护性
    deckclip chat/deckclip 的实现拆分为 app_implapprovalrendertests 模块,后续继续迭代聊天与审批功能时更容易维护。
    The deckclip chat implementation has been split into app_impl, approval, render, and tests modules, making future iteration on chat and approval features easier to maintain.

  • 局域网共享后台策略平衡优化
    重新调整了局域网共享在后台、熄屏与连接状态切换时的发现策略:相比频繁暂停、恢复或重建网络对象,Deck 现在更倾向于保持发现链路稳定运行,以优先降低异常退出与崩溃风险,同时减少因重复重建带来的额外开销。
    Rebalanced LAN sharing discovery behavior across background, display sleep, and connection state transitions. Instead of frequently pausing, resuming, or rebuilding networking objects, Deck now prefers to keep the discovery path stable, reducing crash risk first while also avoiding the overhead caused by repeated teardown and rebuild churn.

  • 剪贴板后备轮询更省电
    剪贴板监听的后备轮询现在会根据用户空闲状态、低功耗模式和设备热状态动态放宽间隔,并减少无变化时的重复调度,降低后台闲置时的不必要唤醒。
    Clipboard fallback polling now adapts its interval to user inactivity, Low Power Mode, and thermal state, and avoids redundant rescheduling when nothing changes, reducing unnecessary wakeups while Deck is idle in the background.

变更 / Changes

  • 局域网共享刷新与设备名生效方式
    运行中的局域网共享设备名称现在会在下次重新开启该功能后再对外生效;同时“刷新搜索”会优先保留当前会话与发现链路,避免为了刷新列表而重建整套局域网共享对象。
    Changes to the LAN sharing device name now take effect externally the next time LAN sharing is turned back on, and “Refresh Search” now preserves the current session and discovery path instead of rebuilding the entire LAN sharing stack just to refresh the list.

  • 二进制瘦身改为启动后自动清理
    App 现在在启动后会自动扫描当前机型不需要的 App 二进制架构,并在发现可清理内容时直接执行清理;不再需要先进入“整理数据库 / 一键整理”再触发。设置页中的相关开关语义也同步调整为“启动时自动清理”,而“一键整理”里的二进制瘦身则改为补做与兜底路径。
    Deck now automatically scans for app binary architectures that are unnecessary for the current Mac right after launch and immediately cleans them up when removable content is found. This no longer depends on running database cleanup or one-click maintenance first. The related Settings copy has been updated to reflect automatic cleanup on launch, while the one-click maintenance path now serves as a fallback and secondary pass.

  • AI 工具执行授权策略
    当你已经明确表达“删 / 改 / 写 / 创建”等操作意图时,Deck AI 现在会直接执行对应工具调用,并把最终确认交给系统审批弹窗;不会再要求你重复一句话、输入固定确认短句,或做第二层、第三层口头确认。像删除脚本插件、删除剪贴板内容、覆盖已有插件这类操作,只要目标明确且能唯一定位就会直接继续;只有目标不清楚、存在重名或近似匹配时才会先澄清。
    When you clearly express an intent like delete, modify, write, or create, Deck AI now proceeds directly with the matching tool call and leaves the final confirmation to the system approval sheet. It no longer asks you to repeat yourself, type a fixed confirmation phrase, or go through extra rounds of verbal confirmation. Actions such as deleting a script plugin, deleting clipboard content, or overwriting an existing plugin now continue immediately when the target is clear and uniquely identified, and only ask follow-up questions when the target is ambiguous or has duplicate or near-matching candidates.

修复 / Fixes

  • 快捷指令与 App Intents 并发兼容性
    修复了在开启完整严格并发检查并使用默认 MainActor 隔离时,快捷指令 / App Intents 元数据可能失效、消失,甚至在启动时触发注册崩溃的问题。相关静态元数据现已显式声明为非隔离,剪贴板实体映射也仅在真正读取 UI 隔离属性时回到主 actor,兼顾 Swift 6 并发安全与 Shortcuts 注册稳定性。
    Fixed an issue where Shortcuts / App Intents metadata could disappear, stop registering, or even crash during launch when complete strict concurrency checking was enabled together with default MainActor isolation. The related static metadata is now explicitly marked as nonisolated, and clipboard entity mapping only hops back to the main actor when reading truly UI-isolated properties, preserving both Swift 6 concurrency safety and stable Shortcuts registration.

  • 二进制瘦身设置文案与多语言同步
    补齐并更新了二进制瘦身相关设置文案的多语言资源,确保“启动时自动清理”和“一键整理补做瘦身”的新语义在各语言下保持一致,同时移除了旧的“仅启动扫描 / 整理时包含瘦身”残留文案。
    Updated and completed localization coverage for the binary slimming settings so the new semantics—automatic cleanup on launch and fallback slimming during one-click maintenance—stay consistent across languages, while removing the old wording that described launch-time scan-only behavior or slimming as part of maintenance only.

  • Deck CLI 安全依赖收敛
    修复了 deckclip 内部 rand / lru 相关安全告警,并将终端 UI 依赖从聚合 ratatui 拆分为 ratatui-coreratatui-crosstermratatui-widgets,移除了旧的 termwiz 传递依赖链;此次仅涉及内部安全与兼容性更新,不影响 Swift App 对接协议,也不改变现有行为或 UI。
    Resolved rand and lru related security advisories in deckclip by replacing the aggregate ratatui dependency with direct ratatui-core, ratatui-crossterm, and ratatui-widgets dependencies, removing the old termwiz transitive chain. This is an internal security and compatibility update only and does not change the Swift app integration contract, runtime behavior, or UI.

  • Deck CLI PATH 安装器误写 Shell 配置
    修复了 Deck CLI 在回退到 ~/.local/bin 时,可能把 zsh 配置文件路径猜错、误把目录字符串当作“已经配置”,甚至擅自新建 shell 启动文件的问题。现在只会在解析出真实 zsh 启动文件后,对已存在且可写的文件精确追加 Deck 自己管理的 PATH 行;拿不准时会直接跳过,不再碰用户配置。
    Fixed an issue where the Deck CLI PATH installer could guess the wrong zsh startup file, mistake a plain directory string for an existing PATH setup, or even create a new shell startup file when falling back to ~/.local/bin. It now resolves the actual zsh startup file first and only appends Deck’s managed PATH line to an existing writable file; if the target cannot be determined safely, it skips the update instead of touching the user’s shell config.

  • 内存占用异常(56GB+ → 30MB 左右)
    修复了特定SmartRule后台调度场景下的异常内存膨胀问题,内存占用从 56GB+ 降到 30MB 左右。
    Fixed an abnormal memory growth issue in a specific background scheduling path, reducing memory usage from 56GB+ to around 30MB.

  • Smart Rule 自动删除调度稳定性
    修复了自动删除在取消与重新调度过程中可能重复触发的并发问题,避免后台任务风暴与异常资源占用。
    Fixed a concurrency issue where Smart Rule auto-delete could retrigger during cancellation and rescheduling, preventing background task storms and abnormal resource usage.

  • 更新记录校验稳定性
    进一步稳固了更新哈希记录的写入、读取与篡改校验流程,降低更新校验偶发异常的风险。
    Improved the stability of update hash record write, read, and tamper-validation flows to reduce the risk of sporadic update verification issues.

  • Deck CLI 交互式输入删除逻辑
    deckclip chat/deckclip 的交互式输入中,Command + Delete 与 Control + U 现在会按终端常见语义,只删除当前行里光标之前的内容,而不再直接清空整行;当光标已经位于行首时,也不会再误删前一个换行。
    In deckclip chat, Command + Delete and Control + U now follow normal terminal behavior by deleting only the text before the cursor on the current line instead of wiping the whole line. If the cursor is already at the start of the line, the previous newline is no longer removed by mistake.

  • 中文输入法切换导致的 Slash 面板误粘贴
    修复了在 deckclip chat/deckclip 中,输入 / 打开命令面板后,如果中文输入法候选还未确认就切换输入语言,空的终端 Paste 事件可能误触发“最近剪贴板文本”插入输入框的问题;同时当终端实际粘贴了普通文本时,现在也会优先使用终端真实输入,而不是被内部聊天剪贴板回退文本抢占。Slash 命令候选不会再异常消失,也不会再莫名粘贴最新剪贴板记录。
    Fixed an issue in deckclip chat/deckclip where switching input sources during unfinished Chinese IME composition after opening the / command palette could trigger an empty terminal paste event and incorrectly inject the latest clipboard text into the input field. When the terminal actually pastes normal text, Deck now prefers the terminal's real pasted content instead of the internal chat clipboard fallback. Slash suggestions now stay intact, and the newest clipboard entry is no longer pasted unexpectedly.

  • 长粘贴文本折叠为紧凑块显示
    deckclip chat/deckclip 中,超长粘贴文本现在会先折叠为输入区里的紧凑占位块,并在输入框上方显示摘要卡片,避免编辑区被大段内容直接撑满;提交消息时会自动恢复为完整原文发送,因此不会丢失上下文,也不会影响后续继续编辑其它内容。
    In deckclip chat/deckclip, very large pasted text is now collapsed into a compact placeholder block inside the composer with a small summary card shown above the input, preventing the editor from being flooded by the full payload. The full original text is automatically restored on submit, so no context is lost and normal editing around the pasted block remains intact.

  • Deck CLI AI 跟随输出首轮协议稳定性
    修复了 deckclip chat/deckclip 在本地模型返回很快时,终端“跟随输出”首轮回复偶发报出协议错误并直接中断的问题;现在会先稳定完成会话确认,再继续接收后续流式事件,用 LM Studio 等本地模型时更可靠。
    Fixed an issue where deckclip chat/deckclip could intermittently hit a protocol error and abort the first reply in terminal follow-output mode when local models responded very quickly. Deck now completes the session acknowledgment before consuming later streaming events, making fast local setups such as LM Studio more reliable.

  • 审批补丁预览噪音
    机器生成补丁中的包装标记会被过滤,审批窗口不再直接暴露大段原始 patch 包装文本,整体更易读。
    Wrapper markers in machine-generated patches are now filtered out, so the approval overlay no longer dumps large blocks of raw patch wrapper text and is easier to read overall.

  • 状态尾部布局稳定性
    流式输出、审批等待和短状态提示在底部区域的对齐更稳定;已有会话内容在生成过程中不再被异常顶动。
    Streaming output, approval waiting states, and short status prompts now stay aligned more consistently near the bottom of the viewport, and existing conversation content no longer shifts upward unexpectedly while generating.

  • 空格预览代码块滚动与顶部横幅体验
    修复了空格预览中代码内容出现双层滚动条的问题,并重做了顶部语言横幅:代码预览现在改为单一滚动路径,顶部语言条调整为更贴边的毛玻璃长条,模糊覆盖与渐变过渡也更自然;同时微调了 Swift 等语言标签的位置,减少顶部硬截断与可见边缘感。
    Fixed the double-scroll behavior in Space-triggered code previews and rebuilt the top language header. Code previews now use a single scrolling path, while the language strip has been refined into a tighter frosted bar with a more natural blur transition. Labels such as TypeScript were also fine-tuned to reduce hard clipping and visible edge artifacts near the top.

  • 局域网共享后台稳定性
    修复了局域网共享在后台、熄屏、刷新搜索或设备状态变化后,系统网络发现链路可能被频繁取消并重建,从而导致 Deck 异常退出或崩溃的问题;本次更新优先收敛高风险的生命周期抖动。
    Fixed an issue where LAN sharing could repeatedly cancel and rebuild the underlying system discovery chain after backgrounding, display sleep, manual refresh, or peer state changes, which could lead to unexpected exits or crashes. This update prioritizes reducing that high-risk lifecycle churn.

测试 / Tests

  • Smart Rule AI 工具与 1 分钟自动删除测试
    新增 Smart Rule AI 工具生命周期测试,覆盖列出、读取、修改、删除规则流程,并补充 auto_delete 最小 1 分钟的构建校验,降低规则编辑与自动删除行为的回归风险。
    Added Smart Rule AI tool lifecycle tests covering list, read, modify, and delete flows, plus validation for the 1-minute auto_delete minimum to reduce regression risk around rule editing and auto-delete behavior.

  • 聊天渲染与审批回归测试
    新增渲染性能、输入布局、输入历史、附件恢复、slash 命令归一化、审批覆盖层、流式状态以及删除行为等测试,进一步补强 deckclip chat/deckclip 的回归覆盖。
    Added regression coverage for render performance, input layout, input history, attachment restoration, slash command normalization, approval overlays, streaming states, and line-deletion behavior to strengthen deckclip chat test coverage.

  • 中文输入法切换与终端粘贴回归测试
    新增终端粘贴处理回归测试,覆盖中文输入法未完成候选时切换语言所触发的空 Paste 事件不会污染 Slash 查询,以及正常文本粘贴会优先使用终端实际输入而不是内部聊天剪贴板回退文本。
    Added regression tests for terminal paste handling to ensure that empty paste events triggered while switching input sources during unfinished Chinese IME composition do not corrupt slash queries, and that normal text pastes prefer the terminal's actual pasted text over the internal chat clipboard fallback text.

  • 长粘贴折叠与恢复回归测试
    新增 deckclip chat 长粘贴处理回归测试,覆盖超长文本折叠为占位块、发送前恢复全文、占位块边界整块删除、输入历史恢复以及输入面板高度变化等行为,降低后续编辑态与提交流程的回归风险。
    Added regression tests for large paste handling in deckclip chat, covering placeholder collapse for oversized pasted text, full-text restoration before submit, whole-block deletion at placeholder boundaries, history restoration, and input panel height changes to reduce regression risk in both editing and submission flows.

  • 自动删除与更新记录回归测试
    新增 Smart Rule 自动删除调度回归测试,并补强更新哈希记录读写与篡改校验测试,进一步降低后续回归风险。
    Added regression coverage for Smart Rule auto-delete scheduling and strengthened update hash record read/write and tamper-validation tests to reduce future regression risk.