@lynn123411/dsh-chat-translate 3.9.0 → 3.9.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/lib/client.js +53 -14
- package/lib/client.js.map +2 -2
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/types/client/chat/assistant-step.d.ts +16 -8
- package/lib/types/client/chat/presentation.d.ts +20 -6
- package/package.json +13 -13
|
@@ -3,19 +3,33 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 宿主把这一策略派生自 `ui-chat` 配置条目的 `transcriptView` 字段;本插件接管
|
|
5
5
|
* 助手行渲染后,经 `ctx.configForms.get('ui-chat')` 读同一个字段。渲染层只用到
|
|
6
|
-
*
|
|
7
|
-
* ({@link ChatPresentationPolicy.settledReasoningPreview}
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* 其中两个能力:落定的思考行要不要在 Think 标题旁预览首行
|
|
7
|
+
* ({@link ChatPresentationPolicy.settledReasoningPreview}),以及折叠时保留哪些
|
|
8
|
+
* 助手回复({@link ChatPresentationPolicy.foldedReplies})。只镜像本插件真正读到的
|
|
9
|
+
* 这两个字段,而不是把宿主的整张策略表搬过来。快照对象按取值常驻(同一取值恒等
|
|
10
|
+
* 返回同一实例),选择器订阅看到的是稳定引用。
|
|
10
11
|
*/
|
|
11
|
-
/**
|
|
12
|
+
/** 折叠回复时保留哪些助手回复:全部,还是只有最后一条结论。 */
|
|
13
|
+
export type FoldedReplies = 'all' | 'final';
|
|
14
|
+
/** 与宿主 ChatPresentationPolicy 同形的结构性镜像(只保留本插件读取的两个能力)。 */
|
|
12
15
|
export interface ChatPresentationPolicy {
|
|
13
16
|
readonly settledReasoningPreview: boolean;
|
|
17
|
+
readonly foldedReplies: FoldedReplies;
|
|
14
18
|
}
|
|
15
19
|
/** 宿主在用户没有显式选择时使用的模式。 */
|
|
16
20
|
export declare const DEFAULT_MODE = "standard";
|
|
21
|
+
/** 宿主在没有保存折叠回复偏好时保留全部回复。 */
|
|
22
|
+
export declare const DEFAULT_FOLDED_REPLIES: FoldedReplies;
|
|
17
23
|
/**
|
|
18
|
-
*
|
|
24
|
+
* 两个存储值 → 策略快照。
|
|
25
|
+
*
|
|
26
|
+
* @param mode - `transcriptView` 的原样字符串。
|
|
27
|
+
* @param foldedReplies - `foldedReplies` 的原样字符串;未识别按保留全部。
|
|
28
|
+
* @returns 该组合的常驻快照。
|
|
29
|
+
*/
|
|
30
|
+
export declare function policyFor(mode: string, foldedReplies: string): ChatPresentationPolicy;
|
|
31
|
+
/**
|
|
32
|
+
* 存储值 → 策略快照(只按工作细节模式,折叠回复取宿主默认)。
|
|
19
33
|
*
|
|
20
34
|
* @param mode - `transcriptView` 的原样字符串。
|
|
21
35
|
* @returns 该模式的常驻快照。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynn123411/dsh-chat-translate",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.4",
|
|
4
4
|
"description": "Assistant reply-body translation for the DeepSeek Harness Web UI (OpenAI-compatible channel)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "lynn123411",
|
|
@@ -72,18 +72,18 @@
|
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": "^22.19 || >=24",
|
|
75
|
-
"dsh": ">=0.2.
|
|
75
|
+
"dsh": ">=0.2.2-rc.2"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@deepseek-ai/cordis": "^4.0
|
|
79
|
-
"@deepseek-ai/dsh-client-connection": ">=0.2.
|
|
80
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.
|
|
81
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.
|
|
82
|
-
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.
|
|
83
|
-
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.
|
|
84
|
-
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.
|
|
85
|
-
"@deepseek-ai/dsh-home-paths": ">=0.2.
|
|
86
|
-
"@deepseek-ai/schemastery": "^3.
|
|
78
|
+
"@deepseek-ai/cordis": "^4.1.0",
|
|
79
|
+
"@deepseek-ai/dsh-client-connection": ">=0.2.2-rc.2",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": ">=0.2.2-rc.2",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.2-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.2-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.2-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.2-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-home-paths": ">=0.2.2-rc.2",
|
|
86
|
+
"@deepseek-ai/schemastery": "^3.19.0",
|
|
87
87
|
"@types/node": "^22.19.0",
|
|
88
88
|
"@types/react": "^19.2.18",
|
|
89
89
|
"@types/react-dom": "^19.3.0",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"typescript": "^6.0.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.
|
|
98
|
-
"@deepseek-ai/dsh-home-paths": ">=0.2.
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.2-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-home-paths": ">=0.2.2-rc.2"
|
|
99
99
|
},
|
|
100
100
|
"peerDependenciesMeta": {
|
|
101
101
|
"@deepseek-ai/dsh-client-ui-primitives": {
|