Commit graph

48 commits

Author SHA1 Message Date
Dusk
488bd3d91f feat(deck): add folder-level deck mode overrides
在 include 模式下允许选中文件夹改用与全局 folderDeckMode 相反的映射规则

Add include-scope folder overrides that apply the opposite global folderDeckMode mapping

取消勾选文件夹时会清理该路径及其子树的覆盖记录,并把规则接入设置页与 deck fingerprint

Clears override records for deselected folders and descendants, and wires the rules into the settings UI and deck fingerprint
2026-04-30 19:18:15 +08:00
Dusk
3e5ce2c1d2 chore(release): bump plugin version to 1.0.1
中文: 将插件版本升至 1.0.1,恢复使用 Obsidian getLanguage() 作为语言来源,并把最低 Obsidian 版本同步提高到 1.8.7。

English: Bumps the plugin to 1.0.1, restores Obsidian getLanguage() as the locale source, and aligns the minimum Obsidian version with API usage.
2026-04-30 10:37:37 +08:00
Dusk
7a73d1cda8 chore(release): prepare Obsidian community submission
中文: 完善上架材料并清理公开仓库中的本地路径配置,同时保持构建产物同步安全。

English: Prepares release materials and cleans local path configuration while preserving safe build artifact sync.
2026-04-29 20:17:40 +08:00
Dusk
5c1bf809b2 fix(cloze): rebuild notes when cloze numbers shrink
在挖空数量减少时重新构建笔记,以确保 Anki 中的卡片正确更新。

Rebuild notes when cloze numbers shrink to ensure Anki cards are updated correctly.
2026-04-28 00:03:27 +08:00
Dusk
4ad25b28a7 feat(cloze): add all-cloze card variant
中文: 新增填空题(全部挖空)变种,支持 #anki-cloze-all 并复用现有填空题模板与主字段。

English: Adds an all-cloze variant using #anki-cloze-all while reusing the existing Cloze note type and main field mapping.
2026-04-27 23:04:16 +08:00
Dusk
b77d4b6332 chore(qa-group): remove managed model remnants
中文: 删除托管 QA Group 12 死代码,统一保留用户自选笔记模板与字段映射路径。

English: Removes dead managed QA Group 12 code and keeps user-selected note templates and field mappings as the active path.
2026-04-27 22:03:52 +08:00
Dusk
98d64dac21 fix(release): clean remaining pre-release state issues
中文: 修复 pendingWriteBack 持久化加载,丢弃旧 Semantic QA 状态,并修正发布链接与多级列表问答文案。

English: Preserves pendingWriteBack state loading, drops old Semantic QA state, and fixes release links and QA Group wording.
2026-04-27 21:11:48 +08:00
Dusk
a9033664b8 Finalize pre-release cleanup 2026-04-27 19:54:49 +08:00
Dusk
771cf9c0cb docs(audit): review plugin improvement opportunities
中文: 基于真实代码审查整理插件可完善方向、风险点和后续开发优先级。

English: Reviews plugin improvement opportunities, risks, and prioritized next steps based on real code inspection.
2026-04-26 23:16:19 +08:00
Dusk
31cde1c88a Style settings page buttons and toggles using Obsidian theme colors
Scope styling to plugin settings page. Use Obsidian theme colors for buttons and toggles to ensure visual consistency.

在插件设置页面应用内容样式,使用 Obsidian 主题颜色。
将样式作用域限定在插件设置页面,并使用 Obsidian 主题色适配按钮和开关,确保视觉效果统一。
2026-04-26 17:56:42 +08:00
Dusk
8357992ee3 feat(sync): refine QA mappings and cloze output
中文: 优化问答题多级列表字段映射与解析,移除填空题兼容性误判,并调整填空题正文分隔符和设置页展示。

English: Refine QA group field mapping and parser behavior, remove stale cloze compatibility assumptions, and update cloze body separator plus settings UI copy.
2026-04-26 16:55:31 +08:00
Dusk
911949bedc fix(sync): make saved field mappings authoritative
中文: 统一已保存字段映射为同步权威来源,移除填空题对 isCloze 与命名猜测的阻断,并让多级列表问答按已保存 titleField 与 slots 同步。

