dsh-prompt-vcs 0.1.2 → 0.1.3
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.md +10 -0
- package/lib/vcs.web.js +31 -4
- package/lib/vcs.web.js.map +7 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
- **Fix the browser half never registering.** The client bundle was emitted as plain ESM
|
|
6
|
+
with `react` external, which prints a top-level `import` — invalid inside the loader's
|
|
7
|
+
concatenated script bundle, so evaluation aborted and every module after it failed with
|
|
8
|
+
"...loaded without registering ... via __ModuleLoader__.load". The bundle is now emitted
|
|
9
|
+
in the loader's lazy-CJS factory form (`window.__ModuleLoader__.load({ id, factory })`).
|
|
10
|
+
- Point the `./client` export's `types` at `lib/client/index.d.ts`, the file the client
|
|
11
|
+
half actually compiles to.
|
|
12
|
+
|
|
3
13
|
## 0.1.0 (2026-09-18)
|
|
4
14
|
|
|
5
15
|
Initial release.
|
package/lib/vcs.web.js
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({ id: "dsh-prompt-vcs", factory: (require) => {
|
|
2
|
+
var module = { exports: {} }; var exports = module.exports;
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/client/index.tsx
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
apply: () => apply,
|
|
26
|
+
inject: () => inject
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
29
|
+
|
|
1
30
|
// src/client/view.tsx
|
|
2
31
|
function renderPanel(payload) {
|
|
3
32
|
const rows = payload.timeline.map((e) => `<tr><td>${e.hash}</td><td>${new Date(e.timestamp).toLocaleString()}</td><td>${e.changedBy}</td><td>${e.file}</td><td>+${e.addedLines}</td><td>-${e.removedLines}</td></tr>`).join("");
|
|
@@ -20,7 +49,5 @@ function apply(ctx) {
|
|
|
20
49
|
});
|
|
21
50
|
});
|
|
22
51
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
inject
|
|
26
|
-
};
|
|
52
|
+
return module.exports; } });
|
|
53
|
+
//# sourceMappingURL=vcs.web.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/client/index.tsx", "../src/client/view.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { PanelPayload } from '../types.js';\nimport { renderPanel } from './view.js';\n\nexport const inject = ['@deepseek-ai/dsh-client-ui-settings', '@deepseek-ai/dsh-client-connection'];\n\nexport function apply(ctx: { inject: (deps: string[], fn: (...services: unknown[]) => void) => void }): void {\n ctx.inject(inject, (settings: unknown, connection: unknown) => {\n const s = settings as { section: (id: string, opts: { title: string; render: () => Promise<string> | string }) => void };\n const c = connection as { fetch: (path: string) => Promise<Response> };\n s.section('prompt-vcs', {\n title: 'Prompt VCS',\n render: async () => {\n const res = await c.fetch('/api/vcs.panel');\n const payload: PanelPayload = await res.json();\n return renderPanel(payload);\n },\n });\n });\n}\n", "import type { PanelPayload } from '../types.js';\n\nexport function renderPanel(payload: PanelPayload): string {\n const rows = payload.timeline\n .map((e) => `<tr><td>${e.hash}</td><td>${new Date(e.timestamp).toLocaleString()}</td><td>${e.changedBy}</td><td>${e.file}</td><td>+${e.addedLines}</td><td>-${e.removedLines}</td></tr>`)\n .join('');\n return `<div class=\"vcs-panel\"><h2>Prompt VCS</h2>${rows ? `<table><thead><tr><th>Hash</th><th>Date</th><th>By</th><th>File</th><th>+</th><th>-</th></tr></thead><tbody>${rows}</tbody></table>` : '<p>No changes recorded.</p>'}</div>`;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,YAAY,SAA+B;AACzD,QAAM,OAAO,QAAQ,SAClB,IAAI,CAAC,MAAM,WAAW,EAAE,IAAI,YAAY,IAAI,KAAK,EAAE,SAAS,EAAE,eAAe,CAAC,YAAY,EAAE,SAAS,YAAY,EAAE,IAAI,aAAa,EAAE,UAAU,aAAa,EAAE,YAAY,YAAY,EACvL,KAAK,EAAE;AACV,SAAO,6CAA6C,OAAO,+GAA+G,IAAI,qBAAqB,6BAA6B;AAClO;;;ADJO,IAAM,SAAS,CAAC,uCAAuC,oCAAoC;AAE3F,SAAS,MAAM,KAAuF;AAC3G,MAAI,OAAO,QAAQ,CAAC,UAAmB,eAAwB;AAC7D,UAAM,IAAI;AACV,UAAM,IAAI;AACV,MAAE,QAAQ,cAAc;AAAA,MACtB,OAAO;AAAA,MACP,QAAQ,YAAY;AAClB,cAAM,MAAM,MAAM,EAAE,MAAM,gBAAgB;AAC1C,cAAM,UAAwB,MAAM,IAAI,KAAK;AAC7C,eAAO,YAAY,OAAO;AAAA,MAC5B;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-prompt-vcs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Every change to your agent's instructions is recorded with a diff, and any change can be undone.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"bin": { "dsh-prompt-vcs": "lib/bin.js" },
|
|
9
9
|
"exports": {
|
|
10
10
|
".": { "types": "./lib/index.d.ts", "default": "./lib/index.js" },
|
|
11
|
-
"./client": { "types": "./lib/client.d.ts", "default": "./lib/vcs.web.js" },
|
|
11
|
+
"./client": { "types": "./lib/client/index.d.ts", "default": "./lib/vcs.web.js" },
|
|
12
12
|
"./package.json": "./package.json"
|
|
13
13
|
},
|
|
14
14
|
"files": ["lib", "cordis.patch.yml", "README.md", "CHANGELOG.md"],
|