dsh-visualization 0.1.3 → 0.1.5
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 +240 -0
- package/FAQ.md +48 -61
- package/GUIDE.md +270 -0
- package/README.md +37 -293
- package/package.json +10 -2
- package/screenshots.json +5 -0
- package/wallpaper/hybrid.html +221 -0
- package/wallpaper/live.html +33 -0
- package/wallpaper/lively/LivelyInfo.json +17 -0
- package/wallpaper/lively/index.html +65 -0
- package/wallpaper/lively/preview.jpg +0 -0
- package/wallpaper/lively-package.zip +0 -0
- package/wallpaper/index.html +0 -62
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>DSH Visualization</title>
|
|
6
|
+
<meta name="description" content="A live session instrument for DeepSeek Harness">
|
|
7
|
+
<style>
|
|
8
|
+
html, body { margin: 0; height: 100%; background: #0b0d11; overflow: hidden }
|
|
9
|
+
iframe { width: 100vw; height: 100vh; border: 0; display: block }
|
|
10
|
+
#msg {
|
|
11
|
+
position: fixed; inset: 0; display: none; flex-direction: column;
|
|
12
|
+
align-items: center; justify-content: center; gap: 12px;
|
|
13
|
+
color: #8d97ab; font: 15px/1.8 "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
14
|
+
background: radial-gradient(circle at 50% 45%, #141a24, #0b0d11 70%);
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
#msg b { color: #e6edfa; font-size: 19px; letter-spacing: .04em }
|
|
18
|
+
#msg code { color: #ffc46b; background: #1a1f29; padding: 2px 7px; border-radius: 4px; font-size: 13px }
|
|
19
|
+
</style>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<iframe id="frame" src="about:blank"></iframe>
|
|
23
|
+
<div id="msg">
|
|
24
|
+
<b>DSH Visualization</b>
|
|
25
|
+
<div id="why">正在连接 DeepSeek Harness…</div>
|
|
26
|
+
<div>需要:装了 <code>dsh-visualization</code> 插件,并且 DSH 正在运行</div>
|
|
27
|
+
<div style="opacity:.6">每 5 秒自动重试</div>
|
|
28
|
+
</div>
|
|
29
|
+
<script>
|
|
30
|
+
/* 插件在固定端口 8799 开了入口(被占用时往下退) */
|
|
31
|
+
var PORTS = [8799, 8798, 8797, 8796, 8795];
|
|
32
|
+
var frame = document.getElementById('frame');
|
|
33
|
+
var msg = document.getElementById('msg');
|
|
34
|
+
var why = document.getElementById('why');
|
|
35
|
+
var ok = false, i = 0;
|
|
36
|
+
|
|
37
|
+
function probe() {
|
|
38
|
+
if (ok) return;
|
|
39
|
+
if (i >= PORTS.length) {
|
|
40
|
+
i = 0;
|
|
41
|
+
msg.style.display = 'flex';
|
|
42
|
+
why.textContent = '连不上插件端口(8799–8795)';
|
|
43
|
+
setTimeout(probe, 5000);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
var p = PORTS[i++];
|
|
47
|
+
var ctl = new AbortController();
|
|
48
|
+
var tm = setTimeout(function () { ctl.abort() }, 1500);
|
|
49
|
+
why.textContent = '正在尝试 ' + p + ' …';
|
|
50
|
+
fetch('http://127.0.0.1:' + p + '/state', { signal: ctl.signal, cache: 'no-store' })
|
|
51
|
+
.then(function (r) { return r.ok ? r.json() : null })
|
|
52
|
+
.then(function (j) {
|
|
53
|
+
clearTimeout(tm);
|
|
54
|
+
if (!j) return probe();
|
|
55
|
+
ok = true;
|
|
56
|
+
msg.style.display = 'none';
|
|
57
|
+
frame.src = 'http://127.0.0.1:' + p + '/';
|
|
58
|
+
})
|
|
59
|
+
.catch(function () { clearTimeout(tm); setTimeout(probe, 120); });
|
|
60
|
+
}
|
|
61
|
+
probe();
|
|
62
|
+
setInterval(function () { if (!ok) probe() }, 8000);
|
|
63
|
+
</script>
|
|
64
|
+
</body>
|
|
65
|
+
</html>
|
|
Binary file
|
|
Binary file
|
package/wallpaper/index.html
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="zh">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>DSH Visualization</title>
|
|
6
|
-
<style>
|
|
7
|
-
html, body { margin: 0; height: 100%; background: #0b0d11; overflow: hidden; }
|
|
8
|
-
iframe { width: 100vw; height: 100vh; border: 0; display: block; }
|
|
9
|
-
#off {
|
|
10
|
-
position: fixed; inset: 0; display: none; flex-direction: column;
|
|
11
|
-
align-items: center; justify-content: center; gap: 14px;
|
|
12
|
-
color: #8d97ab; font: 15px/1.7 "Segoe UI", "Microsoft YaHei", sans-serif;
|
|
13
|
-
background: radial-gradient(circle at 50% 45%, #141a24, #0b0d11 70%);
|
|
14
|
-
text-align: center;
|
|
15
|
-
}
|
|
16
|
-
#off b { color: #e6edfa; font-size: 19px; font-weight: 600; letter-spacing: .04em; }
|
|
17
|
-
#off code { color: #ffc46b; background: #1a1f29; padding: 2px 7px; border-radius: 4px; font-size: 13px; }
|
|
18
|
-
</style>
|
|
19
|
-
</head>
|
|
20
|
-
<body>
|
|
21
|
-
<iframe id="frame" allow="cross-origin-isolated"></iframe>
|
|
22
|
-
<div id="off">
|
|
23
|
-
<b>DSH Visualization</b>
|
|
24
|
-
<div>没有连上 DeepSeek Harness。</div>
|
|
25
|
-
<div>请确认:装了 <code>dsh-visualization</code> 插件,并且 DSH 正在运行。</div>
|
|
26
|
-
<div style="opacity:.65">每 5 秒自动重试</div>
|
|
27
|
-
</div>
|
|
28
|
-
<script>
|
|
29
|
-
/* 插件的壁纸入口固定在这个区间(8799 起,被占用依次往下) */
|
|
30
|
-
var PORTS = [8799, 8798, 8797, 8796, 8795];
|
|
31
|
-
var frame = document.getElementById('frame');
|
|
32
|
-
var off = document.getElementById('off');
|
|
33
|
-
var chosen = 0;
|
|
34
|
-
|
|
35
|
-
function probe() {
|
|
36
|
-
var i = 0;
|
|
37
|
-
function next() {
|
|
38
|
-
if (i >= PORTS.length) { frame.style.display = 'none'; off.style.display = 'flex'; chosen = 0; return; }
|
|
39
|
-
var p = PORTS[i++];
|
|
40
|
-
var ctl = new AbortController();
|
|
41
|
-
var timer = setTimeout(function () { ctl.abort() }, 1200);
|
|
42
|
-
fetch('http://127.0.0.1:' + p + '/state', { signal: ctl.signal, cache: 'no-store' })
|
|
43
|
-
.then(function (r) { return r.ok ? r.json() : null })
|
|
44
|
-
.then(function (j) {
|
|
45
|
-
clearTimeout(timer);
|
|
46
|
-
if (!j) return next();
|
|
47
|
-
chosen = p;
|
|
48
|
-
off.style.display = 'none';
|
|
49
|
-
frame.style.display = 'block';
|
|
50
|
-
if (frame.src.indexOf(':' + p + '/') < 0) frame.src = 'http://127.0.0.1:' + p + '/';
|
|
51
|
-
})
|
|
52
|
-
.catch(function () { clearTimeout(timer); next(); });
|
|
53
|
-
}
|
|
54
|
-
next();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
probe();
|
|
58
|
-
/* 断线后自动重连:DSH 重启会换端口,所以每次都重新探测 */
|
|
59
|
-
setInterval(function () { if (!chosen) probe(); }, 5000);
|
|
60
|
-
</script>
|
|
61
|
-
</body>
|
|
62
|
-
</html>
|