xechat-dsh 0.1.1 → 0.2.2
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/INSTALL.md +10 -1
- package/LICENSE +21 -21
- package/README.md +25 -8
- package/install.bat +61 -61
- package/lib/client.js +415 -24
- package/lib/client.js.map +1 -1
- package/lib/xechat-app.css +77 -63
- package/lib/xechat-app.js +45 -27
- package/package.json +1 -1
package/lib/xechat-app.js
CHANGED
|
@@ -73240,7 +73240,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
73240
73240
|
if (!username) username = "User-" + Date.now().toString(36);
|
|
73241
73241
|
return {
|
|
73242
73242
|
action: "LOGIN",
|
|
73243
|
-
body: { username, status: "FISHING", platform: "
|
|
73243
|
+
body: { username, status: "FISHING", platform: "DSH", uuid: this._uuid(), pluginVersion: "", reconnected: false, token: this._adminToken() }
|
|
73244
73244
|
};
|
|
73245
73245
|
case "setstatus":
|
|
73246
73246
|
const raw = parts[1];
|
|
@@ -74070,6 +74070,32 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74070
74070
|
}
|
|
74071
74071
|
}
|
|
74072
74072
|
});
|
|
74073
|
+
const PLATFORM_LABELS = {
|
|
74074
|
+
WEB: "浏览器",
|
|
74075
|
+
IDEA: "JetBrains IDEA",
|
|
74076
|
+
VSCODE: "VS Code",
|
|
74077
|
+
DSH: "DeepSeek Harness",
|
|
74078
|
+
COMMAND: "命令行"
|
|
74079
|
+
};
|
|
74080
|
+
const PLATFORM_ICONS = {
|
|
74081
|
+
WEB: '<svg class="pf-svg" style="vertical-align:-0.15em" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m.6-3h16.8M3.6 15h16.8"/><path d="M11.5 3a17 17 0 0 0 0 18m1-18a17 17 0 0 1 0 18"/></g></svg>',
|
|
74082
|
+
IDEA: '<svg class="pf-svg" style="vertical-align:-0.15em" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="m3.723 3.111h5v1.834h-1.39v6.277h1.39v1.834h-5v-1.834h1.444V4.945H3.723zm11.055 0H17v6.5c0 .612-.055 1.111-.222 1.556c-.167.444-.39.777-.723 1.11c-.277.279-.666.557-1.11.668a3.9 3.9 0 0 1-1.445.278c-.778 0-1.444-.167-1.944-.445a4.8 4.8 0 0 1-1.279-1.056l1.39-1.555a3.2 3.2 0 0 0 .833.722c.277.167.611.278.945.278c.389 0 .721-.111 1-.389c.221-.278.333-.667.333-1.278zM2.222 19.5h9V21h-9z"/></svg>',
|
|
74083
|
+
VSCODE: '<svg class="pf-svg" style="vertical-align:-0.15em" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63l-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12L.326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128l9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/></svg>',
|
|
74084
|
+
DSH: '<svg class="pf-svg" style="vertical-align:-0.15em" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M23.748 4.651c-.254-.124-.364.113-.512.233c-.051.04-.094.09-.137.137c-.372.397-.806.657-1.373.626c-.829-.046-1.537.214-2.163.848c-.133-.782-.575-1.248-1.247-1.548c-.352-.155-.708-.311-.955-.65c-.172-.24-.219-.509-.305-.774c-.055-.16-.11-.323-.293-.35c-.2-.031-.278.136-.356.276c-.313.572-.434 1.202-.422 1.84c.027 1.436.633 2.58 1.838 3.393c.137.094.172.187.129.323c-.082.28-.18.553-.266.833c-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836c.27-.098.094-.433-.778-.428c-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136a9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653c1.857 1.533 3.997 2.284 6.438 2.14c1.482-.085 3.132-.284 4.994-1.86c.47.234.962.328 1.78.398c.629.058 1.235-.031 1.705-.129c.735-.155.684-.836.418-.961c-2.155-1.004-1.682-.595-2.112-.926c1.095-1.295 2.768-3.598 3.284-6.733c.05-.346.115-.834.108-1.114c-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517c.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16c-.39.024-.32.472-.234.763c.09.288.207.487.371.74c.114.167.192.416-.113.603c-.673.416-1.842-.14-1.897-.168c-1.361-.801-2.5-1.86-3.301-3.306c-.775-1.393-1.225-2.888-1.299-4.482c-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774c.868.86 1.525 1.887 2.202 2.89c.72 1.066 1.494 2.082 2.48 2.915c.348.291.626.513.892.677c-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287a.3.3 0 0 1 .113.074a.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727c-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078a.253.253 0 0 1-.114-.358a1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016c.352.144.618.408 1.001.782c.392.451.462.576.685.915c.176.264.336.536.446.848c.066.194-.02.353-.25.45"/></svg>'
|
|
74085
|
+
};
|
|
74086
|
+
const PLATFORM_TOKEN_RE = /\{\{pf:([A-Z]+)\}\}/g;
|
|
74087
|
+
function platformSvg(p2) {
|
|
74088
|
+
return PLATFORM_ICONS[p2] || "";
|
|
74089
|
+
}
|
|
74090
|
+
function platformLabel(p2) {
|
|
74091
|
+
return PLATFORM_LABELS[p2] || p2 || "未知平台";
|
|
74092
|
+
}
|
|
74093
|
+
function platformMark(p2) {
|
|
74094
|
+
return PLATFORM_ICONS[p2] ? "{{pf:" + p2 + "}}" : "";
|
|
74095
|
+
}
|
|
74096
|
+
function parsePlatformMarkup(html) {
|
|
74097
|
+
return String(html || "").replace(PLATFORM_TOKEN_RE, (m2, key) => PLATFORM_ICONS[key] || "");
|
|
74098
|
+
}
|
|
74073
74099
|
function _statusText(s2) {
|
|
74074
74100
|
switch (s2) {
|
|
74075
74101
|
case "FISHING":
|
|
@@ -74083,15 +74109,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
74083
74109
|
}
|
|
74084
74110
|
}
|
|
74085
74111
|
function _platformIcon(p2) {
|
|
74086
|
-
|
|
74087
|
-
case "IDEA":
|
|
74088
|
-
return "☕";
|
|
74089
|
-
case "WEB":
|
|
74090
|
-
case "VSCODE":
|
|
74091
|
-
return "🌐";
|
|
74092
|
-
default:
|
|
74093
|
-
return "";
|
|
74094
|
-
}
|
|
74112
|
+
return platformMark(p2);
|
|
74095
74113
|
}
|
|
74096
74114
|
function _formatUserMessageHead(data) {
|
|
74097
74115
|
const time = data.time || "";
|
|
@@ -82872,7 +82890,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
82872
82890
|
const processed = props.content.replace(/!\[([^]]*)\]\(([^)]+)\)/g, (m2, alt, url) => {
|
|
82873
82891
|
return `})`;
|
|
82874
82892
|
});
|
|
82875
|
-
return md.render(preprocessFont(processed));
|
|
82893
|
+
return parsePlatformMarkup(md.render(preprocessFont(processed)));
|
|
82876
82894
|
});
|
|
82877
82895
|
const isDirectImage = computed(() => {
|
|
82878
82896
|
if (!props.fileName) return false;
|
|
@@ -83000,7 +83018,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
83000
83018
|
};
|
|
83001
83019
|
}
|
|
83002
83020
|
};
|
|
83003
|
-
const MarkdownMessage = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
83021
|
+
const MarkdownMessage = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-2abd886a"]]);
|
|
83004
83022
|
const STORAGE_KEY$2 = "xechat_text_styles";
|
|
83005
83023
|
const BUILTIN_STYLES = [
|
|
83006
83024
|
{ id: "red", name: "红色文字", tag: '<span style="color:#ff4444">{text}</span>' },
|
|
@@ -95379,7 +95397,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95379
95397
|
body: {
|
|
95380
95398
|
username,
|
|
95381
95399
|
status: "FISHING",
|
|
95382
|
-
|
|
95400
|
+
// 本前端只跑在 DSH 桌面端(DeepSeek Harness 插件),固定上报 DSH,
|
|
95401
|
+
// 与浏览器打开的 xechat-web(WEB)、VS Code / IDEA 插件区分开
|
|
95402
|
+
platform: "DSH",
|
|
95383
95403
|
uuid: deviceStore.uuid,
|
|
95384
95404
|
pluginVersion: srv && srv.version || "",
|
|
95385
95405
|
reconnected: false,
|
|
@@ -95413,7 +95433,9 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
95413
95433
|
body: {
|
|
95414
95434
|
username: saved2.username,
|
|
95415
95435
|
status: saved2.status || "FISHING",
|
|
95416
|
-
|
|
95436
|
+
// 本前端只跑在 DSH 桌面端(DeepSeek Harness 插件),固定上报 DSH,
|
|
95437
|
+
// 与浏览器打开的 xechat-web(WEB)、VS Code / IDEA 插件区分开
|
|
95438
|
+
platform: "DSH",
|
|
95417
95439
|
uuid: deviceStore.uuid,
|
|
95418
95440
|
pluginVersion: srv && srv.version || "",
|
|
95419
95441
|
reconnected: true,
|
|
@@ -96097,7 +96119,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
96097
96119
|
};
|
|
96098
96120
|
}
|
|
96099
96121
|
};
|
|
96100
|
-
const ChatPanel = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-
|
|
96122
|
+
const ChatPanel = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-698903a5"]]);
|
|
96101
96123
|
const PALETTES = {
|
|
96102
96124
|
dark: {
|
|
96103
96125
|
/** iframe 背后的底色:页面加载中/空白时露出的颜色 */
|
|
@@ -101168,7 +101190,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101168
101190
|
key: 0,
|
|
101169
101191
|
class: "user-region"
|
|
101170
101192
|
};
|
|
101171
|
-
const _hoisted_8$2 =
|
|
101193
|
+
const _hoisted_8$2 = ["title", "innerHTML"];
|
|
101172
101194
|
const _hoisted_9$2 = {
|
|
101173
101195
|
key: 1,
|
|
101174
101196
|
class: "user-actions"
|
|
@@ -101270,15 +101292,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101270
101292
|
}
|
|
101271
101293
|
}
|
|
101272
101294
|
function platformIcon(p2) {
|
|
101273
|
-
|
|
101274
|
-
case "IDEA":
|
|
101275
|
-
return "☕";
|
|
101276
|
-
case "WEB":
|
|
101277
|
-
case "VSCODE":
|
|
101278
|
-
return "🌐";
|
|
101279
|
-
default:
|
|
101280
|
-
return "";
|
|
101281
|
-
}
|
|
101295
|
+
return platformSvg(p2);
|
|
101282
101296
|
}
|
|
101283
101297
|
return (_ctx, _cache) => {
|
|
101284
101298
|
const _component_el_tag = resolveComponent("el-tag");
|
|
@@ -101322,7 +101336,11 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101322
101336
|
createBaseVNode("span", _hoisted_5$3, toDisplayString(statusIcon(u2.status)), 1),
|
|
101323
101337
|
createBaseVNode("span", _hoisted_6$2, toDisplayString(u2.username), 1),
|
|
101324
101338
|
u2.displayRegion ? (openBlock(), createElementBlock("span", _hoisted_7$2, "[" + toDisplayString(u2.displayRegion) + "]", 1)) : createCommentVNode("", true),
|
|
101325
|
-
createBaseVNode("span",
|
|
101339
|
+
createBaseVNode("span", {
|
|
101340
|
+
class: "user-platform",
|
|
101341
|
+
title: unref(platformLabel)(u2.platform),
|
|
101342
|
+
innerHTML: platformIcon(u2.platform)
|
|
101343
|
+
}, null, 8, _hoisted_8$2),
|
|
101326
101344
|
canManage(u2) ? (openBlock(), createElementBlock("span", _hoisted_9$2, [
|
|
101327
101345
|
createBaseVNode("button", {
|
|
101328
101346
|
class: normalizeClass(["op-btn", { off: !hasPermit(u2, PERMIT_SEND_FILE) }]),
|
|
@@ -101350,7 +101368,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
101350
101368
|
};
|
|
101351
101369
|
}
|
|
101352
101370
|
};
|
|
101353
|
-
const OnlineUsersPanel = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
101371
|
+
const OnlineUsersPanel = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-a8a21ed8"]]);
|
|
101354
101372
|
const _hoisted_1$2 = { class: "style-editor" };
|
|
101355
101373
|
const _hoisted_2$2 = { class: "editor-header" };
|
|
101356
101374
|
const _hoisted_3$2 = { class: "header-left" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xechat-dsh",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "xechat side-panel chat client for the DeepSeek Harness Web UI: a dockable sidebar that keeps the XEChat pond conversation available while you work.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|