@morlay/dsh-session-mode 0.0.6 → 0.0.8
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 +33 -16
- package/dist/catalog-remote-B-NMi_vS.mjs +21 -0
- package/dist/client.cjs +2623 -1714
- package/dist/client.d.cts +473 -4
- package/dist/client.d.mts +473 -4
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +160 -24
- package/dist/rows.mjs +39 -28
- package/package.json +15 -3
- package/src/catalog-remote.ts +45 -0
- package/src/catalog.ts +75 -0
- package/src/client/BundleConfigPage.tsx +630 -0
- package/src/client/SessionModeSeat.tsx +21 -19
- package/src/client/bundle-config.ts +701 -0
- package/src/client/bundle-locales.ts +214 -0
- package/src/client/index.ts +180 -72
- package/src/client/llm-directory.ts +146 -0
- package/src/client/locales.ts +2 -2
- package/src/index.ts +25 -11
- package/src/mode-sources.ts +20 -6
- package/src/modes.ts +46 -21
- package/src/rows.ts +3 -2
- package/src/scope.ts +4 -5
- package/dist/shared-DX2Giyh3.mjs +0 -5
- package/src/client/SessionModeSeat.module.css +0 -74
package/dist/client.d.mts
CHANGED
|
@@ -1,5 +1,471 @@
|
|
|
1
|
-
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
import {
|
|
1
|
+
import { Context, Service } from "@deepseek-ai/cordis";
|
|
2
|
+
import { SnapshotStore } from "@deepseek-ai/dsh-client-store";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Button, DisclosureRow, Input, SettingsFormShell } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
5
|
+
import { InjectFace, PropsLocale, PropsRuntime, TranslateNS } from "@deepseek-ai/dsh-client-ui-slots";
|
|
6
|
+
import "@deepseek-ai/dsh-api-remotes/client";
|
|
7
|
+
import "@deepseek-ai/dsh-client-ui-settings/client";
|
|
8
|
+
//#region ../../client/ui-primitives/src/client/schema-form/schema-node.d.ts
|
|
9
|
+
type ReadOnlyReason = "transform" | "function" | "constructor";
|
|
10
|
+
interface FieldMeta {
|
|
11
|
+
description: string | Readonly<Record<string, string>> | undefined;
|
|
12
|
+
comment: string | undefined;
|
|
13
|
+
link: string | undefined;
|
|
14
|
+
role: string | undefined;
|
|
15
|
+
secret: boolean;
|
|
16
|
+
required: boolean;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
collapse: boolean;
|
|
19
|
+
badges: readonly string[];
|
|
20
|
+
pattern: string | undefined;
|
|
21
|
+
min: number | undefined;
|
|
22
|
+
max: number | undefined;
|
|
23
|
+
step: number | undefined;
|
|
24
|
+
hasDefault: boolean;
|
|
25
|
+
defaultValue: unknown;
|
|
26
|
+
extra: unknown;
|
|
27
|
+
}
|
|
28
|
+
interface FieldNodeBase {
|
|
29
|
+
key: string;
|
|
30
|
+
path: readonly string[];
|
|
31
|
+
label: string | undefined;
|
|
32
|
+
meta: FieldMeta;
|
|
33
|
+
readOnly: ReadOnlyReason | null;
|
|
34
|
+
}
|
|
35
|
+
interface BitsEntry {
|
|
36
|
+
name: string;
|
|
37
|
+
bit: number;
|
|
38
|
+
}
|
|
39
|
+
type FieldNode = (FieldNodeBase & {
|
|
40
|
+
type: "object";
|
|
41
|
+
fields: readonly FieldNode[];
|
|
42
|
+
}) | (FieldNodeBase & {
|
|
43
|
+
type: "dict";
|
|
44
|
+
keyNode: FieldNode;
|
|
45
|
+
valueNode: FieldNode;
|
|
46
|
+
}) | (FieldNodeBase & {
|
|
47
|
+
type: "array";
|
|
48
|
+
item: FieldNode;
|
|
49
|
+
mergeKey: string | undefined;
|
|
50
|
+
}) | (FieldNodeBase & {
|
|
51
|
+
type: "tuple";
|
|
52
|
+
items: readonly FieldNode[];
|
|
53
|
+
}) | (FieldNodeBase & {
|
|
54
|
+
type: "union";
|
|
55
|
+
choices: readonly unknown[] | undefined;
|
|
56
|
+
variants: readonly FieldNode[];
|
|
57
|
+
tagKey: string | undefined;
|
|
58
|
+
}) | (FieldNodeBase & {
|
|
59
|
+
type: "intersect";
|
|
60
|
+
members: readonly FieldNode[];
|
|
61
|
+
}) | (FieldNodeBase & {
|
|
62
|
+
type: "bitset";
|
|
63
|
+
bits: readonly BitsEntry[];
|
|
64
|
+
}) | (FieldNodeBase & {
|
|
65
|
+
type: "const";
|
|
66
|
+
value: unknown;
|
|
67
|
+
}) | (FieldNodeBase & {
|
|
68
|
+
type: "lazy";
|
|
69
|
+
inner: FieldNode;
|
|
70
|
+
}) | (FieldNodeBase & {
|
|
71
|
+
type: "string" | "number" | "boolean" | "any" | "never" | "function";
|
|
72
|
+
}) | (FieldNodeBase & {
|
|
73
|
+
type: "recursive";
|
|
74
|
+
origin: string;
|
|
75
|
+
});
|
|
76
|
+
interface WalkedField {
|
|
77
|
+
path: readonly string[];
|
|
78
|
+
node: FieldNode;
|
|
79
|
+
member?: {
|
|
80
|
+
parent: readonly string[];
|
|
81
|
+
key: string;
|
|
82
|
+
index: number | undefined;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region ../../client/ui-primitives/src/client/schema-form/draft.d.ts
|
|
87
|
+
type TextParseResult = {
|
|
88
|
+
kind: "value";
|
|
89
|
+
value: unknown;
|
|
90
|
+
} | {
|
|
91
|
+
kind: "skip";
|
|
92
|
+
} | {
|
|
93
|
+
kind: "invalid";
|
|
94
|
+
message: string;
|
|
95
|
+
};
|
|
96
|
+
type TextParse = (text: string) => TextParseResult;
|
|
97
|
+
interface ValidationFailure {
|
|
98
|
+
message: string;
|
|
99
|
+
path: readonly string[];
|
|
100
|
+
}
|
|
101
|
+
interface DraftFieldState {
|
|
102
|
+
value: unknown;
|
|
103
|
+
text: string | undefined;
|
|
104
|
+
invalid: string | undefined;
|
|
105
|
+
overridden: boolean;
|
|
106
|
+
staged: boolean;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region ../../client/ui-primitives/src/client/schema-form/hints.d.ts
|
|
110
|
+
type SuggestedKeysReader = () => readonly string[];
|
|
111
|
+
interface FieldText {
|
|
112
|
+
label?: string | undefined;
|
|
113
|
+
hint?: string | undefined;
|
|
114
|
+
}
|
|
115
|
+
type FieldTextReader = () => FieldText;
|
|
116
|
+
interface SelectOption {
|
|
117
|
+
value: unknown;
|
|
118
|
+
label?: string | undefined;
|
|
119
|
+
}
|
|
120
|
+
interface SelectSpec {
|
|
121
|
+
dependsOn?: readonly (readonly string[])[] | undefined;
|
|
122
|
+
options: (read: (path: readonly string[]) => unknown) => readonly SelectOption[];
|
|
123
|
+
}
|
|
124
|
+
interface SchemaFormHintsFace {
|
|
125
|
+
suggestKeys(ns: string, path: readonly string[], read: SuggestedKeysReader): () => void;
|
|
126
|
+
keysFor(ns: string, path: readonly string[]): readonly string[];
|
|
127
|
+
describe(ns: string, path: readonly string[], read: FieldTextReader): () => void;
|
|
128
|
+
textFor(ns: string, path: readonly string[]): FieldText;
|
|
129
|
+
select(ns: string, path: readonly string[], spec: SelectSpec): () => void;
|
|
130
|
+
source(name: string, spec: SelectSpec): () => void;
|
|
131
|
+
sourceFor(name: string): SelectSpec | undefined;
|
|
132
|
+
selectFor(ns: string, path: readonly string[]): SelectSpec | undefined;
|
|
133
|
+
}
|
|
134
|
+
declare class SchemaFormHints extends Service implements SchemaFormHintsFace {
|
|
135
|
+
#private;
|
|
136
|
+
constructor(ctx: Context);
|
|
137
|
+
keysFor(ns: string, path: readonly string[]): readonly string[];
|
|
138
|
+
textFor(ns: string, path: readonly string[]): FieldText;
|
|
139
|
+
select(ns: string, path: readonly string[], spec: SelectSpec): () => void;
|
|
140
|
+
selectFor(ns: string, path: readonly string[]): SelectSpec | undefined;
|
|
141
|
+
source(name: string, spec: SelectSpec): () => void;
|
|
142
|
+
sourceFor(name: string): SelectSpec | undefined;
|
|
143
|
+
describe(ns: string, path: readonly string[], read: FieldTextReader): () => void;
|
|
144
|
+
suggestKeys(ns: string, path: readonly string[], read: SuggestedKeysReader): () => void;
|
|
145
|
+
subscribe(listener: () => void): () => void;
|
|
146
|
+
refresh(): void;
|
|
147
|
+
}
|
|
148
|
+
declare module "@deepseek-ai/cordis" {
|
|
149
|
+
interface Context {
|
|
150
|
+
schemaFormHints: SchemaFormHints;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region ../../client/ui-primitives/src/client/schema-form/controller.d.ts
|
|
155
|
+
interface AddableProperty {
|
|
156
|
+
key: string;
|
|
157
|
+
description: string | Readonly<Record<string, string>> | undefined;
|
|
158
|
+
}
|
|
159
|
+
interface SchemaFormState extends SettingsFormShell {
|
|
160
|
+
configured: boolean;
|
|
161
|
+
root: FieldNode;
|
|
162
|
+
walked: readonly WalkedField[];
|
|
163
|
+
fields: ReadonlyMap<string, DraftFieldState>;
|
|
164
|
+
secrets: ReadonlyMap<string, boolean>;
|
|
165
|
+
texts: ReadonlyMap<string, FieldText>;
|
|
166
|
+
options: ReadonlyMap<string, readonly SelectOption[]>;
|
|
167
|
+
addable: ReadonlyMap<string, readonly AddableProperty[]>;
|
|
168
|
+
violation: ValidationFailure | undefined;
|
|
169
|
+
invalidAt: ReadonlyMap<string, string>;
|
|
170
|
+
}
|
|
171
|
+
interface SchemaFormActions {
|
|
172
|
+
set: (path: readonly string[], value: unknown) => void;
|
|
173
|
+
setText: (path: readonly string[], text: string, parse: TextParse) => void;
|
|
174
|
+
clear: (path: readonly string[]) => void;
|
|
175
|
+
appendItem: (path: readonly string[]) => void;
|
|
176
|
+
removeItem: (path: readonly string[], index: number) => void;
|
|
177
|
+
addKey: (path: readonly string[], key: string) => void;
|
|
178
|
+
removeKey: (path: readonly string[], key: string) => void;
|
|
179
|
+
save: () => void;
|
|
180
|
+
revert: (path: readonly string[]) => void;
|
|
181
|
+
discard: () => void;
|
|
182
|
+
}
|
|
183
|
+
interface SchemaFormFace extends SchemaFormActions {
|
|
184
|
+
hooks: {
|
|
185
|
+
schemaForm: SnapshotStore<SchemaFormState>;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region ../../client/ui-primitives/src/client/schema-form/labels.d.ts
|
|
190
|
+
type ResolveText = (text: string | Readonly<Record<string, string>>) => string;
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region ../../client/ui-primitives/src/client/schema-form/locales.d.ts
|
|
193
|
+
declare const zh$1: {
|
|
194
|
+
readonly unavailable: "该插件当前未加载,暂时无法配置。";
|
|
195
|
+
readonly readOnly: "本部署的设置为只读。";
|
|
196
|
+
readonly save: "保存";
|
|
197
|
+
readonly confirmEdit: "确认";
|
|
198
|
+
readonly cancelEdit: "取消";
|
|
199
|
+
readonly saving: "保存中…";
|
|
200
|
+
readonly saveFailed: "本部署没有接受这些值,已保留供你修改。";
|
|
201
|
+
readonly notSaved: "没有保存:{message}";
|
|
202
|
+
readonly noSchema: "这一行没有可自动生成的配置项。";
|
|
203
|
+
readonly reset: "恢复默认";
|
|
204
|
+
readonly revert: "撤回";
|
|
205
|
+
readonly invalid: "这个值不被接受。";
|
|
206
|
+
readonly invalidNumber: "需要一个数字。";
|
|
207
|
+
readonly invalidInteger: "需要一个整数。";
|
|
208
|
+
readonly invalidJson: "需要一段合法的 JSON。";
|
|
209
|
+
readonly invalidBoolean: "需要 true 或 false。";
|
|
210
|
+
readonly invalidConst: "这个字段只接受固定值。";
|
|
211
|
+
readonly invalidPattern: "要匹配 {pattern}。";
|
|
212
|
+
readonly invalidRange: "要在 {min} 与 {max} 之间。";
|
|
213
|
+
readonly invalidMin: "不能小于 {min}。";
|
|
214
|
+
readonly invalidMax: "不能大于 {max}。";
|
|
215
|
+
readonly invalidChoice: "只能是 {choices} 之一。";
|
|
216
|
+
readonly unknownProperty: "这一层没有这个字段:从上面的候选里选,或换个键名。";
|
|
217
|
+
readonly empty: "(空)";
|
|
218
|
+
readonly toggleGroup: "展开 / 收起这一层";
|
|
219
|
+
readonly switchVariant: "切换这一层的形状或分支";
|
|
220
|
+
readonly copyValue: "复制值";
|
|
221
|
+
readonly copied: "已复制";
|
|
222
|
+
readonly addProperty: "添加属性";
|
|
223
|
+
readonly addItemPaste: "添加数组项(可粘贴 JSON 字符串)";
|
|
224
|
+
readonly addItem: "添加一项";
|
|
225
|
+
readonly removeItem: "移除";
|
|
226
|
+
readonly addKey: "添加键(可粘贴 JSON 字符串)";
|
|
227
|
+
readonly keyName: "键名";
|
|
228
|
+
readonly noKeys: "还没有键。";
|
|
229
|
+
readonly noItems: "还没有项。";
|
|
230
|
+
readonly deprecated: "已废弃";
|
|
231
|
+
readonly experimental: "试验中";
|
|
232
|
+
readonly secretSet: "已配置";
|
|
233
|
+
readonly secretUnset: "未配置";
|
|
234
|
+
readonly secretHint: "留空即保留已存的值。";
|
|
235
|
+
readonly constValue: "固定值";
|
|
236
|
+
readonly notEditable: "这一项由插件在运行时提供,不能在页面上编辑。";
|
|
237
|
+
readonly recursive: "递归结构:展开到这一层为止。";
|
|
238
|
+
readonly fixedLength: "固定长度";
|
|
239
|
+
readonly bitsetHint: "可多选。";
|
|
240
|
+
readonly unconfigured: "未配置";
|
|
241
|
+
readonly readOnlyField: "只读";
|
|
242
|
+
readonly noDescription: "(无说明)";
|
|
243
|
+
readonly required: "必填";
|
|
244
|
+
readonly duplicateItem: "重复的 {key}:{value}";
|
|
245
|
+
readonly missingItem: "每一项都需要一个 {key}";
|
|
246
|
+
};
|
|
247
|
+
type SchemaFormLocaleKey = keyof typeof zh$1;
|
|
248
|
+
//#endregion
|
|
249
|
+
//#region ../../client/ui-primitives/src/client/schema-form/slot-contract.d.ts
|
|
250
|
+
interface SchemaFieldOwnerProps {
|
|
251
|
+
ns: string;
|
|
252
|
+
path: readonly string[];
|
|
253
|
+
node: FieldNode;
|
|
254
|
+
label: string;
|
|
255
|
+
hint: string | undefined;
|
|
256
|
+
value: unknown;
|
|
257
|
+
options: readonly SelectOption[] | undefined;
|
|
258
|
+
text: string | undefined;
|
|
259
|
+
secretConfigured: boolean;
|
|
260
|
+
depth: number;
|
|
261
|
+
overridden: boolean;
|
|
262
|
+
invalid: string | undefined;
|
|
263
|
+
disabled: boolean;
|
|
264
|
+
t: SchemaFormTranslate;
|
|
265
|
+
actions: SchemaFormActions;
|
|
266
|
+
group: {
|
|
267
|
+
collapsed: boolean;
|
|
268
|
+
toggle: () => void;
|
|
269
|
+
} | undefined;
|
|
270
|
+
member: {
|
|
271
|
+
parent: readonly string[];
|
|
272
|
+
key: string;
|
|
273
|
+
index: number | undefined;
|
|
274
|
+
pending?: boolean;
|
|
275
|
+
} | undefined;
|
|
276
|
+
onChange: (value: unknown) => void;
|
|
277
|
+
onEditText: (text: string, parse?: TextParse) => void;
|
|
278
|
+
onReset: () => void;
|
|
279
|
+
}
|
|
280
|
+
interface SchemaFormProps {
|
|
281
|
+
ns: string;
|
|
282
|
+
face: SchemaFormFace;
|
|
283
|
+
resolveText: ResolveText;
|
|
284
|
+
}
|
|
285
|
+
type SchemaFormTranslate = TranslateNS<"settings.schema-form">;
|
|
286
|
+
declare module "@deepseek-ai/dsh-client-ui-slots" {
|
|
287
|
+
interface LocaleNamespaceMap {
|
|
288
|
+
"settings.schema-form": SchemaFormLocaleKey;
|
|
289
|
+
}
|
|
290
|
+
interface SlotMap {
|
|
291
|
+
"settings.schema-form.field": {
|
|
292
|
+
kind: "chain";
|
|
293
|
+
scope: "root";
|
|
294
|
+
owner: SchemaFieldOwnerProps;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
interface SlotFactoryMap {
|
|
298
|
+
"settings.schema-form.form": {
|
|
299
|
+
scope: "root";
|
|
300
|
+
props: SchemaFormProps;
|
|
301
|
+
locale: "settings.schema-form";
|
|
302
|
+
children: {
|
|
303
|
+
"settings.schema-form.field": {
|
|
304
|
+
kind: "chain";
|
|
305
|
+
scope: "root";
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region ../../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3_supports-color@9.4.0/node_modules/mdast-util-from-markdown/index.d.ts
|
|
313
|
+
declare module 'micromark-util-types' {
|
|
314
|
+
interface TokenTypeMap {
|
|
315
|
+
listItem: 'listItem';
|
|
316
|
+
}
|
|
317
|
+
interface Token {
|
|
318
|
+
_spread?: boolean;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region ../../client/ui-primitives/src/reference.d.ts
|
|
323
|
+
declare module "micromark-util-types" {
|
|
324
|
+
interface TokenTypeMap {
|
|
325
|
+
reference: "reference";
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/client/bundle-locales.d.ts
|
|
330
|
+
declare const bundleZh: {
|
|
331
|
+
"default.label": string;
|
|
332
|
+
"default.hint": string;
|
|
333
|
+
"modes.label": string;
|
|
334
|
+
"modes.hint": string;
|
|
335
|
+
"add.label": string;
|
|
336
|
+
"add.placeholder": string;
|
|
337
|
+
"add.confirm": string;
|
|
338
|
+
"add.cancel": string;
|
|
339
|
+
"add.close": string;
|
|
340
|
+
"add.hint": string;
|
|
341
|
+
removeNamed: string;
|
|
342
|
+
protected: string;
|
|
343
|
+
untitled: string;
|
|
344
|
+
overridden: string;
|
|
345
|
+
"group.identity": string;
|
|
346
|
+
"group.persona": string;
|
|
347
|
+
"group.tools": string;
|
|
348
|
+
"group.rules": string;
|
|
349
|
+
"group.injections": string;
|
|
350
|
+
"group.model": string;
|
|
351
|
+
"role.main": string;
|
|
352
|
+
"role.subagent": string;
|
|
353
|
+
"field.name": string;
|
|
354
|
+
"field.description": string;
|
|
355
|
+
"field.role": string;
|
|
356
|
+
"field.presetsOnly": string;
|
|
357
|
+
"field.prefix": string;
|
|
358
|
+
"field.suffix": string;
|
|
359
|
+
"field.allowTools": string;
|
|
360
|
+
"field.denyTools": string;
|
|
361
|
+
"field.allowSkills": string;
|
|
362
|
+
"field.denySkills": string;
|
|
363
|
+
"field.allowPolicies": string;
|
|
364
|
+
"field.denyPolicies": string;
|
|
365
|
+
"field.instructions": string;
|
|
366
|
+
"field.skills": string;
|
|
367
|
+
"field.runtimeContext": string;
|
|
368
|
+
"field.defaultModel": string;
|
|
369
|
+
"field.modelRoute": string;
|
|
370
|
+
"field.reasoningEffort": string;
|
|
371
|
+
"field.reset": string;
|
|
372
|
+
"hint.name": string;
|
|
373
|
+
"hint.description": string;
|
|
374
|
+
"hint.role": string;
|
|
375
|
+
"hint.presetsOnly": string;
|
|
376
|
+
"hint.prefix": string;
|
|
377
|
+
"hint.suffix": string;
|
|
378
|
+
"hint.allowTools": string;
|
|
379
|
+
"hint.denyTools": string;
|
|
380
|
+
"hint.allowSkills": string;
|
|
381
|
+
"hint.denySkills": string;
|
|
382
|
+
"hint.allowPolicies": string;
|
|
383
|
+
"hint.denyPolicies": string;
|
|
384
|
+
"hint.instructions": string;
|
|
385
|
+
"hint.skills": string;
|
|
386
|
+
"hint.runtimeContext": string;
|
|
387
|
+
"hint.defaultModel": string;
|
|
388
|
+
"hint.modelRoute": string;
|
|
389
|
+
"hint.reasoningEffort": string;
|
|
390
|
+
"model.loading": string;
|
|
391
|
+
"model.error": string;
|
|
392
|
+
"model.empty": string;
|
|
393
|
+
"tags.placeholder": string;
|
|
394
|
+
"tags.add": string;
|
|
395
|
+
"tags.remove": string;
|
|
396
|
+
"select.search": string;
|
|
397
|
+
"select.noMatch": string;
|
|
398
|
+
"tri.unset": string;
|
|
399
|
+
"tri.on": string;
|
|
400
|
+
"tri.off": string;
|
|
401
|
+
"remove.title": string;
|
|
402
|
+
"remove.description": string;
|
|
403
|
+
"remove.confirm": string;
|
|
404
|
+
"remove.cancel": string;
|
|
405
|
+
"remove.close": string;
|
|
406
|
+
"model.set": string;
|
|
407
|
+
"model.follow": string;
|
|
408
|
+
save: string;
|
|
409
|
+
saving: string;
|
|
410
|
+
saveFailed: string;
|
|
411
|
+
readOnly: string;
|
|
412
|
+
unavailable: string;
|
|
413
|
+
notSaved: string;
|
|
414
|
+
"configured.loading": string;
|
|
415
|
+
"configured.missing": string;
|
|
416
|
+
"configured.unreadable": string;
|
|
417
|
+
"violation.modesEmpty": string;
|
|
418
|
+
"violation.defaultMissing": string;
|
|
419
|
+
"violation.modelPair": string;
|
|
420
|
+
"summary.allTools": string;
|
|
421
|
+
"summary.tools": string;
|
|
422
|
+
"summary.denyTools": string;
|
|
423
|
+
"summary.globalModel": string;
|
|
424
|
+
};
|
|
425
|
+
type BundleLocaleKey = keyof typeof bundleZh;
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/client/llm-directory.d.ts
|
|
428
|
+
interface ModelRoute {
|
|
429
|
+
readonly key: string;
|
|
430
|
+
readonly provider: string;
|
|
431
|
+
readonly providerName: string;
|
|
432
|
+
readonly model: string;
|
|
433
|
+
readonly modelName: string;
|
|
434
|
+
}
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region src/client/bundle-config.d.ts
|
|
437
|
+
export declare const SESSION_MODE_NS = "session-mode";
|
|
438
|
+
interface BundleConfigDiagnosis {
|
|
439
|
+
readonly namespaces: readonly string[];
|
|
440
|
+
readonly problem: string;
|
|
441
|
+
readonly controller: string;
|
|
442
|
+
}
|
|
443
|
+
interface BundleModelsState {
|
|
444
|
+
readonly status: "loading" | "ready" | "error";
|
|
445
|
+
readonly routes: readonly ModelRoute[];
|
|
446
|
+
}
|
|
447
|
+
interface BundleConfigActions {
|
|
448
|
+
set: (path: readonly string[], value: unknown) => void;
|
|
449
|
+
editText: (path: readonly string[], text: string) => void;
|
|
450
|
+
clear: (path: readonly string[]) => void;
|
|
451
|
+
appendItem: (path: readonly string[]) => void;
|
|
452
|
+
removeItem: (path: readonly string[], index: number) => void;
|
|
453
|
+
addMode: (id: string) => void;
|
|
454
|
+
removeMode: (id: string) => void;
|
|
455
|
+
save: () => void;
|
|
456
|
+
discard: () => void;
|
|
457
|
+
}
|
|
458
|
+
interface BundleConfigFace extends BundleConfigActions {
|
|
459
|
+
readonly hooks: {
|
|
460
|
+
readonly bundleConfig: SnapshotStore<SchemaFormState>;
|
|
461
|
+
readonly bundleStatus: SnapshotStore<ConfigStatus>;
|
|
462
|
+
readonly bundleModels: SnapshotStore<BundleModelsState>;
|
|
463
|
+
};
|
|
464
|
+
diagnose: () => BundleConfigDiagnosis;
|
|
465
|
+
resync: () => void;
|
|
466
|
+
}
|
|
467
|
+
type ConfigStatus = "loading" | "ready" | "unavailable";
|
|
468
|
+
//#endregion
|
|
3
469
|
//#region src/client/locales.d.ts
|
|
4
470
|
declare const zh: {
|
|
5
471
|
seatHint: string;
|
|
@@ -17,14 +483,17 @@ type SessionModeLocaleKey = keyof typeof zh;
|
|
|
17
483
|
//#region src/client/SessionModeSeat.d.ts
|
|
18
484
|
type SessionModeSeatProps = PropsRuntime<"conversation.input.left"> & PropsLocale<"session-mode">;
|
|
19
485
|
//#endregion
|
|
486
|
+
//#region src/client/BundleConfigPage.d.ts
|
|
487
|
+
type BundleConfigPageProps = PropsRuntime<"plugins.bundle.config"> & PropsLocale<"session-mode-bundle"> & InjectFace<BundleConfigFace>;
|
|
488
|
+
//#endregion
|
|
20
489
|
//#region src/client/index.d.ts
|
|
21
490
|
declare module "@deepseek-ai/dsh-client-ui-slots" {
|
|
22
491
|
interface LocaleNamespaceMap {
|
|
23
492
|
"session-mode": SessionModeLocaleKey;
|
|
493
|
+
"session-mode-bundle": BundleLocaleKey;
|
|
24
494
|
}
|
|
25
495
|
}
|
|
26
496
|
export declare const inject: string[];
|
|
27
|
-
export declare const SESSION_MODE_NS = "session-mode";
|
|
28
497
|
export declare function apply(ctx: Context): void;
|
|
29
498
|
//#endregion
|
|
30
|
-
export type { SessionModeLocaleKey, SessionModeSeatProps };
|
|
499
|
+
export type { BundleConfigPageProps, SessionModeLocaleKey, SessionModeSeatProps };
|
package/dist/index.d.cts
CHANGED
|
@@ -16,7 +16,7 @@ interface SessionModeModel {
|
|
|
16
16
|
}
|
|
17
17
|
type SessionModeModels = Readonly<Record<string, SessionModeModel>>;
|
|
18
18
|
interface SessionMode {
|
|
19
|
-
readonly
|
|
19
|
+
readonly presetsOnly: string[];
|
|
20
20
|
readonly name: string;
|
|
21
21
|
readonly description: string;
|
|
22
22
|
readonly role: SessionModeRole[];
|
|
@@ -31,6 +31,7 @@ interface SessionMode {
|
|
|
31
31
|
readonly skills?: boolean;
|
|
32
32
|
readonly runtimeContext: boolean;
|
|
33
33
|
readonly defaultModel?: SessionModeModel;
|
|
34
|
+
readonly preset?: string;
|
|
34
35
|
}
|
|
35
36
|
export interface Config {
|
|
36
37
|
readonly default: string;
|
|
@@ -127,6 +128,7 @@ export declare class SessionModes extends Service {
|
|
|
127
128
|
private policyInForce;
|
|
128
129
|
private decidePolicy;
|
|
129
130
|
select(sessionId: SessionId, mode: string): Promise<string>;
|
|
131
|
+
private presetTarget;
|
|
130
132
|
private presetOfAgent;
|
|
131
133
|
private presetRegistry;
|
|
132
134
|
applyTo(agent: Agent, mode: string, options?: {
|
package/dist/index.d.mts
CHANGED
|
@@ -16,7 +16,7 @@ interface SessionModeModel {
|
|
|
16
16
|
}
|
|
17
17
|
type SessionModeModels = Readonly<Record<string, SessionModeModel>>;
|
|
18
18
|
interface SessionMode {
|
|
19
|
-
readonly
|
|
19
|
+
readonly presetsOnly: string[];
|
|
20
20
|
readonly name: string;
|
|
21
21
|
readonly description: string;
|
|
22
22
|
readonly role: SessionModeRole[];
|
|
@@ -31,6 +31,7 @@ interface SessionMode {
|
|
|
31
31
|
readonly skills?: boolean;
|
|
32
32
|
readonly runtimeContext: boolean;
|
|
33
33
|
readonly defaultModel?: SessionModeModel;
|
|
34
|
+
readonly preset?: string;
|
|
34
35
|
}
|
|
35
36
|
export interface Config {
|
|
36
37
|
readonly default: string;
|
|
@@ -127,6 +128,7 @@ export declare class SessionModes extends Service {
|
|
|
127
128
|
private policyInForce;
|
|
128
129
|
private decidePolicy;
|
|
129
130
|
select(sessionId: SessionId, mode: string): Promise<string>;
|
|
131
|
+
private presetTarget;
|
|
130
132
|
private presetOfAgent;
|
|
131
133
|
private presetRegistry;
|
|
132
134
|
applyTo(agent: Agent, mode: string, options?: {
|