dsh-aha-tutor 1.1.0 → 1.2.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,24 @@
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.2.0 - 2026-10-19
6
+
7
+ ### Added
8
+
9
+ - **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.
10
+ - **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.
11
+ - **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.
12
+
13
+ ### Fixed
14
+
15
+ - **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.
16
+ - **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.
17
+ - **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.
18
+ - **Captions** show the sentence being spoken, with formulas typeset; narration speaks formulas as readable text instead of raw TeX.
19
+ - **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.
20
+ - **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.
21
+ - **Sample course**: the first lesson of the Bayes sample writes the set {2, 4, 6} as a formula instead of showing stray backslashes.
22
+
5
23
  ## 1.1.0 - 2026-10-19
6
24
 
7
25
  ### Added
package/README.en.md CHANGED
@@ -23,8 +23,8 @@
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 |
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 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
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 |
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
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 |
@@ -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.2.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,8 +23,8 @@
23
23
 
24
24
  | 能力 | 体验 |
25
25
  | --- | --- |
26
- | **为你定制一门课** | 说一句想学什么,或者丢进一本教材。老师先用几道选择题了解你的基础、目标和时间,再给出「单元 → 章 → 讲」的课程蓝图。你可以直接改,也可以用一句话让它改,确认后生成练习和实战项目 |
27
- | **手写黑板课堂** | 老师一边讲(语音 + 字幕),一边在黑板上逐字写下要点、公式、示意图和图表,需要时还会放一段小动画;随时暂停、回放、变速 |
26
+ | **为你定制一门课** | 说一句想学什么,或者丢进一本教材。老师先用几道选择题了解你的基础、目标和时间,再给出「单元 → 章 → 讲」的课程蓝图。你可以直接改,也可以用一句话让它改,确认后生成实战项目和第一单元的练习,后面各讲的练习学到时再出 |
27
+ | **手写黑板课堂** | 老师一边讲(语音 + 字幕),一边用手写体在黑板上逐字写下要点、公式、示意图和图表,讲到哪句写哪句,正在讲的内容用荧光笔划出;侧栏显示课堂要点进度和讲解记录;随时暂停、回放、变速 |
28
28
  | **随堂小测与自适应** | 讲到关键处会停下来考你一题,并问你「有多确定」。猜对、犹豫、自信地答错,会被区别对待;学完一讲后,薄弱的知识点会自动加一节巩固课 |
29
29
  | **举手提问、换个讲法** | 没听懂就举手,老师在黑板上专门回答你,讲完回到原来的进度;也可以让它用打比方、画图、举例、讲简单点或讲深一点的方式重讲这一步 |
30
30
  | **练习、闪卡与复习** | 每讲都有练习,简答题由 AI 批改;闪卡和知识点按间隔重复安排复习,学习计划会自动给复习留出时间 |
@@ -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.2.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,7 +35,7 @@
35
35
  | **讲个概念** | 只想弄懂一个概念,不用建课 |
36
36
  | **陪我解题** | 贴一道题,老师在白板上一步步带你解 |
37
37
  | **画出来看看** | 用示意图、图表或动画把抽象的东西画出来 |
38
- | **消化长文档** | 把一篇长文或论文整理成结构、核心观点、论点和术语表 |
38
+ | **消化长文档** | 把一篇长文或论文整理成结构、核心观点、论点和术语表;长文档会分段读完全文再汇总 |
39
39
  | **两分钟短片** | 生成一段约两分钟、适合分享的白板讲解 |
40
40
 
41
41
  点**添加资料**可以附上文件,它们会进入资料库,并作为这次请求的依据。首页还会显示**继续学习**和**今天的安排**。
@@ -46,13 +46,17 @@
46
46
  2. **课程蓝图**:点**生成课程蓝图**后,老师会给出「单元 → 章 → 讲」的结构,每讲标有预计时长,末尾还有实战项目。你可以:
47
47
  - 直接改标题,**上移 / 下移**调整顺序,**删除**不要的部分,或者**加一讲 / 加一章 / 加一个单元**;
48
48
  - 在**用一句话修改**里写下要求,例如「多加一些编程实战」「第二单元讲浅一点」,点**修改**。
49
- 3. **确认开课**:点**确认,生成整门课**。老师会为每一讲准备练习,并完善实战项目。完成后进入课程页,点**继续学习**开始第一讲。
49
+ 3. **确认开课**:点**确认,生成整门课**。老师会完善实战项目,并为第一单元准备练习;后面各讲的练习在你第一次打开这一讲(或它的练习)时准备。完成后进入课程页,点**继续学习**开始第一讲。
50
50
 
