@genkaku/dsh-user-plugin 0.1.22 → 0.1.23

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.
Files changed (2) hide show
  1. package/lib/client.js +23 -23
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -241,7 +241,7 @@ function Page() {
241
241
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: 16, maxWidth: 760 }, children: [
242
242
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { children: `
243
243
  .gk-net-wrap { position: relative; padding-right: 12px; }
244
- .gk-net-models { max-height: min(380px, 48vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
244
+ .gk-net-models { max-height: min(320px, 38vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
245
245
  .gk-net-models::-webkit-scrollbar { display: none; }
246
246
  .gk-net-rail { position: absolute; top: 2px; bottom: 2px; right: 2px; width: 8px; border-radius: 4px; background: rgba(127,137,153,.16); cursor: pointer; }
247
247
  .gk-net-thumb { position: absolute; left: 0; width: 8px; min-height: 16px; border-radius: 4px; background: rgba(127,137,153,.7); }
@@ -297,28 +297,6 @@ function Page() {
297
297
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: offers.length })
298
298
  ] })
299
299
  ] }),
300
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: box, children: [
301
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...dim, fontSize: 12, textTransform: "uppercase", letterSpacing: 1 }, children: "Models on the network" }),
302
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gk-net-wrap", children: [
303
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gk-net-models", ref: models.attach, onScroll: models.update, children: offers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: { ...dim, marginBottom: 0 }, children: "Nothing offered yet. A worker lists its local Ollama models on start." }) : offers.map((entry, i) => {
304
- const offer = entry.offer ?? {};
305
- const transport = entry.addr == null ? null : status.transports?.[entry.addr];
306
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gk-net-row", children: [
307
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
308
- offer.model ?? "model name missing",
309
- offer.tier === "chat" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...dim, fontSize: 11, marginLeft: 8 }, children: "not for agents" }) : offer.tier != null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...dim, fontSize: 11, marginLeft: 8 }, children: offer.tier }) : null
310
- ] }),
311
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...dim, textAlign: "right", fontSize: 12 }, children: offer.workerName ?? "\u2014" }),
312
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { textAlign: "right", fontSize: 12 }, children: [
313
- price(offer.pricePerHour),
314
- " ",
315
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: dim, children: transport === "relay" ? "\xB7 via seed VM" : transport === "direct" ? "\xB7 direct" : "" })
316
- ] })
317
- ] }, `${entry.addr ?? ""}:${offer.model ?? i}`);
318
- }) }),
319
- models.thumb != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gk-net-rail", "aria-hidden": "true", onPointerDown: (e) => models.jump(e), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gk-net-thumb", style: { top: `${models.thumb.top}%`, height: `${models.thumb.height}%` } }) })
320
- ] })
321
- ] }),
322
300
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: box, children: [
323
301
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: caption, children: t("Settings", "\u8A2D\u5B9A") }),
324
302
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: row, children: [
@@ -393,6 +371,28 @@ function Page() {
393
371
  }, children: busy === "refresh" ? t("Refreshing\u2026", "\u91CD\u65B0\u6383\u63CF\u4E2D\u2026") : t("Refresh network", "\u91CD\u65B0\u6383\u63CF\u7DB2\u8DEF") }),
394
372
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...dim, fontSize: 12 }, children: t("Re-reads the directory and the seed now.", "\u7ACB\u5373\u91CD\u8B80\u93C8\u4E0A\u76EE\u9304\u8207 seed\u3002") })
395
373
  ] })
374
+ ] }),
375
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: box, children: [
376
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { ...dim, fontSize: 12, textTransform: "uppercase", letterSpacing: 1 }, children: "Models on the network" }),
377
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gk-net-wrap", children: [
378
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gk-net-models", ref: models.attach, onScroll: models.update, children: offers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { style: { ...dim, marginBottom: 0 }, children: "Nothing offered yet. A worker lists its local Ollama models on start." }) : offers.map((entry, i) => {
379
+ const offer = entry.offer ?? {};
380
+ const transport = entry.addr == null ? null : status.transports?.[entry.addr];
381
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gk-net-row", children: [
382
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
383
+ offer.model ?? "model name missing",
384
+ offer.tier === "chat" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...dim, fontSize: 11, marginLeft: 8 }, children: "not for agents" }) : offer.tier != null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...dim, fontSize: 11, marginLeft: 8 }, children: offer.tier }) : null
385
+ ] }),
386
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { ...dim, textAlign: "right", fontSize: 12 }, children: offer.workerName ?? "\u2014" }),
387
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { textAlign: "right", fontSize: 12 }, children: [
388
+ price(offer.pricePerHour),
389
+ " ",
390
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: dim, children: transport === "relay" ? "\xB7 via seed VM" : transport === "direct" ? "\xB7 direct" : "" })
391
+ ] })
392
+ ] }, `${entry.addr ?? ""}:${offer.model ?? i}`);
393
+ }) }),
394
+ models.thumb != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gk-net-rail", "aria-hidden": "true", onPointerDown: (e) => models.jump(e), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gk-net-thumb", style: { top: `${models.thumb.top}%`, height: `${models.thumb.height}%` } }) })
395
+ ] })
396
396
  ] })
397
397
  ] });
398
398
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genkaku/dsh-user-plugin",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Buy peer-to-peer inference from the GenKaKu network",
5
5
  "license": "MIT",
6
6
  "type": "module",