English: Makes saved field mappings the sync authority, removes cloze blocking based on isCloze and name heuristics, and syncs QA Group cards with saved title and slot mappings.
2026-04-26 11:47:11 +08:00
Dusk
271253c484 fix(settings): regroup card deck settings
中文: 重组卡片牌组设置分组,统一中文牌组文案,并将文件夹及文件名映射设为默认牌组模式。

English: Regroups card deck settings, normalizes Chinese deck copy, and makes folder-and-file mapping the default deck mode.
2026-04-26 09:35:19 +08:00
Dusk
23b9b83527 fix(settings): refine plugin run scope tree UI
中文: 将范围设置统一为插件运行范围,并把文件夹选择区调整为对齐稳定的 Finder 式树形 UI。

English: Renames the scope settings to plugin run scope and refines the folder selector into a stable Finder-style tree UI.
2026-04-26 08:50:51 +08:00
Dusk
60ef462ad1 feat: 调整正文同步分组顺序并将中文 Cloze 改为填空题 / reorder sync-content sections and rename Chinese Cloze copy to 填空题 2026-04-26 00:20:01 +08:00
Dusk
b6e59c8eec feat: 默认折叠设置卡片并迁移 cloze 默认识别 / collapse settings cards and migrate default cloze recognition 2026-04-25 23:16:40 +08:00
Dusk
0955ba952d fix: fixed opaque sticky gap; replaced transparent margin with page header padding; card headers dock below measured page header height; 8px gap is now part of the opaque page header background
修复不透明粘性间隙;
使用页面标题内边距(padding)替换透明外边距(margin);
卡片标题现在停靠在已测量页面标题高度下方;
8px 间隙现在是不透明页面标题背景的一部分。
2026-04-25 22:38:08 +08:00
Dusk
cdfbf2d12c fixed sticky spacing / 修复粘性间距
added a shared sticky gap variable / 添加了共享的粘性间距变量
card headers dock below the page header with a stable 8px gap before and after scrolling / 卡片标题停靠在页面标题下方,滚动前后均保持稳定的 8px 间距
2026-04-25 22:30:19 +08:00
Dusk
c1dbddd9c0 docs: add sticky overlap fix and header docking documentation
docs:添加吸顶重叠修复和页头停靠文档
2026-04-25 21:21:33 +08:00
Dusk
33a4d29c4d fix(settings): 固定页面级标题栏 / pin page-level settings header
中文: 将设置页顶部标题改为页面级 sticky 白色标题栏,并取消每个卡片标题的 sticky,修复滚动遮挡、正文重叠和边框异常。

English: Convert the settings page title into a page-level sticky white header and remove sticky behavior from section headers to fix scroll overlap, body occlusion, and border artifacts.
2026-04-25 18:33:58 +08:00
Dusk
e76c107041 feat(settings): 设置页卡片标题 sticky 悬浮 / make settings card headers sticky
中文: 为五个设置页卡片标题按钮增加 CSS sticky 吸附效果,保持原有折叠展开与局部刷新机制,不引入滚动监听。

English: Add CSS-only sticky behavior to all five settings card headers while preserving the existing collapse/expand and local refresh behavior without scroll listeners.
2026-04-25 13:36:07 +08:00
Dusk
ffad94dd18 feat: 优化设置页模板缓存状态 / improve settings template cache status
- 设置页在有缓存时立即显示缓存摘要,并在打开时只做一次轻量 note type freshness 检查
- 手动读取仍负责完整模板与字段刷新,不会在页面打开时读取所有字段
- Add tests and docs for cache summary, stale-cache warning, and failed background checks
2026-04-25 11:18:11 +08:00
Dusk
3136f50624 feat: automatic Anki note type migration during sync
- Support for QA Group and normal cards migration.
- Preservation of noteId and learning history.
- 自动同步过程中的 Anki 笔记类型迁移
- 支持问答组和普通卡片的迁移
- 保留笔记 ID 和学习历史记录
2026-04-25 09:53:30 +08:00
Dusk
3d82d7fb55 feat: QA Group 重构为用户模板驱动并支持自动字段映射 | Refactor QA Group to user-template-driven route with auto field mapping 2026-04-24 23:47:09 +08:00
Dusk
0fdf9c8ef3 重构设置页为五卡片并统一识别配置 / Cardize settings page and unify recognition config
重构设置页采用五个卡片外壳,提升布局稳定性和局部刷新体验;通过 cardTypeConfigs 驱动各卡片的识别配置,并完成初步的功能测试与验证。 / Refactored settings page into five cards for better stability and partial refresh; unified recognition configurations via cardTypeConfigs with initial testing and verification.
2026-04-24 12:12:10 +08:00
Dusk
b82e1dd53d feat: 支持可配置 Obsidian 回链显示名称与位置 / configurable Obsidian backlink label and placement
覆盖普通卡、Cloze、语义 QA 与 QA Group 12,新增回链名称与放置位置设置、渲染位置控制、QA Group 模板漂移更新与 renderConfigHash 失效。

