dsh-aha-tutor 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -8,7 +8,7 @@ This file governs the entire `dsh-aha-tutor` repository.
8
8
  - npm package: `dsh-aha-tutor`
9
9
  - DSH plugin rows: `aha-tutor` (the plugin) and `preset-aha-tutor` (the conversation preset), both inserted by `cordis.patch.yml`
10
10
  - Product name: 「开窍 · AI 私人老师」, English "Aha Tutor"; mascot 「小窍」
11
- - RPC channel `/aha-tutor`; HTTP routes `/api/aha-tutor/upload` and `/api/aha-tutor/tts`
11
+ - RPC channel `/aha-tutor`; HTTP routes `/api/aha-tutor/upload`, `/api/aha-tutor/tts` and `/api/aha-tutor/font`
12
12
  - Data directory: `$DSH_HOME/aha-tutor/`; project folders: `~/AhaTutor/projects/`
13
13
 
14
14
  ## Project boundaries
@@ -33,7 +33,7 @@ The plugin runs inside DSH on both systems. Every change must keep working on bo
33
33
  - Write files with `writeFileAtomic` (it retries `EPERM`/`EBUSY` renames that Windows antivirus and indexers cause).
34
34
  - Spawn processes without a shell. The pnpm launcher prefers DSH's own `process.execPath` + `pnpm.mjs`; the Windows fallback `pnpm.cmd` is the only place a shell is allowed.
35
35
  - Text uploads decode as UTF-8 with a GB18030 fallback; normalize `\r\n`.
36
- - UI fonts and voices come from per-OS stacks; never hard-code a single system font or voice name.
36
+ - UI fonts and voices come from per-OS stacks; never hard-code a single system font or voice name. The one exception is the board's handwriting: the bundled LXGW WenKai GB and Caveat subsets in `assets/fonts/` come first, with the per-OS stack as the fallback.
37
37
  - Tests that need links use junctions on Windows. CI runs the tests on Ubuntu, macOS and Windows.
38
38
 
39
39
  ## Security requirements
@@ -49,6 +49,7 @@ The plugin runs inside DSH on both systems. Every change must keep working on bo
49
49
 
50
50
  - Edit `src/`; never hand-edit `lib/`. `lib/` is tracked (`index.js`, `agent.js`, their shared runtime chunk and `client.js`) and must be regenerated with `pnpm run build` after source changes; CI fails when it differs from a fresh build. `lib/client.js.map` is ignored.
51
51
  - `samples/*.aha-course.json` are generated by `node scripts/build-samples.mjs` through the plugin's own normalizers; edit the script, not the JSON.
