dsh-aha-tutor 1.4.0 → 1.6.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 +4 -3
- package/CHANGELOG.md +27 -0
- package/README.en.md +4 -4
- package/README.md +4 -4
- package/docs/guide.zh-CN.md +37 -5
- package/lib/agent.js +1 -1
- package/lib/client.js +100 -45
- package/lib/index.js +1235 -78
- package/lib/{runtime-DqCjJ0yL.js → runtime-B6zUpJjA.js} +783 -16
- package/package.json +1 -1
- package/samples/harmonic-motion.aha-course.json +92 -388
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`, `/api/aha-tutor/tts` and `/api/aha-tutor/font`
|
|
11
|
+
- RPC channel `/aha-tutor`; HTTP routes `/api/aha-tutor/upload`, `/api/aha-tutor/tts`, `/api/aha-tutor/speech` and `/api/aha-tutor/font`
|
|
12
12
|
- Data directory: `$DSH_HOME/aha-tutor/`; project folders: `~/AhaTutor/projects/`
|
|
13
13
|
|
|
14
14
|
## Project boundaries
|
|
@@ -17,10 +17,11 @@ This file governs the entire `dsh-aha-tutor` repository.
|
|
|
17
17
|
- `src/index.js` (host): storage, generation, materials, voices, jobs and the RPC handler, built from `src/host/` and `src/core/`.
|
|
18
18
|
- `src/agent.js` (`dsh-aha-tutor/agent`): the conversation preset's tools and system-prompt section.
|
|
19
19
|
- `src/client.jsx` (browser): the full-page app, sidebar entry, right-sidebar board tab and tool cards, built from `src/ui/` through the client wrapper in `tsdown.config.mjs`.
|
|
20
|
-
- `src/core/` is pure logic shared by host and browser (mastery, SRS, planner, grading, board scripts, course model, retrieval, JSON extraction). Keep it free of Node and DOM APIs.
|
|
20
|
+
- `src/core/` is pure logic shared by host and browser (mastery, SRS, planner, grading, board scripts and their fixes, plot formulas, course model, retrieval, JSON extraction). Keep it free of Node and DOM APIs.
|
|
21
21
|
- Formulas are rendered by the bundled KaTeX and styled by the KaTeX stylesheet and fonts DSH loads. The bundled version must be the stylesheet's version (0.18.7 in DSH 0.2.1); KaTeX renames layout classes between versions. `tests/package-contract.test.mjs` pins it; change both together when DSH moves.
|
|
22
22
|
- Generation uses only the model the user chose: DSH's default model or the plugin's two overrides ("teach" and "quick"). Never fall back to another provider, model or credential source on a failure.
|
|
23
23
|
- Web research before course design goes through DSH's own web service (`ctx.get('web')`) and whatever search provider DSH is configured with. The plugin never calls a search vendor or touches its credentials; when DSH cannot search, the course is designed without research and the reason is shown.
|
|
24
|
+
- Voice questions go through DSH's own speech service (`ctx.get('speechToText')`, the experimental Voice input bundle with local SenseVoice) with DSH's provider and language choices. The plugin never prepares or downloads a recognizer, keeps no audio and sends it nowhere else; until Voice input is enabled and ready, the microphone explains how to set it up.
|
|
24
25
|
- Generate on demand: course structure when the learner confirms the blueprint, a lesson's board when it is opened plus at most one prefetched next lesson. Never generate a whole course's boards in the background.
|
|
25
26
|
- Cloud TTS keys live in DSH's credential store as records and are used host-side only. Never fall back to environment variables, and never return a key to the browser.
|
|
26
27
|
- The in-plugin update installs an exact registry version with DSH's bundled pnpm in the owning profile, under the profile's own pnpm release-age policy. Never pass `--config.minimumReleaseAge`, never edit `minimumReleaseAgeExclude`, and never use `--force`: bypassing the policy leaves a lockfile entry pnpm later rejects, and the profile then refuses every plugin install until that version is 24 hours old. A version pnpm holds back is reported as pending with the time it becomes installable. Verify the installed version even on exit code 0. `link:` installs are never updated in place. After an update, tell the user to quit and reopen DSH.
|
|
@@ -40,7 +41,7 @@ The plugin runs inside DSH on both systems. Every change must keep working on bo
|
|
|
40
41
|
|
|
41
42
|
## Security requirements
|
|
42
43
|
|
|
43
|
-
- Model output, uploads, course packs, fetched web pages and web search results are untrusted. Search results keep http(s) links only, are length-capped, reach prompts as reference material (never as instructions) and open outside the app. Keep `src/ui/sanitize.js`'s SVG allow-list, the sandboxed animation iframe (`sandbox="allow-scripts"`, no same-origin, `default-src 'none'` CSP), Markdown without raw HTML and KaTeX with `trust: false`.
|
|
44
|
+
- Model output, uploads, course packs, fetched web pages and web search results are untrusted. Search results keep http(s) links only, are length-capped, reach prompts as reference material (never as instructions) and open outside the app. Keep `src/ui/sanitize.js`'s SVG allow-list, the sandboxed animation iframe (`sandbox="allow-scripts"`, no same-origin, `default-src 'none'` CSP), Markdown without raw HTML and KaTeX with `trust: false`. Plot formulas are read by `src/core/expr.js` and evaluated over numbers only, never as code (no `eval`, `Function` or iframe).
|
|
44
45
|
- Web import refuses non-`http(s)` URLs and localhost, private, link-local and metadata addresses, follows redirects by hand and re-checks each hop.
|
|
45
46
|
- Project files: starter paths go through `safeRelativePath`; existing files are never overwritten; reviews read text files only, skip symlinks and cap the total size.
|
|
46
47
|
- Browser RPC validates every payload and returns only user-facing error messages. Never print, log, commit or return to the browser any API key, token or package-manager output.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
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.6.0 - 2026-10-22
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Is this step wrong?**: a learner who thinks the teacher made a mistake can say so, from the classroom controls (the step on screen) or from any line of the transcript (an earlier step). An optional note, typed or spoken, says what looks wrong. The teacher model checks the step with thinking on (recomputing numbers, re-deriving formulas, checking facts, units and answer keys), which takes a few seconds to half a minute, then answers at the board. A real mistake is boxed and corrected there, and the lesson itself is fixed where it is kept: the wrong ops, later steps that carried the mistake forward, the narration and check answers. Each fixed op shows **✎ Corrected**, with the original on hover, also in PDF and PNG exports. A step that is right is explained, aimed at the learner's doubt. Either answer stays with the lesson and in the transcript, and neither changes mastery. It works in lessons (answers to raised hands included), instant answers, explainer shorts and the conversation board.
|
|
10
|
+
- **Something wrong with this question?**: after a practice, unit-quiz, library-quiz or review question is graded, the learner can ask the teacher to check it, with an optional note, typed or spoken. The teacher model checks the question, its answer key and the grading with thinking on, and the answer appears under the question: a verdict, then a few sentences aimed at the learner's doubt. A question that is wrong is fixed where it is kept (prompt, options, answer, explanation and hints; a review question from a lesson check fixes that check), and it shows **✎ Corrected**, with the original on hover. A question that depends on an unstated convention gets the convention written in, and an answer that is right under another reasonable reading counts as right. A short or written-out answer graded wrongly is graded again. The answer is then graded again against the fixed question, and mastery and the review schedule are recomputed as if it had been graded right the first time: the concept goes back to before that answer, takes the new score, then takes every later answer again in order, and a misconception the misgrade left is dropped. The round's stars, accuracy and streaks follow. The learner can go on while the check runs; a line at the top of the page reports what it found.
|
|
11
|
+
- **Exact function plots**: a new board element draws curves from formulas the app computes point by point, so a sine wave or a parabola is never drawn wrong. It takes y = f(x), parametric and polar curves; labelled points (on a curve from their x alone), dashed guides such as asymptotes, shaded areas and tangents; and textbook axes through the origin with arrows, ticks in π for angles and an optional equal scale. Up to four parameters become sliders under the plot; moving one pauses the lesson. Exports and videos show the plot at its default values. Practice and quiz items can use a plot as their figure. Formulas are read in calculator syntax by the plugin's own parser and evaluated over numbers only, never run as code.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- The first lesson of the harmonic-motion sample shows its wave as a plot with sliders for the amplitude and the angular frequency.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **A cloud voice that stops answering is noticed in seconds.** A voice service that took a request and then sent nothing held the first step of a lesson for the full 45-second limit before the note about the missing voice appeared. Now a service that sends nothing for 10 seconds, or stops sending half way, counts as not responding: the note says so and the lesson goes on silently. A long step gets more time to start, up to the old 45 seconds, since Volcengine, MiniMax and many local servers answer only once the whole text is synthesized, and a slow service that is still sending is waited for as before. **Test** in Settings gives up just as quickly.
|
|
20
|
+
- **A changed cloud voice is heard at once.** After another voice, model, service or address was chosen in Settings, **Test** and every sentence heard before in the same page still played the old voice until the page was reloaded, because the browser kept audio by its words alone. Audio is now kept per voice, so going back to a voice still finds its audio. **Test** waits for a field just left to be saved. Other open views of the plugin pick up changed settings, the system voice included, without being reopened: the side-panel board, the cards in a conversation, and the plugin in another window or tab of the same browser.
|
|
21
|
+
- **Replaying a cloud voice no longer pays for it twice.** Synthesized audio was meant to be kept on this computer so that hearing a lesson again calls the service no more, but the folder for it was never created, so every replay was synthesized and paid for again. The folder is now made with the first audio.
|
|
22
|
+
- **The microphone's note fits a narrow window.** Beside the microphone, a note (how to set up Voice input, a refused or missing microphone) was cut off on the left in a narrow window. It now narrows and moves inward to stay on the page.
|
|
23
|
+
- **Voice questions use the microphone chosen in DSH.** The microphone followed the system default instead of the input device chosen in the details of DSH's Voice input. It now records from that device, and the button's tooltip names it. When the chosen one is unplugged, the plugin says so instead of switching to another microphone, as DSH does. DSH's speech service does not report the device; the plugin reads the choice where DSH's Voice input keeps it in the browser, and falls back to the system default if it cannot.
|
|
24
|
+
|
|
25
|
+
## 1.5.0 - 2026-10-21
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- **The board is a canvas**: a lesson's pages sit top to bottom on one canvas that pans (drag, scroll wheel or trackpad) and zooms (Ctrl/⌘ with the wheel, a pinch, or the − and + buttons) from 5 % to 300 %. Double-click a page to fit it, and **All** shows every page. During a lesson the view follows the writing; moving it yourself stops that until **Back to the teacher**. **Settings → Board view → Pages** brings back one page at a time with page numbers. Exports are unchanged.
|
|
30
|
+
- **Voice questions**: the ask box in a lesson and the instant-answer box have a microphone. Click it, say the question, click again to stop, and the words are filled into the box to check before asking; a lesson pauses while you speak. Recognition is DSH's experimental Voice input (local SenseVoice, in the language set there), so nothing leaves the computer and the plugin keeps no audio. Until Voice input is enabled in DSH's Plugins page and its model is prepared, the microphone is greyed out and says how to set it up. A recording is at most two minutes.
|
|
31
|
+
|
|
5
32
|
## 1.4.0 - 2026-10-20
|
|
6
33
|
|
|
7
34
|
### Added
|
package/README.en.md
CHANGED
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
| Feature | What you get |
|
|
25
25
|
| --- | --- |
|
|
26
26
|
| **A course made for you** | Say what you want to learn or drop in a textbook. The tutor can look the subject up on the web first, then 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 |
|
|
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; curves given by a formula are computed point by point, with sliders for their parameters; the lesson's pages sit on one canvas you can drag and zoom while the view follows the teacher, 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; 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
|
-
| **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, 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 |
|
|
29
|
+
| **Raise your hand, hear it again** | Ask anything mid-lesson, typed or spoken (recognized on your computer by DSH's Voice input), 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. Think a step is wrong? Ask the teacher to check it: a real mistake is corrected at the board and fixed in the lesson, and a step that is right is explained |
|
|
30
|
+
| **Practice, flashcards, reviews** | Every lesson has practice, with figures where they help, open answers graded by the model and keyboard answering; think a question or its grading is wrong, and the teacher checks it, fixes a wrong question, grades your answer again and corrects your mastery; 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 exports** | A two-minute whiteboard explainer from a topic or a link; any lesson exports to a video with the handwriting, captions and a watermark, or its board to a PDF (one board page per page, handwriting and formulas included) or a PNG picture per page |
|
|
@@ -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.
|
|
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.6.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
|
|
package/README.md
CHANGED
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
| 能力 | 体验 |
|
|
25
25
|
| --- | --- |
|
|
26
26
|
| **为你定制一门课** | 说一句想学什么,或者丢进一本教材。老师可以先联网查一查这个主题,再用几道选择题了解你的基础、目标、时间和想要的课程规模,再一边写一边展示「单元 → 章 → 讲」的课程蓝图。你可以直接改,可以让老师把一讲拆开或讲深,也可以用一句话让它改(先看修改建议再应用);开课后还能继续加讲、加单元。确认后生成实战项目和第一单元的练习,后面各讲的练习学到时再出 |
|
|
27
|
-
| **手写黑板课堂** | 老师一边讲(语音 +
|
|
27
|
+
| **手写黑板课堂** | 老师一边讲(语音 + 字幕),一边用手写体在黑板上逐字写下要点、公式、示意图和图表,讲到哪句写哪句,正在讲的内容用荧光笔划出;由公式画的曲线按公式逐点算出,带参数的还能拖动滑块看它怎么变;整讲的板书排在一张能拖动、缩放的画布上,镜头跟着老师走;侧栏显示课堂要点进度和讲解记录;随时暂停、回放、变速 |
|
|
28
28
|
| **随堂小测与自适应** | 讲到关键处会停下来考你一题,并问你「有多确定」。猜对、犹豫、自信地答错,会被区别对待;有计算的一讲会请你写出过程,写错了老师就在黑板上订正。学完一讲后,薄弱的知识点会自动加一节巩固课 |
|
|
29
|
-
| **举手提问、换个讲法** |
|
|
30
|
-
| **练习、闪卡与复习** | 每讲都有练习,题目可以带示意图,简答题由 AI
|
|
29
|
+
| **举手提问、换个讲法** | 没听懂就举手,老师在黑板上专门回答你,讲完回到原来的进度;问题可以打字,也可以直接说出来(用 DSH 的语音输入在本机识别);也可以让它用打比方、画图、举例、讲简单点或讲深一点的方式重讲这一步。觉得讲错了就点「这一步不对?」:老师先仔细核对,真错了就在黑板上更正,并把这一讲改好;没错就讲清为什么 |
|
|
30
|
+
| **练习、闪卡与复习** | 每讲都有练习,题目可以带示意图,简答题由 AI 批改,支持键盘作答;觉得题目或判分有问题就点「这题有问题?」,老师先仔细核对,题错了就改好、重新判分并修正掌握度;做完一组给出星级、掌握程度变化和下一步建议。闪卡和知识点按间隔重复安排复习,学习计划会自动给复习留出时间 |
|
|
31
31
|
| **资料变课程** | 支持 PDF、Word、PPT、Markdown、网页链接和图片(图片需要支持识图的模型)。讲课和速查表会引用原文页码;长文档可以一键「消化」成结构、论点和术语表 |
|
|
32
32
|
| **速查表、笔记、测验** | 按主题整理的可打印速查表(列数、字号、高亮可调),以及笔记、闪卡组和测验 |
|
|
33
33
|
| **讲解短片 + 导出** | 输入一个主题或网址,得到一段约两分钟的白板讲解;任何一讲都能导出成带板书动画、字幕和水印的视频,也能把板书导出成 PDF(一页一张板书,带手写字体和公式)或每页一张的 PNG 图片 |
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
dsh-aha-tutor
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
安装源选择**官方源**,点击**安装**。新版本刚发布的 24 小时内,DSH 的 pnpm 会因为发布冷却期暂缓安装,这时请填入精确版本,例如 `dsh-aha-tutor@1.
|
|
50
|
+
安装源选择**官方源**,点击**安装**。新版本刚发布的 24 小时内,DSH 的 pnpm 会因为发布冷却期暂缓安装,这时请填入精确版本,例如 `dsh-aha-tutor@1.6.0`。
|
|
51
51
|
|
|
52
52
|
2. **完全退出并重新打开** DSH 桌面应用。只刷新页面不会加载 Host 端的新插件。
|
|
53
53
|
|
package/docs/guide.zh-CN.md
CHANGED
|
@@ -58,7 +58,18 @@
|
|
|
58
58
|
|
|
59
59
|
## 黑板课堂
|
|
60
60
|
|
|
61
|
-
老师一边讲(语音 +
|
|
61
|
+
老师一边讲(语音 + 字幕),一边在黑板上逐字写出要点,画出示意图、图表,需要时还会放一段小动画。一页写满后接着写下一页。板书用手写体,讲到哪一句才写哪一句对应的内容,正在讲的那一行会用荧光笔划出来;字幕跟着朗读一句一句出现,公式按数学排版显示。想换回普通字体,到**设置 → 板书字体**选**标准体**。
|
|
62
|
+
|
|
63
|
+
**画布**:整讲的板书一页接一页从上到下排在一张画布上,讲课时镜头自动跟着老师写的地方走。
|
|
64
|
+
- **移动**:用鼠标拖动,或用滚轮、触控板滚动。
|
|
65
|
+
- **缩放**:按住 Ctrl(Mac 上是 ⌘)滚动,或在触控板上双指捏合;右上角也有 **−**、**+** 按钮。
|
|
66
|
+
- **看一页**:双击某一页,就放大到这一页。
|
|
67
|
+
- **看全貌**:点右上角的**全貌**,缩小到能看到所有页;点百分比回到 100%(铺满宽度)。
|
|
68
|
+
- **回到老师这里**:你一拖动或缩放,镜头就不再自动跟随,右上角会出现**回到老师这里**,点一下回到正在写的地方并继续跟随。
|
|
69
|
+
|
|
70
|
+
习惯一次看一页的话,到**设置 → 板书视图**选**分页**,用右上角的页码翻页。
|
|
71
|
+
|
|
72
|
+
**函数图**:由公式画出的曲线,比如 y = A·sin(ωx)、圆、心形线,都由开窍按公式逐点算出来,不会画歪。坐标轴按课本的样子画:穿过原点、带箭头,三角函数按 π/2 标刻度,曲线旁写着它的公式;需要时还有标出的点、虚线(渐近线、对称轴)、阴影面积和切线。公式里有参数时,图下面有滑块,拖一拖就能看到曲线怎么变。一拖滑块课堂就暂停,看够了再点**播放**。导出的 PDF、PNG 和视频按默认值画成静态图。
|
|
62
73
|
|
|
63
74
|
**备课中**:一讲第一次打开时,老师要先备课。能关掉推理的模型(比如 DeepSeek)不先构思、直接写板书,一两秒就开讲;关不掉推理的模型会用它最轻的一档先想一想。备课超过 3 秒时,黑板中间会显示备课进度:先是**构思**(只在模型先想的时候出现,显示已构思的字数),然后是**写板书**,写到第几步、这一步讲什么(小标题边写边出现),以及已用的时间。第一步一写好就开讲,后面的内容边讲边写;如果讲得比写得快,黑板上会显示老师正在写的那一步。下一讲会在你上这一讲时提前备好,通常打开就能直接上。
|
|
64
75
|
|
|
@@ -75,12 +86,25 @@
|
|
|
75
86
|
|
|
76
87
|
退出后再回来,课堂会从上次的位置继续。
|
|
77
88
|
|
|
78
|
-
|
|
89
|
+
**朗读用不了时**:云端语音没保存密钥、密钥被拒、地址或区域填错、服务拒绝请求、一直没有回应或超时,或者系统音色没法出声,控制栏上方会写明原因,这节课先静音往下讲,不再一步一步地重试。服务 10 秒没有任何回应(一步讲得长时多等一会儿,最多 45 秒),或者音频传到一半停住 10 秒,就算没有回应;还在陆续传音频的慢服务会照常等完。连不上、限流这类可能很快恢复的问题,连续两步失败才停用。点**重试**重新打开语音,并从这一步开头重讲;点**去设置**修改语音设置。停用期间**声音开 / 静音**显示为静音,点它也能重新打开语音。
|
|
79
90
|
|
|
80
91
|
**举手提问**:没听懂就点**举手提问**(或直接在侧栏的提问框里写)。老师会把回答插在当前这一步之后,边写边讲给你听,讲完接着原来的内容继续。问过的问题和「换个讲法」都会留在这一讲里,下次打开还在原来的位置,也会出现在侧栏的讲解记录里。
|
|
81
92
|
|
|
93
|
+
**语音提问**:提问框旁边有个麦克风。点一下开始说,说完再点一下停止,识别出的文字会填进提问框,检查一下再点**提问**;说话时课堂会自动暂停。一次最多录 2 分钟。语音识别用的是 DSH 的实验功能**语音输入**,在本机识别、不上传录音,开窍也不保存录音。第一次用之前:
|
|
94
|
+
1. 在 DSH 的**插件管理**里启用**语音输入**;
|
|
95
|
+
2. 在它的详情里点**下载并准备**,下载本地识别模型(约 240 MB);
|
|
96
|
+
3. 准备好后回到课堂点麦克风。没准备好时麦克风是灰的,点它会提示还差哪一步。识别的语言跟随语音输入详情里的设置(默认自动)。
|
|
97
|
+
|
|
98
|
+
录音用的麦克风跟随语音输入详情里选的**输入设备**(默认跟随系统);选了具体设备时,鼠标停在麦克风按钮上会显示它的名字。选的那个拔掉了或用不了时,开窍会提示,不会悄悄换成别的麦克风:插上它,或在语音输入详情里换一个。
|
|
99
|
+
|
|
82
100
|
**换个讲法**:对当前这一步不满意,点**换个讲法**,选择**打个比方 / 画图讲 / 举个例子 / 讲简单点 / 讲深一点**,新的讲解同样会插在这一步之后。
|
|
83
101
|
|
|
102
|
+
**这一步不对?**:觉得老师讲错了(算错、写错、说法不对),点控制栏的**这一步不对?**。想质疑前面讲过的某一步,就把鼠标移到讲解记录里那一行上,点旁边的**不对?**。可以写一句(或点麦克风说)哪里不对,也可以不写,然后点**请老师核对**。老师会先仔细算一遍、想清楚,要等十几秒到半分钟,然后在黑板上回答:
|
|
103
|
+
- **确实讲错了**:老师会框出错处、写出正确的内容并讲清楚原因。这一讲存档里的错处也会一起改正,包括后面沿用了这个错误的地方、旁白和随堂小测的答案。改过的地方旁边有红色的**✎ 已更正**,鼠标停在上面能看到原来写的内容。以后回放、导出 PDF 和 PNG 时都是改好的。
|
|
104
|
+
- **其实没错**:老师会针对你的疑问讲清楚为什么是对的。
|
|
105
|
+
|
|
106
|
+
核对的结果会留在这一讲里,也会出现在讲解记录中(标着 🧐)。质疑不会影响掌握度,可以放心问。即时答疑、讲解短片和对话里的白板也能这样核对。
|
|
107
|
+
|
|
84
108
|
**随堂小测**:讲到关键处,老师会停下来出一道题,并问你**有多确定**(很确定 / 有点犹豫 / 猜的)。回答会影响掌握度:猜对不算完全掌握,自信地答错说明有误解,需要重点巩固。卡住时可以点**提示**,也可以**跳过**。
|
|
85
109
|
|
|
86
110
|
**写出过程**:有计算或推导的一讲,会有一道题请你把过程写出来:一步一行,公式写在 $…$ 里,下面会实时预览。老师会逐行看,找出第一处出错的地方;没写对时点**看老师订正**,老师会在黑板上框出那一步,写出正确的做法,再接着讲。订正会留在这一讲里,也会出现在讲解记录中。
|
|
@@ -112,9 +136,16 @@
|
|
|
112
136
|
|
|
113
137
|
## 练习、闪卡与复习
|
|
114
138
|
|
|
115
|
-
-
|
|
139
|
+
- **练习**:单选、多选、填空、数值计算和排序题会立即判分;简答题由老师按要点批改,告诉你答到了哪些、漏了哪些。做完可以**看解析**。需要图的题会附一张示意图,或一张按公式算出的函数图。
|
|
116
140
|
- 可以用键盘作答:1–4 选择,Enter 提交或继续,H 看提示;题号旁边会显示连对了几题。
|
|
117
141
|
- 做完一组会看到星级、正确率、最长连对,以及这一轮之后各知识点的掌握程度,最后给出一个下一步建议,比如回到这一讲再听一遍、复习这门课,或者做单元测验。
|
|
142
|
+
- **这题有问题?**:判完分后,觉得题目、答案或判分不对(答案标错了、选项有两个对的、单位错了、简答题判得太严),点结果框里的**这题有问题?**。可以写一句(或点麦克风说)哪里不对,也可以不写,然后点**请老师核对**。老师会先自己把题做一遍、仔细核对,要等几秒到半分钟;这期间可以先做下一题,核对完会在页面顶部提示。结果显示在这道题下面的**老师核对**里:
|
|
143
|
+
- **确实有错**:老师会把存档里的这道题改好(题目、选项、答案、解析、提示里错的地方),题上出现红色的**✎ 已更正**,鼠标停在上面能看到原来写的内容。然后按改好的题重新判你这次的作答。
|
|
144
|
+
- **题目没说清楚**(比如没说 g 取 9.8 还是 10):老师会把约定写进题目;你按另一种合理理解答对的,这次算对。
|
|
145
|
+
- **判分有误**(简答题、写过程的题):题目不动,只重新判这次的作答。
|
|
146
|
+
- **其实没错**:老师会针对你的疑问讲清楚为什么,成绩和掌握度都不变。
|
|
147
|
+
|
|
148
|
+
重新判分后,掌握度和复习时间会按新的分数重新算,就像当初判对了一样:这次作答留下的「误解」标记也会去掉,这一轮的星级、正确率和连对也按新结果算。每讲的练习、单元测验、学习工具里的测验和复习里的题都可以这样核对。
|
|
118
149
|
- **闪卡**:点击翻面,然后按记忆情况选**忘了 / 困难 / 记得 / 简单**。开窍用间隔重复安排下次复习的时间,记得越牢,间隔越长。
|
|
119
150
|
- **复习**:学过的知识点也会按遗忘曲线回来。学习计划会提醒你**有 N 个知识点该复习了**,点**开始复习**即可。
|
|
120
151
|
|
|
@@ -135,7 +166,7 @@
|
|
|
135
166
|
## 学习工具、即时答疑与讲解短片
|
|
136
167
|
|
|
137
168
|
- **学习工具**:先**选择资料**,再生成速查表、笔记、闪卡组或测验。可以在**重点**里写上范围,例如「期中考试范围第 3–6 章」。速查表可以调**列数、字号**,开关**高亮重点**,隐藏某些部分,然后**打印**。
|
|
138
|
-
-
|
|
169
|
+
- **即时答疑**:不用建课,直接提问,老师在白板上讲给你听。可以**继续追问**,以前问过的问题都在**历史记录**里。问题也可以点麦克风说出来(见[黑板课堂](#黑板课堂)里的「语音提问」)。
|
|
139
170
|
- **讲解短片**:输入一个主题,或者贴一个网址,点**生成短片**,得到一段约两分钟的白板讲解。
|
|
140
171
|
|
|
141
172
|
窄屏时(手机,或者 DSH 侧栏展开、窗口不够宽时),即时答疑和讲解短片整页上下滚动:课堂在上,板书约占屏幕高度的 60%,下面依次是字幕、播放控制和讲解记录,再往下是追问框和历史记录。从历史记录打开、继续追问或生成短片后,页面会自动滚回课堂。
|
|
@@ -171,10 +202,11 @@
|
|
|
171
202
|
- **语音讲解**:
|
|
172
203
|
- **语音来源**:系统语音(免费)/ 云端语音 / 不朗读。
|
|
173
204
|
- **系统音色**:可以选**自动选择**,或指定一个音色。没有合适的中文音色时,可以在 macOS 的「系统设置 → 辅助功能 → 朗读内容」或 Windows 的「设置 → 时间和语言 → 语音」里添加。
|
|
174
|
-
- **云端语音**:选择服务(OpenAI 兼容接口、火山引擎(豆包语音)、MiniMax、Azure 语音),填写接口地址、模型、音色等,再**保存密钥**。密钥保存在 DSH 的凭据库中,只在本机 Host
|
|
205
|
+
- **云端语音**:选择服务(OpenAI 兼容接口、火山引擎(豆包语音)、MiniMax、Azure 语音),填写接口地址、模型、音色等,再**保存密钥**。密钥保存在 DSH 的凭据库中,只在本机 Host 端使用。合成过的语音按服务和音色缓存在本机,重播不再计费;换了服务或音色后,听过的句子会用新的声音重新合成。
|
|
175
206
|
- **默认语速**和**试听**。试听、保存或清除密钥失败时,原因显示在对应按钮下方。
|
|
176
207
|
- **白板外观**:跟随系统 / 白板 / 黑板。
|
|
177
208
|
- **板书字体**:手写体 / 标准体。
|
|
209
|
+
- **板书视图**:画布(整讲排在一张可拖动、缩放的画布上)/ 分页(一次看一页)。
|
|
178
210
|
- **插件版本**:**检查更新**,有新版本时点**更新插件**,新版本刚发布也能直接装上。如果 DSH 的 pnpm 显式设置了发布冷却期,还没过冷却期的版本会显示可更新的时间,这不是失败。更新后请完全退出并重新打开 DSH。
|
|
179
211
|
|
|
180
212
|
## 关于作者
|
package/lib/agent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ct as text, Et as newId, H as readProfile, j as generateJson, l as detectLanguage, t as getRuntime, vt as normalizePractice, x as quizPrompt } from "./runtime-B6zUpJjA.js";
|
|
2
2
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
3
3
|
//#region src/agent.js
|
|
4
4
|
const name = "aha-tutor-agent";
|