Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
- **P0 · 立即(验证不开发)**:练习页 VoiceOver 实机走查、安装器三条新分支的回归测试、离线回归编译共享缓存、
pro 升级与实键入、IT-22 清单按 1.2.1 复跑。除非抓出缺陷,否则并进 1.3.0 的 B0,不单出 1.2.2。
- **P1-U · 输入体验与学练闭环(ADR-324,2026-11-12 已采纳)**:15 项分三档(拼音可主用、日常输入细节、扩展词库、学练闭环);
方向已批准,每项开工前仍各写落地 ADR / 任务卡。**第一档 U1-1…U1-5 代码已完成(ADR-325…329),未换包、待装机复验**;下一步第二档。
方向已批准,每项开工前仍各写落地 ADR / 任务卡。**ADR-325…336 共 12 项代码已完成并(前两档)合入 main,全部未换包、待装机复验**;剩余 8 项待用户定口径/授权,见积压文档 P1-U 末尾的表。
- **P1 · 1.3.0**:三级简码专项(需引擎 + ADR)、corpus M2-1 调研 → N1 字根字形库 → N2/N3/N4、拆字说明扩充、多方案码表、客户端自动回读缺口。
- **P2 · 有证据才做**:排序观察期、位置记忆、冷首键、拼音后端评估、n-gram(均写触发条件)。
- **明确不做**:云/账号/广告/统计/剪贴板/语音;平台扩展单独立项,不与 macOS 同批。
Expand Down Expand Up @@ -117,6 +117,7 @@ make macos-offline-tests

## 9. 会话日志(最近)