52
+ - `assets/fonts/*` and `src/core/board-fonts.js` are generated by `python3 -I scripts/build-fonts.py <sources…>` (fonttools and brotli; the script's docstring names the source versions); edit the script, not its output, and keep the fonts' OFL licenses beside them.
52
53
  - User-facing strings live in `src/ui/i18n.js` (zh and en, same keys) and `locale/*.json` (package metadata). `tests/package-contract.test.mjs` checks both languages and that every endpoint the browser calls is routed.
53
54
  - `docs/releases/v<version>.md` holds each version's GitHub Release notes. It is tracked and not packaged.
54
55
  - `.artifacts/` and `node_modules/` are ignored and must never be committed.
@@ -74,7 +75,8 @@ Never reuse, move, delete or overwrite a published npm version or Git tag. If a
74
75
  ## Release cadence
75
76
 
76
77
  - Tags publish straight to npm's `latest`, which the in-plugin update button and DSH's Plugins page install.
77
- - DSH's pnpm holds a version back for 24 hours after it is published. The in-plugin update reports it as pending until then; the Plugins page accepts an exact version (`dsh-aha-tutor@<version>`) earlier. Prefer at least 24 hours between releases so users are not chasing versions they cannot install yet.
78
+ - With DSH's default pnpm settings an exact version installs as soon as it is published: pnpm adds `dsh-aha-tutor@<version>` to the profile's `minimumReleaseAgeExclude` itself. The in-plugin update installs that way, and so does the Plugins page when given `dsh-aha-tutor@<version>`; given only the package name, the Plugins page picks the newest version published at least 24 hours ago. Only a profile that sets `minimumReleaseAge` explicitly holds a new version back, and the in-plugin update then reports it as pending with the time it becomes installable.
79
+ - Releases need no 24-hour spacing. Spacing only protects users of update buttons that bypass the cooldown with `--config.minimumReleaseAge`, and this plugin's button has never done that.
78
80
  - A broken release reaches `latest` at once: deprecate it on npm and publish a fixed patch version.
79
81
 
80
82
  ## First release
package/CHANGELOG.md CHANGED
@@ -2,6 +2,44 @@
2
2
 
3
3
  All notable changes to this plugin are recorded here. Versions follow [SemVer](https://semver.org/); GitHub Release notes for each version live in `docs/releases/`.
4
4
 
5
+ ## 1.3.0 - 2026-10-19
6
+
7
+ ### Added
8
+
9
+ - **Show your working**: a lesson with a calculation or derivation asks once for the whole working, typed with a live math preview. The grader finds the first line that goes wrong, and the teacher corrects it on the board, starting from that line. The correction stays with the lesson and appears in the transcript.
10
+ - **Course size and a visible build**: the questionnaire asks how big the course should be (let the teacher decide, short 3–8, standard 10–20 or full 25–45 lessons). While the blueprint is written you see the steps and the outline growing unit by unit.
11
+ - **Blueprint editing**: split a lesson in two or take it deeper with one click; deleting a unit, a chapter or a started lesson asks first; and **Edit outline** in a course's ⋯ menu reopens the editor after the course has started, with **Ask for one more unit**. Progress on lessons that stay is kept.
12
+ - **Practice**: items can carry a figure (drawn through the SVG allow-list), a round ends with stars, accuracy, the best streak, how each concept moved and one next step, the current streak shows while you answer, and the keyboard works (1–4 to choose, Enter to submit or continue, H for a hint).
13
+ - **Course page**: concepts show five stages (not started, weak, learning, proficient, mastered), and a **Next step** card suggests due reviews first, then the weakest concept, then the next lesson.
14
+
15
+ ### Fixed
16
+
17
+ - **Reasoning models no longer cut lessons and shorts short.** At its default effort a reasoning model (DeepSeek through DSH or a relay, among others) could spend the whole output limit thinking, so a short stopped after two steps ("came back too short") or came back empty (`EMPTY_RESPONSE`). Boards, shorts, re-explanations and quick answers now ask for a low reasoning effort, every call leaves room for its reasoning within the model's limit, and an answer lost to reasoning is retried with more room. Model errors in the classroom and on checks now show in your language.
18
+
19
+ ### Changed
20
+
21
+ - **AI changes to a blueprint are proposals**: the editor lists the lessons added, removed, renamed and changed, and nothing changes until you apply them.
22
+ - Mastery meters stay empty until there is evidence; an untouched concept no longer lights a segment. **Start review** on a course page reviews that course only.
23
+ - Plans and today's list name a course by its emoji and main title (the part before a colon), with the full title on hover.
24
+
25
+ ## 1.2.0 - 2026-10-19
26
+
27
+ ### Added
28
+
29
+ - **Handwriting board font**: the board writes in LXGW WenKai GB (Chinese) and Caveat (Latin), bundled as OFL subsets (GB 2312 and CJK punctuation, about 1.8 MB) and fetched slice by slice through a new `/api/aha-tutor/font` route, with the system stack as the fallback; the slices a board needs are fetched before the pencil reaches them, and exported videos use the same font. Settings → board font switches between handwriting and the app's standard font.
30
+ - **The board follows the narration sentence by sentence**: new lessons tag each board item with the sentence it belongs to, so it is written when that sentence is spoken and highlighted while it is being talked about. Older boards keep their pacing. Exported videos follow the same timing.
31
+ - **Side panel in the classroom**: the lesson's goals with progress (new lessons tag each step with the goal it serves), a transcript of what has been said with your questions and re-explanations (click a line to go back to it), and the ask box. It folds away, and drops below the board on narrow screens.
32
+
33
+ ### Fixed
34
+
35
+ - **Web import** no longer reaches this computer or the local network through other spellings of an address (`localhost.`, `[::ffff:127.0.0.1]`, IPv6 link-local, shared and reserved ranges, `*.internal`) or through a public name that resolves to a private address: every resolved address is checked when the connection is made, each redirect hop is checked again, and the page size is capped while it downloads. Import errors are translated.
36
+ - **Leaving a screen no longer cancels its generation.** Blueprints, course confirmation, lesson boards, practice, cheat sheets and digests keep running in the background and are picked up when you come back; long waits show a cancel button instead. A cancelled job reads as cancelled, not failed.
37
+ - **Long documents are read in full.** A digest reads the whole document part by part and combines the notes (failed parts are retried once, and any still missing are named in the digest with a "Digest again" button); the summary used for course design samples the whole document instead of its first pages.
38
+ - **Captions** show the sentence being spoken, with formulas typeset; narration speaks formulas as readable text instead of raw TeX.
39
+ - **Raised-hand answers and re-explanations** appear on the board while they are written, stay with the lesson (replayed where they were asked when you come back), and show up in the side panel's transcript. The saved position now counts the lesson's own steps.
40
+ - **Confirming a course is quicker**: it prepares the projects and the first unit's practice; a later lecture gets practice for all its lessons when one of them is first opened or practised, with room for every lesson. The blueprint step shows how many lessons have been written so far.
41
+ - **Sample course**: the first lesson of the Bayes sample writes the set {2, 4, 6} as a formula instead of showing stray backslashes.
42
+
5
43
  ## 1.1.0 - 2026-10-19
6
44
 
7
45
  ### Added
package/README.en.md CHANGED
@@ -23,11 +23,11 @@
23
23
 
24
24
  | Feature | What you get |
25
25
  | --- | --- |
26
- | **A course made for you** | Say what you want to learn or drop in a textbook. The tutor first asks a few multiple-choice questions about your background, goal and time, then proposes a unit → chapter → lesson blueprint you can edit by hand or by asking. Confirming generates practice sets and hands-on projects |
27
- | **Handwriting chalkboard lessons** | Narration (voice + captions) while the board fills up with handwritten points, formulas, diagrams, charts and, when it helps, a small animation; pause, rewind and change speed any time |
28
- | **Quick checks that adapt** | At key moments the lesson stops for a question and asks how sure you are. Lucky guesses, hesitation and confident mistakes count differently, and a revisit lesson is added automatically for concepts that did not stick |
26
+ | **A course made for you** | Say what you want to learn or drop in a textbook. The tutor first asks a few multiple-choice questions about your background, goal, time and the course size you want, then writes a unit → chapter → lesson blueprint while you watch. Edit it by hand, have a lesson split or deepened, or ask for changes and review them before they apply; a running course can still grow. Confirming prepares the hands-on projects and the first unit's practice; later lectures get theirs when you reach them |
27
+ | **Handwriting chalkboard lessons** | Narration (voice + captions) while the board fills up in a handwriting font with points, formulas, diagrams, charts and, when it helps, a small animation; each item is written as its sentence is spoken and highlighted while it is discussed, and a side panel shows the lesson's goals and a transcript; pause, rewind and change speed any time |
28
+ | **Quick checks that adapt** | At key moments the lesson stops for a question and asks how sure you are. Lucky guesses, hesitation and confident mistakes count differently; a lesson with a calculation asks you to write out your working and corrects it on the board. A revisit lesson is added automatically for concepts that did not stick |
29
29
  | **Raise your hand, hear it again** | Ask anything mid-lesson and the tutor answers on the board, then picks up where it left off; or have a step re-explained with an analogy, a drawing, an example, more simply or in more depth |
30
- | **Practice, flashcards, reviews** | Every lesson has practice (open answers graded by the model); flashcards and concepts come back on a spaced-repetition schedule, and the study plan leaves time for them |
30
+ | **Practice, flashcards, reviews** | Every lesson has practice, with figures where they help, open answers graded by the model and keyboard answering; a round ends with stars, how your mastery moved and a next step. Flashcards and concepts come back on a spaced-repetition schedule, and the study plan leaves time for them |
31
31
  | **Your materials become courses** | PDF, Word, PowerPoint, Markdown, web links and images (images need a vision model). Lessons and cheat sheets cite pages; long readings can be digested into structure, claims and a glossary |
32
32
  | **Cheat sheets, notes, quizzes** | Printable cheat sheets organized by theme (columns, font size and highlighting adjustable), plus notes, flashcard decks and quizzes |
33
33
  | **Explainer shorts and video export** | A two-minute whiteboard explainer from a topic or a link; any lesson exports to a video with the handwriting, captions and a watermark |
@@ -41,7 +41,7 @@ Two sample courses ship with the plugin (harmonic motion and Bayesian thinking,
41
41
 
42
42
  You need the **DeepSeek Harness** desktop app (0.2.x, from 0.2.1) with at least one working model. See the [DSH instructions](https://github.com/deepseek-ai/deepseek-harness#run) if you do not have it yet.
43
43
 
44
- 1. Open **Plugins** in the desktop app, click **Add plugin** and enter `dsh-aha-tutor` as the package, with the official registry as the source. Within 24 hours of a new release DSH's pnpm holds new versions back; enter an exact version such as `dsh-aha-tutor@1.1.0` then.
44
+ 1. Open **Plugins** in the desktop app, click **Add plugin** and enter `dsh-aha-tutor` as the package, with the official registry as the source. Within 24 hours of a new release DSH's pnpm holds new versions back; enter an exact version such as `dsh-aha-tutor@1.3.0` then.
45
45
  2. **Quit and reopen** the desktop app. Refreshing the page does not load the plugin's host side.
46
46
  3. Open **Aha · AI tutor** in the left sidebar (shown as 「开窍 · AI 私人老师」 in Chinese).
47
47
 
@@ -66,14 +66,14 @@ Only cloud voices can be recorded into exported videos; with a system voice the
66
66
 
67
67
  ## Models
68
68
 
69
- Aha uses your DSH default model. In **Aha → Settings** you can pick separate models for "course design & teaching" and "grading & questions". The plugin never switches to another paid model on its own and never generates in bulk in the background: the course structure is made when you confirm it, and each lesson's board when you open it (plus the next one). Follow the terms of subscription-based models you use.
69
+ Aha uses your DSH default model. In **Aha → Settings** you can pick separate models for "course design & teaching" and "grading & questions". The plugin never switches to another paid model on its own and never generates in bulk in the background: the course structure is made when you confirm it, and each lesson's board when you open it (plus the next one), as is the practice for later lectures. Follow the terms of subscription-based models you use.
70
70
 
71
71
  ## Privacy and data
72
72
 
73
73
  - Courses, progress, materials, profile and plan stay on this computer under `$DSH_HOME/aha-tutor/` (default `~/.dsh/aha-tutor/`, on Windows `C:\Users\<you>\.dsh\aha-tutor\`).
74
74
  - Project folders live under `~/AhaTutor/projects/`; files you changed are never overwritten.
75
75
  - Models receive only what the current task needs: your request, the course outline, relevant passages from your materials and a short learner profile.
76
- - Web import fetches public addresses only, never localhost or private networks.
76
+ - Web import fetches public addresses only, never localhost or private networks; every address a name resolves to is checked again when connecting.
77
77
  - Model-drawn diagrams pass an allow-list sanitizer; animations run in a sandbox without network access.
78
78
 
79
79
  See [SECURITY.md](SECURITY.md).
package/README.md CHANGED
@@ -23,11 +23,11 @@
23
23
 
24
24
  | 能力 | 体验 |
25
25
  | --- | --- |
26
- | **为你定制一门课** | 说一句想学什么,或者丢进一本教材。老师先用几道选择题了解你的基础、目标和时间,再给出「单元 → 章 → 讲」的课程蓝图。你可以直接改,也可以用一句话让它改,确认后生成练习和实战项目 |
27
- | **手写黑板课堂** | 老师一边讲(语音 + 字幕),一边在黑板上逐字写下要点、公式、示意图和图表,需要时还会放一段小动画;随时暂停、回放、变速 |
28
- | **随堂小测与自适应** | 讲到关键处会停下来考你一题,并问你「有多确定」。猜对、犹豫、自信地答错,会被区别对待;学完一讲后,薄弱的知识点会自动加一节巩固课 |
26
+ | **为你定制一门课** | 说一句想学什么,或者丢进一本教材。老师先用几道选择题了解你的基础、目标、时间和想要的课程规模,再一边写一边展示「单元 → 章 → 讲」的课程蓝图。你可以直接改,可以让老师把一讲拆开或讲深,也可以用一句话让它改(先看修改建议再应用);开课后还能继续加讲、加单元。确认后生成实战项目和第一单元的练习,后面各讲的练习学到时再出 |
27
+ | **手写黑板课堂** | 老师一边讲(语音 + 字幕),一边用手写体在黑板上逐字写下要点、公式、示意图和图表,讲到哪句写哪句,正在讲的内容用荧光笔划出;侧栏显示课堂要点进度和讲解记录;随时暂停、回放、变速 |
28
+ | **随堂小测与自适应** | 讲到关键处会停下来考你一题,并问你「有多确定」。猜对、犹豫、自信地答错,会被区别对待;有计算的一讲会请你写出过程,写错了老师就在黑板上订正。学完一讲后,薄弱的知识点会自动加一节巩固课 |
29
29
  | **举手提问、换个讲法** | 没听懂就举手,老师在黑板上专门回答你,讲完回到原来的进度;也可以让它用打比方、画图、举例、讲简单点或讲深一点的方式重讲这一步 |
30
- | **练习、闪卡与复习** | 每讲都有练习,简答题由 AI 批改;闪卡和知识点按间隔重复安排复习,学习计划会自动给复习留出时间 |
30
+ | **练习、闪卡与复习** | 每讲都有练习,题目可以带示意图,简答题由 AI 批改,支持键盘作答;做完一组给出星级、掌握程度变化和下一步建议。闪卡和知识点按间隔重复安排复习,学习计划会自动给复习留出时间 |
31
31
  | **资料变课程** | 支持 PDF、Word、PPT、Markdown、网页链接和图片(图片需要支持识图的模型)。讲课和速查表会引用原文页码;长文档可以一键「消化」成结构、论点和术语表 |
32
32
  | **速查表、笔记、测验** | 按主题整理的可打印速查表(列数、字号、高亮可调),以及笔记、闪卡组和测验 |
33
33
  | **讲解短片 + 导出视频** | 输入一个主题或网址,得到一段约两分钟的白板讲解;任何一讲都能导出成带板书动画、字幕和水印的视频,适合分享 |
@@ -47,7 +47,7 @@
47
47
  dsh-aha-tutor
48
48
  ```
49
49
 
50
- 安装源选择**官方源**,点击**安装**。新版本刚发布的 24 小时内,DSH 的 pnpm 会因为发布冷却期暂缓安装,这时请填入精确版本,例如 `dsh-aha-tutor@1.1.0`。
50
+ 安装源选择**官方源**,点击**安装**。新版本刚发布的 24 小时内,DSH 的 pnpm 会因为发布冷却期暂缓安装,这时请填入精确版本,例如 `dsh-aha-tutor@1.3.0`。
51
51
 
52
52
  2. **完全退出并重新打开** DSH 桌面应用。只刷新页面不会加载 Host 端的新插件。
53
53
 
@@ -90,21 +90,21 @@
90
90
 
91
91
  默认使用你在 DSH 里设置的默认模型。在 **开窍 → 设置** 里,可以分别为「出课与讲课」和「批改与问答」指定模型,例如出课用更强的模型、批改用更快的模型。
92
92
 
93
- 插件不会自动切换到其它付费模型,也不会在后台批量消耗额度:课程结构在你确认时生成,每一讲的板书在你打开时才生成(同时预备下一讲)。使用订阅类模型时,请遵守对应服务的使用条款。
93
+ 插件不会自动切换到其它付费模型,也不会在后台批量消耗额度:课程结构在你确认时生成,每一讲的板书在你打开时才生成(同时预备下一讲),后面各讲的练习也在打开时才生成。使用订阅类模型时,请遵守对应服务的使用条款。
94
94
 
95
95
  ## 隐私与数据
96
96
 
97
97
  - 课程、进度、资料、画像和学习计划都保存在本机:`$DSH_HOME/aha-tutor/`(默认 `~/.dsh/aha-tutor/`,Windows 为 `C:\Users\<用户名>\.dsh\aha-tutor\`)。
98
98
  - 实战项目的文件夹在 `~/AhaTutor/projects/` 下,插件不会覆盖你已经改过的文件。
99
99
  - 发给模型的内容只有完成当前任务所需的部分:你的问题、课程结构、相关的资料片段,以及简短的学习画像。
100
- - 网页导入只抓取公开地址,不访问本机或局域网地址。
100
+ - 网页导入只抓取公开地址,不访问本机或局域网地址;连接时会再次核对网址解析出的每一个地址。
101
101
  - 模型生成的示意图会经过白名单过滤;动画运行在无网络权限的沙箱里。
102
102
 
103
103
  详见 [SECURITY.md](SECURITY.md)。
104
104
 
105
105
  ## 更新与卸载
106
106
 
107
- **开窍 → 设置 → 插件版本**可以检查更新,并用 DSH 自带的 pnpm 安装精确的新版本。新版本发布不满 24 小时时会显示「待更新」和可以更新的时间,这是 DSH 的供应链安全策略,不是失败。更新后需要完全退出并重新打开 DSH。
107
+ **开窍 → 设置 → 插件版本**可以检查更新,并用 DSH 自带的 pnpm 安装精确的新版本,新版本刚发布也能直接装上。如果你给 DSH 的 pnpm 显式设置了发布冷却期(`minimumReleaseAge`),还没过冷却期的版本会显示「待更新」和可以更新的时间,这是 pnpm 的供应链安全策略,不是失败。更新后需要完全退出并重新打开 DSH。
108
108
 
109
109
  在桌面应用的**插件**页可以停用或卸载插件。卸载不会删除 `~/.dsh/aha-tutor/` 里的学习数据;不再需要时可以手动删除这个文件夹。
110
110
 
@@ -11,6 +11,15 @@ The plugin depends on the following open-source software. Runtime dependencies a
11
11
  | [linkedom](https://github.com/WebReflection/linkedom) | DOM for Readability on the host | ISC |
12
12
  | [KaTeX](https://github.com/KaTeX/KaTeX) | Math rendering on the board (bundled) | MIT |
13
13
 
14
+ ## Fonts
15
+
16
+ The board's handwriting fonts in `assets/fonts/` are subsets converted to WOFF2 for web delivery inside the plugin, generated by `scripts/build-fonts.py`. Each license ships next to the files.
17
+
18
+ | Font | Use | License |
19
+ | --- | --- | --- |
20
+ | [LXGW WenKai GB](https://github.com/lxgw/LxgwWenkaiGB) 1.530 Regular, cut to GB 2312 and CJK punctuation | Chinese handwriting on the board | SIL OFL 1.1 (`assets/fonts/OFL-LXGWWenKaiGB.txt`); its additional permission keeps the name for web-delivery subsets |
21
+ | [Caveat](https://github.com/googlefonts/caveat) 400, Latin (via [@fontsource/caveat](https://fontsource.org/fonts/caveat) 5.3.0) | Latin letters and digits on the board | SIL OFL 1.1 (`assets/fonts/OFL-Caveat.txt`) |
22
+
14
23
  DeepSeek Harness packages (`@deepseek-ai/*`) and React are provided by the DSH runtime and are not redistributed.
15
24
 
16
25
  Artwork in `docs/assets/` and `icon.png` was created for this project with ChatGPT image generation. Sample courses in `samples/` were written for this project.
@@ -0,0 +1,93 @@
1
+ Copyright 2014 The Caveat Project Authors (https://github.com/googlefonts/caveat)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,94 @@
1
+ Copyright 2022-2026 LXGW (https://github.com/lxgw/LxgwWenKaiGB), with Reserved Font Name '霞鹜', '霞鶩', '落霞孤鹜', '落霞孤鶩' and 'LXGW'. [ADDITIONAL PERMISSION] The Reserved Font Names '霞鹜', '霞鶩', '落霞孤鹜', '落霞孤鶩' and 'LXGW' may continue to be used in Modified Versions recompiled from the Original Version, without modifications to the font source code; or in Modified Versions subsetted or converted to other formats (e.g., WOFF/WOFF2) solely for web font delivery, provided such Modified Versions are not made available as installable desktop fonts (e.g., on mainstream platforms like Google Fonts, or third-party non-commercial platforms recognized by the author @lxgw; other web font platforms please contact the author @lxgw for confirmation).
2
+ Copyright 2020 The Klee Project Authors (https://github.com/fontworks-fonts/Klee)
3
+
4
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
+ This license is copied below, and is also available with a FAQ at:
6
+ https://openfontlicense.org
7
+
8
+
9
+ -----------------------------------------------------------
10
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
+ -----------------------------------------------------------
12
+
13
+ PREAMBLE
14
+ The goals of the Open Font License (OFL) are to stimulate worldwide
15
+ development of collaborative font projects, to support the font creation
16
+ efforts of academic and linguistic communities, and to provide a free and
17
+ open framework in which fonts may be shared and improved in partnership
18
+ with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves. The
22
+ fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply
27
+ to any document created using the fonts or their derivatives.
28
+
29
+ DEFINITIONS
30
+ "Font Software" refers to the set of files released by the Copyright
31
+ Holder(s) under this license and clearly marked as such. This may
32
+ include source files, build scripts and documentation.
33
+
34
+ "Reserved Font Name" refers to any names specified as such after the
35
+ copyright statement(s).
36
+
37
+ "Original Version" refers to the collection of Font Software components as
38
+ distributed by the Copyright Holder(s).
39
+
40
+ "Modified Version" refers to any derivative made by adding to, deleting,
41
+ or substituting -- in part or in whole -- any of the components of the
42
+ Original Version, by changing formats or by porting the Font Software to a
43
+ new environment.
44
+
45
+ "Author" refers to any designer, engineer, programmer, technical
46
+ writer or other person who contributed to the Font Software.
47
+
48
+ PERMISSION & CONDITIONS
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
+ redistribute, and sell modified and unmodified copies of the Font
52
+ Software, subject to the following conditions:
53
+
54
+ 1) Neither the Font Software nor any of its individual components,
55
+ in Original or Modified Versions, may be sold by itself.
56
+
57
+ 2) Original or Modified Versions of the Font Software may be bundled,
58
+ redistributed and/or sold with any software, provided that each copy
59
+ contains the above copyright notice and this license. These can be
60
+ included either as stand-alone text files, human-readable headers or
61
+ in the appropriate machine-readable metadata fields within text or
62
+ binary files as long as those fields can be easily viewed by the user.
63
+
64
+ 3) No Modified Version of the Font Software may use the Reserved Font
65
+ Name(s) unless explicit written permission is granted by the corresponding
66
+ Copyright Holder. This restriction only applies to the primary font name as
67
+ presented to the users.
68
+
69
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
+ Software shall not be used to promote, endorse or advertise any
71
+ Modified Version, except to acknowledge the contribution(s) of the
72
+ Copyright Holder(s) and the Author(s) or with their explicit written
73
+ permission.
74
+
75
+ 5) The Font Software, modified or unmodified, in part or in whole,
76
+ must be distributed entirely under this license, and must not be
77
+ distributed under any other license. The requirement for fonts to
78
+ remain under this license does not apply to any document created
79
+ using the Font Software.
80
+
81
+ TERMINATION
82
+ This license becomes null and void if any of the above conditions are
83
+ not met.
84
+
85
+ DISCLAIMER
86
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -35,24 +35,31 @@
35
35
  | **讲个概念** | 只想弄懂一个概念,不用建课 |
36
36
  | **陪我解题** | 贴一道题,老师在白板上一步步带你解 |
37
37
  | **画出来看看** | 用示意图、图表或动画把抽象的东西画出来 |
38
- | **消化长文档** | 把一篇长文或论文整理成结构、核心观点、论点和术语表 |
38
+ | **消化长文档** | 把一篇长文或论文整理成结构、核心观点、论点和术语表;长文档会分段读完全文再汇总 |
39
39
  | **两分钟短片** | 生成一段约两分钟、适合分享的白板讲解 |
40
40
 
41
41
  点**添加资料**可以附上文件,它们会进入资料库,并作为这次请求的依据。首页还会显示**继续学习**和**今天的安排**。
42
42
 
43
43
  ## 定制一门课
44
44
 
45
- 1. **先认识一下你**:老师会根据你的主题出几道选择题,问你的基础、目的、想学多深等。每题都可以选「其他」自己写,拿不准的可以跳过。下面再选**学习节奏**(冲刺约 6 周 / 稳步约 3 个月 / 不设期限)、**每周大约能学多久**,以及可选的**截止日期**。想省事可以点**跳过提问,直接出课**。
46
- 2. **课程蓝图**:点**生成课程蓝图**后,老师会给出「单元 → 章 → 讲」的结构,每讲标有预计时长,末尾还有实战项目。你可以:
47
- - 直接改标题,**上移 / 下移**调整顺序,**删除**不要的部分,或者**加一讲 / 加一章 / 加一个单元**;
48
- - 在**用一句话修改**里写下要求,例如「多加一些编程实战」「第二单元讲浅一点」,点**修改**。
49
- 3. **确认开课**:点**确认,生成整门课**。老师会为每一讲准备练习,并完善实战项目。完成后进入课程页,点**继续学习**开始第一讲。
45
+ 1. **先认识一下你**:老师会根据你的主题出几道选择题,问你的基础、目的、想学多深等。每题都可以选「其他」自己写,拿不准的可以跳过。下面先选**课程规模**:**让老师决定**(按目标定,一个小问题可能只要一两讲)、**精简**(3–8 讲)、**标准**(10–20 讲)或**完整**(25–45 讲)。选了规模,老师就按这个讲数出课。再选**学习节奏**(冲刺约 6 周 / 稳步约 3 个月 / 不设期限)、**每周大约能学多久**,以及可选的**截止日期**;节奏只影响每周怎么排。想省事可以点**跳过提问,直接出课**。
46
+ 2. **课程蓝图**:点**生成课程蓝图**后,老师边写边展示:上面是进行到哪一步,下面是一个个单元逐渐长出来的大纲。写完后就是「单元 → 章 → 讲」的完整结构,每讲标有预计时长,末尾还有实战项目。你可以:
47
+ - 直接改标题,**上移 / 下移**调整顺序,**删除**不要的部分,或者**加一讲 / 加一章 / 加一个单元**。删除单元、章或已经开始学的讲之前会先确认;
48
+ - 点某一讲旁边的 **✦**,让老师把它**拆成两讲**或**讲深一些**。改好的内容先出现在编辑器里,保存后才生效;
49
+ - 在**用一句话修改**里写下要求,例如「多加一些编程实战」「第二单元讲浅一点」,点**修改**。老师会先给出**修改建议**,列出新增、删除、改名和调整的讲,点**应用修改**才生效,不满意就**放弃**。
50
+ 3. **确认开课**:点**确认,生成整门课**。老师会完善实战项目,并为第一单元准备练习;后面各讲的练习在你第一次打开这一讲(或它的练习)时准备。完成后进入课程页,点**继续学习**开始第一讲。
51
+
52
+ 开课以后也能改:在课程页右上角的 **⋯** 里选**编辑课程大纲**,可以加讲、加单元、调整顺序,或点**让老师续写一个单元**。保留下来的讲,学习进度不变。
50
53
 
51
54
  每一讲的板书在你打开它时才生成,同时会预备下一讲,所以不会一次性消耗大量额度。
52
55
 
56
+ 生成蓝图、确认开课这类要等一会儿的步骤,可以先去别的页面,生成会在后台继续,回来就能看到结果;想停下来就点**取消**。
57
+
53
58
  ## 黑板课堂
54
59
 
55
- 老师一边讲(语音 + 字幕),一边在黑板上逐字写出要点,画出示意图、图表,需要时还会放一段小动画。一页写满后自动翻到下一页。
60
+ 老师一边讲(语音 + 字幕),一边在黑板上逐字写出要点,画出示意图、图表,需要时还会放一段小动画。一页写满后自动翻到下一页。板书用手写体,讲到哪一句才写哪一句对应的内容,正在讲的那一行会用荧光笔划出来;字幕跟着朗读一句一句出现,公式按数学排版显示。想换回普通字体,到**设置 → 板书字体**选**标准体**。
61
+
62
+ 白板右侧是**课堂侧栏**:上面是这一讲的**课堂要点**,讲到哪一条就亮到哪一条,讲完打勾;下面是**讲解记录**,老师说过的话和你的提问都在里面,点一条就回到那里;最下面是提问框。侧栏可以收起,窄屏时会放到白板下方。
56
63
 
57
64
  **播放控制**
58
65
 
@@ -65,12 +72,14 @@
65
72
 
66
73
  退出后再回来,课堂会从上次的位置继续。
67
74
 
68
- **举手提问**:没听懂就点**举手提问**,直接写下问题。老师会把回答插在当前这一步之后,在黑板上讲给你听,讲完接着原来的内容继续。
75
+ **举手提问**:没听懂就点**举手提问**(或直接在侧栏的提问框里写)。老师会把回答插在当前这一步之后,边写边讲给你听,讲完接着原来的内容继续。问过的问题和「换个讲法」都会留在这一讲里,下次打开还在原来的位置,也会出现在侧栏的讲解记录里。
69
76
 
70
77
  **换个讲法**:对当前这一步不满意,点**换个讲法**,选择**打个比方 / 画图讲 / 举个例子 / 讲简单点 / 讲深一点**,新的讲解同样会插在这一步之后。
71
78
 
72
79
  **随堂小测**:讲到关键处,老师会停下来出一道题,并问你**有多确定**(很确定 / 有点犹豫 / 猜的)。回答会影响掌握度:猜对不算完全掌握,自信地答错说明有误解,需要重点巩固。卡住时可以点**提示**,也可以**跳过**。
73
80
 
81
+ **写出过程**:有计算或推导的一讲,会有一道题请你把过程写出来:一步一行,公式写在 $…$ 里,下面会实时预览。老师会逐行看,找出第一处出错的地方;没写对时点**看老师订正**,老师会在黑板上框出那一步,写出正确的做法,再接着讲。订正会留在这一讲里,也会出现在讲解记录中。
82
+
74
83
  **讲完之后**:给自己的掌握程度打个分(1–5)。如果某些知识点掌握得不好,老师会自动加一节**巩固课**;如果掌握得很好,后面会讲得更深一些。
75
84
 
76
85
  课堂顶部还有:**练习**(去做这一讲的练习)、**导出板书**(Markdown 文件)、**导出视频**(见[讲解短片](#学习工具即时答疑与讲解短片))和**重新备课**(重新生成这一讲的板书)。
@@ -80,17 +89,19 @@
80
89
  | 标签 | 内容 |
81
90
  | --- | --- |
82
91
  | **大纲** | 全部单元、章和讲,带学习状态;自动加入的巩固课标有「巩固」。每个单元都有**单元速查表**和**单元测验** |
83
- | **练习与测验** | 每讲的练习、单元测验和**开始复习** |
92
+ | **练习与测验** | 每讲的练习、单元测验和**开始复习**(只复习这门课) |
84
93
  | **速查表** | 单元速查表,按主题整理公式、定义和要点 |
85
94
  | **闪卡** | 这门课的闪卡,按复习计划出现 |
86
95
  | **项目** | 实战项目,见[实战项目](#实战项目) |
87
- | **进度** | 每个知识点的掌握度,以及老师发现的误解(⚠) |
96
+ | **进度** | 每个知识点的掌握程度(未开始、薄弱、学习中、熟练、掌握五级),以及老师发现的误解(⚠) |
88
97
 
89
- 标题旁边是学习进度和剩余时间;右上角的 **⋯** 菜单可以**导出课程包**、**归档**和**删除课程**。所有课程都在左侧的**我的课程**里,可以按学习中、已学完、已归档筛选和搜索。
98
+ 标题旁边是学习进度和剩余时间;下面的**下一步**给出一个建议:有到期的复习就先复习,其次练一练最薄弱的知识点,再往下是下一讲。右上角的 **⋯** 菜单可以**编辑课程大纲**、**导出课程包**、**归档**和**删除课程**。大纲里每一讲的掌握度条在学过之前是空的。所有课程都在左侧的**我的课程**里,可以按学习中、已学完、已归档筛选和搜索。
90
99
 
91
100
  ## 练习、闪卡与复习
92
101
 
93
- - **练习**:单选、多选、填空、数值计算和排序题会立即判分;简答题由老师按要点批改,告诉你答到了哪些、漏了哪些。做完可以**看解析**。
102
+ - **练习**:单选、多选、填空、数值计算和排序题会立即判分;简答题由老师按要点批改,告诉你答到了哪些、漏了哪些。做完可以**看解析**。需要图的题会附一张示意图。
103
+ - 可以用键盘作答:1–4 选择,Enter 提交或继续,H 看提示;题号旁边会显示连对了几题。
104
+ - 做完一组会看到星级、正确率、最长连对,以及这一轮之后各知识点的掌握程度,最后给出一个下一步建议,比如回到这一讲再听一遍、复习这门课,或者做单元测验。
94
105
  - **闪卡**:点击翻面,然后按记忆情况选**忘了 / 困难 / 记得 / 简单**。开窍用间隔重复安排下次复习的时间,记得越牢,间隔越长。
95
106
  - **复习**:学过的知识点也会按遗忘曲线回来。学习计划会提醒你**有 N 个知识点该复习了**,点**开始复习**即可。
96
107
 
@@ -147,7 +158,8 @@
147
158
  - **云端语音**:选择服务(OpenAI 兼容接口、火山引擎(豆包语音)、MiniMax、Azure 语音),填写接口地址、模型、音色等,再**保存密钥**。密钥保存在 DSH 的凭据库中,只在本机 Host 端使用。合成过的语音会缓存在本机,重播不再计费。
148
159
  - **默认语速**和**试听**。
149
160
  - **白板外观**:跟随系统 / 白板 / 黑板。
150
- - **插件版本**:**检查更新**,有新版本时点**更新插件**。新版本发布不满 24 小时会显示可更新的时间,这是 DSH 的发布冷却期,不是失败。更新后请完全退出并重新打开 DSH。
161
+ - **板书字体**:手写体 / 标准体。
162
+ - **插件版本**:**检查更新**,有新版本时点**更新插件**,新版本刚发布也能直接装上。如果 DSH 的 pnpm 显式设置了发布冷却期,还没过冷却期的版本会显示可更新的时间,这不是失败。更新后请完全退出并重新打开 DSH。
151
163
 
152
164
  ## 关于作者
153
165
 
@@ -180,6 +192,6 @@
180
192
  | 生成结果不理想 | 点**重试**或**重新备课**;为「出课与讲课」换一个更强的模型 |
181
193
  | PDF 读不出文字 | 扫描版没有文字层,截图后以图片上传 |
182
194
  | 图片资料读不了 | 需要支持识图的模型 |
183
- | 更新显示「待更新」 | 新版本发布不满 24 小时,到显示的时间后再更新;急用可以在 DSH 插件页填写精确版本 |
195
+ | 更新显示「待更新」 | DSH 的 pnpm 设置了发布冷却期,新版本还没过冷却期;到显示的时间后再更新 |
184
196
 
185
197
  还有问题,欢迎到 [GitHub Issues](https://github.com/BaronCyrus/dsh-aha-tutor/issues) 反馈(请不要贴出密钥或个人学习数据)。
package/lib/agent.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as normalizePractice, P as readProfile, it as text, ot as newId, s as detectLanguage, t as getRuntime, v as quizPrompt, w as generateJson } from "./runtime-CiA2I7-X.js";
1
+ import { D as generateJson, R as readProfile, _t as newId, b as quizPrompt, c as detectLanguage, ht as text, t as getRuntime, ut as normalizePractice } from "./runtime-BCGFUDlg.js";
2
2
  import { defineTool } from "@deepseek-ai/dsh-tools";
3
3
  //#region src/agent.js
4
4
  const name = "aha-tutor-agent";