e56bfabdf2 feat(server,ui-html): AI 联想候选徽标支持切换 🤖 / 🐳 (#948)
* feat(server,ui-html): AI 联想候选徽标支持切换 🤖 / 🐳

AI 联想候选的来源角标此前硬编码为 🤖,用户无法更改。按固定排位徽标
(#463)的既有做法把它做成可配置项 appearance.candidate_ai_badge_style,
取值 "robot"(🤖,出厂默认)或 "whale"(🐳)。

- 默认值保持 🤖 不变,升级不改变默认观感
- 与固定排位徽标一致,配置里存枚举名而不是字面 emoji,TOML/日志/diff
  里不出现图形字符;新增样式只改白名单与展示层映射
- 非法取值一律回退到出厂 🤖,手改 TOML 写错不会让 AI 候选失去来源标识
- 展示层新增纯函数 AiSuggestionBadge(style),沿用既有 badge 字段通道,
  D2D 与 WebView2 两个后端同时生效,不新增渲染路径
- 配置改动经既有 ConfigChanged → WM_APPLY_IME_CONFIG 链路即时生效,
  无需重启输入法进程
- 出厂模板 config.default.toml 与开发配置 config.toml 同步补齐,
  避免升级时用户选择被 MergeConfigIntoTemplate 静默丢弃

验证:
- server/tests/portable(Linux,g++,无 vcpkg):57 test(s), 0 failure(s)
- ui-html settings:vitest 167 passed,tsc --noEmit 通过,vite build 通过
- clang-format 18.1.8 --dry-run --Werror --style=file:改动文件全部通过
- scripts/ci/check-developer-paths.sh 通过;sync-contracts.py --check 通过

* fix(server): 补齐 IsValidCandidateAiBadgeStyle 的跨编译单元声明

ime_config_appearance.cpp 是独立编译单元,无法看到定义在 ime_config.cpp
里的 IsValidCandidateAiBadgeStyle,MSVC 报 C3861。补上 ime_config_internal.h
里的声明——IsValidCandidateFixedBadgeStyle 等同类校验函数都声明在那里。

* refactor(server,ui-html): AI 徽标样式改为单一映射表并精简测试

- AiSuggestionBadgeGlyph 作为样式到字形的唯一映射,配置层白名单
  IsValidCandidateAiBadgeStyle 直接查它,新增样式不会两边漂移
- 测试去掉与首条断言重复的一行和恒真的 cloud 断言,改为检查映射表
  对已知/未知样式的判定
- 设置页描述写明两种样式对应的 emoji

---------

Co-authored-by: Caiyi Liao <216114941+cxk1993@users.noreply.github.com>
Co-authored-by: fanlusky <1730976608@qq.com>
2026-10-15 02:44:27 +08:00
2026-09-09 04:05:24 +09:00
2025-11-10 21:10:23 +08:00

Metasequoia IME for Windows

中文 README · Website · Docs · Privacy · Code signing policy

CI CodeQL Release Downloads License Stars

A free and open-source Chinese and Japanese input method for Windows 10 and 11, built on TSF with no legacy IMM32 path.

This repository is the whole Windows product: the TSF text service DLL, the resident server, the conversion engine, a self-written native GUI framework, the HTML surfaces and the installer. The engine was imported from MSIME-Engine and specialized for Windows; it now lives in engine/ as a first-party component, so a plain clone builds the product. See engine/UPSTREAM.md.

This is a public beta. Expect rough edges and read the release notes before upgrading.

Install

Download the installer from Releases or the download page, run it, then switch with Win + Space.

Current builds are not code signed. SmartScreen will block them and uiAccess is unavailable, which means the candidate window cannot float above elevated applications. Verify the download with the SHA256 published on the download page.

You need the Microsoft Visual C++ 2015–2022 Redistributable (x64). The server and settings app are 64-bit; the x86 redistributable is a separate package and does not substitute for it. If you cannot switch to the IME, the server keeps exiting, or the settings window closes immediately, install that first.

What it does

  • Chinese input: full pinyin, double pinyin (Xiaohe / Ziranma / Shoudao / Microsoft / Sogou / Ziguang / Zhineng ABC / Guobiao / Pinyin Jiajia), Wubi 86
  • Japanese input: romaji, with hiragana, katakana and dictionary candidates; also available as a temporary mode from Chinese
  • Helpcode (形码) filtering on pinyin schemes: six tables, single- and double-code
  • Optional cloud candidates, and AI suggestions via DeepSeek / OpenAI / SiliconFlow / Groq
  • English-Chinese glosses in the vertical candidate window
  • Mixed Chinese-English input, emoji and kaomoji, a dedicated English candidate mode
  • Local input statistics (off by default): character counts and active time stay on this machine; view and clean them under Settings → Statistics
  • Voice input with streaming recognition and optional cleanup
  • Handwriting, on-screen keyboard, floating toolbar, clipboard history
  • User dictionary management, candidate frequency tuning, skins with light and dark variants

Privacy

An input method sees every keystroke, so the boundaries are stated explicitly in PRIVACY.md: which features reach the network, what each one sends, what the defaults are, and how to turn each off.

Two things worth knowing up front. Cloud candidates are on by default — the composition spelling goes to Google's input-tools service, and it is the only network feature that works without you supplying a credential. API tokens are stored in plain text in config.toml, unlike macOS and Linux which use the Keychain and Secret Service.

There is no telemetry, analytics or crash reporting of any kind.

Building and contributing

CONTRIBUTING.md has the environment, the build order and what to run before opening a pull request. Contributions do not have to be code — dictionary entries, documentation, icons and compatibility testing all count, and the recruiting page lists them by area.

Note that most issues, documentation and code comments are in Chinese. English pull requests and issues are welcome.

Code signing policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

What is signed, who the committers, reviewers and approvers are, the build and release process and the current status are in the code signing policy. The privacy policy is PRIVACY.md.

Licence

GPL-3.0. See LICENSE and THIRD_PARTY_NOTICES.txt.

S
Description
水杉输入法 Windows 产品:TSF、Server、GUI、设置页与安装器。内测:tg: https://t.me/msimegroup QQ Group: 829919142
https://msime.app
Readme GPL-3.0
24 MiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 93.5%
Python 2.4%
PowerShell 2%
CMake 0.9%
Inno Setup 0.7%
Other 0.5%