@klarkxy/dsh-context-cleaner 0.0.0-stage → 0.1.1
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/LICENSE +42 -0
- package/README.md +19 -2
- package/client.js +59 -0
- package/cordis.patch.yml +8 -0
- package/docs/README.zh-CN.md +20 -0
- package/icon.svg +13 -0
- package/index.js +2 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +69 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
The Star And Thank Author License (SATA)
|
|
2
|
+
Version 2.1, September 2026
|
|
3
|
+
|
|
4
|
+
Copyright © 2026 Klarkxy(278370456@qq.com)
|
|
5
|
+
|
|
6
|
+
Project Url: https://github.com/klarkxy/dsh-editor
|
|
7
|
+
https://github.com/klarkxy/sata-license
|
|
8
|
+
https://github.com/klarkxy/dsh-plugins
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in
|
|
18
|
+
all copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
And wait, one more thing — an invitation, not a condition: it would be best if
|
|
21
|
+
you star/+1/like the project(s) in the project url section above, and thank the
|
|
22
|
+
author(s) in the Copyright section. You may, and arguably you should — but the
|
|
23
|
+
permissions above hold either way, star or no star.
|
|
24
|
+
|
|
25
|
+
Here are some suggested ways:
|
|
26
|
+
|
|
27
|
+
- Email the authors a thank-you letter, and make friends with him/her/them.
|
|
28
|
+
- Report bugs or issues.
|
|
29
|
+
- Tell friends what a wonderful project this is.
|
|
30
|
+
- And, sure, you can just express thanks in your mind without telling the world.
|
|
31
|
+
|
|
32
|
+
Contributors of this project by forking have the option to add his/her name and
|
|
33
|
+
forked project url at copyright and project url sections, but shall not delete
|
|
34
|
+
or modify anything else in these two sections.
|
|
35
|
+
|
|
36
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
37
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
38
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
39
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
40
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
41
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
42
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Context Cleaner
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- release-state-note -->
|
|
4
|
+
|
|
5
|
+
Context Cleaner hides the two decoration cards at the top right of the dsh-context dashboard: the plugin-info card and the promotion/recommendation card. The freed column collapses and the stats card fills the header row.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
First install and enable `dsh-context` — this plugin only declutters it and does not provide the context panel itself.
|
|
10
|
+
|
|
11
|
+
From a source checkout, install the bundle directory `plugins/dsh-context-cleaner` through the DSH plugin manager (its absolute path also works) and enable the **Context Cleaner** row. Nothing else needs configuring.
|
|
12
|
+
|
|
13
|
+
## Use
|
|
14
|
+
|
|
15
|
+
No action needed. While the plugin is enabled, the plugin-info and promotion cards stay hidden in the dsh-context panel — in the context tab and the sidebar entry alike. Disabling or uninstalling the bundle removes the rule and restores the cards.
|
|
16
|
+
|
|
17
|
+
## Limits
|
|
18
|
+
|
|
19
|
+
- The hiding relies on dsh-context's rendered layout; an upstream redesign may need a matching update of this plugin.
|
|
20
|
+
- The plugin removes the cards visually only — dsh-context still runs its recommendation fetch in the background.
|
package/client.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// dsh-context-cleaner client half.
|
|
2
|
+
//
|
|
3
|
+
// dsh-context renders two decoration cards in the right column of the top
|
|
4
|
+
// header row (.lc-cols.lc-head > .lc-col) on its dashboard:
|
|
5
|
+
// - "Plugin Info" (.lc-card containing .lc-pi-grid; the only card without a
|
|
6
|
+
// dedicated root class)
|
|
7
|
+
// - the promotion card (a.lc-card.lc-recom, remote recommendations with a
|
|
8
|
+
// bundled deepseek-platform fallback)
|
|
9
|
+
// The upstream Config schema exposes no switch for either card, so this module
|
|
10
|
+
// hides them with a scoped stylesheet. .lc-root only appears on dsh-context
|
|
11
|
+
// surfaces (dashboard / fleet); its settings layer uses .lc-modal-card, so the
|
|
12
|
+
// rule cannot reach the plugin's own settings or the host UI. The selectors
|
|
13
|
+
// and the lc-* class names are dsh-context implementation details verified
|
|
14
|
+
// against 0.82.2 (see peerDependencies).
|
|
15
|
+
window.__ModuleLoader__.load({
|
|
16
|
+
id: '@klarkxy/dsh-context-cleaner',
|
|
17
|
+
factory() {
|
|
18
|
+
function recordClientLog(level, event, message) {
|
|
19
|
+
try {
|
|
20
|
+
const g = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
21
|
+
const list = Array.isArray(g.__KLARKXY_PLUGIN_LOGS__) ? g.__KLARKXY_PLUGIN_LOGS__ : (g.__KLARKXY_PLUGIN_LOGS__ = []);
|
|
22
|
+
list.push({
|
|
23
|
+
version: 1,
|
|
24
|
+
at: new Date().toISOString(),
|
|
25
|
+
level,
|
|
26
|
+
source: 'dsh-context-cleaner',
|
|
27
|
+
surface: 'client',
|
|
28
|
+
event,
|
|
29
|
+
message,
|
|
30
|
+
});
|
|
31
|
+
if (list.length > 300) list.splice(0, list.length - 300);
|
|
32
|
+
} catch {}
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
apply(ctx) {
|
|
36
|
+
ctx.effect(() => {
|
|
37
|
+
if (typeof document === 'undefined') return;
|
|
38
|
+
const tag = document.createElement('style');
|
|
39
|
+
// The Host removes a package's styles by its owner id, which is the
|
|
40
|
+
// registration id minus a '/client' suffix. The tag must carry the
|
|
41
|
+
// package name, not a short alias, or an unload leaves it behind.
|
|
42
|
+
tag.dataset.plugin = '@klarkxy/dsh-context-cleaner';
|
|
43
|
+
tag.dataset.pluginCss = 'dsh-context-cleaner/hide-cards.css';
|
|
44
|
+
// Collapse the header column that wraps both cards. The sibling
|
|
45
|
+
// stats card is a flex item (.lc-head > .lc-card:has(.lc-stats)) and
|
|
46
|
+
// grows to fill the row, so no empty shell is left behind.
|
|
47
|
+
tag.textContent =
|
|
48
|
+
'.lc-root > .lc-cols.lc-head > .lc-col:has(.lc-pi-grid, .lc-recom) { display: none; }';
|
|
49
|
+
document.head.appendChild(tag);
|
|
50
|
+
recordClientLog('info', 'client.loaded', 'Installed dsh-context-cleaner stylesheet.');
|
|
51
|
+
return () => {
|
|
52
|
+
tag.remove();
|
|
53
|
+
recordClientLog('debug', 'client.disposed', 'Removed dsh-context-cleaner stylesheet.');
|
|
54
|
+
};
|
|
55
|
+
}, 'dsh-context-cleaner: hide cards');
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
});
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Bundle patch layer: the row loads the package's main entry as the host half
|
|
2
|
+
# (a plain Cordis plugin); the `dsh.client` declaration makes the web app load
|
|
3
|
+
# its ./client bundle as the browser half.
|
|
4
|
+
# dsh-context itself is NOT inserted here: its activation stays controlled by
|
|
5
|
+
# the profile's own bundle list. This row only ships a scoped stylesheet.
|
|
6
|
+
- insert:
|
|
7
|
+
- id: dsh-context-cleaner
|
|
8
|
+
name: '@klarkxy/dsh-context-cleaner'
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 上下文面板清理
|
|
2
|
+
|
|
3
|
+
<!-- release-state-note -->
|
|
4
|
+
|
|
5
|
+
本插件隐藏 dsh-context 仪表盘右上角的两张装饰卡片:插件信息卡和推广/推荐卡。隐藏后整列收回,统计卡铺满顶部一行。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
先安装并启用 `dsh-context`——本插件只做清理,不提供上下文面板本身。
|
|
10
|
+
|
|
11
|
+
在源码检出中,通过 DSH 插件管理器安装 `plugins/dsh-context-cleaner` 目录(也可使用其绝对路径),并启用「上下文面板清理」。无需其他配置。
|
|
12
|
+
|
|
13
|
+
## 使用
|
|
14
|
+
|
|
15
|
+
无需操作。插件启用期间,dsh-context 面板中的插件信息卡与推广卡保持隐藏——上下文标签页和侧边栏入口同样生效。停用或卸载本插件会移除规则,卡片随之恢复。
|
|
16
|
+
|
|
17
|
+
## 主要限制
|
|
18
|
+
|
|
19
|
+
- 隐藏依赖 dsh-context 渲染出的界面结构,上游改版可能需要本插件同步适配。
|
|
20
|
+
- 仅做视觉隐藏——dsh-context 后台仍会发起推荐内容请求。
|
package/icon.svg
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="Context Cleaner">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#1c2430"/>
|
|
3
|
+
<!-- stats card kept -->
|
|
4
|
+
<rect x="9" y="14" width="30" height="15" rx="4" fill="none" stroke="#7ea2e8" stroke-width="2.5"/>
|
|
5
|
+
<line x1="14" y1="20" x2="30" y2="20" stroke="#7ea2e8" stroke-width="2" stroke-linecap="round"/>
|
|
6
|
+
<line x1="14" y1="25" x2="26" y2="25" stroke="#7ea2e8" stroke-width="2" stroke-linecap="round"/>
|
|
7
|
+
<rect x="9" y="35" width="30" height="15" rx="4" fill="none" stroke="#7ea2e8" stroke-width="2.5"/>
|
|
8
|
+
<line x1="14" y1="41" x2="30" y2="41" stroke="#7ea2e8" stroke-width="2" stroke-linecap="round"/>
|
|
9
|
+
<line x1="14" y1="46" x2="26" y2="46" stroke="#7ea2e8" stroke-width="2" stroke-linecap="round"/>
|
|
10
|
+
<!-- promo column crossed out -->
|
|
11
|
+
<rect x="43" y="14" width="14" height="36" rx="4" fill="none" stroke="#8b95a5" stroke-width="2.5" opacity="0.7"/>
|
|
12
|
+
<line x1="40" y1="53" x2="60" y2="11" stroke="#e8716f" stroke-width="3.5" stroke-linecap="round"/>
|
|
13
|
+
</svg>
|
package/index.js
ADDED
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klarkxy/dsh-context-cleaner",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Hide the plugin-info and promotion cards at the top of the dsh-context dashboard.",
|
|
5
|
+
"icon": "./icon.svg",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=24",
|
|
10
|
+
"dsh": ">=0.2.2-rc.1"
|
|
11
|
+
},
|
|
12
|
+
"main": "./index.js",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": "./index.js",
|
|
15
|
+
"./client": "./client.js",
|
|
16
|
+
"./icon": "./icon.svg",
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
"./locale/*.json": "./locale/*.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"index.js",
|
|
22
|
+
"client.js",
|
|
23
|
+
"icon.svg",
|
|
24
|
+
"locale/*.json",
|
|
25
|
+
"cordis.patch.yml",
|
|
26
|
+
"README.md",
|
|
27
|
+
"docs/README.zh-CN.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"test": "vitest run --root ../.. --config vitest.editor-plugins.config.ts --maxWorkers=2 plugins/dsh-context-cleaner/src"
|
|
32
|
+
},
|
|
33
|
+
"dsh": {
|
|
34
|
+
"bundle": {
|
|
35
|
+
"patch": "./cordis.patch.yml"
|
|
36
|
+
},
|
|
37
|
+
"client": {
|
|
38
|
+
"platform": "web",
|
|
39
|
+
"immediately": true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"dsh-context": ">=0.82.2"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"dsh",
|
|
47
|
+
"dsh-plugin",
|
|
48
|
+
"dsh-plugins",
|
|
49
|
+
"deepseek-harness",
|
|
50
|
+
"deepseek-harness-plugin",
|
|
51
|
+
"dsh-context",
|
|
52
|
+
"context-panel",
|
|
53
|
+
"declutter"
|
|
54
|
+
],
|
|
55
|
+
"repository": {
|
|
56
|
+
"type": "git",
|
|
57
|
+
"url": "git+https://github.com/klarkxy/dsh-plugins.git",
|
|
58
|
+
"directory": "plugins/dsh-context-cleaner"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://klarkxy.github.io/dsh-plugins/plugins/context-cleaner/",
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/klarkxy/dsh-plugins/issues"
|
|
63
|
+
},
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public",
|
|
66
|
+
"registry": "https://registry.npmjs.org/"
|
|
67
|
+
},
|
|
68
|
+
"dshRelease": {
|
|
69
|
+
"contentHash": "13c5e67f9b0bec7127312a32a66c7f96d5f347072c4d52b69e67f920edace6a7"
|
|
70
|
+
}
|
|
71
|
+
}
|