Release Notes v1.4.0
新增 / Added
-
iOS 同步
在 Mac 设置中可开启局域网纯文本同步:通过「快捷指令」从 Mac 拉取最近一条可下载文本到 iPhone,或将 iPhone 剪贴板上传到 Mac(写入剪贴板并降低重复入库)。
Turn on LAN plain-text sync in Mac settings: use Shortcuts to pull the latest downloadable text from your Mac to iPhone, or push the iPhone clipboard to the Mac (paste with safeguards against duplicate history entries). -
快捷指令配对
安装 Deck 提供的「Deck iOS 同步」快捷指令时,系统会提示输入配对码一次,之后长期有效。
When you install Deck’s Deck iOS Sync shortcut, you’ll be prompted for a pairing code once; it stays valid afterward. -
AI 会话长上下文(加密 + 按需读取)
AI 助手新增save_session_context/read_session_context/delete_session_context:每条记录为本地独立加密文件(YAML 头 + 长正文),每轮仅向模型注入标题与源信息索引;完整正文需通过工具读取,便于控 token。与「跨窗口记忆」(≤30 字短句、全文注入)互补;可在「AI 助手」设置中单独开关,并查看条数与清理过期条目。
The AI assistant addssave_session_context,read_session_context, anddelete_session_context: each note is a separate encrypted file on disk (YAML front matter + long body); only title + provenance are injected each turn—load full text via tools to save tokens. Complements cross-window memory (≤30-char snippets, fully injected). Toggle per feature in AI Assistant settings, with counts and cleanup for expired entries. -
Deck CLI(命令行控制)
在设置中启用「Deck CLI」后,deckclip命令行工具通过 Unix Domain Socket 安全地控制面板、剪贴板与 AI 功能——零网络暴露、三层本地验证(二进制哈希 + Token + HMAC-SHA256)。App 启动时自动安装/usr/local/bin/deckclip(或~/.local/bin)。
With Deck CLI enabled in Settings, thedeckclipcommand-line tool securely drives panels, clipboard, and AI features via a Unix Domain Socket — zero network exposure, three-layer local authentication (binary hash + token + HMAC-SHA256). The app auto-installs/usr/local/bin/deckclip(or~/.local/bin) on launch. -
支持的命令 / Supported commands
deckclip health:检查 App 连接状态。
deckclip health: Check app connectivity.
deckclip write <text>:写入剪贴板(支持 stdin 管道与--tag)。
deckclip write <text>: Write to the clipboard (supports stdin pipes and--tag).
deckclip read:读取最近一条剪贴板内容。
deckclip read: Read the latest clipboard entry.
deckclip paste <1-9>:按序号快速粘贴。
deckclip paste <1-9>: Quick paste by slot.
deckclip panel toggle:显示/隐藏面板。
deckclip panel toggle: Toggle the panel.
deckclip(无参):在交互式终端里直接进入 AI 聊天界面。
deckclip(no args): Open the AI chat directly when launched in an interactive terminal.
deckclip chat:进入交互式 AI 聊天,走与 App 一致的真实会话流,并支持/cost、/compact、/copy、/resume、/clear。
deckclip chat: Enter the interactive AI chat with the same real conversation flow as the app, including/cost,/compact,/copy,/resume, and/clear.
deckclip ai run <prompt>:运行 AI 指令。
deckclip ai run <prompt>: Run an AI prompt.
deckclip ai search <query>:AI 语义搜索。
deckclip ai search <query>: AI semantic search.
deckclip ai transform <prompt>:AI 转换剪贴板内容。
deckclip ai transform <prompt>: AI transform clipboard content.
deckclip completion <shell>:生成 Shell 自动补全。
deckclip completion <shell>: Generate shell completions.
deckclip login:在 CLI 中配置 Deck AI 提供商,包括 ChatGPT、OpenAI API、Anthropic API 与 Ollama。
deckclip login: Configure Deck AI providers directly in the CLI, including ChatGPT, OpenAI API, Anthropic API, and Ollama.
deckclip version:显示版本信息与 ASCII Art 图标。
deckclip version: Show version info with the ASCII art logo.
deckclip mcp serve:以前台 stdio 方式运行 Deck MCP bridge。
deckclip mcp serve: Run the Deck MCP bridge in foreground stdio mode.
deckclip mcp tools:列出首发 MCP tools 与参数。
deckclip mcp tools: List the initial MCP tools and their arguments.
deckclip mcp doctor:检查 Deck App、本地 socket/token 与客户端配置路径。
deckclip mcp doctor: Check the Deck App, local socket/token, and client config paths.
deckclip mcp setup --client <claude-desktop|cursor|codex|opencode|all>:输出或写入 MCP 客户端配置片段。
deckclip mcp setup --client <claude-desktop|cursor|codex|opencode|all>: Print or write MCP client config snippets. -
CLI 语言与输出 / CLI language and output
所有命令支持--json全局标志输出 JSON 格式,适合脚本与 AI Agent 集成。CLI 会自动跟随 App 语言(zh-Hans / zh-Hant / en / de / fr / ja / ko),包括所有--help与子命令帮助文本。
All commands support the global--jsonflag for JSON output, ideal for scripting and AI agent integration. The CLI automatically follows the app's language (zh-Hans / zh-Hant / en / de / fr / ja / ko), including all--helpand subcommand help text.
优化 / Improvements
-
复制音效
复制到剪贴板时使用新的音效反馈,听感更清晰、与操作更一致。
Copy-to-clipboard now uses new sound effects for clearer, more consistent audio feedback. -
AI 助手提供商图标
「AI 助手」设置里,各提供商选项旁显示对应的品牌图标;ChatGPT 订阅与 OpenAI API 使用同一枚 OpenAI 图标。
In AI Assistant settings, each provider shows its brand icon beside the label; ChatGPT subscription and OpenAI API use the same OpenAI mark. -
ChatGPT 订阅 · Codex 后端请求对齐
使用 ChatGPT 订阅时,对官方 Codex 接口的请求会携带与 OAuth 一致的客户端标识、结构化 User-Agent、账户与会话相关头字段,并在请求体中附带与对话一致的缓存键;带推理参数时与官方客户端同样请求加密的推理内容字段。
For ChatGPT subscription, requests to the Codex backend now include consistent client identity and structuredUser-Agent, account/session headers, and per-conversation cache keys aligned with the official flow; when reasoning is enabled, encrypted reasoning content is requested like the reference client. -
Smart Rule · AI 网页能力
智能规则触发的 AI 自动化现在可使用web_search与web_fetch(与 AI 助手一致),便于按链接或关键词检索、抓取公开网页内容;仍仅作用于当前触发条目,不扩大其它剪贴板或本地文件权限。
Smart Rule AI automation can now useweb_searchandweb_fetch(same as the AI assistant) to look up or fetch public web content from URLs or keywords; scope stays limited to the triggering item without broader clipboard or local file access. -
sqlite-vec(语义向量索引)
嵌入式 sqlite-vec 升级至 v0.1.9(含 DELETE 与相关稳定性修复);仍以静态 amalgamation 编译进应用,无需单独加载扩展。
Embedded sqlite-vec updated to v0.1.9 (DELETE and related stability fixes); still built in as a static amalgamation, no separate loadable extension required. -
AI 聊天面板性能与稳定性
流式输出时减少滚动视图重复解析;长回复累加器降低换行扫描与全文拼接开销;上下文用量估算合并短时重复触发;工具审批在切换会话、新建对话或关闭面板时正确收尾,避免挂起;长会话消息列表采用惰性布局以降低内存压力。
AI chat panel performance and stability: fewer redundant scroll-view resolves during streaming, cheaper newline scanning and full-text materialization in the accumulator, debounced context-usage estimates, safe teardown of tool-approval continuations when switching chats, starting a new chat, or closing the panel, and lazy stacking for long transcripts to reduce memory use. -
iCloud 同步(编译期开关 + 队列)
增加DeckBuildFlags.isCloudSyncCompiledIn(默认关闭):未打算开启 CloudKit 时不走同步、不创建CKContainer、不派发后台同步任务;与UserDefaults双保险。启用后:CKContainer改为不可变实例;待上传项先按 item id 合并再在 flush 前调用createRecord,减少重复加密与临时文件;syncItem与物化任务使用强引用,避免标志位卡死。
iCloud sync (compile-time flag + pipeline): addDeckBuildFlags.isCloudSyncCompiledIn(default off) so CloudKit isn’t touched—noCKContainer, no background sync tasks—unless you opt in; works alongsideUserDefaults. When enabled: immutableCKContainer, coalesce pending item IDs andcreateRecordat flush time to cut duplicate work, and strong captures in the materialization path so the in-flight flag can’t stick. -
搜索与列表
清空搜索回到默认列表时,若已在默认态则不再重复loadInitialData();模糊搜索在候选不足时先扫描行构建 SearchSnapshot、再对命中结果物化ClipboardItem,降低主路径与内存峰值;编辑自定义标题时仅按条失效搜索预处理缓存,而非全量清空。
Search & list: when returning to the default list, skip redundantloadInitialData()if already in the default state; when fuzzy search needs a wider scan, scan lightweightSearchSnapshots first and materializeClipboardItemonly for hits; editing a custom title invalidates that item’s cached text instead of clearing the whole prepared-text cache. -
链接预览面板
顶部预览区拆为独立子视图;Apple 流媒体封面文字对比色按图像 TIFF 做缓存,减少重复像素采样。
Link preview: split the top preview into a subview; cache adaptive text tone (dark/light) per image TIFF to avoid repeated luminance sampling. -
邮件反馈(纯文本)
移除内置 HTML 工单模板,通过系统邮件撰写反馈时正文改为纯文本,便于在邮件客户端中直接编辑;仍自动附带 Ticket、来源与设备/应用诊断信息(并本地化提示文案)。
Feedback email (plain text): removed bundled HTML ticket templates; composing feedback via the system mail UI now uses a plain-text body for easier editing across mail clients, while still auto-attaching ticket ID, source, and device/app diagnostics (with localized prompts).
修复 / Fixes
-
AI 聊天全局快捷键
聊天面板仍处于打开状态、但已切换到其它应用或 Deck 其它窗口时,快捷键会前置并激活面板,而不再被误判为「关闭」。再次在聊天已聚焦时按同一快捷键仍可收起。
When the AI chat panel stays open but you switch to another app or another Deck window, the global shortcut now brings the panel forward and activates it instead of hiding it. Press the shortcut again while the chat is focused to dismiss as before. -
AI 助手 · Anthropic 兼容接口
第三方文档若只给出不含/v1的基址(例如 MiniMax),Deck 会自动补全正确的 Messages 请求路径,避免误配导致的失败;设置中增加简要说明。
When third-party docs only provide an Anthropic-compatible base URL without/v1(e.g. MiniMax), Deck now completes the correct Messages path so requests work; a short hint was added in settings. -
iOS 同步与快捷指令兼容性
修复 Swift 6 编译模式下 iOS 局域网同步、后台拉取与快捷指令导出相关的并发隔离问题,减少构建报错并提升同步稳定性。
Fixed Swift 6 concurrency-isolation issues affecting iOS LAN sync, background fetches, and shortcut export, reducing build errors and improving sync stability. -
CloudSync 与 SQLite 符号
CloudSyncService引入import SQLite以读取fetchRow的id;Result与 SQLite 模块内类型冲突时显式使用Swift.Result;物化任务由weak self改为强引用,避免isMaterializingPendingSync永久为 true 导致后续同步不再执行。
CloudSync & SQLite symbols:CloudSyncServicenow imports SQLite for rowidsubscripts; disambiguate withSwift.Resultwhen the SQLite module shadowsResult; materialization uses a strong capture soisMaterializingPendingSynccan’t get stuck and block future sync work.