feat(linux): fcitx5 候选框听写状态提示 + AppImage 插件自动安装 + 热键启动容错#520
Conversation
- fcitx5 插件新增 SetAuxDown/ClearAuxDown DBus 接口,在候选词列表下方 显示听写状态文字(收音中→识别中→润色中→已插入),切窗口自动跟随焦点 - 优先使用当前焦点 IC 展示 auxDown,失焦 IC 降级兜底,避免面板不渲染 - flushUI 排空旧事件后再设 auxDown,防止按键事件竞态覆盖状态文字 - start_dictation_signal_listener 启动时等待 fcitx5 最多 30s,监听 NameOwnerChanged 在 fcitx5 重启后自动重新同步快捷键绑定 - AppImage 打包 libopenless.so 为资源,启动时检测缺失自动安装到 ~/.local/lib/fcitx5/ 和 ~/.local/share/fcitx5/addon/ - Linux 胶囊窗口不在 Wayland/X11 显示,状态完全走 fcitx5 输入面板 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR Reviewer Guide 🔍(Review updated until commit 1b0e41c)Here are some key observations to aid the review process:
|
Linux 已从 NoActivate 列表移除(走 fcitx5 auxDown 状态提示),测试断言 需同步更新为 FallbackShow。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
两个根因: 1. end_time 判断用 is_some() 而非 > 0:API 对 interim 结果设 end_time:0, 导致所有中间结果被当成 final 推入 segments 2. 累积文本拼接:同一句 API 多次发送("你"→"你好"→"你好吗"), 每次作为新 segment push,join 后变成重复拼接 修复: - end_time 改用 > 0 判断真正的句子结束 - 引入 sentence_id → BTreeMap 按序存储,同一 sentence_id 后到覆盖前到 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit 7635df5 |
1. clearAuxDown 找不到 IC 时也会清掉 lastAuxText_,避免 FocusIn 时 重放旧状态(如"已插入"→切窗口→突然显示"已插入") 2. 300ms 延迟重试前检查 LAST_AUX,状态已变则跳过,避免旧文字覆盖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit 7403597 |
1. set_aux_down/clear_aux_down 从 emit_capsule(被 cpal 音频回调调用) 移到独立线程执行,避免同步 DBus I/O 阻塞录音导致卡顿 2. is_plugin_installed_on_disk 同时检查 .so 和 .conf,孤立的 .so 没有 addon 配置 fcitx5 不会加载 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit c4cb3c9 |
1. start_dictation_signal_listener 新增 custom_trigger_key 参数, NameOwnerChanged 和初始同步都通过 resync_main_binding 分支处理 自定义组合键 vs 预设修饰键 2. ensure_plugin_installed 去掉"已安装即跳过"检查,AppImage 每次启动 都覆盖最新 .so + .conf,确保新 DBus 方法不会因旧插件丢失 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
b783115 to
163327e
Compare
|
Persistent review updated to latest commit 163327e |
1 similar comment
|
Persistent review updated to latest commit 163327e |
…ux")] 函数体内引用了 crate::linux_fcitx,非 Linux 平台该模块不存在导致 E0433。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Persistent review updated to latest commit 77455cf |
|
Persistent review updated to latest commit 1b0e41c |
|
在测试里我没发现相关问题 |
User description
概述
Linux 上通过 fcitx5 输入法候选框下方显示听写状态文字,替代 macOS/Windows 的胶囊窗口。同时修复 AppImage 不含 fcitx5 插件、热键启动时序等问题。
改动
fcitx5 插件 (
openless.cpp)SetAuxDown/ClearAuxDownDBus 接口InputContextFocusIn监听:切窗口自动跟随焦点flushUI先排空旧事件再设 auxDown,防止按键竞态覆盖热键启动容错 (
linux_fcitx.rs)start_dictation_signal_listener启动时等待 fcitx5 最多 30sNameOwnerChanged,fcitx5 重启后自动重新同步快捷键AppImage 插件自动安装
libopenless.so打入 AppImage 资源~/.local/lib/fcitx5/和~/.local/share/fcitx5/addon/files映射安装到系统路径其他
coordinator.rs/dictation.rs移除冗余调用,统一文案测试
🤖 Generated with Claude Code
PR Type
Bug fix, Enhancement, Tests
Description
Show Linux status in fcitx5
auxDownAuto-install bundled AppImage plugin
~/.local/Resync hotkeys after fcitx5 restarts
NameOwnerChangedeventsFix duplicate DashScope transcripts
sentence_idend_time: 0Diagram Walkthrough
File Walkthrough
1 files
Deduplicate final ASR segments by sentence3 files
Route Linux status and hotkey syncingAdd auxDown API and restart resyncAdd status text and focus handling1 files
Remove redundant Linux polish status note2 files
Install fcitx5 plugin during startupBundle Linux plugin resource in AppImage