dsh-quick-toc 0.5.0 → 0.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/CHANGELOG.en.md +37 -0
- package/CHANGELOG.md +37 -0
- package/README.en.md +35 -12
- package/README.md +34 -11
- package/lib/client.js +4257 -3282
- package/lib/index.js +63 -6
- package/package.json +8 -2
package/lib/index.js
CHANGED
|
@@ -1,8 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* dsh-
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* dsh-quick-toc host half.
|
|
3
|
+
*
|
|
4
|
+
* One job: register the `dsh-quick-toc` settings namespace so the panel's
|
|
5
|
+
* preferences live in the Host settings document and the plugin gets a card in
|
|
6
|
+
* Settings → Plugins → Plugin configuration. The browser half owns both the
|
|
7
|
+
* card and the panel; nothing here consumes the values.
|
|
8
|
+
*
|
|
9
|
+
* The composition entry is the base layer, so a value the user clears falls
|
|
10
|
+
* back to the schema defaults rather than to nothing.
|
|
11
|
+
*
|
|
12
|
+
* @module dsh-quick-toc
|
|
6
13
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
import z from "@deepseek-ai/schemastery";
|
|
15
|
+
|
|
16
|
+
/** Namespace the browser half binds and the card is keyed on. */
|
|
17
|
+
export const NAMESPACE = "dsh-quick-toc";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The durable settings section. Values are written by the browser half's card
|
|
21
|
+
* (and by the panel itself), so the schema is the validation layer, not a form.
|
|
22
|
+
*/
|
|
23
|
+
export const Config = z.object({
|
|
24
|
+
lang: z
|
|
25
|
+
.string()
|
|
26
|
+
.pattern(/^(auto|zh|en)$/)
|
|
27
|
+
.default("auto")
|
|
28
|
+
.description("Panel language: auto follows DSH, zh or en forces one"),
|
|
29
|
+
dock: z
|
|
30
|
+
.string()
|
|
31
|
+
.pattern(/^(left|right)$/)
|
|
32
|
+
.default("left")
|
|
33
|
+
.description("Which edge the panel docks to by default"),
|
|
34
|
+
levels: z
|
|
35
|
+
.array(z.number().min(1).max(6))
|
|
36
|
+
.default([1, 2, 3, 4, 5, 6])
|
|
37
|
+
.description("Heading levels the outline shows"),
|
|
38
|
+
fuzzy: z
|
|
39
|
+
.boolean()
|
|
40
|
+
.default(false)
|
|
41
|
+
.description("Start with fuzzy search on"),
|
|
42
|
+
hover: z
|
|
43
|
+
.boolean()
|
|
44
|
+
.default(true)
|
|
45
|
+
.description("Show the hover preview card"),
|
|
46
|
+
debug: z
|
|
47
|
+
.boolean()
|
|
48
|
+
.default(false)
|
|
49
|
+
.description("Print the mount diagnostic to the browser console"),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Register the settings section. The values themselves are read and written by
|
|
54
|
+
* the browser half through the client settings scope.
|
|
55
|
+
* @param {object} ctx - host cordis context.
|
|
56
|
+
* @param {object} [config] - the plugin entry's composition config (base layer).
|
|
57
|
+
*/
|
|
58
|
+
export function apply(ctx, config) {
|
|
59
|
+
ctx.inject(["settings"], (settingsCtx) => {
|
|
60
|
+
settingsCtx.settings.installSection(ctx, NAMESPACE, Config, config ?? {}, {
|
|
61
|
+
setSource: () => {},
|
|
62
|
+
onChange: () => {},
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-quick-toc",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Conversation TOC for DeepSeek Harness (DSH): turn-grouped Markdown outline covering the whole session (unloaded turns included), title/full-text search with an optional fuzzy switch, hover previews, in-chat match highlighting, heading-level filter
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Conversation TOC for DeepSeek Harness (DSH): turn-grouped Markdown outline covering the whole session (unloaded turns included), title/full-text search with an optional fuzzy switch, hover previews, in-chat match highlighting, heading-level filter, reading-position auto-follow, a Chinese/English interface and a plugin-configuration card",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"files": [
|
|
@@ -42,9 +42,15 @@
|
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"react": "^18.2.0",
|
|
45
|
+
"@deepseek-ai/schemastery": "^3.18.0",
|
|
45
46
|
"@deepseek-ai/dsh-client-ui-chat": ">=0.1.5-rc.1",
|
|
46
47
|
"@deepseek-ai/dsh-client-ui-conversation": ">=0.1.5-rc.1"
|
|
47
48
|
},
|
|
49
|
+
"peerDependenciesMeta": {
|
|
50
|
+
"@deepseek-ai/schemastery": {
|
|
51
|
+
"optional": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
48
54
|
"license": "MIT",
|
|
49
55
|
"keywords": [
|
|
50
56
|
"dsh",
|