@deepseek-ai/dsh-client-ui-workflow-run 0.1.6-alpha.1 → 0.1.7-alpha.1
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 +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/lib/client.js +21 -13
- package/lib/types/client/WorkflowRunPanel.d.ts +3 -3
- package/package.json +19 -17
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/client/ui-workflow-run/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: f48efe1f1525603a0f710f1a3fc6302cc14d109f
|
|
6
|
+
README.zh.md: 9fa6f59b6899aa353d50a39e73218e6ee8748417
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ A top-level workflow run through `dsh-tool-workflow` appears in the conversation
|
|
|
29
29
|
|
|
30
30
|
### Navigating the node
|
|
31
31
|
|
|
32
|
-
The run uses a 32-pixel row with persistent chevrons, an inline state dot, and status text; phases use disclosure rows with title and member count in the main area and a fixed aggregate-status tail; members use a 16-pixel dot slot, a truncating name area, and a fixed status column. Opening a member's child Session requires
|
|
32
|
+
The run uses a 32-pixel row with persistent chevrons, an inline state dot, and status text; phases use disclosure rows with title and member count in the main area and a fixed aggregate-status tail; members use a 16-pixel dot slot, a truncating name area, and a fixed status column. Opening a member's child Session requires both member and child to be running, and the child must belong to the current Session's direct-child catalog. Child activity uses the unified UI status, falling back to the Session summary when unknown. Session summaries do not establish membership; absent, wrong-parent, or terminal catalog entries remain non-interactive.
|
|
33
33
|
|
|
34
34
|
### State and completion
|
|
35
35
|
|
package/README.zh.md
CHANGED
|
@@ -29,7 +29,7 @@ kind: "package-reference"
|
|
|
29
29
|
|
|
30
30
|
### 导航节点
|
|
31
31
|
|
|
32
|
-
运行使用 32 像素行,带常驻 chevron、行内状态点与状态文字;阶段使用 disclosure 行,在主区显示标题与成员数、在固定尾部显示聚合状态;成员使用 16
|
|
32
|
+
运行使用 32 像素行,带常驻 chevron、行内状态点与状态文字;阶段使用 disclosure 行,在主区显示标题与成员数、在固定尾部显示聚合状态;成员使用 16 像素状态点槽、可省略名称区与固定状态列。打开成员的子 Session 需要成员与子级均在运行,且子级属于当前 Session 的直接子级目录。子级活动状态使用统一 UI status,未知时使用 Session 摘要。Session 摘要不建立成员关系;目录中缺失、父级不符或终态的条目不可交互。
|
|
33
33
|
|
|
34
34
|
### 状态与完成
|
|
35
35
|
|
package/lib/client.js
CHANGED
|
@@ -168,18 +168,18 @@ window.__ModuleLoader__.load({
|
|
|
168
168
|
if (active.length === 0) return statusCount("completed", count("completed"), t);
|
|
169
169
|
return (active.includes("interrupted") && count("completed") > 0 ? ["completed", ...active] : active).map((status) => statusCount(status, count(status), t)).join(" · ");
|
|
170
170
|
}
|
|
171
|
-
function navigableMembers(sessions, phases, parentId) {
|
|
172
|
-
const
|
|
171
|
+
function navigableMembers(sessions, phases, parentId, statuses) {
|
|
172
|
+
const catalog = sessions.projectionsBySession[parentId];
|
|
173
173
|
const result = [];
|
|
174
174
|
for (const phase of phases) for (const member of phase.members) {
|
|
175
|
-
const
|
|
176
|
-
if (member.status === "running" &&
|
|
175
|
+
const child = catalog?.values.subagentCatalog?.find((entry) => entry.id === member.childId);
|
|
176
|
+
if (member.status === "running" && child !== void 0 && (statuses.get(child.id)?.running ?? sessions.byId[child.id]?.running) === true) result.push(member.childId);
|
|
177
177
|
}
|
|
178
178
|
return result;
|
|
179
179
|
}
|
|
180
180
|
function RunHeader({ children, count, name, onToggle, open, status, t }) {
|
|
181
181
|
return (0, react_jsx_runtime.jsx)(StatusDisclosure, {
|
|
182
|
-
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
182
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, {}),
|
|
183
183
|
title: t("run.title", { name }),
|
|
184
184
|
open,
|
|
185
185
|
onToggle,
|
|
@@ -207,7 +207,7 @@ window.__ModuleLoader__.load({
|
|
|
207
207
|
children
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
|
-
function MemberRow({ member, navigable, openSession, t }) {
|
|
210
|
+
function MemberRow({ member, navigable, openSession, parentSessionId, t }) {
|
|
211
211
|
const name = readableMember(member.label, t);
|
|
212
212
|
const [focused, setFocused] = (0, react.useState)(false);
|
|
213
213
|
const renderButton = navigable || focused;
|
|
@@ -250,17 +250,21 @@ window.__ModuleLoader__.load({
|
|
|
250
250
|
setFocused(false);
|
|
251
251
|
},
|
|
252
252
|
onClick: navigable ? () => {
|
|
253
|
-
openSession(
|
|
253
|
+
openSession({
|
|
254
|
+
parentSessionId,
|
|
255
|
+
childSessionId: member.childId,
|
|
256
|
+
mode: "one-shot"
|
|
257
|
+
});
|
|
254
258
|
} : void 0,
|
|
255
259
|
children: content
|
|
256
260
|
});
|
|
257
261
|
}
|
|
258
|
-
function PhaseSection({ contentRef, onContentBlur, onToggle, open, pendingCleanCollapse, phase, navigable, openSession, t }) {
|
|
262
|
+
function PhaseSection({ contentRef, onContentBlur, onToggle, open, pendingCleanCollapse, phase, navigable, openSession, parentSessionId, t }) {
|
|
259
263
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
260
264
|
className: WorkflowRunPanel_module_css_default.phase,
|
|
261
265
|
onMouseDownCapture: pendingCleanCollapse ? preventPendingHeaderFocus : void 0,
|
|
262
266
|
children: (0, react_jsx_runtime.jsx)(StatusDisclosure, {
|
|
263
|
-
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.
|
|
267
|
+
icon: (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronRightOutlineRegular, {}),
|
|
264
268
|
title: readablePhase(phase.phase, t),
|
|
265
269
|
open,
|
|
266
270
|
onToggle,
|
|
@@ -294,6 +298,7 @@ window.__ModuleLoader__.load({
|
|
|
294
298
|
member,
|
|
295
299
|
navigable: navigable.includes(member.childId),
|
|
296
300
|
openSession,
|
|
301
|
+
parentSessionId,
|
|
297
302
|
t
|
|
298
303
|
}, member.seq))
|
|
299
304
|
})
|
|
@@ -301,7 +306,7 @@ window.__ModuleLoader__.load({
|
|
|
301
306
|
});
|
|
302
307
|
}
|
|
303
308
|
/** Render one durable workflow run with status-driven run and phase disclosure. */
|
|
304
|
-
function WorkflowRunPanel({ node, sessionId, useSessions, openSession, t }) {
|
|
309
|
+
function WorkflowRunPanel({ node, sessionId, useSessions, useSessionStatus, openSession, t }) {
|
|
305
310
|
const phaseFacts = (0, react.useMemo)(() => node.data.phases.map((phase) => [phase.key, phaseDisclosureFacts(phase)]), [node.data.phases]);
|
|
306
311
|
const runFacts = (0, react.useMemo)(() => runDisclosureFacts(node.data.status, phaseFacts), [node.data.status, phaseFacts]);
|
|
307
312
|
const totalMembers = runFacts.activityCount;
|
|
@@ -311,7 +316,8 @@ window.__ModuleLoader__.load({
|
|
|
311
316
|
}));
|
|
312
317
|
const runContentRef = (0, react.useRef)(null);
|
|
313
318
|
const phaseContentRefs = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
314
|
-
const
|
|
319
|
+
const statuses = useSessionStatus((value) => value);
|
|
320
|
+
const navigable = useSessions((sessions) => navigableMembers(sessions, node.data.phases, sessionId, statuses), _deepseek_ai_dsh_client_store.shallowEqual);
|
|
315
321
|
(0, react.useLayoutEffect)(() => {
|
|
316
322
|
setDisclosures((current) => {
|
|
317
323
|
const phases = /* @__PURE__ */ new Map();
|
|
@@ -427,6 +433,7 @@ window.__ModuleLoader__.load({
|
|
|
427
433
|
phase,
|
|
428
434
|
navigable,
|
|
429
435
|
openSession,
|
|
436
|
+
parentSessionId: sessionId,
|
|
430
437
|
t
|
|
431
438
|
}, phase.key);
|
|
432
439
|
})
|
|
@@ -619,6 +626,7 @@ window.__ModuleLoader__.load({
|
|
|
619
626
|
/** Required services for Definition, keyed renderer, navigation, and copy. */
|
|
620
627
|
const inject = [
|
|
621
628
|
"uiConversation",
|
|
629
|
+
"uiWorkspace",
|
|
622
630
|
"slots",
|
|
623
631
|
"sessions",
|
|
624
632
|
"locale"
|
|
@@ -634,8 +642,8 @@ window.__ModuleLoader__.load({
|
|
|
634
642
|
name: "conversation.chat.node",
|
|
635
643
|
key: "workflow-run",
|
|
636
644
|
locale: NS,
|
|
637
|
-
inject: () => ({ openSession: (
|
|
638
|
-
ctx.
|
|
645
|
+
inject: () => ({ openSession: (target) => {
|
|
646
|
+
ctx.uiWorkspace.openSession(target);
|
|
639
647
|
} })
|
|
640
648
|
}, WorkflowRunPanel));
|
|
641
649
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SessionTarget } from '@deepseek-ai/dsh-api-session-controller/client';
|
|
3
3
|
/** Navigation action injected from the plugin's own Session Controller access. */
|
|
4
4
|
export interface WorkflowRunInjected {
|
|
5
|
-
readonly openSession: (
|
|
5
|
+
readonly openSession: (target: SessionTarget) => void;
|
|
6
6
|
}
|
|
7
7
|
/** Complete keyed Chat renderer props. */
|
|
8
8
|
export type WorkflowRunPanelProps = PropsRuntime<'conversation.chat.node', 'workflow-run'> & PropsLocale<'workflowRun'> & WorkflowRunInjected;
|
|
9
9
|
/** Render one durable workflow run with status-driven run and phase disclosure. */
|
|
10
|
-
export declare function WorkflowRunPanel({ node, sessionId, useSessions, openSession, t }: WorkflowRunPanelProps): import("react").JSX.Element;
|
|
10
|
+
export declare function WorkflowRunPanel({ node, sessionId, useSessions, useSessionStatus, openSession, t }: WorkflowRunPanelProps): import("react").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=WorkflowRunPanel.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-ui-workflow-run",
|
|
3
3
|
"description": "Durable workflow-run Conversation Node and nested member disclosure for dsh web",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"@deepseek-ai/dsh-client-ui-chat",
|
|
34
34
|
"@deepseek-ai/dsh-client-ui-conversation",
|
|
35
35
|
"@deepseek-ai/dsh-client-ui-renderer",
|
|
36
|
-
"@deepseek-ai/dsh-client-ui-session"
|
|
36
|
+
"@deepseek-ai/dsh-client-ui-session",
|
|
37
|
+
"@deepseek-ai/dsh-client-ui-workspace"
|
|
37
38
|
],
|
|
38
39
|
"platform": "web"
|
|
39
40
|
}
|
|
@@ -45,25 +46,26 @@
|
|
|
45
46
|
],
|
|
46
47
|
"license": "MIT",
|
|
47
48
|
"peerDependencies": {
|
|
48
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
49
|
+
"@deepseek-ai/cordis": "^4.0.3"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@types/react": "~18.3.1",
|
|
52
53
|
"react": "^18.2.0",
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-client-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-client-test-runtime": "^0.1.
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.
|
|
58
|
-
"@deepseek-ai/dsh-client-
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-workflow": "^0.1.
|
|
66
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
54
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.7-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-client-test-runtime": "^0.1.7-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-alpha.1",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.7-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-alpha.1",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-alpha.1",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.7-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-tool-workflow": "^0.1.7-alpha.1",
|
|
67
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
68
|
+
"@deepseek-ai/dsh-workflow": "^0.1.7-alpha.1"
|
|
67
69
|
},
|
|
68
70
|
"scripts": {
|
|
69
71
|
"bundle": "tsdown",
|