dsh-neartoken 0.19.2 → 0.21.0
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/README.md +18 -4
- package/lib/client.js +204 -124
- package/lib/client.js.map +1 -1
- package/lib/index.js +335 -49
- package/lib/types/client/ModelGroupSelect.d.ts +1 -1
- package/lib/types/client/api.d.ts +8 -1
- package/lib/types/client/locales.d.ts +4 -0
- package/lib/types/client/slots.d.ts +8 -0
- package/lib/types/host/images.d.ts +79 -7
- package/lib/types/host/provider-mount.d.ts +3 -1
- package/lib/types/host/relay.d.ts +20 -0
- package/lib/types/host/routes.d.ts +8 -1
- package/lib/types/index.d.ts +26 -0
- package/lib/types/protocol.d.ts +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|---|---|
|
|
25
25
|
| `src/index.ts` | 配置 schema、按凭据现状挂载 provider、装配其余模块 |
|
|
26
26
|
| `src/host/account.ts` | RFC 8628 形状的设备授权:发起、按 interval 轮询、把 key 写进 credentials |
|
|
27
|
-
| `src/host/routes.ts` |
|
|
27
|
+
| `src/host/routes.ts` | 设置页与模型选择器调用的同源路由(状态 / 余额立即刷新 / 授权 / 取消 / 断开 / 模型白名单 / 生图设置 / 长连接端点) |
|
|
28
28
|
| `src/host/whitelist.ts` | 白名单读写在插件自身 Config 的 `enabledModels`(volatile),存 profile patch |
|
|
29
29
|
| `src/host/pricing.ts` | 拉 `/api/pricing`,展开成 `"<组>::<模型>"` 路由,过滤出能聊的模型 |
|
|
30
30
|
| `src/host/model-caps.ts` | 一个模型能不能聊、上下文窗口多大、可选的推理等级(只读站点声明,不存模型表) |
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
| `src/host/protocol-router.ts` | 按模型选上游协议(claude / gemini / gpt / 其余) |
|
|
34
34
|
| `src/host/session-key.ts` | 从 `GenerateOptions.sessionId` 取会话亲和键,四条 wire 用它让站点把会话粘在同一渠道 |
|
|
35
35
|
| `src/host/provider-mount.ts` | 路由挂载、撤下、白名单变更时 `replace()` 重播 |
|
|
36
|
+
| `src/host/relay.ts` | 模型接口走哪个域名:站点根或长连接端点,由模型选择器里的开关决定 |
|
|
36
37
|
| `src/host/topup.ts` | 站点充值面:读 amount 档位与渠道、下单,把 403 `DSH_TOKEN_REQUIRED` 翻成「是否 DSH 密钥」的原因 |
|
|
37
38
|
| `src/host/images.ts` | 生图:挑通道、发请求、两种响应都读成 bytes |
|
|
38
39
|
| `src/host/image-tool.ts` | `generate_image` 工具:选模型/分组、把图写进 attachment |
|
|
@@ -59,6 +60,8 @@
|
|
|
59
60
|
|
|
60
61
|
分组路由按同一文档:请求头 `x-neartoken-group` 的值是 `/api/pricing` 的 `group_refs` 给出的 **`#<id>`**(纯 ASCII),分组名只用于展示;某分组没有 ref 时不发该头,按令牌自身分组路由。
|
|
61
62
|
|
|
63
|
+
模型选择器的根菜单里,「分组」下面一行是**长连接端点**开关:打开后所有**模型接口**(`/v1/chat/completions`、`/v1/messages`、`/v1/responses`、`/v1/images/*`、Gemini 的 `/v1beta/*`)改走 `https://direct.neartoken.cc`,站点控制台的 `/api/*`(目录、用量、钱包、充值、设备授权)仍走 `baseURL`。开关写进插件配置的 `directLink`(volatile),点完立刻对下一次请求生效,不需要重启。它只出现在本插件自己的 provider 上。
|
|
64
|
+
|
|
62
65
|
模型选择器里的分组是**显式选择**:换模型时先保留当前分组;新模型不在该分组时,按分组名上的档位标签(`[低价]` / `[满血]` / `[官key]` 等)就近匹配同一档位的分组,而不是落回站点目录里的第一个分组——那一个往往是倍率最高的。跨模型族(`[低价] DeepSeek` → GPT)也按标签匹配。
|
|
63
66
|
|
|
64
67
|
## 数据概览(消耗 / Token / 模型堆积)
|
|
@@ -105,6 +108,8 @@ https://<site>/dsh/device?user_code=K7QM-3XPD&aff=<code>
|
|
|
105
108
|
| 字段 | 默认 | 说明 |
|
|
106
109
|
|---|---|---|
|
|
107
110
|
| `baseURL` | `https://neartoken.cc` | 站点根地址,不带尾斜杠 |
|
|
111
|
+
| `directEndpoint` | `https://direct.neartoken.cc` | 长连接端点;模型选择器打开开关后模型接口改走它,`/api/*` 不受影响 |
|
|
112
|
+
| `directLink` | `false` | 长连接端点开关;volatile,模型选择器直接写它 |
|
|
108
113
|
| `apiKeyEnv` | `NEARTOKEN_API_KEY` | 授权写入、adapter 读取的凭据引用名 |
|
|
109
114
|
| `catalogTtlMs` | `300000` | `/api/pricing` 目录缓存时长 |
|
|
110
115
|
| `defaultContextWindow` | `200000` | 没有任何来源能说明某模型上下文窗口时上报的值 |
|
|
@@ -220,7 +225,7 @@ location / {
|
|
|
220
225
|
|
|
221
226
|
| 通道 | 判定 | 请求 | 响应 |
|
|
222
227
|
|---|---|---|---|
|
|
223
|
-
| `images` | 声明含 `image-generation`(gpt-image 系) | `POST /v1/images/
|
|
228
|
+
| `images` | 声明含 `image-generation`(gpt-image 系) | `POST /v1/images/tasks` 提交 → `GET /v1/images/tasks/<id>` 轮询 | 任务 `SUCCESS` 的 `data[0].url` / `b64_json`;站点回落同步时直接是 `data[0]` |
|
|
224
229
|
| `genai` | 声明含 `gemini`(nano-banana、`gemini-*-image`) | `POST /v1beta/models/<model>:generateContent` | `candidates[0].content.parts[].inlineData`(结构化) |
|
|
225
230
|
| `chat` | 其余(只有 `openai` 的,如 grok-imagine) | `POST /v1/chat/completions` | 回复文本里的 `data:image/...;base64,` 或图片链接 |
|
|
226
231
|
|
|
@@ -234,7 +239,7 @@ Gemini 系走原生 surface 而不是 openai 兼容层:同模型同提示词
|
|
|
234
239
|
|
|
235
240
|
`images` 传工作区里的图片路径,工具读成 data URL 后按通道发送:
|
|
236
241
|
|
|
237
|
-
- **images 通道**:作为 `image` 数组(data URL
|
|
242
|
+
- **images 通道**:作为 `image` 数组(data URL)随任务提交发给 `/v1/images/tasks`(站点 DTO 里没有可用的 `edits` 路由,参考图只能搭生成请求)
|
|
238
243
|
- **genai 通道**:作为 `inlineData` part 与提示词一起进 `contents[0].parts`
|
|
239
244
|
- **chat 通道**:作为 `image_url` content part 与提示词一起进 `messages`
|
|
240
245
|
|
|
@@ -251,13 +256,22 @@ Gemini 系走原生 surface 而不是 openai 兼容层:同模型同提示词
|
|
|
251
256
|
|
|
252
257
|
限制:一次只出一张图(`n` 未暴露);`mask` 局部重绘、`input_fidelity` 未暴露。
|
|
253
258
|
|
|
259
|
+
### 异步任务
|
|
260
|
+
|
|
261
|
+
`images` 通道的模型走站点的 **durable task**:`POST /v1/images/tasks` 立刻返回 `202 + task_id`,插件每 3 秒(退避到 5 秒)轮询 `GET /v1/images/tasks/<id>`,`SUCCESS` 后再取 `data[0].url` / `b64_json`。慢模型不再靠一条长 HTTP 撑时间 —— 连接断了,任务还在站点上跑。
|
|
262
|
+
|
|
263
|
+
- **轮询只重读,不重提交**:轮询撞上 5xx、网关故障或断网,按同一 `task_id` 再来一次;任务没有幂等键,重复提交会重复计费,所以提交没拿到任务就原样报给模型,由模型决定要不要重试。
|
|
264
|
+
- **取消只停轮询**:`exec.signal` 中止后本地不再查询,站点上的任务照常跑完并按站点规则计费。
|
|
265
|
+
- **失败带站点原话**:`FAILURE` 的 `fail_reason`(例如 `DataInspectionFailed: …`)直接进错误消息,不用去站点后台翻。
|
|
266
|
+
- **两种回落都能接**:站点没把该模型认领成任务时,同一端点直接回 `200 + data[]`;不认这个端点的老站点回 404,插件改用 `POST /v1/images/generations` 同步等一次。
|
|
267
|
+
|
|
254
268
|
### 超时
|
|
255
269
|
|
|
256
270
|
生图是几十秒到几分钟的活,所以有两条时间线,故意错开:
|
|
257
271
|
|
|
258
272
|
| 层 | 值 | 超时后模型看到什么 |
|
|
259
273
|
|---|---|---|
|
|
260
|
-
| 插件自己的预算 | `imageTimeoutMs`(默认 300
|
|
274
|
+
| 插件自己的预算 | `imageTimeoutMs`(默认 300 秒),**从提交到拿到图的总预算**(含轮询) | `the site did not return an image within 300s (imageTimeoutMs); … a submitted task keeps running on the site and is billed when it finishes …` |
|
|
261
275
|
| 工具调用截止时间 | `imageTimeoutMs + 30 秒`,声明给 harness 的 timeout policy | 通用的 `tool call timed out after …ms` |
|
|
262
276
|
|
|
263
277
|
自己那条早 30 秒触发,所以正常情况模型拿到的是**能指路**的那条(等了多久、该调哪个旋钮);harness 那条只兜住「工具无视 abort 继续跑」。预算耗尽和调用方取消是分开处理的(`AbortSignal.any` 里单独持有预算信号),取消原样向上传递,不会被写成超时。
|
package/lib/client.js
CHANGED
|
@@ -44,6 +44,8 @@ window.__ModuleLoader__.load({
|
|
|
44
44
|
const MODELS_PATH = "/neartoken/models";
|
|
45
45
|
/** Read the picture models and the image-generation setting; POST one change to it. */
|
|
46
46
|
const IMAGES_PATH = "/neartoken/images";
|
|
47
|
+
/** Read the long-connection switch; POST its new state. */
|
|
48
|
+
const LINK_PATH = "/neartoken/link";
|
|
47
49
|
/** Read the site's top-up offer; POST one order and open its checkout page. */
|
|
48
50
|
const TOPUP_PATH = "/neartoken/topup";
|
|
49
51
|
/**
|
|
@@ -200,6 +202,20 @@ window.__ModuleLoader__.load({
|
|
|
200
202
|
const refusal = await response.json().catch(() => ({ message: `HTTP ${String(response.status)}` }));
|
|
201
203
|
throw new Error(refusal.message ?? `HTTP ${String(response.status)}`);
|
|
202
204
|
}
|
|
205
|
+
},
|
|
206
|
+
async link() {
|
|
207
|
+
return await jsonOf(await fetcher(LINK_PATH, { headers: { accept: "application/json" } }));
|
|
208
|
+
},
|
|
209
|
+
async saveLink(direct) {
|
|
210
|
+
const response = await fetcher(LINK_PATH, {
|
|
211
|
+
method: "POST",
|
|
212
|
+
headers: { "content-type": "application/json" },
|
|
213
|
+
body: JSON.stringify({ direct })
|
|
214
|
+
});
|
|
215
|
+
if (!response.ok) {
|
|
216
|
+
const refusal = await response.json().catch(() => ({ message: `HTTP ${String(response.status)}` }));
|
|
217
|
+
throw new Error(refusal.message ?? `HTTP ${String(response.status)}`);
|
|
218
|
+
}
|
|
203
219
|
}
|
|
204
220
|
};
|
|
205
221
|
}
|
|
@@ -456,23 +472,23 @@ window.__ModuleLoader__.load({
|
|
|
456
472
|
document.head.appendChild(tag);
|
|
457
473
|
}
|
|
458
474
|
var group_tags_module_css_default = {
|
|
459
|
-
"toneIndigo": "FotuUq_toneIndigo",
|
|
460
|
-
"toneLime": "FotuUq_toneLime",
|
|
461
|
-
"toneRose": "FotuUq_toneRose",
|
|
462
|
-
"toneEmerald": "FotuUq_toneEmerald",
|
|
463
|
-
"ratioChip": "FotuUq_ratioChip",
|
|
464
|
-
"toneFuchsia": "FotuUq_toneFuchsia",
|
|
465
475
|
"toneOrange": "FotuUq_toneOrange",
|
|
476
|
+
"toneTeal": "FotuUq_toneTeal",
|
|
477
|
+
"ratioChip": "FotuUq_ratioChip",
|
|
478
|
+
"toneRose": "FotuUq_toneRose",
|
|
479
|
+
"toneIndigo": "FotuUq_toneIndigo",
|
|
466
480
|
"tag": "FotuUq_tag",
|
|
467
|
-
"
|
|
481
|
+
"toneEmerald": "FotuUq_toneEmerald",
|
|
468
482
|
"toneSky": "FotuUq_toneSky",
|
|
469
|
-
"
|
|
483
|
+
"ratioBase": "FotuUq_ratioBase",
|
|
470
484
|
"ratioPricey": "FotuUq_ratioPricey",
|
|
471
|
-
"
|
|
472
|
-
"toneTeal": "FotuUq_toneTeal",
|
|
485
|
+
"toneAmber": "FotuUq_toneAmber",
|
|
473
486
|
"toneCyan": "FotuUq_toneCyan",
|
|
487
|
+
"ratioCheap": "FotuUq_ratioCheap",
|
|
474
488
|
"tonePink": "FotuUq_tonePink",
|
|
475
|
-
"
|
|
489
|
+
"toneViolet": "FotuUq_toneViolet",
|
|
490
|
+
"toneFuchsia": "FotuUq_toneFuchsia",
|
|
491
|
+
"toneLime": "FotuUq_toneLime"
|
|
476
492
|
};
|
|
477
493
|
//#endregion
|
|
478
494
|
//#region src/client/group-tags.tsx
|
|
@@ -517,7 +533,7 @@ window.__ModuleLoader__.load({
|
|
|
517
533
|
}
|
|
518
534
|
//#endregion
|
|
519
535
|
//#region \0dsh-css:D:\Projects\deepseek-harness\dsh-neartoken\src\client\ModelGroupSelect.module.css.mjs
|
|
520
|
-
const css$1 = "._2pt-bW_root{min-width:0;position:relative}._2pt-bW_trigger{border-radius:var(--dsw-radius-sm);min-width:0;max-width:min(360px,45cqw);height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;outline:none;align-items:center;gap:4px;padding:0 4px 0 8px;font-size:13px;font-weight:400;line-height:20px;display:flex}._2pt-bW_trigger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._2pt-bW_trigger:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}._2pt-bW_trigger:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._2pt-bW_triggerLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._2pt-bW_triggerEffort{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-caption);flex-shrink:1000;overflow:hidden}._2pt-bW_triggerIcon{display:var(--dsh-composer-model-icon-display,none);flex:none}._2pt-bW_chevron{color:var(--dsw-alias-label-caption);flex:none}._2pt-bW_menu{z-index:1100;--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);width:max-content;min-width:min(240px,100vw - 32px);max-width:min(420px,100vw - 32px);max-height:min(360px,100vh - 96px);box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border:0;flex-direction:column;padding:4px;display:flex;position:fixed;overflow:hidden}._2pt-bW_status,._2pt-bW_empty{color:var(--dsw-alias-label-tertiary);padding:8px;font-size:12px;line-height:18px}._2pt-bW_error,._2pt-bW_warning{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:flex-start;gap:6px;margin-bottom:3px;padding:6px 7px;font-size:11px;line-height:16px;display:flex}._2pt-bW_warning{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-state-warn-label)}._2pt-bW_retry{color:inherit;font:inherit;cursor:pointer;background:0 0;border:none;flex:none;padding:0;font-weight:600}._2pt-bW_searchRow{flex-shrink:0;margin:2px 0 3px;position:relative}._2pt-bW_searchRow ._2pt-bW_search{border-radius:var(--dsw-radius-md);background:0 0;border:0 solid #0000;height:auto;padding:5px 7px;display:flex}._2pt-bW_searchRow ._2pt-bW_search input{padding:0;font-size:12px;line-height:normal}._2pt-bW_searchClear{width:24px;height:24px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;top:50%;right:4px;transform:translateY(-50%)}._2pt-bW_searchClear:hover,._2pt-bW_searchClear:focus-visible{background:var(--dsw-alias-interactive-bg-hover);outline:none}._2pt-bW_groups{min-height:0;overflow-y:auto}._2pt-bW_option{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:auto;min-width:100%;min-height:34px;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;outline:none;align-items:center;gap:6px;padding:5px 7px;display:flex}._2pt-bW_option:not(._2pt-bW_modelOption):hover:not(:disabled),._2pt-bW_option:focus-visible,._2pt-bW_optionActive:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._2pt-bW_selected{background:0 0}._2pt-bW_option:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._2pt-bW_optionCopy{flex-direction:column;flex:1;min-width:0;display:flex}._2pt-bW_modelName{color:inherit;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}._2pt-bW_optionTrailing{flex:none;align-items:center;gap:6px;display:flex}._2pt-bW_variantCount{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-tertiary);border-radius:999px;padding:0 5px;font-size:10px;line-height:16px}._2pt-bW_check{color:var(--dsw-alias-label-primary);flex:0 0 14px;place-items:center;display:grid}._2pt-bW_check svg{width:14px;height:14px}._2pt-bW_cell{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:auto;min-width:100%;height:34px;color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;background:0 0;border:none;outline:none;align-items:center;gap:6px;padding:0 8px;font-size:13px;line-height:20px;display:flex}._2pt-bW_cell:hover:not(:disabled),._2pt-bW_cell:focus-visible{background:var(--dsw-alias-interactive-bg-hover)}._2pt-bW_cell:disabled{cursor:default}._2pt-bW_cellLabel{white-space:nowrap;flex:none}._2pt-bW_cellValue{text-align:right;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;justify-content:flex-end;display:flex;overflow:hidden}._2pt-bW_cellChevron{width:12px;height:12px;color:var(--dsw-alias-menu-icon);flex:none}._2pt-bW_groupInline{align-items:center;gap:4px;min-width:0;display:inline-flex;overflow:hidden}._2pt-bW_groupName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._2pt-bW_groupOptionLabel{align-items:center;min-width:0;display:flex;overflow:hidden}._2pt-bW_toast{z-index:1100;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover-danger);max-width:320px;color:var(--dsw-alias-state-error-primary);padding:6px 10px;font-size:11px;line-height:16px;position:absolute;bottom:calc(100% + 6px);right:0}";
|
|
536
|
+
const css$1 = "._2pt-bW_root{min-width:0;position:relative}._2pt-bW_trigger{border-radius:var(--dsw-radius-sm);min-width:0;max-width:min(360px,45cqw);height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;outline:none;align-items:center;gap:4px;padding:0 4px 0 8px;font-size:13px;font-weight:400;line-height:20px;display:flex}._2pt-bW_trigger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._2pt-bW_trigger:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}._2pt-bW_trigger:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._2pt-bW_triggerLabel{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._2pt-bW_triggerEffort{text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--dsw-alias-label-caption);flex-shrink:1000;overflow:hidden}._2pt-bW_triggerIcon{display:var(--dsh-composer-model-icon-display,none);flex:none}._2pt-bW_chevron{color:var(--dsw-alias-label-caption);flex:none}._2pt-bW_menu{z-index:1100;--dsw-elevation-stroke-color:var(--dsw-alias-border-l1);width:max-content;min-width:min(240px,100vw - 32px);max-width:min(420px,100vw - 32px);max-height:min(360px,100vh - 96px);box-shadow:var(--dsw-elevation-prominent);color:var(--dsw-alias-label-primary);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);border:0;flex-direction:column;padding:4px;display:flex;position:fixed;overflow:hidden}._2pt-bW_status,._2pt-bW_empty{color:var(--dsw-alias-label-tertiary);padding:8px;font-size:12px;line-height:18px}._2pt-bW_error,._2pt-bW_warning{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);justify-content:space-between;align-items:flex-start;gap:6px;margin-bottom:3px;padding:6px 7px;font-size:11px;line-height:16px;display:flex}._2pt-bW_warning{background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-state-warn-label)}._2pt-bW_retry{color:inherit;font:inherit;cursor:pointer;background:0 0;border:none;flex:none;padding:0;font-weight:600}._2pt-bW_searchRow{flex-shrink:0;margin:2px 0 3px;position:relative}._2pt-bW_searchRow ._2pt-bW_search{border-radius:var(--dsw-radius-md);background:0 0;border:0 solid #0000;height:auto;padding:5px 7px;display:flex}._2pt-bW_searchRow ._2pt-bW_search input{padding:0;font-size:12px;line-height:normal}._2pt-bW_searchClear{width:24px;height:24px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;border-radius:50%;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;top:50%;right:4px;transform:translateY(-50%)}._2pt-bW_searchClear:hover,._2pt-bW_searchClear:focus-visible{background:var(--dsw-alias-interactive-bg-hover);outline:none}._2pt-bW_groups{min-height:0;overflow-y:auto}._2pt-bW_option{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:auto;min-width:100%;min-height:34px;color:inherit;text-align:left;cursor:pointer;background:0 0;border:none;outline:none;align-items:center;gap:6px;padding:5px 7px;display:flex}._2pt-bW_option:not(._2pt-bW_modelOption):hover:not(:disabled),._2pt-bW_option:focus-visible,._2pt-bW_optionActive:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._2pt-bW_selected{background:0 0}._2pt-bW_option:disabled{color:var(--dsw-alias-label-dimmed);cursor:default}._2pt-bW_optionCopy{flex-direction:column;flex:1;min-width:0;display:flex}._2pt-bW_modelName{color:inherit;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:18px;overflow:hidden}._2pt-bW_optionTrailing{flex:none;align-items:center;gap:6px;display:flex}._2pt-bW_variantCount{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-tertiary);border-radius:999px;padding:0 5px;font-size:10px;line-height:16px}._2pt-bW_check{color:var(--dsw-alias-label-primary);flex:0 0 14px;place-items:center;display:grid}._2pt-bW_check svg{width:14px;height:14px}._2pt-bW_cell{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:auto;min-width:100%;height:34px;color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;background:0 0;border:none;outline:none;align-items:center;gap:6px;padding:0 8px;font-size:13px;line-height:20px;display:flex}._2pt-bW_cell:hover:not(:disabled),._2pt-bW_cell:focus-visible{background:var(--dsw-alias-interactive-bg-hover)}._2pt-bW_cell:disabled{cursor:default}._2pt-bW_cellLabel{white-space:nowrap;flex:none}._2pt-bW_cellValue{text-align:right;min-width:0;color:var(--dsw-alias-label-tertiary);flex:auto;justify-content:flex-end;display:flex;overflow:hidden}._2pt-bW_cellChevron{width:12px;height:12px;color:var(--dsw-alias-menu-icon);flex:none}._2pt-bW_cellSwitch{box-sizing:border-box;width:auto;min-width:100%;height:34px;color:var(--dsw-alias-label-primary);align-items:center;gap:6px;padding:0 8px;font-size:13px;line-height:20px;display:flex}._2pt-bW_linkError{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary);margin:0 0 3px;padding:6px 7px;font-size:11px;line-height:16px}._2pt-bW_groupInline{align-items:center;gap:4px;min-width:0;display:inline-flex;overflow:hidden}._2pt-bW_groupName{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._2pt-bW_groupOptionLabel{align-items:center;min-width:0;display:flex;overflow:hidden}._2pt-bW_toast{z-index:1100;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover-danger);max-width:320px;color:var(--dsw-alias-state-error-primary);padding:6px 10px;font-size:11px;line-height:16px;position:absolute;bottom:calc(100% + 6px);right:0}";
|
|
521
537
|
const tagId$1 = "dsh-neartoken/ModelGroupSelect.module.css";
|
|
522
538
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
|
|
523
539
|
const tag = document.createElement("style");
|
|
@@ -527,39 +543,41 @@ window.__ModuleLoader__.load({
|
|
|
527
543
|
document.head.appendChild(tag);
|
|
528
544
|
}
|
|
529
545
|
var ModelGroupSelect_module_css_default = {
|
|
530
|
-
"
|
|
531
|
-
"cellLabel": "_2pt-bW_cellLabel",
|
|
532
|
-
"groups": "_2pt-bW_groups",
|
|
533
|
-
"modelName": "_2pt-bW_modelName",
|
|
534
|
-
"groupName": "_2pt-bW_groupName",
|
|
535
|
-
"searchRow": "_2pt-bW_searchRow",
|
|
546
|
+
"cellChevron": "_2pt-bW_cellChevron",
|
|
536
547
|
"retry": "_2pt-bW_retry",
|
|
537
|
-
"
|
|
538
|
-
"
|
|
539
|
-
"
|
|
540
|
-
"chevron": "_2pt-bW_chevron",
|
|
541
|
-
"search": "_2pt-bW_search",
|
|
542
|
-
"warning": "_2pt-bW_warning",
|
|
548
|
+
"cellSwitch": "_2pt-bW_cellSwitch",
|
|
549
|
+
"optionCopy": "_2pt-bW_optionCopy",
|
|
550
|
+
"error": "_2pt-bW_error",
|
|
543
551
|
"option": "_2pt-bW_option",
|
|
544
|
-
"cellValue": "_2pt-bW_cellValue",
|
|
545
|
-
"variantCount": "_2pt-bW_variantCount",
|
|
546
|
-
"cellChevron": "_2pt-bW_cellChevron",
|
|
547
552
|
"selected": "_2pt-bW_selected",
|
|
553
|
+
"variantCount": "_2pt-bW_variantCount",
|
|
554
|
+
"optionActive": "_2pt-bW_optionActive",
|
|
555
|
+
"groupInline": "_2pt-bW_groupInline",
|
|
548
556
|
"triggerIcon": "_2pt-bW_triggerIcon",
|
|
549
|
-
"
|
|
550
|
-
"
|
|
551
|
-
"
|
|
557
|
+
"empty": "_2pt-bW_empty",
|
|
558
|
+
"check": "_2pt-bW_check",
|
|
559
|
+
"chevron": "_2pt-bW_chevron",
|
|
560
|
+
"status": "_2pt-bW_status",
|
|
561
|
+
"cellValue": "_2pt-bW_cellValue",
|
|
562
|
+
"modelName": "_2pt-bW_modelName",
|
|
563
|
+
"search": "_2pt-bW_search",
|
|
564
|
+
"root": "_2pt-bW_root",
|
|
552
565
|
"optionTrailing": "_2pt-bW_optionTrailing",
|
|
553
|
-
"toast": "_2pt-bW_toast",
|
|
554
|
-
"groupInline": "_2pt-bW_groupInline",
|
|
555
566
|
"modelOption": "_2pt-bW_modelOption",
|
|
556
|
-
"
|
|
557
|
-
"
|
|
558
|
-
"
|
|
567
|
+
"linkError": "_2pt-bW_linkError",
|
|
568
|
+
"groups": "_2pt-bW_groups",
|
|
569
|
+
"groupName": "_2pt-bW_groupName",
|
|
559
570
|
"menu": "_2pt-bW_menu",
|
|
560
|
-
"
|
|
561
|
-
"
|
|
562
|
-
"
|
|
571
|
+
"toast": "_2pt-bW_toast",
|
|
572
|
+
"triggerLabel": "_2pt-bW_triggerLabel",
|
|
573
|
+
"groupOptionLabel": "_2pt-bW_groupOptionLabel",
|
|
574
|
+
"warning": "_2pt-bW_warning",
|
|
575
|
+
"triggerEffort": "_2pt-bW_triggerEffort",
|
|
576
|
+
"cellLabel": "_2pt-bW_cellLabel",
|
|
577
|
+
"trigger": "_2pt-bW_trigger",
|
|
578
|
+
"searchRow": "_2pt-bW_searchRow",
|
|
579
|
+
"cell": "_2pt-bW_cell",
|
|
580
|
+
"searchClear": "_2pt-bW_searchClear"
|
|
563
581
|
};
|
|
564
582
|
//#endregion
|
|
565
583
|
//#region src/client/ModelGroupSelect.tsx
|
|
@@ -612,7 +630,7 @@ window.__ModuleLoader__.load({
|
|
|
612
630
|
* @param props - owner share (locked) + injected directory face + the locale seat.
|
|
613
631
|
* @returns the trigger and, while open, the three-level menu.
|
|
614
632
|
*/
|
|
615
|
-
function ModelGroupSelect({ locked, available, directory, load, select, t }) {
|
|
633
|
+
function ModelGroupSelect({ locked, available, directory, load, select, readLink, saveLink, t }) {
|
|
616
634
|
const state = (0, react.useSyncExternalStore)((fn) => directory.subscribe(fn), () => directory.getSnapshot());
|
|
617
635
|
const [open, setOpen] = (0, react.useState)(false);
|
|
618
636
|
const [pane, setPane] = (0, react.useState)("root");
|
|
@@ -624,6 +642,12 @@ window.__ModuleLoader__.load({
|
|
|
624
642
|
const menuRef = (0, react.useRef)(null);
|
|
625
643
|
const searchRef = (0, react.useRef)(null);
|
|
626
644
|
const [menuPos, setMenuPos] = (0, react.useState)(null);
|
|
645
|
+
/** The long-connection switch, once the Host answered; undefined while unread. */
|
|
646
|
+
const [direct, setDirect] = (0, react.useState)(void 0);
|
|
647
|
+
/** Whether a switch write is on the wire. */
|
|
648
|
+
const [linkBusy, setLinkBusy] = (0, react.useState)(false);
|
|
649
|
+
/** Why the last switch write was refused; cleared by the next one. */
|
|
650
|
+
const [linkError, setLinkError] = (0, react.useState)(null);
|
|
627
651
|
const id = (0, react.useId)();
|
|
628
652
|
const accountName = t("provider.account");
|
|
629
653
|
const providers = (0, react.useMemo)(() => state.groups.map((group) => ({
|
|
@@ -729,6 +753,24 @@ window.__ModuleLoader__.load({
|
|
|
729
753
|
pane,
|
|
730
754
|
showSearch
|
|
731
755
|
]);
|
|
756
|
+
const ownSeat = located !== void 0 && isGroupedProvider(located.provider.id);
|
|
757
|
+
(0, react.useEffect)(() => {
|
|
758
|
+
if (!open || !ownSeat) return;
|
|
759
|
+
let live = true;
|
|
760
|
+
readLink().then((next) => {
|
|
761
|
+
if (live) setDirect(next.direct);
|
|
762
|
+
}, (failure) => {
|
|
763
|
+
if (live) setLinkError(t("link.failed", { message: failure instanceof Error ? failure.message : String(failure) }));
|
|
764
|
+
});
|
|
765
|
+
return () => {
|
|
766
|
+
live = false;
|
|
767
|
+
};
|
|
768
|
+
}, [
|
|
769
|
+
open,
|
|
770
|
+
ownSeat,
|
|
771
|
+
readLink,
|
|
772
|
+
t
|
|
773
|
+
]);
|
|
732
774
|
if (!available) return null;
|
|
733
775
|
const settle = (result) => {
|
|
734
776
|
if (result === void 0) return;
|
|
@@ -783,6 +825,18 @@ window.__ModuleLoader__.load({
|
|
|
783
825
|
...effort === void 0 ? {} : { reasoningEffort: effort }
|
|
784
826
|
});
|
|
785
827
|
};
|
|
828
|
+
const toggleDirect = (next) => {
|
|
829
|
+
setDirect(next);
|
|
830
|
+
setLinkBusy(true);
|
|
831
|
+
setLinkError(null);
|
|
832
|
+
saveLink(next).then(() => {
|
|
833
|
+
setLinkBusy(false);
|
|
834
|
+
}, (failure) => {
|
|
835
|
+
setDirect(!next);
|
|
836
|
+
setLinkBusy(false);
|
|
837
|
+
setLinkError(t("link.failed", { message: failure instanceof Error ? failure.message : String(failure) }));
|
|
838
|
+
});
|
|
839
|
+
};
|
|
786
840
|
const onKeyDown = (event) => {
|
|
787
841
|
if (event.nativeEvent.isComposing) return;
|
|
788
842
|
if (event.key === "Escape" && open) {
|
|
@@ -891,6 +945,26 @@ window.__ModuleLoader__.load({
|
|
|
891
945
|
groupChoices.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, { className: ModelGroupSelect_module_css_default.cellChevron })
|
|
892
946
|
]
|
|
893
947
|
}),
|
|
948
|
+
ownSeat && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
949
|
+
className: ModelGroupSelect_module_css_default.cellSwitch,
|
|
950
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
951
|
+
className: ModelGroupSelect_module_css_default.cellLabel,
|
|
952
|
+
children: t("link.label")
|
|
953
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
954
|
+
className: ModelGroupSelect_module_css_default.cellValue,
|
|
955
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
956
|
+
checked: direct === true,
|
|
957
|
+
disabled: linkBusy || direct === void 0,
|
|
958
|
+
label: t("link.label"),
|
|
959
|
+
onChange: toggleDirect
|
|
960
|
+
})
|
|
961
|
+
})]
|
|
962
|
+
}),
|
|
963
|
+
linkError === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
964
|
+
className: ModelGroupSelect_module_css_default.linkError,
|
|
965
|
+
role: "status",
|
|
966
|
+
children: linkError
|
|
967
|
+
}),
|
|
894
968
|
reasoning !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
895
969
|
type: "button",
|
|
896
970
|
role: "menuitem",
|
|
@@ -1164,107 +1238,107 @@ window.__ModuleLoader__.load({
|
|
|
1164
1238
|
document.head.appendChild(tag);
|
|
1165
1239
|
}
|
|
1166
1240
|
var NearTokenSection_module_css_default = {
|
|
1167
|
-
"
|
|
1168
|
-
"row": "_02HI2q_row",
|
|
1169
|
-
"notice": "_02HI2q_notice",
|
|
1170
|
-
"series0": "_02HI2q_series0",
|
|
1171
|
-
"series5": "_02HI2q_series5",
|
|
1172
|
-
"voucherList": "_02HI2q_voucherList",
|
|
1173
|
-
"label": "_02HI2q_label",
|
|
1174
|
-
"tally": "_02HI2q_tally",
|
|
1175
|
-
"metaLabel": "_02HI2q_metaLabel",
|
|
1241
|
+
"tipTitle": "_02HI2q_tipTitle",
|
|
1176
1242
|
"badgeOn": "_02HI2q_badgeOn",
|
|
1177
|
-
"
|
|
1178
|
-
"
|
|
1179
|
-
"
|
|
1180
|
-
"rowRatio": "_02HI2q_rowRatio",
|
|
1181
|
-
"form": "_02HI2q_form",
|
|
1182
|
-
"cardHead": "_02HI2q_cardHead",
|
|
1183
|
-
"linkLine": "_02HI2q_linkLine",
|
|
1184
|
-
"metaBtn": "_02HI2q_metaBtn",
|
|
1243
|
+
"fact": "_02HI2q_fact",
|
|
1244
|
+
"yScale": "_02HI2q_yScale",
|
|
1245
|
+
"actions": "_02HI2q_actions",
|
|
1185
1246
|
"metaField": "_02HI2q_metaField",
|
|
1186
|
-
"
|
|
1187
|
-
"
|
|
1188
|
-
"
|
|
1189
|
-
"
|
|
1190
|
-
"
|
|
1191
|
-
"
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1247
|
+
"plot": "_02HI2q_plot",
|
|
1248
|
+
"metaHead": "_02HI2q_metaHead",
|
|
1249
|
+
"intro": "_02HI2q_intro",
|
|
1250
|
+
"refresh": "_02HI2q_refresh",
|
|
1251
|
+
"hit": "_02HI2q_hit",
|
|
1252
|
+
"series5": "_02HI2q_series5",
|
|
1253
|
+
"countDot": "_02HI2q_countDot",
|
|
1254
|
+
"cardHead": "_02HI2q_cardHead",
|
|
1194
1255
|
"select": "_02HI2q_select",
|
|
1256
|
+
"button": "_02HI2q_button",
|
|
1257
|
+
"chevronOpen": "_02HI2q_chevronOpen",
|
|
1258
|
+
"hint": "_02HI2q_hint",
|
|
1259
|
+
"yTick": "_02HI2q_yTick",
|
|
1260
|
+
"metaHint": "_02HI2q_metaHint",
|
|
1195
1261
|
"axisLabel": "_02HI2q_axisLabel",
|
|
1196
|
-
"
|
|
1197
|
-
"voucherFact": "_02HI2q_voucherFact",
|
|
1198
|
-
"factLabel": "_02HI2q_factLabel",
|
|
1199
|
-
"linkRow": "_02HI2q_linkRow",
|
|
1262
|
+
"topupBar": "_02HI2q_topupBar",
|
|
1200
1263
|
"facts": "_02HI2q_facts",
|
|
1201
|
-
"
|
|
1202
|
-
"topupChips": "_02HI2q_topupChips",
|
|
1264
|
+
"row": "_02HI2q_row",
|
|
1203
1265
|
"buttonSmall": "_02HI2q_buttonSmall",
|
|
1204
|
-
"
|
|
1205
|
-
"
|
|
1206
|
-
"
|
|
1207
|
-
"
|
|
1208
|
-
"
|
|
1209
|
-
"
|
|
1210
|
-
"
|
|
1266
|
+
"rowRatio": "_02HI2q_rowRatio",
|
|
1267
|
+
"card": "_02HI2q_card",
|
|
1268
|
+
"voucherEmpty": "_02HI2q_voucherEmpty",
|
|
1269
|
+
"gridBase": "_02HI2q_gridBase",
|
|
1270
|
+
"plotPanel": "_02HI2q_plotPanel",
|
|
1271
|
+
"chart": "_02HI2q_chart",
|
|
1272
|
+
"code": "_02HI2q_code",
|
|
1273
|
+
"countPicked": "_02HI2q_countPicked",
|
|
1274
|
+
"swatch": "_02HI2q_swatch",
|
|
1211
1275
|
"count": "_02HI2q_count",
|
|
1212
|
-
"
|
|
1213
|
-
"
|
|
1214
|
-
"chevronOpen": "_02HI2q_chevronOpen",
|
|
1215
|
-
"metaActions": "_02HI2q_metaActions",
|
|
1216
|
-
"segment": "_02HI2q_segment",
|
|
1276
|
+
"list": "_02HI2q_list",
|
|
1277
|
+
"autosave": "_02HI2q_autosave",
|
|
1217
1278
|
"codeRow": "_02HI2q_codeRow",
|
|
1218
|
-
"
|
|
1219
|
-
"
|
|
1220
|
-
"
|
|
1279
|
+
"metaBtn": "_02HI2q_metaBtn",
|
|
1280
|
+
"segment": "_02HI2q_segment",
|
|
1281
|
+
"rowMeta": "_02HI2q_rowMeta",
|
|
1282
|
+
"topup": "_02HI2q_topup",
|
|
1283
|
+
"series4": "_02HI2q_series4",
|
|
1221
1284
|
"valueRow": "_02HI2q_valueRow",
|
|
1222
|
-
"
|
|
1223
|
-
"
|
|
1224
|
-
"
|
|
1225
|
-
"
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1285
|
+
"form": "_02HI2q_form",
|
|
1286
|
+
"axisRow": "_02HI2q_axisRow",
|
|
1287
|
+
"linkRow": "_02HI2q_linkRow",
|
|
1288
|
+
"factValue": "_02HI2q_factValue",
|
|
1289
|
+
"voucherFact": "_02HI2q_voucherFact",
|
|
1290
|
+
"metaEditor": "_02HI2q_metaEditor",
|
|
1291
|
+
"topupChipActive": "_02HI2q_topupChipActive",
|
|
1292
|
+
"rowName": "_02HI2q_rowName",
|
|
1293
|
+
"voucherGroup": "_02HI2q_voucherGroup",
|
|
1294
|
+
"metaActions": "_02HI2q_metaActions",
|
|
1295
|
+
"notice": "_02HI2q_notice",
|
|
1296
|
+
"tip": "_02HI2q_tip",
|
|
1297
|
+
"legend": "_02HI2q_legend",
|
|
1298
|
+
"segmentOn": "_02HI2q_segmentOn",
|
|
1228
1299
|
"topupChip": "_02HI2q_topupChip",
|
|
1229
|
-
"metaHint": "_02HI2q_metaHint",
|
|
1230
|
-
"plotPanel": "_02HI2q_plotPanel",
|
|
1231
|
-
"yTick": "_02HI2q_yTick",
|
|
1232
|
-
"plot": "_02HI2q_plot",
|
|
1233
1300
|
"gridLine": "_02HI2q_gridLine",
|
|
1234
|
-
"
|
|
1235
|
-
"hit": "_02HI2q_hit",
|
|
1236
|
-
"metaEditor": "_02HI2q_metaEditor",
|
|
1237
|
-
"legendItem": "_02HI2q_legendItem",
|
|
1301
|
+
"axis": "_02HI2q_axis",
|
|
1238
1302
|
"handle": "_02HI2q_handle",
|
|
1239
|
-
"
|
|
1240
|
-
"
|
|
1241
|
-
"
|
|
1242
|
-
"legendName": "_02HI2q_legendName",
|
|
1303
|
+
"series3": "_02HI2q_series3",
|
|
1304
|
+
"section": "_02HI2q_section",
|
|
1305
|
+
"link": "_02HI2q_link",
|
|
1243
1306
|
"series2": "_02HI2q_series2",
|
|
1244
|
-
"
|
|
1307
|
+
"tipGroup": "_02HI2q_tipGroup",
|
|
1308
|
+
"series0": "_02HI2q_series0",
|
|
1309
|
+
"label": "_02HI2q_label",
|
|
1310
|
+
"factLabel": "_02HI2q_factLabel",
|
|
1311
|
+
"topupInput": "_02HI2q_topupInput",
|
|
1312
|
+
"search": "_02HI2q_search",
|
|
1245
1313
|
"plotRow": "_02HI2q_plotRow",
|
|
1314
|
+
"legendItem": "_02HI2q_legendItem",
|
|
1315
|
+
"buttonPrimary": "_02HI2q_buttonPrimary",
|
|
1246
1316
|
"metaTitle": "_02HI2q_metaTitle",
|
|
1247
|
-
"
|
|
1248
|
-
"
|
|
1249
|
-
"
|
|
1250
|
-
"legend": "_02HI2q_legend",
|
|
1251
|
-
"actions": "_02HI2q_actions",
|
|
1252
|
-
"axis": "_02HI2q_axis",
|
|
1253
|
-
"legendCost": "_02HI2q_legendCost",
|
|
1317
|
+
"topupChips": "_02HI2q_topupChips",
|
|
1318
|
+
"cardToggle": "_02HI2q_cardToggle",
|
|
1319
|
+
"name": "_02HI2q_name",
|
|
1254
1320
|
"toolbar": "_02HI2q_toolbar",
|
|
1255
|
-
"
|
|
1256
|
-
"
|
|
1257
|
-
"
|
|
1258
|
-
"
|
|
1259
|
-
"
|
|
1260
|
-
"
|
|
1261
|
-
"
|
|
1262
|
-
"
|
|
1263
|
-
"
|
|
1264
|
-
"
|
|
1265
|
-
"
|
|
1321
|
+
"invite": "_02HI2q_invite",
|
|
1322
|
+
"voucherList": "_02HI2q_voucherList",
|
|
1323
|
+
"metaInput": "_02HI2q_metaInput",
|
|
1324
|
+
"metaIntro": "_02HI2q_metaIntro",
|
|
1325
|
+
"chevron": "_02HI2q_chevron",
|
|
1326
|
+
"title": "_02HI2q_title",
|
|
1327
|
+
"voucherRow": "_02HI2q_voucherRow",
|
|
1328
|
+
"metaChecks": "_02HI2q_metaChecks",
|
|
1329
|
+
"voucherAmount": "_02HI2q_voucherAmount",
|
|
1330
|
+
"metaCheck": "_02HI2q_metaCheck",
|
|
1331
|
+
"tipGroupName": "_02HI2q_tipGroupName",
|
|
1266
1332
|
"segmented": "_02HI2q_segmented",
|
|
1267
|
-
"
|
|
1333
|
+
"tally": "_02HI2q_tally",
|
|
1334
|
+
"legendCost": "_02HI2q_legendCost",
|
|
1335
|
+
"linkLine": "_02HI2q_linkLine",
|
|
1336
|
+
"metaBtnOn": "_02HI2q_metaBtnOn",
|
|
1337
|
+
"series1": "_02HI2q_series1",
|
|
1338
|
+
"tipRow": "_02HI2q_tipRow",
|
|
1339
|
+
"legendName": "_02HI2q_legendName",
|
|
1340
|
+
"metaLabel": "_02HI2q_metaLabel",
|
|
1341
|
+
"badge": "_02HI2q_badge"
|
|
1268
1342
|
};
|
|
1269
1343
|
//#endregion
|
|
1270
1344
|
//#region src/client/NearTokenSection.tsx
|
|
@@ -3003,6 +3077,8 @@ window.__ModuleLoader__.load({
|
|
|
3003
3077
|
"menu.model": "模型",
|
|
3004
3078
|
"menu.group": "分组",
|
|
3005
3079
|
"menu.effort": "推理等级",
|
|
3080
|
+
"link.label": "长连接端点",
|
|
3081
|
+
"link.failed": "端点切换失败:{message}",
|
|
3006
3082
|
"effort.providerDefault": "Default",
|
|
3007
3083
|
"status.loading": "正在刷新模型列表…",
|
|
3008
3084
|
"error.action": "模型操作失败:{message}",
|
|
@@ -3140,6 +3216,8 @@ window.__ModuleLoader__.load({
|
|
|
3140
3216
|
"menu.model": "Model",
|
|
3141
3217
|
"menu.group": "Group",
|
|
3142
3218
|
"menu.effort": "Effort",
|
|
3219
|
+
"link.label": "Long-lived endpoint",
|
|
3220
|
+
"link.failed": "Could not switch the endpoint: {message}",
|
|
3143
3221
|
"effort.providerDefault": "Default",
|
|
3144
3222
|
"status.loading": "Refreshing model list…",
|
|
3145
3223
|
"error.action": "Model operation failed: {message}",
|
|
@@ -3316,7 +3394,9 @@ window.__ModuleLoader__.load({
|
|
|
3316
3394
|
load: () => {
|
|
3317
3395
|
if (available) directory.load().catch(() => {});
|
|
3318
3396
|
},
|
|
3319
|
-
select: (selection) => available ? directory.select(selection) : Promise.resolve(void 0)
|
|
3397
|
+
select: (selection) => available ? directory.select(selection) : Promise.resolve(void 0),
|
|
3398
|
+
readLink: () => api.link(),
|
|
3399
|
+
saveLink: (direct) => api.saveLink(direct)
|
|
3320
3400
|
};
|
|
3321
3401
|
}
|
|
3322
3402
|
}, ModelGroupSelect));
|