51
51
  每一讲的板书在你打开它时才生成,同时会预备下一讲,所以不会一次性消耗大量额度。
52
52
 
53
+ 生成蓝图、确认开课这类要等一会儿的步骤,可以先去别的页面,生成会在后台继续,回来就能看到结果;想停下来就点**取消**。
54
+
53
55
  ## 黑板课堂
54
56
 
55
- 老师一边讲(语音 + 字幕),一边在黑板上逐字写出要点,画出示意图、图表,需要时还会放一段小动画。一页写满后自动翻到下一页。
57
+ 老师一边讲(语音 + 字幕),一边在黑板上逐字写出要点,画出示意图、图表,需要时还会放一段小动画。一页写满后自动翻到下一页。板书用手写体,讲到哪一句才写哪一句对应的内容,正在讲的那一行会用荧光笔划出来;字幕跟着朗读一句一句出现,公式按数学排版显示。想换回普通字体,到**设置 → 板书字体**选**标准体**。
58
+
59
+ 白板右侧是**课堂侧栏**:上面是这一讲的**课堂要点**,讲到哪一条就亮到哪一条,讲完打勾;下面是**讲解记录**,老师说过的话和你的提问都在里面,点一条就回到那里;最下面是提问框。侧栏可以收起,窄屏时会放到白板下方。
56
60
 
57
61
  **播放控制**
58
62
 
@@ -65,7 +69,7 @@
65
69
 
66
70
  退出后再回来,课堂会从上次的位置继续。
67
71
 
68
- **举手提问**:没听懂就点**举手提问**,直接写下问题。老师会把回答插在当前这一步之后,在黑板上讲给你听,讲完接着原来的内容继续。
72
+ **举手提问**:没听懂就点**举手提问**(或直接在侧栏的提问框里写)。老师会把回答插在当前这一步之后,边写边讲给你听,讲完接着原来的内容继续。问过的问题和「换个讲法」都会留在这一讲里,下次打开还在原来的位置,也会出现在侧栏的讲解记录里。
69
73
 
70
74
  **换个讲法**:对当前这一步不满意,点**换个讲法**,选择**打个比方 / 画图讲 / 举个例子 / 讲简单点 / 讲深一点**,新的讲解同样会插在这一步之后。
71
75
 
@@ -147,7 +151,8 @@
147
151
  - **云端语音**:选择服务(OpenAI 兼容接口、火山引擎(豆包语音)、MiniMax、Azure 语音),填写接口地址、模型、音色等,再**保存密钥**。密钥保存在 DSH 的凭据库中,只在本机 Host 端使用。合成过的语音会缓存在本机,重播不再计费。
148
152
  - **默认语速**和**试听**。
149
153
  - **白板外观**:跟随系统 / 白板 / 黑板。
150
- - **插件版本**:**检查更新**,有新版本时点**更新插件**。新版本发布不满 24 小时会显示可更新的时间,这是 DSH 的发布冷却期,不是失败。更新后请完全退出并重新打开 DSH。
154
+ - **板书字体**:手写体 / 标准体。
155
+ - **插件版本**:**检查更新**,有新版本时点**更新插件**,新版本刚发布也能直接装上。如果 DSH 的 pnpm 显式设置了发布冷却期,还没过冷却期的版本会显示可更新的时间,这不是失败。更新后请完全退出并重新打开 DSH。
151
156
 
152
157
  ## 关于作者
153
158
 
@@ -180,6 +185,6 @@
180
185
  | 生成结果不理想 | 点**重试**或**重新备课**;为「出课与讲课」换一个更强的模型 |
181
186
  | PDF 读不出文字 | 扫描版没有文字层,截图后以图片上传 |
182
187
  | 图片资料读不了 | 需要支持识图的模型 |
183
- | 更新显示「待更新」 | 新版本发布不满 24 小时,到显示的时间后再更新;急用可以在 DSH 插件页填写精确版本 |
188
+ | 更新显示「待更新」 | DSH 的 pnpm 设置了发布冷却期,新版本还没过冷却期;到显示的时间后再更新 |
184
189
 
185
190
  还有问题,欢迎到 [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 { I as readProfile, T as generateJson, at as normalizePractice, ft as newId, s as detectLanguage, t as getRuntime, ut as text, y as quizPrompt } from "./runtime-ywaTyu56.js";
2
2
  import { defineTool } from "@deepseek-ai/dsh-tools";
3
3
  //#region src/agent.js
4
4
  const name = "aha-tutor-agent";