Cover normal cards, cloze, semantic QA, and QA Group 12 with configurable backlink label and placement, placement-aware rendering, QA Group template drift updates, and renderConfigHash invalidation.
2026-04-23 23:08:00 +08:00
Dusk
579899f7c8 feat: sync Obsidian tags and pure tag line cleanup / 功能:同步 Obsidian 标签并清理纯标签行
EN: Implement one-way Obsidian to Anki tag sync, nested tag normalization, pure tag-line body cleanup, and QA Group coverage.\nZH: 实现 Obsidian 到 Anki 的单向标签覆盖、嵌套标签规范化、正文纯标签行清理,并补齐 QA Group 覆盖。
2026-04-23 16:43:06 +08:00
Dusk
4052eff0e7 feat: 新增 cardAnswerCutoffMode 卡片正文截止模式,支持 heading-block / double-blank-lines,并统一 marker/GI 写回归整规则
feat: add cardAnswerCutoffMode with heading-block / double-blank-lines and unify marker/GI writeback normalization.
2026-04-23 10:16:41 +08:00
Dusk
67854cf154 feat: implement full bilingual i18n and structured error rendering
- 新增完整双语 i18n 支持,支持按 Obsidian 语言自动切换
- 实现结构化 warning / user error 渲染
- Added full bilingual i18n support with automatic switching based on Obsidian language settings
- Implemented structured warning and user error rendering
2026-04-21 13:34:27 +08:00
Dusk
a3c540a493 fix: clear current-file synced cards for semantic QA and QA groups / 修复当前文件清空已同步卡片覆盖 semantic QA 与 QA Group 2026-04-21 11:56:29 +08:00
Dusk
fbb289850a 清理 legacy sync 链与旧 syncRegistry 残留,保留 current manual-sync 主链 / Remove legacy sync chain and old syncRegistry remnants while preserving the current manual-sync path
删除已失效的 legacy sync use case、syncRegistry 持久化与旧 card pipeline,运行入口保持 ManualSyncService 主链。

Remove the obsolete legacy sync use cases, syncRegistry persistence, and old card pipeline while keeping the runtime on ManualSyncService.
2026-04-21 11:23:27 +08:00
Dusk
bbe1eece12 QA Group 模型同步修复 / Fix QA Group model sync
- 修复 QA Group model 管理的 AnkiConnect payload 契约,模板与样式更新改为嵌套 model payload
- 修复 QA Group model 自检与更新链路,补充带 action/model 上下文的错误信息与回归测试
- 解耦 QA Group 与旧 semantic-qa mapping 路径,设置页移除保留 model 的旧映射入口并增加只读状态说明
- Fix the AnkiConnect payload contract for QA Group model management by using nested model payloads for template and styling updates
- Repair the QA Group model ensure/update flow with action/model-aware errors and regression tests
- Decouple QA Group from the legacy semantic-qa mapping path by removing the reserved model from old mapping controls and adding read-only status guidance
2026-04-20 15:20:20 +08:00
Dusk
4845c721d5 feat: add #anki-list QA Group 12 route / 新增 #anki-list QA Group 12 路线
Add a parallel QA Group 12 sync path with GI writeback, fixed model management, and GroupId recovery semantics.

