feat(linux): 选区读取集成进 fcitx5 插件(clipboard addon),删除外部工具依赖 - #961
Merged
H-Chris233 merged 4 commits intoAug 19, 2026
Conversation
aeoform
force-pushed
the
feat/linux-selection-fcitx-clipboard
branch
from
August 17, 2026 04:44
6d82220 to
56da02a
Compare
- openless 插件新增 GetSelectionText DBus 方法:直读 fcitx clipboard addon 的 PRIMARY 选区缓存(X11 XFIXES / Wayland data-control 统一维护),与 fcitx 剪贴板模块来源一致,不触碰用户剪贴板 - CMake 增加 Fcitx5::Module::Clipboard 依赖 - Rust 侧 selection 改走插件 GetSelectionText,删除 wl-paste/xclip/xsel 外部工具路径及 linux_selection_tools_missing 提醒机制(前端 selection_warning 状态机、i18n、测试一并删除) - acceptQaSessionEvent 的 idle 分支不再依赖 selection_warning 字段, 一律视为新会话 token(事件保序,语义等价) - 打字提问路径(QA 面板 / less-computer)不再 emit Polishing capsule: 回答在面板内可见,避免 Linux 输入法 auxDown 闪「✨ 润色中...」 (cherry picked from commit 384f8876a490cb3e8e992af05cdad33f2af6a8ec)
(cherry picked from commit 7e8bf825c08f5e935c7a25746c121136d92b7926)
(cherry picked from commit d13403343b08fe1b4070e0f0d2f219a0a69d363e)
aeoform
force-pushed
the
feat/linux-selection-fcitx-clipboard
branch
3 times, most recently
from
August 19, 2026 03:57
2d646a6 to
7161114
Compare
- capsule 反馈参数从裸 bool 改为具名枚举 CapsuleFeedback(Show/Hide): 语音/听写路径 Show、打字路径 Hide,调用点自文档化,避免将来误传 - AppImage 插件子路径提取为 APPIMAGE_PLUGIN_SUBDIR 常量并注明与 CI bundle.resources 的契约,避免三处硬编码静默失配 - selection.rs 移除文件级 Linux 大赦(lib.rs 的 crate 级兜底仍在), Duration import 按平台限定,消除 Linux unused 隐患
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Linux 划词追问此前依赖外部工具(wl-paste / xclip / xsel)读取 PRIMARY selection,未安装时功能不可用,且与 fcitx 剪贴板模块的选区来源不一致。
改动
fcitx5 插件(openless.cpp)
GetSelectionText():直接读 fcitx clipboard addon 的 PRIMARY 选区缓存Fcitx5::Module::Clipboard依赖Rust 侧
selection.rsLinux 分支改走插件GetSelectionText(DBus 带超时,失败自动视为无选区)linux_selection_tools_missing提醒机制selection_warning状态机、i18n 文案、相关测试一并删除acceptQaSessionEventidle 分支不再依赖selection_warning字段,一律视为新会话 token(事件保序,与旧语义等价)顺带修复
验证