@genkaku/dsh-worker-plugin 0.1.21 → 0.1.22
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/lib/client.js +23 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -91,6 +91,27 @@ var PANEL_CSS = `
|
|
|
91
91
|
.gk-price input { text-align: right; }
|
|
92
92
|
.gk-pull { width: 260px; max-width: 100%; }
|
|
93
93
|
.gk-muted { color: var(--dsw-alias-label-tertiary); font-size: 12px; }
|
|
94
|
+
/* The panel can hold every model Ollama has (two dozen is normal). A bounded
|
|
95
|
+
list with its own scrollbar keeps the download box, Save and the Worker
|
|
96
|
+
section reachable instead of pushing them off-screen. */
|
|
97
|
+
.gk-models {
|
|
98
|
+
max-height: min(420px, 45vh);
|
|
99
|
+
overflow-y: auto;
|
|
100
|
+
overscroll-behavior: contain;
|
|
101
|
+
padding-right: 6px;
|
|
102
|
+
scrollbar-width: thin;
|
|
103
|
+
}
|
|
104
|
+
.gk-models::-webkit-scrollbar { width: 10px; }
|
|
105
|
+
.gk-models::-webkit-scrollbar-track { background: transparent; }
|
|
106
|
+
.gk-models::-webkit-scrollbar-thumb {
|
|
107
|
+
background: var(--dsw-alias-border-l3, #9aa3b2);
|
|
108
|
+
border: 2px solid transparent;
|
|
109
|
+
border-radius: 6px;
|
|
110
|
+
background-clip: content-box;
|
|
111
|
+
}
|
|
112
|
+
.gk-models:hover::-webkit-scrollbar-thumb {
|
|
113
|
+
background-color: var(--dsw-alias-label-tertiary, #6f7887);
|
|
114
|
+
}
|
|
94
115
|
`;
|
|
95
116
|
function Icon({ size = 16 }) {
|
|
96
117
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { style: { display: "inline-flex", width: size, height: size }, "aria-hidden": "true", children: [
|
|
@@ -451,7 +472,7 @@ function Page() {
|
|
|
451
472
|
"\u672A\u52FE\u9078\u7684\u6A21\u578B\u4ECD\u7559\u5728\u672C\u6A5F\uFF0C\u4F46\u4E0D\u6703\u4E0A\u67B6\u3002\u50F9\u683C\u70BA\u6BCF\u5C0F\u6642 USDC\uFF1B0 \u8868\u793A\u514D\u8CBB\u3002"
|
|
452
473
|
) }),
|
|
453
474
|
names.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: dim, children: t("No local models yet. Download one below.", "\u672C\u6A5F\u9084\u6C92\u6709\u6A21\u578B\uFF0C\u53EF\u5728\u4E0B\u65B9\u4E0B\u8F09\u3002") }),
|
|
454
|
-
names.map((name) => {
|
|
475
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "gk-models", children: names.map((name) => {
|
|
455
476
|
const on = name in offered;
|
|
456
477
|
const tier = tierOf.get(name);
|
|
457
478
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "gk-row", children: [
|
|
@@ -497,7 +518,7 @@ function Page() {
|
|
|
497
518
|
}
|
|
498
519
|
)
|
|
499
520
|
] }, name);
|
|
500
|
-
}),
|
|
521
|
+
}) }),
|
|
501
522
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { ...row, justifyContent: "flex-start", gap: 8, marginTop: 12 }, children: [
|
|
502
523
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
503
524
|
import_dsh_client_ui_primitives.Input,
|