新增并行 QA Group 12 同步路径,支持 GI 写回、固定模型管理,以及基于 GroupId 的恢复语义。
2026-04-20 13:42:30 +08:00
Dusk
b1b2051502 feat: add semantic QA list splitting / 支持语义 QA 列表拆卡 2026-04-19 22:00:36 +08:00
Dusk
e2f973dc46 refactor: 切换 manual-sync 主链到 ID noteId / refactor manual-sync mainline to ID noteId
- 将 marker、state、writeback 的 durable identity 改为 noteId
- Switch marker, state, and writeback durable identity to noteId

- 支持满足标题规则的旧 ID 卡片重接进并按当前 renderer 重渲染
- Reconnect legacy ID cards that match heading rules and rerender them with the current renderer

- 补充 schema migration、测试、构建验证与插件同步
- Add schema migration, tests, build verification, and plugin sync
2026-04-19 11:46:37 +08:00
Dusk
d4d73487a0 fix(deck-cleanup): detect empty decks correctly and improve selection modal
中文: 修复空牌组清理时错误读取 Anki deck 统计的问题,改为按真实返回结构识别空牌组;同时增强清理弹窗,新增全选、全部不选、反选、已选计数和删除按钮禁用逻辑。

English: Fix empty-deck cleanup by matching Anki deck stats from the real response shape, and improve the cleanup modal with select all, clear all, invert selection, selection counts, and disabled delete when nothing is selected.
2026-04-19 00:03:07 +08:00
Dusk
1682ce5fa0 fix(sync): fix deck stats structure, empty deck identification, and test false positives
修复了 deck stats 返回结构读取错误、修复了空牌组候选识别错误、修复了对应测试的假阳性问题。
2026-04-18 22:53:17 +08:00
Dusk
a5056dd71c fix: prevent treating unknown deck stats as cleanup candidates | 修复:防止把未知 deck 统计当成空牌组 cleanup candidates
English: Ensure that decks with unknown statistics are not incorrectly treated as empty candidates for cleanup.
中文:确保统计信息未知的牌组不会被错误地视为待清理的空牌组。
2026-04-18 22:37:08 +08:00
Dusk
412fddebc1 feat(management): add commands to clear synced cards and cleanup empty decks | 新增清空已同步卡片与清理空牌组管理命令
Introduced two new management commands: 'Clear currently synced cards' to reset sync state for the current file, and 'Cleanup empty decks' to remove unused decks from Anki. Both commands improve plugin maintenance and synchronization flow.

新增两个管理命令:'清空当前文件已同步卡片'用于重置当前文件的同步状态,'清理空牌组'用于从 Anki 中移除未使用的牌组。这两个命令改进了插件的维护和同步流程。
2026-04-18 22:21:10 +08:00
Dusk
bd149b9d11 fix(deck): migrate existing cards when deck rules change 2026-04-18 21:39:15 +08:00
Dusk
960b87103d feat(deck): add configurable deck resolution modes
中文: 新增 deck 模式选择、文件级 deck 解析、文件夹映射、模板插入与 warning 汇总

English: Add deck mode selection, file-level deck parsing, folder mapping, template insertion, and warning aggregation
2026-04-18 20:14:29 +08:00
Dusk
cb968b1d17 feat: redesign folder scope settings 2026-04-18 13:42:01 +08:00
Dusk
a0ac404712 fix: tighten module 3 indexing identity and caching 2026-04-18 10:20:16 +08:00
Dusk
d3d356fb10 feat: implement module 3 manual sync architecture 2026-04-18 10:07:49 +08:00
Dusk
63aaf5f438 fix: stabilize batch AHS writeback 2026-04-18 08:16:30 +08:00
Dusk
7c2c6776bd feat: Module2 — AHS 写回与相关测试 2026-04-18 00:08:46 +08:00
Dusk
5099b39d3f chore: commit Module 1 changes — add NoteFieldMapping, mapping service, persistence, tests 2026-04-16 23:02:07 +08:00
Dusk
f854a3b581 chore: rebuild dist and sync 2026-04-16 18:02:02 +08:00