dsh-model-think-level 2.6.1 → 2.6.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/README.md +2 -2
- package/lib/client/AutoContinueController.d.ts +25 -3
- package/lib/client/injection/auto-continue-run.d.ts +2 -0
- package/lib/client/locales.d.ts +6 -0
- package/lib/client/styles.d.ts +1 -1
- package/lib/client.js +116 -34
- package/lib/client.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ DSH 自带的 Models 页只认得它自己目录里的模型。中转站、自
|
|
|
20
20
|
- **自定义请求头** — 每个路由可配任意请求头(含 `user-agent`),在 fetch 层按请求重新盖回去;同源冲突、与官方适配器或同类插件的争抢都会被检出。
|
|
21
21
|
- **请求伪装** — 每个路由可选 Codex / Claude 两种官方 CLI 身份:客户端请求头,以及 Claude 的 Messages 请求体身份段一并补齐;默认关闭,与自定义请求头同一区块。
|
|
22
22
|
- **生图** — 勾一下「生图」就能把任意模型变成生图模型,对话模型调用原生工具 `generate_image` 出图,支持参考图改图、多图并出、默认参数与超时。
|
|
23
|
-
- **旧话题恢复** — 换过 Azure 资源/中转账号池的上游会拒收旧话题带来的历史项(`item`):要么说「created under a different … resource
|
|
23
|
+
- **旧话题恢复** — 换过 Azure 资源/中转账号池的上游会拒收旧话题带来的历史项(`item`):要么说「created under a different … resource」,要么说某个历史项(`function_call` 或 `message`)缺少与它配对的那条 `reasoning`。打开后同时识别 `400` 响应体与 `200` 流内 `response.failed` 的这些拒绝,在发送副本的消息上下文里逐级去掉旧资源签发的句柄(必要时连历史推理一起),再重放这次请求,不删本地历史。
|
|
24
24
|
- **自动继续** — 会话因为断线、超时、撞上输出上限停住时,替你补一条「继续」,可展开配置等待秒数和最多重试次数。
|
|
25
25
|
- **余额** — 每个供应商可选配一个只读余额接口,模型页直接显示余额,支持手动刷新。
|
|
26
26
|
|
|
@@ -209,7 +209,7 @@ The requested item was created under a different Azure OpenAI resource. Use the
|
|
|
209
209
|
Item 'fc_04e5…' of type 'function_call' was provided without its required 'reasoning' item: 'rs_04e5…'.
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
|
|
212
|
+
前者是历史项的标识属于上一个资源;后者是同一次拆分的结果——中转把某个历史项的句柄留下了(工具调用的 `fc_`,或普通回复的 `message` 项 `msg_`),却没把与它配对生成的那条 `rs_` 推理项一起重放,服务端按配对关系找不到兄弟项。**两者是同一件事:重放的历史和服务它的后端对不上。** 旧话题的历史项带着上一个资源签发的标识和加密推理,新资源不认识它们。这不是密钥失效,也不是模型不存在——换密钥、切协议、把话题清空重来都不对症,而且本地那段历史还在,换个入口发出去照样被拒。
|
|
213
213
|
|
|
214
214
|
「高级配置」里的第三块**旧话题恢复**就是为这两种拒绝准备的,默认关闭,按路由打开:
|
|
215
215
|
|
|
@@ -5,11 +5,19 @@
|
|
|
5
5
|
* carries 「5 轮 · 185 步 · 115 tok/s」 and the context meter — and is inserted
|
|
6
6
|
* right of the context pill. It exists ONLY while a continue chain is running:
|
|
7
7
|
*
|
|
8
|
-
* waiting →
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* waiting → `◔ 自动继续 3s 1/5`, countdown ring, click opens the popover
|
|
9
|
+
* paused → `⏸ 自动继续 回到本会话后继续` (the view left this session, so
|
|
10
|
+
* the countdown is frozen; it resumes from the remaining seconds)
|
|
11
|
+
* sent → `✓ 已继续 2/5`
|
|
12
|
+
* exhausted → `⏱ 已停手 5/5` + an inline 重置
|
|
11
13
|
* idle → nothing at all (the chip unmounts, the slot stays empty)
|
|
12
14
|
*
|
|
15
|
+
* The chip answers three questions in that order, at 22px high: who is doing
|
|
16
|
+
* what (a verb, not a counter), how long is left (a ring, then an exact
|
|
17
|
+
* number), and how many tries are left (quiet small type — it is a ceiling,
|
|
18
|
+
* not a reading). The popover carries the one sentence that does not fit:
|
|
19
|
+
* why the chain exists, what it will do, and how the user takes over.
|
|
20
|
+
*
|
|
13
21
|
* Every action is scoped to the CURRENT session: 「停止」 ends this chain and
|
|
14
22
|
* mutes the session until the user posts again; the global switch and the
|
|
15
23
|
* policy live in the settings pane, which 「设置…」 opens.
|
|
@@ -23,6 +31,20 @@
|
|
|
23
31
|
*/
|
|
24
32
|
import type { AutoContinueRunner } from './injection/auto-continue-run.js';
|
|
25
33
|
type Translate = (key: string, params?: Record<string, unknown>) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the mounted chip still belongs where it is: exactly one dock on the
|
|
36
|
+
* page and the chip already a direct child of it.
|
|
37
|
+
*
|
|
38
|
+
* Checked before {@link anchorRow}, because that resolve ends in
|
|
39
|
+
* `getClientRects()` — which forces layout the moment the transcript is dirty,
|
|
40
|
+
* and typing or streaming keeps it dirty. Several docks take the slow path on
|
|
41
|
+
* purpose: there "the last visible one" decides the chip's home, and that is a
|
|
42
|
+
* question only the full resolve can answer.
|
|
43
|
+
* @param host - the element this module mounted, if any.
|
|
44
|
+
* @param docks - every composer dock currently in the document.
|
|
45
|
+
* @returns true when re-resolving the anchor could not move the chip.
|
|
46
|
+
*/
|
|
47
|
+
export declare function chipInPlace(host: HTMLElement | undefined, docks: ArrayLike<HTMLElement>): boolean;
|
|
26
48
|
/** What {@link mountAutoContinueController} needs. */
|
|
27
49
|
export interface AutoContinueControllerDeps {
|
|
28
50
|
runner: AutoContinueRunner;
|
|
@@ -71,6 +71,8 @@ export interface AutoContinueStatus {
|
|
|
71
71
|
readonly maxRetries: number;
|
|
72
72
|
/** Epoch ms the pending reply fires at; 0 when no timer is armed. */
|
|
73
73
|
readonly nextSendAt: number;
|
|
74
|
+
/** Length of the armed wait in ms; the chip draws the ring against it. */
|
|
75
|
+
readonly waitMs: number;
|
|
74
76
|
/** The judged interruption, e.g. `RATE_LIMIT` or `max-tokens` (tooltip only). */
|
|
75
77
|
readonly detail: string;
|
|
76
78
|
/** Whether the user stopped this session's chain. */
|
package/lib/client/locales.d.ts
CHANGED
|
@@ -310,6 +310,8 @@ export declare const en: {
|
|
|
310
310
|
autoContinueWhyMALFORMED_RESPONSE: string;
|
|
311
311
|
autoContinueWhyUNKNOWN_MODEL: string;
|
|
312
312
|
autoContinueControllerWaiting: string;
|
|
313
|
+
autoContinueControllerSeconds: string;
|
|
314
|
+
autoContinueControllerRatio: string;
|
|
313
315
|
autoContinueControllerSent: string;
|
|
314
316
|
autoContinueControllerExhausted: string;
|
|
315
317
|
autoContinueControllerStop: string;
|
|
@@ -318,6 +320,10 @@ export declare const en: {
|
|
|
318
320
|
autoContinueControllerSettings: string;
|
|
319
321
|
autoContinueControllerAria: string;
|
|
320
322
|
autoContinueControllerDetail: string;
|
|
323
|
+
autoContinueControllerPopTitle: string;
|
|
324
|
+
autoContinueControllerPopBadge: string;
|
|
325
|
+
autoContinueControllerPopDesc: string;
|
|
326
|
+
autoContinueControllerPopScope: string;
|
|
321
327
|
errorDetailSectionTitle: string;
|
|
322
328
|
errorDetailSummary: string;
|
|
323
329
|
errorDetailHint: string;
|