- 2026-11-12 / Claude Code(air):**P1-U 第三批(ADR-333…336)+ 前两档已合入 main**。PR [#269](https://github.com/EasyIndie/EasyInputMethod/pull/269)(第一档)与 [#270](https://github.com/EasyIndie/EasyInputMethod/pull/270)(第二档)均已用合并提交并入(`c882c06`、`2f8ee06`),**下面一条日志里「第二档未推送」已过时**。第三批:按应用记住中英状态(仅内存)、练习「词组」题型(随包码表前 800 词)、薄弱字清单(`practice.collect_weak_chars` 默认关,`weak-chars.tsv`)、小鹤双拼(`pinyin.scheme`,仅拼音模式;425 个音节 419 个可达)。Schema 27→30。四道检查全绿、评测 98.2%/86.4% 与基线一致。**三批改动全部未装机**,复验清单见 `docs/待办与积压.md` P1-U;P1-U 剩余 8 项都需用户先定口径或授权取数据(同处有表)。仓库已开启 auto-merge。
- 2026-11-12 / Claude Code(air):**P1-U 第二档可直接做的部分完成(ADR-330…332)**。U2-1 拼音分段选词(`Candidate.consumed`、`Session::preedit`、`IME_SELECT_PARTIAL`,整句学成用户拼音词);U2-4 混输下拼音上屏后提示五笔码(`candidate.hint_wubi_code`,Schema 26→27);U2-5 练习新增「字根」题型并排最前。第一档 PR [#269](https://github.com/EasyIndie/EasyInputMethod/pull/269) 已开(首跑 `macos` 红:预览冒烟写死设置项 23 → `7e37dba` 修)。**第二档提交只在本地 `dev`,未推送**——同一个 `dev → main` 只能有一个 PR,要等 #269 合并后再推并开第二档 PR。四道检查全绿(`make verify`、离线 62/328、预览冒烟、`build.sh --strict`),**均未装机**。教训:离线回归不含预览冒烟与宿主编译,改设置项数量或 `InputController.swift` 后必须另跑这两项。剩余 U2-2 五笔造词 / U2-3 扩展词库 / U2-5 分阶段与跟打都需用户先定口径。
- 2026-11-12 / Claude Code(air):**P1-U 第一档全部完成(ADR-326…329)**。U1-2 拼音没打完给补全(`nih`→你好,补全不拦五笔自动上屏,评测与基线一致 98.2%/86.4%);U1-3 `;`/`'` 选二三候选、`[`/`]` 以词定字(两个开关默认开,Schema 24→26);U1-5 练习按错题加权出题(文件格式不变);U1-4 安装完成页加上手提示(窗口高 300→340,**版式未目视确认**)。`dev` 领先 `main` 7 个提交(`df2019c`…),`make verify` PASS、离线 62 文件 / 328 例 PASS。**未推送、未开 PR、未换包;六项行为都待装机实键复验**(清单见 `docs/待办与积压.md` P1-U 末尾)。下一步:第二档 U2-1 → U2-4 → U2-2。
- 2026-11-12 / Claude Code(air):**U1-1 数字后标点(ADR-325)代码完成**。组合外数字后紧跟的 `.` / `:` 保持半角(`3.14`、`12:30`),新增 `input.digit_punctuation`(默认开,Schema 23→24);核心单测覆盖开/关、全角、标记消耗、选词数字。`make verify` PASS、离线 62 文件 / 328 例 PASS。**未提交、未换包;装机实键待复验。** 已知限制:数字后用方向键/鼠标移光标不消耗标记。
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

> 一款**跨平台、开源可审计、默认离线**的中文输入法:核心输入 + 本地「学·练·用」闭环(ADR-324)。
>
> **状态:macOS 首版已冻结为 1.0.0(build 34),四道门禁只剩 IT-23 五工作日试用在记(见 [HANDOFF](HANDOFF.md) 与 [ROADMAP](ROADMAP.md))。** 试用结束后打 `v1.0.0` 标签发布;下一步计划见 [MVP后执行计划](docs/MVP后执行计划.md)。日常隔离调试运行 `make macos-dev`。
> **状态:macOS 线上版本为 1.2.1(build 40);`main` 上已合入 1.2.1 之后的输入体验与学练改进(ADR-324…336),尚未发版。** 当前状态见 [HANDOFF](HANDOFF.md),待办见 [待办与积压](docs/待办与积压.md)。日常隔离调试运行 `make macos-dev`。

## 这是什么

Expand Down
1 change: 1 addition & 0 deletions crates/ime-cli/examples/compose_bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fn build(data_dir: &str) -> Session {
auto_commit: false,
fuzzy: false,
z_wildcard: false,
double_pinyin: false,
});
session.set_wubi_engine(Box::new(CodeTableEngine::new(wubi, 4)));
session.set_pinyin_engine(Box::new(PinyinEngine::new(Box::new(pinyin), 32)));
Expand Down
1 change: 1 addition & 0 deletions crates/ime-cli/examples/input_quality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ fn main() -> Result<(), Box<dyn Error>> {
auto_commit: false,
fuzzy: true,
z_wildcard: false,
double_pinyin: false,
});
eprintln!("load_ms={:.3}", start.elapsed().as_secs_f64() * 1000.0);
// Measure resident memory before allocating full reference dictionaries.
Expand Down
1 change: 1 addition & 0 deletions crates/ime-cli/tests/core_vocabulary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fn common_input_terms_are_reachable_and_submit_the_displayed_candidate() {
auto_commit: false,
fuzzy: true,
z_wildcard: false,
double_pinyin: false,
});
for mode in [InputMode::WubiOnly, InputMode::PinyinOnly, InputMode::Mixed] {
session.set_mode(mode);
Expand Down
5 changes: 4 additions & 1 deletion crates/ime-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ mod tests {

#[test]
fn schema_is_single_source_and_matches_v1() {
assert_eq!(schema().len(), 27);
assert_eq!(schema().len(), 30);
let keys: Vec<&str> = schema().iter().map(|s| s.key).collect();
assert_eq!(
keys,
Expand All @@ -875,12 +875,14 @@ mod tests {
"wubi.auto_commit",
"wubi.z_key",
"pinyin.fuzzy",
"pinyin.scheme",
"candidate.count",
"candidate.page_with_comma",
"candidate.select_with_semicolon",
"candidate.pick_char_with_brackets",
"candidate.show_wubi_learning",
"candidate.hint_wubi_code",
"practice.collect_weak_chars",
"appearance.theme",
"hotkey.toggle_wubi_learning",
"hotkey.toggle_mode",
Expand All @@ -896,6 +898,7 @@ mod tests {
"input.full_width",
"input.chinese_variant",
"input.digit_punctuation",
"input.remember_english_per_app",
"update.feed_url",
"update.feed_mirrors",
]
Expand Down
29 changes: 29 additions & 0 deletions crates/ime-config/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ pub static SCHEMA: &[OptionSpec] = &[
doc_zh: "支持 zh/z、ch/c、sh/s、n/l 的基础模糊音",
scope: Scope::Engine,
},
OptionSpec {
key: "pinyin.scheme",
value_type: ValueType::Enum {
values: &["full", "xiaohe"],
},
enum_labels_zh: &["全拼", "小鹤双拼"],
default: "\"full\"",
title_zh: "拼音方案",
doc_zh: "全拼,或小鹤双拼(两键一个音节);双拼只在「拼音」模式下生效,混输模式仍按全拼兜底",
scope: Scope::Engine,
},
OptionSpec {
key: "candidate.count",
value_type: ValueType::Int { min: 3, max: 9 },
Expand Down Expand Up @@ -144,6 +155,15 @@ pub static SCHEMA: &[OptionSpec] = &[
doc_zh: "混输模式下用拼音打出字词后,在光标旁短暂提示它的五笔码,帮助下次直接用五笔",
scope: Scope::CandidateWindow,
},
OptionSpec {
key: "practice.collect_weak_chars",
value_type: ValueType::Bool,
enum_labels_zh: &[],
default: "false",
title_zh: "记录薄弱字用于练习",
doc_zh: "混输模式下把靠拼音打出的单字记到本机 weak-chars.tsv,练习「完整码」时多出这些字;不上传、不影响候选排序,重置练习进度时一并清空",
scope: Scope::CandidateWindow,
},
OptionSpec {
key: "appearance.theme",
value_type: ValueType::Enum {
Expand Down Expand Up @@ -287,6 +307,15 @@ pub static SCHEMA: &[OptionSpec] = &[
doc_zh: "数字后紧跟的 . 和 : 不转成中文标点,便于输入小数、版本号与时间(如 3.14、12:30)",
scope: Scope::Engine,
},
OptionSpec {
key: "input.remember_english_per_app",
value_type: ValueType::Bool,
enum_labels_zh: &[],
default: "true",
title_zh: "按应用记住中英状态",
doc_zh: "在某个应用里切到英文后,回到该应用时保持英文;只记在内存里,退出输入法即清空",
scope: Scope::Engine,
},
OptionSpec {
key: "update.feed_url",
value_type: ValueType::Url,
Expand Down
3 changes: 3 additions & 0 deletions crates/ime-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ pub struct EngineOptions {
pub auto_commit: bool,
pub z_wildcard: bool,
pub fuzzy: bool,
/// Interpret pinyin input as double pinyin (two keys per syllable, ADR-336).
pub double_pinyin: bool,
}

pub trait Engine: Send {
Expand Down Expand Up @@ -1148,6 +1150,7 @@ mod tests {
auto_commit: false,
z_wildcard: true,
fuzzy: false,
double_pinyin: false,
};
for session in [&mut first, &mut second] {
session.set_pinyin_engine(Box::new(ChangingEngine(false)));
Expand Down
2 changes: 1 addition & 1 deletion crates/ime-ffi/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ mod tests {
#[test]
fn schema_layout_matches_v1() {
let layout = build_schema();
assert_eq!(layout.view.len, 27);
assert_eq!(layout.view.len, 30);
let first = layout._options[0];
// SAFETY:指针由 build_schema 的 CString/Vec 持有,测试期间有效。
unsafe {
Expand Down
1 change: 1 addition & 0 deletions crates/ime-ffi/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ mod tests {
fuzzy: true,
auto_commit: true,
z_wildcard: false,
double_pinyin: false,
});
assert!(!fuzzy.convert("zong", 9).candidates.is_empty());
assert!(exact.convert("zong", 9).candidates.is_empty());
Expand Down
3 changes: 3 additions & 0 deletions crates/ime-ffi/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,9 @@ pub extern "C" fn ime_session_configure(session: *mut ImeSession) -> i32 {
auto_commit: boolean("wubi.auto_commit"),
fuzzy: boolean("pinyin.fuzzy"),
z_wildcard: cfg.get("wubi.z_key").and_then(|v| v.as_str()) == Some("wildcard"),
// 双拼键与五笔码无法共存:只在纯拼音模式下启用(ADR-336)。
double_pinyin: s.session.mode() == InputMode::PinyinOnly
&& cfg.get("pinyin.scheme").and_then(|v| v.as_str()) == Some("xiaohe"),
});
let traditional =
cfg.get("input.chinese_variant").and_then(|v| v.as_str()) == Some("traditional");
Expand Down
Loading
Loading