@deepseek-ai/dsh-client-ui-cordis 0.1.7-alpha.2 → 0.1.7-rc.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.i18n.yaml +54 -5
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/lib/client.js +68 -3
- package/lib/types/client/CordisActionRow.d.ts +1 -1
- package/lib/types/client/CordisDefineRow.d.ts +1 -1
- package/lib/types/client/CordisPreparingRow.d.ts +19 -0
- package/lib/types/client/CordisRunRow.d.ts +1 -1
- package/lib/types/client/card-model.d.ts +2 -2
- package/lib/types/client/locales.d.ts +2 -0
- package/package.json +13 -13
package/README.i18n.yaml
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
|
-
# Bilingual-pair consistency record (docs/i18n/README.md):
|
|
2
|
-
#
|
|
3
|
-
#
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/extensions/ui-cordis/README.md
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/:
|
|
6
|
+
en: cdad52474ffc161d
|
|
7
|
+
zh: 864ed938d5ee9012
|
|
8
|
+
/deepseek-ai-dsh-client-ui-cordis:
|
|
9
|
+
en: 63d8703a05312146
|
|
10
|
+
zh: 9e4c02908b65c417
|
|
11
|
+
/deepseek-ai-dsh-client-ui-cordis/summary:
|
|
12
|
+
en: 4d3e762156a6e66e
|
|
13
|
+
zh: 436215c71fd8905c
|
|
14
|
+
/deepseek-ai-dsh-client-ui-cordis/table-of-contents:
|
|
15
|
+
en: d152484eb41ac6b4
|
|
16
|
+
zh: 09388d293f9be9cb
|
|
17
|
+
/deepseek-ai-dsh-client-ui-cordis/use-this-package:
|
|
18
|
+
en: b2f4dd7bdcfa5fea
|
|
19
|
+
zh: 23e48220e532f98a
|
|
20
|
+
/deepseek-ai-dsh-client-ui-cordis/use-this-package/what-the-panel-shows:
|
|
21
|
+
en: 56ec98fc74c1706a
|
|
22
|
+
zh: 06d2c6315aa20217
|
|
23
|
+
/deepseek-ai-dsh-client-ui-cordis/use-this-package/what-the-tool-cards-show:
|
|
24
|
+
en: a9c45dd79deab953
|
|
25
|
+
zh: 6d68858f202ee247
|
|
26
|
+
/deepseek-ai-dsh-client-ui-cordis/use-this-package/boundaries-to-plan-around:
|
|
27
|
+
en: c76ace6595f805d6
|
|
28
|
+
zh: 53ee7e51823f367c
|
|
29
|
+
/deepseek-ai-dsh-client-ui-cordis/understand-the-implementation:
|
|
30
|
+
en: e4e1b788078bcd0d
|
|
31
|
+
zh: 93d0cb3132fd2157
|
|
32
|
+
/deepseek-ai-dsh-client-ui-cordis/understand-the-implementation/design-philosophy:
|
|
33
|
+
en: b27840fda9efefc6
|
|
34
|
+
zh: 53ed0401355290eb
|
|
35
|
+
/deepseek-ai-dsh-client-ui-cordis/understand-the-implementation/source-map:
|
|
36
|
+
en: de077f5773f79ac6
|
|
37
|
+
zh: 6d6f98cc34d530a5
|
|
38
|
+
/deepseek-ai-dsh-client-ui-cordis/understand-the-implementation/how-the-panel-stays-current:
|
|
39
|
+
en: cbcc34aa282d8739
|
|
40
|
+
zh: ad054d71184037e3
|
|
41
|
+
/deepseek-ai-dsh-client-ui-cordis/further-exploration:
|
|
42
|
+
en: 30316fa7214c7995
|
|
43
|
+
zh: 01bf063e4c21b0c7
|
|
44
|
+
/deepseek-ai-dsh-client-ui-cordis/model-experience:
|
|
45
|
+
en: 83a0687b7ad68dde
|
|
46
|
+
zh: 9763803384bef7af
|
|
47
|
+
/deepseek-ai-dsh-client-ui-cordis/model-experience/kv-cache-effect:
|
|
48
|
+
en: ec4562df89d18e78
|
|
49
|
+
zh: 30084e7fb8dee95d
|
|
50
|
+
/deepseek-ai-dsh-client-ui-cordis/known-limitations-and-deferred-work:
|
|
51
|
+
en: 3b9cfd230ab18a75
|
|
52
|
+
zh: 47b87bb34b9c9d1c
|
|
53
|
+
/deepseek-ai-dsh-client-ui-cordis/known-limitations-and-deferred-work/dev-note:
|
|
54
|
+
en: 82bc60a2bd964744
|
|
55
|
+
zh: 900679483cdbde4b
|
package/README.md
CHANGED
|
@@ -33,6 +33,8 @@ A `sidebar.footer.action` seat shows a badge counting what runs plus what waits;
|
|
|
33
33
|
|
|
34
34
|
### What the tool cards show
|
|
35
35
|
|
|
36
|
+
Preparing calls show their ordinary Cordis icon and title in one non-expandable row. This stage does not derive a package identity, read its live inventory, or mount its business view; those operations require the start/result props.
|
|
37
|
+
|
|
36
38
|
The `cordis_define` card is a record: the name and purpose the model wrote, the source it wrote, and whether the definition is running — no switch, no approval, and a pointer to the panel. The `cordis_run` card shows the mode, the plugin, package, and run ids, the outcome, and offers the package's own business view through the `tool.view.cordis` slot when the package registered one. Define, run, stop, and undefine cards retain their ordinary business glyph when they fail or are interrupted, including a correlated activation failure after a successful run receipt. All cards render from the recorded call and result, so replay shows the same card.
|
|
37
39
|
|
|
38
40
|
### Boundaries to plan around
|
package/README.zh.md
CHANGED
|
@@ -33,6 +33,8 @@ kind: "package-reference"
|
|
|
33
33
|
|
|
34
34
|
### 工具卡片显示什么
|
|
35
35
|
|
|
36
|
+
准备中的调用显示为带普通 Cordis 图标与标题的不可展开单行。此阶段不派生包身份、不读取其当前清单,也不挂载其业务视图;这些操作需要 start/result props。
|
|
37
|
+
|
|
36
38
|
`cordis_define` 卡片是一份记录:模型写下的 name 与 purpose、它写的源码,以及该定义是否在跑——没有开关、没有审批,只有一句指向面板的指引。`cordis_run` 卡片显示模式、插件标识、包标识与运行标识、结果,并在包注册了业务视图时经 `tool.view.cordis` slot 提供它。define、run、stop 与 undefine 卡片在失败或中断时继续保留普通业务图标,包括调用回执成功后发生的关联激活失败。所有卡片都渲染会话记录下的 call 与 result,因此回放显示同一张卡。
|
|
37
39
|
|
|
38
40
|
### 需要规划的边界
|
package/lib/client.js
CHANGED
|
@@ -137,10 +137,51 @@ window.__ModuleLoader__.load({
|
|
|
137
137
|
"title": "cvtE3a_title"
|
|
138
138
|
};
|
|
139
139
|
//#endregion
|
|
140
|
+
//#region lib/types/client/CordisPreparingRow.js
|
|
141
|
+
/* v8 ignore next -- Non-expandable rows never invoke DisclosureRow's required toggle callback. */
|
|
142
|
+
const noop = () => void 0;
|
|
143
|
+
/**
|
|
144
|
+
* Render a Cordis-owned prefix without disclosure.
|
|
145
|
+
* @param props - Cordis prefix, styling, and locale.
|
|
146
|
+
* @returns the preparation row.
|
|
147
|
+
*/
|
|
148
|
+
function CordisPreparingRow({ toolName, t, icon, title, className, rowClassName, titleClassName }) {
|
|
149
|
+
return (0, react_jsx_runtime.jsx)("div", {
|
|
150
|
+
"data-tool": toolName,
|
|
151
|
+
"data-state": "preparing",
|
|
152
|
+
"aria-label": t("a11y.preparing"),
|
|
153
|
+
children: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DisclosureRow, {
|
|
154
|
+
icon,
|
|
155
|
+
title,
|
|
156
|
+
className,
|
|
157
|
+
rowClassName,
|
|
158
|
+
titleClassName,
|
|
159
|
+
open: false,
|
|
160
|
+
expandable: false,
|
|
161
|
+
onToggle: noop,
|
|
162
|
+
running: true
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
140
167
|
//#region lib/types/client/CordisActionRow.js
|
|
141
168
|
/** Localized cards for `cordis_stop` and `cordis_undefine`. */
|
|
142
169
|
/** Render one Stop or Remove call with Cordis-owned localized copy. */
|
|
143
|
-
function CordisActionRow(
|
|
170
|
+
function CordisActionRow(props) {
|
|
171
|
+
if (props.phase === "preparing") {
|
|
172
|
+
const remove = props.toolName === "cordis_undefine";
|
|
173
|
+
return (0, react_jsx_runtime.jsx)(CordisPreparingRow, {
|
|
174
|
+
...props,
|
|
175
|
+
icon: remove ? (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, { size: 14 }) : (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconStopFillRegular, { size: 14 }),
|
|
176
|
+
title: props.t(remove ? "row.removeTitle" : "row.stopTitle"),
|
|
177
|
+
className: CordisRunRow_module_css_default.card,
|
|
178
|
+
rowClassName: CordisRunRow_module_css_default.row,
|
|
179
|
+
titleClassName: CordisRunRow_module_css_default.title
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
return (0, react_jsx_runtime.jsx)(StartedCordisActionRow, { ...props });
|
|
183
|
+
}
|
|
184
|
+
function StartedCordisActionRow({ callId, toolName, block, inspect, t }) {
|
|
144
185
|
const card = cordisActionCard(block);
|
|
145
186
|
const remove = toolName === "cordis_undefine";
|
|
146
187
|
const summary = card.errorSummary ?? card.pluginId ?? callId;
|
|
@@ -264,7 +305,18 @@ window.__ModuleLoader__.load({
|
|
|
264
305
|
}
|
|
265
306
|
}
|
|
266
307
|
/** Render one immutable Package definition. */
|
|
267
|
-
function CordisDefineRow(
|
|
308
|
+
function CordisDefineRow(props) {
|
|
309
|
+
if (props.phase === "preparing") return (0, react_jsx_runtime.jsx)(CordisPreparingRow, {
|
|
310
|
+
...props,
|
|
311
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCodeOutlineRegular, { size: 14 }),
|
|
312
|
+
title: props.t("row.defineTitle"),
|
|
313
|
+
className: CordisDefineRow_module_css_default.card,
|
|
314
|
+
rowClassName: CordisDefineRow_module_css_default.row,
|
|
315
|
+
titleClassName: CordisDefineRow_module_css_default.title
|
|
316
|
+
});
|
|
317
|
+
return (0, react_jsx_runtime.jsx)(StartedCordisDefineRow, { ...props });
|
|
318
|
+
}
|
|
319
|
+
function StartedCordisDefineRow({ callId, block, inspect, useInventory, useLoaded, t }) {
|
|
268
320
|
const card = cordisDefineCard(block);
|
|
269
321
|
const inventory = useInventory((snapshot) => snapshot);
|
|
270
322
|
const loaded = useLoaded((snapshot) => snapshot);
|
|
@@ -458,7 +510,18 @@ window.__ModuleLoader__.load({
|
|
|
458
510
|
superseded: "status.superseded"
|
|
459
511
|
};
|
|
460
512
|
/** Render one activation result and, when eligible, its Package-owned view. */
|
|
461
|
-
function CordisRunRow(
|
|
513
|
+
function CordisRunRow(props) {
|
|
514
|
+
if (props.phase === "preparing") return (0, react_jsx_runtime.jsx)(CordisPreparingRow, {
|
|
515
|
+
...props,
|
|
516
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCodeOutlineRegular, { size: 14 }),
|
|
517
|
+
title: props.t("row.runTitle"),
|
|
518
|
+
className: CordisRunRow_module_css_default.card,
|
|
519
|
+
rowClassName: CordisRunRow_module_css_default.row,
|
|
520
|
+
titleClassName: CordisRunRow_module_css_default.title
|
|
521
|
+
});
|
|
522
|
+
return (0, react_jsx_runtime.jsx)(StartedCordisRunRow, { ...props });
|
|
523
|
+
}
|
|
524
|
+
function StartedCordisRunRow({ callId, block, inspect, renderSlot, useInventory, useLoaded, useRunCards, useActiveRuns, onObserveRunCard, t }) {
|
|
462
525
|
const card = cordisRunCard(block);
|
|
463
526
|
const inventory = useInventory((snapshot) => snapshot);
|
|
464
527
|
const loaded = useLoaded((snapshot) => snapshot);
|
|
@@ -1164,6 +1227,7 @@ window.__ModuleLoader__.load({
|
|
|
1164
1227
|
/** Simplified Chinese Cordis UI messages. */
|
|
1165
1228
|
const zh = {
|
|
1166
1229
|
"row.defineTitle": "注册 Cordis 插件",
|
|
1230
|
+
"a11y.preparing": "准备调用 Cordis 工具",
|
|
1167
1231
|
"row.runTitle": "运行 Cordis 插件",
|
|
1168
1232
|
"row.updateTitle": "更新 Cordis 插件",
|
|
1169
1233
|
"row.stopTitle": "停止 Cordis 插件",
|
|
@@ -1217,6 +1281,7 @@ window.__ModuleLoader__.load({
|
|
|
1217
1281
|
/** English Cordis UI messages. */
|
|
1218
1282
|
const en = {
|
|
1219
1283
|
"row.defineTitle": "Register Cordis Plugin",
|
|
1284
|
+
"a11y.preparing": "Preparing a Cordis tool call",
|
|
1220
1285
|
"row.runTitle": "Run Cordis Plugin",
|
|
1221
1286
|
"row.updateTitle": "Update Cordis Plugin",
|
|
1222
1287
|
"row.stopTitle": "Stop Cordis Plugin",
|
|
@@ -4,5 +4,5 @@ import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
|
4
4
|
/** Full action-card props composed by the keyed Tool slot. */
|
|
5
5
|
export type CordisActionRowProps = ToolCallViewProps & PropsLocale<'cordis'>;
|
|
6
6
|
/** Render one Stop or Remove call with Cordis-owned localized copy. */
|
|
7
|
-
export declare function CordisActionRow(
|
|
7
|
+
export declare function CordisActionRow(props: CordisActionRowProps): import("react").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=CordisActionRow.d.ts.map
|
|
@@ -5,5 +5,5 @@ import type { CordisCardFace } from './slots.ts';
|
|
|
5
5
|
/** Full card props composed by the keyed Tool slot. */
|
|
6
6
|
export type CordisDefineRowProps = ToolCallViewProps & InjectFace<CordisCardFace> & PropsLocale<'cordis'>;
|
|
7
7
|
/** Render one immutable Package definition. */
|
|
8
|
-
export declare function CordisDefineRow(
|
|
8
|
+
export declare function CordisDefineRow(props: CordisDefineRowProps): import("react").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=CordisDefineRow.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Argument-free Cordis tool prefix shared by its three card families. */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots';
|
|
4
|
+
import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
5
|
+
type CordisPreparingRowProps = Pick<ToolCallViewProps, 'toolName'> & PropsLocale<'cordis'> & {
|
|
6
|
+
readonly icon: ReactNode;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly className?: string | undefined;
|
|
9
|
+
readonly rowClassName?: string | undefined;
|
|
10
|
+
readonly titleClassName?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Render a Cordis-owned prefix without disclosure.
|
|
14
|
+
* @param props - Cordis prefix, styling, and locale.
|
|
15
|
+
* @returns the preparation row.
|
|
16
|
+
*/
|
|
17
|
+
export declare function CordisPreparingRow({ toolName, t, icon, title, className, rowClassName, titleClassName, }: CordisPreparingRowProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=CordisPreparingRow.d.ts.map
|
|
@@ -5,5 +5,5 @@ import type { CordisRunCardFace } from './slots.ts';
|
|
|
5
5
|
/** Full Run-card props including its declared Package business-view child slot. */
|
|
6
6
|
export type CordisRunRowProps = ToolCallViewProps & InjectFace<CordisRunCardFace> & PropsRenderSlots<'tool.view.cordis'> & PropsLocale<'cordis'>;
|
|
7
7
|
/** Render one activation result and, when eligible, its Package-owned view. */
|
|
8
|
-
export declare function CordisRunRow(
|
|
8
|
+
export declare function CordisRunRow(props: CordisRunRowProps): import("react").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=CordisRunRow.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Replay-stable view models for Cordis lifecycle Tool calls. */
|
|
2
|
-
import type {
|
|
2
|
+
import type { StartedToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client';
|
|
3
3
|
import type { CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId, CordisDynamicRunMode } from './events.ts';
|
|
4
|
-
type Block =
|
|
4
|
+
type Block = StartedToolCallViewProps['block'];
|
|
5
5
|
/** Lifecycle of the tool call itself. */
|
|
6
6
|
export type CordisToolState = 'running' | 'ok' | 'error' | 'stopped';
|
|
7
7
|
/** Frozen `cordis_define` presentation data. */
|
|
@@ -3,6 +3,7 @@ export declare const NS = "cordis";
|
|
|
3
3
|
/** Simplified Chinese Cordis UI messages. */
|
|
4
4
|
export declare const zh: {
|
|
5
5
|
'row.defineTitle': string;
|
|
6
|
+
'a11y.preparing': string;
|
|
6
7
|
'row.runTitle': string;
|
|
7
8
|
'row.updateTitle': string;
|
|
8
9
|
'row.stopTitle': string;
|
|
@@ -64,6 +65,7 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
64
65
|
/** English Cordis UI messages. */
|
|
65
66
|
export declare const en: {
|
|
66
67
|
'row.defineTitle': string;
|
|
68
|
+
'a11y.preparing': string;
|
|
67
69
|
'row.runTitle': string;
|
|
68
70
|
'row.updateTitle': string;
|
|
69
71
|
'row.stopTitle': string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-cordis",
|
|
3
3
|
"description": "Cordis dynamic-plugin definition card: the keyed cordis_define tool row with its run/stop switch",
|
|
4
|
-
"version": "0.1.7-
|
|
4
|
+
"version": "0.1.7-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/react": "~18.3.1",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-cordis-client-runner": "0.1.7-
|
|
53
|
-
"@deepseek-ai/dsh-client-locale": "0.1.7-
|
|
54
|
-
"@deepseek-ai/dsh-session": "0.1.7-
|
|
55
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-
|
|
60
|
-
"@deepseek-ai/
|
|
61
|
-
"@deepseek-ai/
|
|
50
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.7-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-client-connection": "0.1.7-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-cordis-client-runner": "0.1.7-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-session": "0.1.7-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.7-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.1.7-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-tool": "0.1.7-rc.2",
|
|
61
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
"lib/index.js",
|