dsh-plugin-lookatstudy 0.13.1 → 0.14.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/README.md +12 -12
- package/lib/client.js +831 -1017
- package/lib/client.js.map +1 -1
- package/lib/index.mjs +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Turn any markdown document, local folder, or GitHub learning repository into a g
|
|
|
6
6
|
|
|
7
7
|
| | |
|
|
8
8
|
|---|---|
|
|
9
|
-
|  | **The 学习
|
|
9
|
+
|  | **The 学习 panel** — course rail (progress, mastery bars, due box), the tutor chat with its own composer, and the focus lesson's blackboard; opened from the sidebar's 学习 row (0.14.0 screenshot pending — the shot shows the 0.13 tab arrangement of the same three columns). |
|
|
10
10
|
|  | **讲解** — server-sanitized markdown rendered rich on demand: KaTeX formulas, syntax-highlighted code, mermaid diagrams (CDN loaders, silent degrade offline). |
|
|
11
11
|
|  | **🕸 概念图** — the lesson's knowledge components laid out as a draw.io-style concept graph (bundled ELK layout, no external service). |
|
|
12
12
|
|  | **课程栏** — sections, gating, mastery bars, ⚡ weak spots, exam stars, XP & streak. |
|
|
@@ -32,28 +32,28 @@ Works with any profile. In the `web` profile the plugin additionally serves the
|
|
|
32
32
|
- **Learner memory** — three slots (global style / per-course pattern / per-lesson gap), read-merge-write (`study_remember`).
|
|
33
33
|
- A dynamic **learner snapshot** (focus, strategy band, weak concepts, friction, memory, due count, pending proposal) is injected as runtime context every turn.
|
|
34
34
|
|
|
35
|
-
**2. The study
|
|
35
|
+
**2. The study panel (`dsh.client`).** A 「学习」 row in the dsh sidebar (below 新会话, alongside other plugin entries) opens a full-takeover panel arranged like upstream LookatStudy's own app — three columns styled entirely with dsh's `--dsw-*` tokens; closing it (or navigating to any session) hands the center column straight back to the host:
|
|
36
36
|
|
|
37
37
|
| Column | What you get |
|
|
38
38
|
|---|---|
|
|
39
39
|
| 左 · 课程 | Course picker, progress, due box with one-click review kickoff, lesson tree (gating, mastery bars, ⚡😣 weak spots, clickable focus), one-click demo import when empty |
|
|
40
|
-
| 中 ·
|
|
41
|
-
| 右 · 黑板 | The focus lesson's 讲解 (server-sanitized markdown, rendered rich on demand: KaTeX / syntax highlighting / mermaid), a
|
|
40
|
+
| 中 · 导师 | The tutor conversation with its OWN composer — the panel never touches dsh's host composer. Sending (or tapping a starter) is the single entry into a lesson thread: the panel activates the study surface if dormant, creates the lesson's session on the host, and prompts through the host's session face; replies stream back from the session's event window and render through the plugin's markdown pipeline. Soul pills (直讲/引导/实战) ride the column head; the tutor's quiz options (A–D) render as clickable answer buttons under the latest reply |
|
|
41
|
+
| 右 · 黑板 | The focus lesson's 讲解 (server-sanitized markdown, rendered rich on demand: KaTeX / syntax highlighting / mermaid), a 🕸 concept-map view of the same lesson, the Cornell 笔记 three zones (each note deletable with an armed confirm), and the read-aloud bar — 朗读本课 speaks the lesson sentence-by-sentence through Microsoft's Edge neural voices (host-side synthesis, disk-cached; falls back to the browser's system voice offline) with the current sentence highlighted |
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Clicking a lesson in the rail only FOCUSES it — progress updates, the blackboard switches, zero model traffic (upstream's exact interaction). The tutor engages only when you send. Every course-tree glyph, tag, and mastery bar carries a hover tooltip explaining its meaning.
|
|
44
44
|
|
|
45
|
-
All study state comes from one shared 3 s poll over `/lookatstudy/api/state
|
|
45
|
+
All study state comes from one shared 3 s poll over `/lookatstudy/api/state`. The host is exactly the conversation-model + agent-turn engine; the panel owns the UI, the host owns the loop.
|
|
46
46
|
|
|
47
47
|
## dsh-native surfaces
|
|
48
48
|
|
|
49
49
|
Beyond the tab, the plugin rides the host's own integration points:
|
|
50
50
|
|
|
51
|
-
- **Bilingual UI** — the whole client half registers a `lookatstudy` locale namespace (zh/en, key parity enforced); switch the host language and the study
|
|
51
|
+
- **Bilingual UI** — the whole client half registers a `lookatstudy` locale namespace (zh/en, key parity enforced); switch the host language and the study panel follows.
|
|
52
52
|
- **Settings page** — a `settings.section` entry in the host settings shell: teaching style, study mode on/off, read-only stats (courses/XP/streak) and the state-file path.
|
|
53
53
|
- **`/study` command** — bare `/study` activates a dormant install and queues the kickoff prompt; `/study <text>` queues that request. Works wherever slash commands do.
|
|
54
54
|
- **Composer dock pill** — `conversation.composer.dock` entry showing ⚡due · 🔥streak · Lv while active (renders nothing while dormant).
|
|
55
55
|
- **Tool cards in the conversation tab** — keyed `tool.call.toolview` entries for `study_record_answer` (✓/✗ + concept), `study_lesson`, `study_due_reviews`, `study_exam_result`.
|
|
56
|
-
- **Boot-tier prefetch** — `dsh.client.immediately: true`, so the
|
|
56
|
+
- **Boot-tier prefetch** — `dsh.client.immediately: true`, so the sidebar 学习 row renders on first paint with no bundle fetch.
|
|
57
57
|
|
|
58
58
|
## Tool surface (25)
|
|
59
59
|
|
|
@@ -84,14 +84,14 @@ LookatStudy's Electron-native experiences have no host surface in dsh: the 伴
|
|
|
84
84
|
|
|
85
85
|
```sh
|
|
86
86
|
pnpm exec tsdown # build lib/ (host + client entries, peers external)
|
|
87
|
-
pnpm test #
|
|
87
|
+
pnpm test # node:test cases over the real source (no key needed)
|
|
88
88
|
|
|
89
|
-
# iterate against a live dsh (
|
|
89
|
+
# iterate against a live dsh (needs a deepseek-harness checkout):
|
|
90
90
|
pnpm dsh web --patch ../dsh-plugin-lookatstudy/cordis.dev.yml # run from the harness checkout
|
|
91
|
-
# then open
|
|
91
|
+
# then open the served URL and click the 学习 row in the sidebar
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
Layout: persona + snapshot context in `src/index.ts`, tools in `src/tools.ts`, state transitions in `src/state.ts`, the study
|
|
94
|
+
Layout: persona + snapshot context in `src/index.ts`, tools in `src/tools.ts`, state transitions in `src/state.ts`, the study panel's HTTP API in `src/dashboard.ts`, sanitized markdown in `src/markdown.ts` (shared by the host routes and the client bundle), the browser half in `src/client/` (`index.ts` registrations, `shell-entry.ts` the DOM sidebar row + center-column takeover, `panel.tsx` the upstream-arranged three columns, `session-feed.ts` the session-event-window → chat-rows fold, `data.ts` shared poll store, `styles.ts` injected `--dsw-*` stylesheet), UI card projections in `src/cards.ts`, vendored zero-dependency engine in `src/vendor/` (see each file's provenance header; the one local modification to the folder scanner's dedup key is documented there).
|
|
95
95
|
|
|
96
96
|
Publishing note: `exports` must keep `"./package.json": "./package.json"` — the web bundle's client-module scanner resolves it to discover the `dsh.client` browser half. When re-installing a rebuilt tarball into a profile, remove the old one first or bump the version (pnpm reuses same-spec tarballs).
|
|
97
97
|
|