hmharness TUI Restores Native Terminal Selection and Copying
The Juejin AI report says the open-source hmharness development-agent framework removed global mouse capture from its TUI, preserving native terminal selection and copying. Its picker remains keyboard-driven, alternate scroll is mapped to arrow keys, and stray SGR mouse reports are ignored. The report ties the behavior to public main commit c6fdd73422ef8cb05d41412ed448e7d4e8f5a226 and cites a passing CI run with 1,068 tests and local TUI test results of 35 passes.
The change lets an AI development-agent TUI preserve familiar terminal workflows while retaining scrollable, keyboard-operated controls, with the reported implementation backed by a pinned commit and reproducible tests.
先说工具全貌:hmharness 是一个开源的 HarmonyOS/OpenHarmony 开发智能体框架,把工程创建、检查、构建、签名、安装、启动、日志读取和结果验证接成本地工具链,让 AI 不只是生成代码,还要用本机环境证明结果;自进化行为受审批、预算、canary 和回滚约束。它不是 DevEco Studio 的替代品,而是开发智能体和鸿蒙工具链之间的验证层。本文只展开其中一环:TUI 原生选择复制。 仓库:github.com/swsgbl/hmha…
终端 AI 工具最容易暴露问题的地方,往往不是模型能力,而是那些看起来很小的交互细节:想划选一段命令复制出来,鼠标却先被 TUI 抢走了;想用滚轮翻列表,又担心为了滚轮开启全局鼠标跟踪。对每天在终端里工作的人来说,这不是审美问题,是效率问题。
hmharness 的 TUI 最终选择是:不开启全局鼠标捕获,把选择和复制还给终端;滚轮通过 ?1007 alternate scroll 转成上下键;选择器保持键盘操作;无法完全排除的杂散 SGR 鼠标报文直接吞掉。