dsh-model-arena 0.1.1 → 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/arena.web.js +31 -4
- package/lib/arena.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/arena.web.js
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
window.__ModuleLoader__.load({ id: "dsh-model-arena", 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 runRows = payload.recentRuns.map((r) => `<tr><td>${r.id}</td><td>${r.modelCount}</td><td>${new Date(r.timestamp).toLocaleString()}</td><td>${r.prompt.slice(0, 60)}...</td></tr>`).join("");
|
|
@@ -23,7 +52,5 @@ function apply(ctx) {
|
|
|
23
52
|
});
|
|
24
53
|
});
|
|
25
54
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
inject
|
|
29
|
-
};
|
|
55
|
+
return module.exports; } });
|
|
56
|
+
//# sourceMappingURL=arena.web.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/client/index.tsx", "../src/client/view.tsx"],
|
|
4
|
+
"sourcesContent": ["import { useEffect, useState } from 'react';\nimport 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: {\n inject: (deps: string[], fn: (...services: unknown[]) => void) => void;\n}): 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\n s.section('arena', {\n title: 'Model Arena',\n render: async () => {\n const res = await c.fetch('/api/arena.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 runRows = payload.recentRuns\n .map((r) => `<tr><td>${r.id}</td><td>${r.modelCount}</td><td>${new Date(r.timestamp).toLocaleString()}</td><td>${r.prompt.slice(0, 60)}...</td></tr>`)\n .join('');\n\n return `<div class=\"arena-panel\">\n <h2>Model Arena</h2>\n ${runRows ? `<table class=\"arena-table\"><thead><tr><th>Run</th><th>Models</th><th>Date</th><th>Prompt</th></tr></thead><tbody>${runRows}</tbody></table>` : '<p>No runs yet.</p>'}\n </div>`;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,YAAY,SAA+B;AACzD,QAAM,UAAU,QAAQ,WACrB,IAAI,CAAC,MAAM,WAAW,EAAE,EAAE,YAAY,EAAE,UAAU,YAAY,IAAI,KAAK,EAAE,SAAS,EAAE,eAAe,CAAC,YAAY,EAAE,OAAO,MAAM,GAAG,EAAE,CAAC,eAAe,EACpJ,KAAK,EAAE;AAEV,SAAO;AAAA;AAAA,MAEH,UAAU,oHAAoH,OAAO,qBAAqB,qBAAqB;AAAA;AAErL;;;ADPO,IAAM,SAAS,CAAC,uCAAuC,oCAAoC;AAE3F,SAAS,MAAM,KAEb;AACP,MAAI,OAAO,QAAQ,CAAC,UAAmB,eAAwB;AAC7D,UAAM,IAAI;AACV,UAAM,IAAI;AAEV,MAAE,QAAQ,SAAS;AAAA,MACjB,OAAO;AAAA,MACP,QAAQ,YAAY;AAClB,cAAM,MAAM,MAAM,EAAE,MAAM,kBAAkB;AAC5C,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-model-arena",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Run the same prompt through every model you have, and see the difference without squinting.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"default": "./lib/index.js"
|
|
15
15
|
},
|
|
16
16
|
"./client": {
|
|
17
|
-
"types": "./lib/client.d.ts",
|
|
17
|
+
"types": "./lib/client/index.d.ts",
|
|
18
18
|
"default": "./lib/arena.web.js"
|
|
19
19
|
},
|
|
20
20
|
"./package.json": "./package.json"
|