dsh-model-think-level 2.6.2 → 2.6.4
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
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
|
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
* right of the context pill. It exists ONLY while a continue chain is running:
|
|
7
7
|
*
|
|
8
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
9
|
* sent → `✓ 已继续 2/5`
|
|
12
10
|
* exhausted → `⏱ 已停手 5/5` + an inline 重置
|
|
13
11
|
* idle → nothing at all (the chip unmounts, the slot stays empty)
|
|
@@ -31,6 +29,20 @@
|
|
|
31
29
|
*/
|
|
32
30
|
import type { AutoContinueRunner } from './injection/auto-continue-run.js';
|
|
33
31
|
type Translate = (key: string, params?: Record<string, unknown>) => string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the mounted chip still belongs where it is: exactly one dock on the
|
|
34
|
+
* page and the chip already a direct child of it.
|
|
35
|
+
*
|
|
36
|
+
* Checked before {@link anchorRow}, because that resolve ends in
|
|
37
|
+
* `getClientRects()` — which forces layout the moment the transcript is dirty,
|
|
38
|
+
* and typing or streaming keeps it dirty. Several docks take the slow path on
|
|
39
|
+
* purpose: there "the last visible one" decides the chip's home, and that is a
|
|
40
|
+
* question only the full resolve can answer.
|
|
41
|
+
* @param host - the element this module mounted, if any.
|
|
42
|
+
* @param docks - every composer dock currently in the document.
|
|
43
|
+
* @returns true when re-resolving the anchor could not move the chip.
|
|
44
|
+
*/
|
|
45
|
+
export declare function chipInPlace(host: HTMLElement | undefined, docks: ArrayLike<HTMLElement>): boolean;
|
|
34
46
|
/** What {@link mountAutoContinueController} needs. */
|
|
35
47
|
export interface AutoContinueControllerDeps {
|
|
36
48
|
runner: AutoContinueRunner;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The auto-continue watcher: replies 「继续」 to
|
|
2
|
+
* The auto-continue watcher: replies 「继续」 to interrupted live sessions
|
|
3
3
|
* when it ended in a way worth continuing, and stays silent otherwise.
|
|
4
4
|
*
|
|
5
5
|
* The decision is {@link judgeTurnTail} (auto-continue-rules.ts); this module
|
|
6
6
|
* owns the OBSERVATION and the GUARDS around it:
|
|
7
7
|
*
|
|
8
|
-
* -
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* - A page that loads into a session whose last turn failed yesterday does
|
|
15
|
-
* nothing — auto-continuing stale failures is exactly the mindless
|
|
16
|
-
* behaviour the switch must not have.
|
|
8
|
+
* - The selected session and running root sessions from the catalog are
|
|
9
|
+
* watched. On reference-owning kernels each live chain retains its exact
|
|
10
|
+
* session generation: a borrowed binding alone cannot keep history alive.
|
|
11
|
+
* Idle unopened history is never scanned en masse. On first attachment,
|
|
12
|
+
* only a recent unanswered failure is recoverable (within a day); any
|
|
13
|
+
* newer user intent/run or stale ending makes it history.
|
|
17
14
|
* - The durable `turn/end` is what is judged, not the running edge, so the
|
|
18
15
|
* evaluation waits briefly for the settlement to reach the event window.
|
|
19
16
|
* - Guards at send time: the switch still on, the turn still ended, nothing
|
|
20
|
-
* the user submitted pending, the session still
|
|
17
|
+
* the user submitted pending, the retained session generation still live.
|
|
21
18
|
* - A streak cap bounds every chain of automatic replies (a dead provider
|
|
22
19
|
* or a model looping on the ceiling must not be fed forever); anything
|
|
23
20
|
* the user sends by hand, and every turn that ends completed / aborted /
|
|
@@ -23,8 +23,12 @@ export interface SessionsLike {
|
|
|
23
23
|
list?: {
|
|
24
24
|
getSnapshot(): {
|
|
25
25
|
current?: string;
|
|
26
|
+
ids?: readonly string[];
|
|
26
27
|
byId?: Record<string, {
|
|
27
28
|
id?: string;
|
|
29
|
+
running?: boolean;
|
|
30
|
+
origin?: string;
|
|
31
|
+
parentId?: string;
|
|
28
32
|
retainedBy?: Record<string, number>;
|
|
29
33
|
} | undefined>;
|
|
30
34
|
};
|