@lijian-ui/dsh-session-cleaner 0.1.3 → 0.1.4
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/lib/client.js +35 -0
- package/package.json +87 -87
package/lib/client.js
CHANGED
|
@@ -722,6 +722,41 @@ window.__ModuleLoader__.load({
|
|
|
722
722
|
archiveSession: (sessionId) => officialArchive ? officialArchive(sessionId) : api.archive(sessionId).then((r) => r.ok)
|
|
723
723
|
})
|
|
724
724
|
}, SessionManagerSection));
|
|
725
|
+
const navLabels = /* @__PURE__ */ new Set([zh["section.label"], en["section.label"]]);
|
|
726
|
+
const sessionNavSvg = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" data-scn-nav=\"1\"><path d=\"M8.00003 0.3237C3.76075 0.3237 0.32373 3.76072 0.32373 8C0.32373 9.17603 0.589121 10.2922 1.0632 11.2901L1.35291 11.8989L2.5705 11.3205L2.28079 10.7117C1.89079 9.89074 1.67301 8.97167 1.67301 8C1.67301 4.50546 4.50549 1.67298 8.00003 1.67298C11.4946 1.67298 14.3271 4.50546 14.3271 8C14.3271 11.4945 11.4946 14.327 8.00003 14.327C7.28473 14.327 6.76077 14.277 6.29621 14.1487C5.83857 14.0224 5.40441 13.8109 4.88514 13.4488C4.12569 12.919 3.03778 12.7316 2.141 13.2978L2.12682 13.307L2.11264 13.3171L1.34886 13.854L1.79659 15.188L2.86122 14.4384C3.19068 14.2305 3.68325 14.2542 4.11326 14.5539C4.72789 14.9826 5.30042 15.2724 5.93762 15.4484C6.56803 15.6224 7.22776 15.6763 8.00003 15.6763C12.2393 15.6763 15.6763 12.2393 15.6763 8C15.6763 3.76072 12.2393 0.3237 8.00003 0.3237ZM7.32033 4.82535V7.32536H4.82538V8.67464H7.32033V11.1747H8.6696V8.67464H11.1747V7.32536H8.6696V4.82535H7.32033Z\" fill=\"currentColor\"/></svg>";
|
|
727
|
+
const patchNavIcon = () => {
|
|
728
|
+
if (typeof document === "undefined") return;
|
|
729
|
+
for (const span of Array.from(document.querySelectorAll("button > span"))) {
|
|
730
|
+
if (!navLabels.has(span.textContent ?? "")) continue;
|
|
731
|
+
const button = span.parentElement;
|
|
732
|
+
if (button === null) continue;
|
|
733
|
+
const stale = button.querySelector("svg:not([data-scn-nav])");
|
|
734
|
+
if (stale === null) continue;
|
|
735
|
+
const template = document.createElement("template");
|
|
736
|
+
template.innerHTML = sessionNavSvg;
|
|
737
|
+
const next = template.content.firstElementChild;
|
|
738
|
+
if (next === null) continue;
|
|
739
|
+
const cls = stale.getAttribute("class");
|
|
740
|
+
if (cls !== null) next.setAttribute("class", cls);
|
|
741
|
+
stale.replaceWith(next);
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
if (typeof document !== "undefined" && typeof MutationObserver !== "undefined" && document.body !== null) {
|
|
745
|
+
let scheduled = false;
|
|
746
|
+
const schedule = () => {
|
|
747
|
+
if (scheduled) return;
|
|
748
|
+
scheduled = true;
|
|
749
|
+
queueMicrotask(() => {
|
|
750
|
+
scheduled = false;
|
|
751
|
+
patchNavIcon();
|
|
752
|
+
});
|
|
753
|
+
};
|
|
754
|
+
patchNavIcon();
|
|
755
|
+
new MutationObserver(schedule).observe(document.body, {
|
|
756
|
+
childList: true,
|
|
757
|
+
subtree: true
|
|
758
|
+
});
|
|
759
|
+
}
|
|
725
760
|
}
|
|
726
761
|
//#endregion
|
|
727
762
|
exports.apply = apply;
|
package/package.json
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lijian-ui/dsh-session-cleaner",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Session management plugin for DeepSeek Harness (dsh): list / delete / archive & restore sessions, with a built-in \"Archived\" group and a delete confirm dialog (real delete, not trash). 为 DeepSeek Harness 提供会话管理:列表 / 真删除(二次确认)/ 归档分组与恢复。",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "lib/index.js",
|
|
8
|
-
"types": "lib/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./lib/index.d.ts",
|
|
12
|
-
"default": "./lib/index.js"
|
|
13
|
-
},
|
|
14
|
-
"./client": {
|
|
15
|
-
"default": "./lib/client.js"
|
|
16
|
-
},
|
|
17
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
18
|
-
"./package.json": "./package.json"
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"lib/**/*.js",
|
|
22
|
-
"lib/**/*.d.ts",
|
|
23
|
-
"cordis.patch.yml",
|
|
24
|
-
"README.md",
|
|
25
|
-
"README.en.md",
|
|
26
|
-
"LICENSE"
|
|
27
|
-
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build": "tsdown",
|
|
30
|
-
"watch": "tsdown --watch",
|
|
31
|
-
"typecheck": "tsc --noEmit",
|
|
32
|
-
"prepare": "npm run build"
|
|
33
|
-
},
|
|
34
|
-
"keywords": [
|
|
35
|
-
"deepseek-harness",
|
|
36
|
-
"dsh",
|
|
37
|
-
"dsh-plugin",
|
|
38
|
-
"session",
|
|
39
|
-
"session-cleaner",
|
|
40
|
-
"archive",
|
|
41
|
-
"delete",
|
|
42
|
-
"cordis"
|
|
43
|
-
],
|
|
44
|
-
"repository": {
|
|
45
|
-
"type": "git",
|
|
46
|
-
"url": "git+https://github.com/lijian-ui/dsh-session-cleaner.git"
|
|
47
|
-
},
|
|
48
|
-
"dsh": {
|
|
49
|
-
"bundle": {
|
|
50
|
-
"patch": "./cordis.patch.yml"
|
|
51
|
-
},
|
|
52
|
-
"client": {
|
|
53
|
-
"inject": [
|
|
54
|
-
"@deepseek-ai/dsh-client-runtime",
|
|
55
|
-
"@deepseek-ai/dsh-client-locale",
|
|
56
|
-
"@deepseek-ai/dsh-api-gateway"
|
|
57
|
-
],
|
|
58
|
-
"platform": "web",
|
|
59
|
-
"immediately": true
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"@deepseek-ai/cordis": "*",
|
|
64
|
-
"@deepseek-ai/dsh-settings": "*",
|
|
65
|
-
"@deepseek-ai/dsh-typert-protocol": "*",
|
|
66
|
-
"@deepseek-ai/schemastery": "*"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@deepseek-ai/cordis": "4.0.1",
|
|
70
|
-
"@deepseek-ai/dsh-api-gateway": "0.1.0-rc.6",
|
|
71
|
-
"@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
|
|
72
|
-
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.6",
|
|
73
|
-
"@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
|
|
74
|
-
"@deepseek-ai/dsh-client-schema-form": "0.1.0-rc.6",
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.0-rc.6",
|
|
77
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
|
|
78
|
-
"@deepseek-ai/dsh-settings": "0.1.0-rc.6",
|
|
79
|
-
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
|
|
80
|
-
"@deepseek-ai/schemastery": "3.18.1",
|
|
81
|
-
"@types/node": "^22.0.0",
|
|
82
|
-
"@types/react": "^18.3.0",
|
|
83
|
-
"react": "^18.2.0",
|
|
84
|
-
"tsdown": "^0.12.0",
|
|
85
|
-
"typescript": "^5.6.0"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@lijian-ui/dsh-session-cleaner",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Session management plugin for DeepSeek Harness (dsh): list / delete / archive & restore sessions, with a built-in \"Archived\" group and a delete confirm dialog (real delete, not trash). 为 DeepSeek Harness 提供会话管理:列表 / 真删除(二次确认)/ 归档分组与恢复。",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "lib/index.js",
|
|
8
|
+
"types": "lib/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
|
+
"default": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./client": {
|
|
15
|
+
"default": "./lib/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"lib/**/*.js",
|
|
22
|
+
"lib/**/*.d.ts",
|
|
23
|
+
"cordis.patch.yml",
|
|
24
|
+
"README.md",
|
|
25
|
+
"README.en.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "tsdown",
|
|
30
|
+
"watch": "tsdown --watch",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"prepare": "npm run build"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"deepseek-harness",
|
|
36
|
+
"dsh",
|
|
37
|
+
"dsh-plugin",
|
|
38
|
+
"session",
|
|
39
|
+
"session-cleaner",
|
|
40
|
+
"archive",
|
|
41
|
+
"delete",
|
|
42
|
+
"cordis"
|
|
43
|
+
],
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/lijian-ui/dsh-session-cleaner.git"
|
|
47
|
+
},
|
|
48
|
+
"dsh": {
|
|
49
|
+
"bundle": {
|
|
50
|
+
"patch": "./cordis.patch.yml"
|
|
51
|
+
},
|
|
52
|
+
"client": {
|
|
53
|
+
"inject": [
|
|
54
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
55
|
+
"@deepseek-ai/dsh-client-locale",
|
|
56
|
+
"@deepseek-ai/dsh-api-gateway"
|
|
57
|
+
],
|
|
58
|
+
"platform": "web",
|
|
59
|
+
"immediately": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@deepseek-ai/cordis": "*",
|
|
64
|
+
"@deepseek-ai/dsh-settings": "*",
|
|
65
|
+
"@deepseek-ai/dsh-typert-protocol": "*",
|
|
66
|
+
"@deepseek-ai/schemastery": "*"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@deepseek-ai/cordis": "4.0.1",
|
|
70
|
+
"@deepseek-ai/dsh-api-gateway": "0.1.0-rc.6",
|
|
71
|
+
"@deepseek-ai/dsh-client-connection": "0.1.0-rc.6",
|
|
72
|
+
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.6",
|
|
73
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.0-rc.6",
|
|
74
|
+
"@deepseek-ai/dsh-client-schema-form": "0.1.0-rc.6",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.6",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "0.1.0-rc.6",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.6",
|
|
78
|
+
"@deepseek-ai/dsh-settings": "0.1.0-rc.6",
|
|
79
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.0-rc.6",
|
|
80
|
+
"@deepseek-ai/schemastery": "3.18.1",
|
|
81
|
+
"@types/node": "^22.0.0",
|
|
82
|
+
"@types/react": "^18.3.0",
|
|
83
|
+
"react": "^18.2.0",
|
|
84
|
+
"tsdown": "^0.12.0",
|
|
85
|
+
"typescript": "^5.6.0"
|
|
86
|
+
}
|
|
87
|
+
}
|