dsh-model-think-level 2.6.0 → 2.6.2
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 +10 -6
- package/lib/client/AutoContinueController.d.ts +11 -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/lib/history-compat.d.ts +12 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +2 -2
- 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
|
|
23
|
+
- **旧话题恢复** — 换过 Azure 资源/中转账号池的上游会拒收旧话题带来的历史项(`item`):要么说「created under a different … resource」,要么说某个 `function_call` 缺少与它配对的那条 `reasoning`。打开后同时识别 `400` 响应体与 `200` 流内 `response.failed` 的这些拒绝,在发送副本的消息上下文里逐级去掉旧资源签发的句柄(必要时连历史推理一起),再重放这次请求,不删本地历史。
|
|
24
24
|
- **自动继续** — 会话因为断线、超时、撞上输出上限停住时,替你补一条「继续」,可展开配置等待秒数和最多重试次数。
|
|
25
25
|
- **余额** — 每个供应商可选配一个只读余额接口,模型页直接显示余额,支持手动刷新。
|
|
26
26
|
|
|
@@ -199,18 +199,22 @@ dsh plugin add .
|
|
|
199
199
|
|
|
200
200
|
## 旧话题恢复
|
|
201
201
|
|
|
202
|
-
同一个供应商如果换过 Azure
|
|
202
|
+
同一个供应商如果换过 Azure 资源、换过中转账号池,旧话题的下一条消息可能直接被拒。会见到两种说法:
|
|
203
203
|
|
|
204
204
|
```
|
|
205
205
|
The requested item was created under a different Azure OpenAI resource. Use the same resource that created the item to access it.
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
-
|
|
208
|
+
```
|
|
209
|
+
Item 'fc_04e5…' of type 'function_call' was provided without its required 'reasoning' item: 'rs_04e5…'.
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
前者是历史项的标识属于上一个资源;后者是同一次拆分的结果——中转把工具调用的 `fc_` 句柄留下了,却没把与它配对生成的那条 `rs_` 推理项一起重放,服务端按配对关系找不到兄弟项。**两者是同一件事:重放的历史和服务它的后端对不上。** 旧话题的历史项带着上一个资源签发的标识和加密推理,新资源不认识它们。这不是密钥失效,也不是模型不存在——换密钥、切协议、把话题清空重来都不对症,而且本地那段历史还在,换个入口发出去照样被拒。
|
|
209
213
|
|
|
210
|
-
|
|
214
|
+
「高级配置」里的第三块**旧话题恢复**就是为这两种拒绝准备的,默认关闭,按路由打开:
|
|
211
215
|
|
|
212
|
-
-
|
|
213
|
-
- **在原消息上下文上降级,逐级放宽**:第一次原样发送;命中后先只去掉重放历史里绑定旧资源的句柄——推理项 `thinkingSignature` 里的 `id`、文本项 `textSignature` 里的 `id`、工具调用 `id` 里的 `itemId`
|
|
216
|
+
- **认措辞,不认状态码**:这两种拒绝都可能以 `400` 出现(正文是 JSON,或中转把 400 当 SSE 流发回来),也可能以 `200` 的流内 `response.failed` 出现——流式 Responses 更常见的正是后者。两种都会识别,因为恢复引擎读的是那句精确措辞,而不是 HTTP 门牌。别的错误一律原样透传。
|
|
217
|
+
- **在原消息上下文上降级,逐级放宽**:第一次原样发送;命中后先只去掉重放历史里绑定旧资源的句柄——推理项 `thinkingSignature` 里的 `id`、文本项 `textSignature` 里的 `id`、工具调用 `id` 里的 `itemId` 半段(去掉它,被拆开的 `fc_`/`rs_` 也就不再触发配对校验);仍被拒就再停止重放历史推理(本地可见的思考文本不动)。恢复只发生在流还没把任何内容交给调用方之前;已经开始输出的回合不会被重放。
|
|
214
218
|
- **不动你保存的历史**:只改这一次请求的副本。`call_id`、工具调用与结果的配对、正文、顺序、`previous_response_id` 全部保留;`item_reference`、compaction 这类带密文的项不碰。
|
|
215
219
|
- **不牵连密钥与协议**:恢复在同一个候选密钥、同一个地址、模型和协议内完成;历史类失败不会把密钥记进冷却、不算协议失败、不触发自动继续。修不好时不换密钥——每把密钥都到同一个中转池,换只是把同样的失败多试几遍。
|
|
216
220
|
- **代价很小**:只有匹配到那句拒绝时才多读一次错误体(上限 64 KiB / 2 秒),或按需多跑一至两次降级重放;正常请求一个字节都不多看。
|
|
@@ -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.
|
|
@@ -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;
|