Skip to content

v3.4.0

Choose a tag to compare

@sj719045032 sj719045032 released this 07 May 05:38

What's New

  • AskUserQuestion shows up in the notch. When Claude calls the AskUserQuestion tool, the notch now surfaces an actionable card with the question, options, and an optional manual textbox. Pick an answer inline, deny the call, or hand off to the terminal so the CLI's native picker takes over.

Bug fixes

  • Status bar icon clicks register again. The notch's outside-click watcher used NSEvent.addLocalMonitorForEvents and returned nil for any in-app mouse-down outside the hit rect, which silently swallowed clicks on the menu-bar status item and other app windows (Settings, Marketplace, etc.). Pass the event through and just drive the collapse signal.
  • Completion notch shows the actual final reply, not an intermediate text block. Claude Code's Stop hook payload carries the final assistant text in last_assistant_message, but the Stop normalizer was tail-scanning the transcript jsonl instead — and the jsonl can lag a few hundred ms behind hook fire, so the scan picked up the last intermediate text (the one before the final tool calls). Stop / StopFailure now read the payload field directly; transcript scan stays as a fallback.
  • "Return to terminal" on AskUserQuestion lets the CLI take over cleanly. Claude Code fires both PreToolUse and a follow-up PermissionRequest for AskUserQuestion, so the same question used to pop a second card right after dismissal — and clicking Answer on the second card never reached the CLI (different printer for the PermissionRequest decision lane). The normalizer now skips PermissionRequest:askuserquestion silently, and the Return-to-terminal path resolves PreToolUse with .ask so the CLI's native picker surfaces.
  • Answer button is legible against the dark notch. Three layers of dimming (.disabled + .opacity(0.48) + .secondary) made it nearly invisible. Render as .primary; the inner closure already guards the no-op when nothing is selected.

中文

新功能

  • AskUserQuestion 显示在刘海里。 当 Claude 调用 AskUserQuestion 工具时,刘海会弹出一张可操作卡片,展示问题、选项和可选的手动输入框。可以直接在卡片里选答案、拒绝,或交给终端让 CLI 原生 picker 接管。

Bug 修复

  • 状态栏图标点击恢复响应。 刘海里那个 NSEvent.addLocalMonitorForEvents 外部点击监听对所有 app 内非命中区的鼠标按下都 return nil,把状态栏图标点击和其他窗口(Settings、Marketplace 等)的点击全吞了。改成放行事件,只触发折叠信号。
  • 完成卡片显示真正的最终回复,不是中间文本块。 Claude Code 的 Stop hook payload 在 last_assistant_message 字段里直接带着最终文本,但原代码偏要去扒 transcript jsonl —— 而 jsonl 落盘比 hook 触发延迟几百毫秒,扒到的是最后一个中间文本(最终工具调用之前那段)。现在 Stop / StopFailure 直接读 payload 字段,transcript 扒只作 fallback。
  • AskUserQuestion 的 "Return to terminal" 正确移交给 CLI。 Claude Code 对 AskUserQuestion 会先后发 PreToolUse 和 PermissionRequest 两个 hook,之前关掉第一张卡之后会再弹一张同样的卡 —— 而第二张卡点 Answer 也送不到 CLI(PermissionRequest 走的另一条 printer,扔掉了 updatedInput)。现在 normalizer 静默拦掉 PermissionRequest:askuserquestion,Return-to-terminal 路径用 .ask 决议让 CLI 走默认流程,原生 picker 正常出现。
  • Answer 按钮在深色刘海里看得清了。 .disabled + .opacity(0.48) + .secondary 三层叠加,按钮几乎隐形。统一改用 .primary 样式,点击安全由内部闭包的 guard 保护。