@yiyi_zhang/reactflow-ui 0.3.0 → 0.5.0-beta.0
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 +61 -22
- package/dist/AiWorkflowIDE.d.ts +217 -0
- package/dist/WorkflowIDE.d.ts +22 -3
- package/dist/ai-BJwQZcGK.js +15168 -0
- package/dist/ai.d.ts +30 -0
- package/dist/arc-BUGZGgtu.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-ZcgvTwSO.js +4692 -0
- package/dist/blockDiagram-GPEHLZMM-DtVtOBbH.js +2418 -0
- package/dist/c4Diagram-AAUBKEIU-tBS5Rcvm.js +1577 -0
- package/dist/channel-CURI9jmI.js +5 -0
- package/dist/chunk-2J33WTMH-D7gashNz.js +19 -0
- package/dist/chunk-4BX2VUAB-DE3VjyiZ.js +8 -0
- package/dist/chunk-55IACEB6-GYZ_m2MY.js +8 -0
- package/dist/chunk-727SXJPM-D4WVyvOg.js +1528 -0
- package/dist/chunk-AQP2D5EJ-Os2Uwqya.js +1387 -0
- package/dist/chunk-FMBD7UC4-B3CSVzS4.js +19 -0
- package/dist/chunk-ND2GUHAM-CNj_s1aK.js +68 -0
- package/dist/chunk-QZHKN3VN-DoV8iUKo.js +15 -0
- package/dist/classDiagram-4FO5ZUOK-Dr9C18x4.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-Dr9C18x4.js +16 -0
- package/dist/components/AiNative/AgentTimeline.d.ts +18 -0
- package/dist/components/AiNative/AiCommandCenter.d.ts +40 -0
- package/dist/components/AiNative/AiConfigPanel.d.ts +9 -0
- package/dist/components/AiNative/BusinessCanvas.d.ts +15 -0
- package/dist/components/AiNative/CanvasPreview.d.ts +16 -0
- package/dist/components/AiNative/ClarificationCard.d.ts +9 -0
- package/dist/components/AiNative/FailureSummaryCard.d.ts +20 -0
- package/dist/components/AiNative/LibraryPanel.d.ts +9 -0
- package/dist/components/AiNative/MermaidBlock.d.ts +6 -0
- package/dist/components/AiNative/PlanCard.d.ts +15 -0
- package/dist/components/AiNative/ProposalPreviewCard.d.ts +21 -0
- package/dist/components/AiNative/RecommendationCard.d.ts +10 -0
- package/dist/components/AiNative/RepairCard.d.ts +17 -0
- package/dist/components/AiNative/ReviewBar.d.ts +21 -0
- package/dist/components/AiNative/WorkflowRunCard.d.ts +14 -0
- package/dist/components/Controls/ModeSlider.d.ts +2 -0
- package/dist/components/ExecutionSummaryPanel.d.ts +4 -0
- package/dist/components/WorkflowRunPanel.d.ts +12 -0
- package/dist/components/nodes/NodeWrapper.d.ts +2 -1
- package/dist/cose-bilkent-S5V4N54A-CgQlI-io.js +2609 -0
- package/dist/cytoscape.esm-kVAWcYoG.js +18755 -0
- package/dist/dagre-BM42HDAG-CFMIuOmS.js +445 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/diagram-2AECGRRQ-C5jZp2YX.js +217 -0
- package/dist/diagram-5GNKFQAL-DRUVcHpp.js +123 -0
- package/dist/diagram-KO2AKTUF-BOl4aaej.js +461 -0
- package/dist/diagram-LMA3HP47-ZeckPR2Q.js +142 -0
- package/dist/diagram-OG6HWLK6-qUWeLfa-.js +528 -0
- package/dist/erDiagram-TEJ5UH35-Bw_CWS13.js +899 -0
- package/dist/flowDiagram-I6XJVG4X-D3xEvQA-.js +1628 -0
- package/dist/ganttDiagram-6RSMTGT7-D8GvenY3.js +2707 -0
- package/dist/gitGraphDiagram-PVQCEYII-BWrN_HOm.js +815 -0
- package/dist/graph-BRoPeNF3.js +1545 -0
- package/dist/hooks/useNodeExecution.d.ts +1 -1
- package/dist/hooks/useNodeLayout.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/infoDiagram-5YYISTIA-Da8FG5tB.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-Bg2_mKEc.js +621 -0
- package/dist/journeyDiagram-JHISSGLW-sFIxGfua.js +834 -0
- package/dist/kanban-definition-UN3LZRKU-CGmopzHd.js +724 -0
- package/dist/katex-DoRnZ_sp.js +11682 -0
- package/dist/layout-D9EpM4Fg.js +1728 -0
- package/dist/linear-BA49eco4.js +259 -0
- package/dist/mermaid.core-XSpZEAKP.js +16137 -0
- package/dist/mindmap-definition-RKZ34NQL-Bqf76QGB.js +827 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/pieDiagram-4H26LBE5-hHiP8HzL.js +163 -0
- package/dist/quadrantDiagram-W4KKPZXB-DSccwH8B.js +1024 -0
- package/dist/reactflow-ui-ai.es.js +12 -0
- package/dist/reactflow-ui.css +1 -1
- package/dist/reactflow-ui.es.js +8198 -7039
- package/dist/reactflow-ui.umd.js +52 -17
- package/dist/requirementDiagram-4Y6WPE33-DIpyoYZ_.js +882 -0
- package/dist/sankeyDiagram-5OEKKPKP-DsaPqq8D.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-BNg7orie.js +2891 -0
- package/dist/services/ai/agentRunner.d.ts +51 -0
- package/dist/services/ai/contextEngine.d.ts +83 -0
- package/dist/services/ai/draftPersistence.d.ts +22 -0
- package/dist/services/ai/errorMessages.d.ts +16 -0
- package/dist/services/ai/intentClassifier.d.ts +17 -0
- package/dist/services/ai/protocolAdapter.d.ts +114 -0
- package/dist/services/ai/ruleEngine.d.ts +57 -0
- package/dist/services/ai/schemaRegistry.d.ts +51 -0
- package/dist/services/ai/systemPrompt.d.ts +30 -0
- package/dist/services/ai/toolDefs.d.ts +9 -0
- package/dist/services/ai/toolExecutor.d.ts +83 -0
- package/dist/services/ai/toolRegistry.d.ts +38 -0
- package/dist/services/ai/transport.d.ts +58 -0
- package/dist/services/aiService.d.ts +27 -5
- package/dist/stateDiagram-AJRCARHV-Rv1mSmnJ.js +263 -0
- package/dist/stateDiagram-v2-BHNVJYJU-BME16k02.js +16 -0
- package/dist/store/aiStore.d.ts +199 -0
- package/dist/store/ideStoresContext.d.ts +39 -0
- package/dist/store/libraryStore.d.ts +25 -0
- package/dist/timeline-definition-PNZ67QCA-CmmzdVk-.js +1055 -0
- package/dist/types/aiEvents.d.ts +38 -0
- package/dist/types/conductor.d.ts +23 -2
- package/dist/types/workflow.d.ts +36 -0
- package/dist/types/workflowLibrary.d.ts +27 -0
- package/dist/utils/executionAnalyzer.d.ts +32 -0
- package/dist/utils/nodeMeta.d.ts +6 -0
- package/dist/utils/proposalPreview.d.ts +19 -0
- package/dist/utils/taskTypeMeta.d.ts +18 -0
- package/dist/utils/workflowToMermaid.d.ts +7 -0
- package/dist/vennDiagram-CIIHVFJN-BQt00w9Q.js +1557 -0
- package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
- package/dist/wardleyDiagram-YWT4CUSO-LZpiODGN.js +675 -0
- package/dist/xychartDiagram-2RQKCTM6-BpJlv_mc.js +1342 -0
- package/package.json +14 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { _ as e } from "./mermaid.core-XSpZEAKP.js";
|
|
2
|
+
var l = /* @__PURE__ */ e(() => `
|
|
3
|
+
/* Font Awesome icon styling - consolidated */
|
|
4
|
+
.label-icon {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
height: 1em;
|
|
7
|
+
overflow: visible;
|
|
8
|
+
vertical-align: -0.125em;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.node .label-icon path {
|
|
12
|
+
fill: currentColor;
|
|
13
|
+
stroke: revert;
|
|
14
|
+
stroke-width: revert;
|
|
15
|
+
}
|
|
16
|
+
`, "getIconStyles");
|
|
17
|
+
export {
|
|
18
|
+
l as g
|
|
19
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { _ as i, d as l, U as d, j as o } from "./mermaid.core-XSpZEAKP.js";
|
|
2
|
+
var x = /* @__PURE__ */ i((r, t) => {
|
|
3
|
+
const e = r.append("rect");
|
|
4
|
+
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx && e.attr("rx", t.rx), t.ry && e.attr("ry", t.ry), t.attrs !== void 0)
|
|
5
|
+
for (const s in t.attrs)
|
|
6
|
+
e.attr(s, t.attrs[s]);
|
|
7
|
+
return t.class && e.attr("class", t.class), e;
|
|
8
|
+
}, "drawRect"), p = /* @__PURE__ */ i((r, t) => {
|
|
9
|
+
const e = {
|
|
10
|
+
x: t.startx,
|
|
11
|
+
y: t.starty,
|
|
12
|
+
width: t.stopx - t.startx,
|
|
13
|
+
height: t.stopy - t.starty,
|
|
14
|
+
fill: t.fill,
|
|
15
|
+
stroke: t.stroke,
|
|
16
|
+
class: "rect"
|
|
17
|
+
};
|
|
18
|
+
x(r, e).lower();
|
|
19
|
+
}, "drawBackgroundRect"), y = /* @__PURE__ */ i((r, t) => {
|
|
20
|
+
const e = t.text.replace(d, " "), s = r.append("text");
|
|
21
|
+
s.attr("x", t.x), s.attr("y", t.y), s.attr("class", "legend"), s.style("text-anchor", t.anchor), t.class && s.attr("class", t.class);
|
|
22
|
+
const a = s.append("tspan");
|
|
23
|
+
return a.attr("x", t.x + t.textMargin * 2), a.text(e), s;
|
|
24
|
+
}, "drawText"), m = /* @__PURE__ */ i((r, t, e, s) => {
|
|
25
|
+
const a = r.append("image");
|
|
26
|
+
a.attr("x", t), a.attr("y", e);
|
|
27
|
+
const n = o.sanitizeUrl(s);
|
|
28
|
+
a.attr("xlink:href", n);
|
|
29
|
+
}, "drawImage"), g = /* @__PURE__ */ i((r, t, e, s) => {
|
|
30
|
+
const a = r.append("use");
|
|
31
|
+
a.attr("x", t), a.attr("y", e);
|
|
32
|
+
const n = o.sanitizeUrl(s);
|
|
33
|
+
a.attr("xlink:href", `#${n}`);
|
|
34
|
+
}, "drawEmbeddedImage"), h = /* @__PURE__ */ i(() => ({
|
|
35
|
+
x: 0,
|
|
36
|
+
y: 0,
|
|
37
|
+
width: 100,
|
|
38
|
+
height: 100,
|
|
39
|
+
fill: "#EDF2AE",
|
|
40
|
+
stroke: "#666",
|
|
41
|
+
anchor: "start",
|
|
42
|
+
rx: 0,
|
|
43
|
+
ry: 0
|
|
44
|
+
}), "getNoteRect"), f = /* @__PURE__ */ i(() => ({
|
|
45
|
+
x: 0,
|
|
46
|
+
y: 0,
|
|
47
|
+
width: 100,
|
|
48
|
+
height: 100,
|
|
49
|
+
"text-anchor": "start",
|
|
50
|
+
style: "#666",
|
|
51
|
+
textMargin: 0,
|
|
52
|
+
rx: 0,
|
|
53
|
+
ry: 0,
|
|
54
|
+
tspan: !0
|
|
55
|
+
}), "getTextObj"), w = /* @__PURE__ */ i(() => {
|
|
56
|
+
let r = l(".mermaidTooltip");
|
|
57
|
+
return r.empty() && (r = l("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0).style("position", "absolute").style("text-align", "center").style("max-width", "200px").style("padding", "2px").style("font-size", "12px").style("background", "#ffffde").style("border", "1px solid #333").style("border-radius", "2px").style("pointer-events", "none").style("z-index", "100")), r;
|
|
58
|
+
}, "createTooltip");
|
|
59
|
+
export {
|
|
60
|
+
p as a,
|
|
61
|
+
f as b,
|
|
62
|
+
w as c,
|
|
63
|
+
x as d,
|
|
64
|
+
g as e,
|
|
65
|
+
m as f,
|
|
66
|
+
h as g,
|
|
67
|
+
y as h
|
|
68
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _ as s } from "./mermaid.core-XSpZEAKP.js";
|
|
2
|
+
var t, e = (t = class {
|
|
3
|
+
/**
|
|
4
|
+
* @param init - Function that creates the default state.
|
|
5
|
+
*/
|
|
6
|
+
constructor(i) {
|
|
7
|
+
this.init = i, this.records = this.init();
|
|
8
|
+
}
|
|
9
|
+
reset() {
|
|
10
|
+
this.records = this.init();
|
|
11
|
+
}
|
|
12
|
+
}, s(t, "ImperativeState"), t);
|
|
13
|
+
export {
|
|
14
|
+
e as I
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { s as r, c as s, a as e, C as t } from "./chunk-727SXJPM-D4WVyvOg.js";
|
|
2
|
+
import { _ as l } from "./mermaid.core-XSpZEAKP.js";
|
|
3
|
+
var d = {
|
|
4
|
+
parser: e,
|
|
5
|
+
get db() {
|
|
6
|
+
return new t();
|
|
7
|
+
},
|
|
8
|
+
renderer: s,
|
|
9
|
+
styles: r,
|
|
10
|
+
init: /* @__PURE__ */ l((a) => {
|
|
11
|
+
a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
|
|
12
|
+
}, "init")
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
d as diagram
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { s as r, c as s, a as e, C as t } from "./chunk-727SXJPM-D4WVyvOg.js";
|
|
2
|
+
import { _ as l } from "./mermaid.core-XSpZEAKP.js";
|
|
3
|
+
var d = {
|
|
4
|
+
parser: e,
|
|
5
|
+
get db() {
|
|
6
|
+
return new t();
|
|
7
|
+
},
|
|
8
|
+
renderer: s,
|
|
9
|
+
styles: r,
|
|
10
|
+
init: /* @__PURE__ */ l((a) => {
|
|
11
|
+
a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
|
|
12
|
+
}, "init")
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
d as diagram
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentTimeline — visible work-in-progress log for the current agent turn (M2.2)
|
|
3
|
+
*
|
|
4
|
+
* Replaces the single toolStatus line with a growing list of completed steps
|
|
5
|
+
* ("✓ 已搜索工作流库", "⚠ 发现 2 处校验问题,正在自动修正…") plus the current
|
|
6
|
+
* in-flight step as a spinner row. Self-heal retries log their own entry instead
|
|
7
|
+
* of silently redoing the request, so users see the AI catch and fix its own
|
|
8
|
+
* mistakes rather than experiencing an unexplained pause.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import type { TimelineEntry } from '../../store/aiStore';
|
|
12
|
+
interface AgentTimelineProps {
|
|
13
|
+
entries: TimelineEntry[];
|
|
14
|
+
/** Current in-flight step label, or '' when nothing is actively running */
|
|
15
|
+
activeLabel: string;
|
|
16
|
+
}
|
|
17
|
+
declare const AgentTimeline: React.FC<AgentTimelineProps>;
|
|
18
|
+
export default AgentTimeline;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AiCommandCenter — AI chat panel (left side of AiWorkflowIDE)
|
|
3
|
+
*
|
|
4
|
+
* Tabs: 对话 | 工作流库
|
|
5
|
+
* Features: welcome chips, API-key onboarding, pending-proposal guard,
|
|
6
|
+
* streaming messages, tool-call pipeline.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import type { WorkflowInstance } from '../../types/conductor';
|
|
10
|
+
import type { ExecutionActions } from '../../types/workflow';
|
|
11
|
+
import type { AiEvent } from '../../types/aiEvents';
|
|
12
|
+
interface AiCommandCenterProps {
|
|
13
|
+
systemPrompt?: string;
|
|
14
|
+
systemPromptExtra?: string;
|
|
15
|
+
showConfigButton?: boolean;
|
|
16
|
+
onShowConfig: () => void;
|
|
17
|
+
executionActions?: ExecutionActions;
|
|
18
|
+
onAiEvent?: (event: AiEvent) => void;
|
|
19
|
+
aiPermissions?: {
|
|
20
|
+
canEdit?: boolean;
|
|
21
|
+
canRepair?: boolean;
|
|
22
|
+
restrictionMessage?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Whether the canvas drawer is currently open */
|
|
25
|
+
canvasOpen?: boolean;
|
|
26
|
+
onOpenCanvas?: () => void;
|
|
27
|
+
onCloseCanvas?: () => void;
|
|
28
|
+
/** Trigger execution of the current workflow. Signature matches WorkflowIDE's onTriggerExecution. */
|
|
29
|
+
onTriggerExecution?: (workflowName: string, version: number, input: Record<string, any>) => Promise<{
|
|
30
|
+
workflowId: string;
|
|
31
|
+
}>;
|
|
32
|
+
/** Poll execution status by workflowId. Signature matches WorkflowIDE's onPollExecution. */
|
|
33
|
+
onPollExecution?: (workflowId: string) => Promise<WorkflowInstance | null>;
|
|
34
|
+
/** Accept the pending proposal (full accept) */
|
|
35
|
+
onAccept?: () => void;
|
|
36
|
+
/** Reject the pending proposal */
|
|
37
|
+
onReject?: () => void;
|
|
38
|
+
}
|
|
39
|
+
declare const AiCommandCenter: React.FC<AiCommandCenterProps>;
|
|
40
|
+
export default AiCommandCenter;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BusinessCanvas — renders a WorkflowDef as business-friendly step cards
|
|
3
|
+
* for non-technical users (business view mode).
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { WorkflowDef } from '../../types/conductor';
|
|
7
|
+
interface BusinessCanvasProps {
|
|
8
|
+
workflowDef: WorkflowDef | null;
|
|
9
|
+
/** Task statuses from execution (ref → status) */
|
|
10
|
+
executionStatus?: Record<string, string>;
|
|
11
|
+
/** Called when user clicks a step to ask AI about it */
|
|
12
|
+
onStepClick?: (taskRef: string, taskType: string) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const BusinessCanvas: React.FC<BusinessCanvasProps>;
|
|
15
|
+
export default BusinessCanvas;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CanvasPreview — 画布预览组件
|
|
3
|
+
*
|
|
4
|
+
* 包裹现有的 WorkflowDesigner,作为右侧预览区。
|
|
5
|
+
* 后续会增加 Ghost 节点叠加层。
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { ExecutionActions } from '../../types/workflow';
|
|
9
|
+
import type { WorkflowDef } from '../../types/conductor';
|
|
10
|
+
interface CanvasPreviewProps {
|
|
11
|
+
onSave?: (def: WorkflowDef) => void;
|
|
12
|
+
onRequestImport?: () => void;
|
|
13
|
+
executionActions?: ExecutionActions;
|
|
14
|
+
}
|
|
15
|
+
declare const CanvasPreview: React.FC<CanvasPreviewProps>;
|
|
16
|
+
export default CanvasPreview;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PendingClarification } from '../../store/aiStore';
|
|
3
|
+
interface ClarificationCardProps {
|
|
4
|
+
clarification: PendingClarification;
|
|
5
|
+
onSelect: (optionLabel: string) => void;
|
|
6
|
+
onCustom: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ClarificationCard: React.FC<ClarificationCardProps>;
|
|
9
|
+
export default ClarificationCard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FailureSummaryCard — proactive failure surface for run-mode (M4.1)
|
|
3
|
+
*
|
|
4
|
+
* The runtime banner + welcome-message chips only appear near the top of the
|
|
5
|
+
* conversation; if a workflow fails mid-conversation the user has to scroll back
|
|
6
|
+
* to find a "why did this fail" suggestion. This card appears wherever the user
|
|
7
|
+
* currently is the moment a failure is detected, with the failed task's own error
|
|
8
|
+
* reason and a one-click path straight into diagnosis (skips having to phrase the
|
|
9
|
+
* question themselves).
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
interface FailureSummaryCardProps {
|
|
13
|
+
taskRef: string;
|
|
14
|
+
taskType: string;
|
|
15
|
+
reason?: string;
|
|
16
|
+
onDiagnose: () => void;
|
|
17
|
+
onDismiss: () => void;
|
|
18
|
+
}
|
|
19
|
+
declare const FailureSummaryCard: React.FC<FailureSummaryCardProps>;
|
|
20
|
+
export default FailureSummaryCard;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LibraryPanel — L1/L2/L3 sub-workflow catalog browser
|
|
3
|
+
*
|
|
4
|
+
* Allows users to search the workflow library and insert workflows
|
|
5
|
+
* as SUB_WORKFLOW tasks directly onto the canvas (creates a proposal).
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
declare const LibraryPanel: React.FC;
|
|
9
|
+
export default LibraryPanel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PlanCard — displays an AI-proposed multi-step execution plan
|
|
3
|
+
*
|
|
4
|
+
* Shown in the chat when the AI calls propose_plan before executing a
|
|
5
|
+
* complex multi-step operation. The user can confirm or cancel.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { PendingPlan } from '../../store/aiStore';
|
|
9
|
+
interface PlanCardProps {
|
|
10
|
+
plan: PendingPlan;
|
|
11
|
+
onExecute: () => void;
|
|
12
|
+
onCancel: () => void;
|
|
13
|
+
}
|
|
14
|
+
declare const PlanCard: React.FC<PlanCardProps>;
|
|
15
|
+
export default PlanCard;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProposalPreviewCard — business step preview for AI proposals (UX Phase A / M2.2)
|
|
3
|
+
*
|
|
4
|
+
* Replaces the old "+N 新增 ~N 修改" number-chip summary with an actual preview of
|
|
5
|
+
* what the workflow will look like: every step in business language, added steps
|
|
6
|
+
* highlighted green, modified steps yellow with a one-line change description,
|
|
7
|
+
* removed steps struck through in place. The goal is that a non-technical user can
|
|
8
|
+
* tell what changed in ~10 seconds without opening the canvas.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import type { ProposedChange } from '../../store/aiStore';
|
|
12
|
+
import type { WorkflowDef } from '../../types/conductor';
|
|
13
|
+
interface ProposalPreviewCardProps {
|
|
14
|
+
proposal: ProposedChange;
|
|
15
|
+
currentDef: WorkflowDef | null;
|
|
16
|
+
isStale: boolean;
|
|
17
|
+
onAccept: () => void;
|
|
18
|
+
onReject: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const ProposalPreviewCard: React.FC<ProposalPreviewCardProps>;
|
|
21
|
+
export default ProposalPreviewCard;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PendingRecommendation } from '../../store/aiStore';
|
|
3
|
+
interface RecommendationCardProps {
|
|
4
|
+
recommendation: PendingRecommendation;
|
|
5
|
+
onUseWorkflow: (workflowName: string) => void;
|
|
6
|
+
onModifyWorkflow: (workflowName: string) => void;
|
|
7
|
+
onCreateNew: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare const RecommendationCard: React.FC<RecommendationCardProps>;
|
|
10
|
+
export default RecommendationCard;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RepairCard — AI-generated repair proposal for run-mode failures
|
|
3
|
+
*
|
|
4
|
+
* Shown when the AI calls propose_repair in run mode.
|
|
5
|
+
* Displays a diagnosis and a list of executable repair actions.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { RepairProposal, RepairAction } from '../../store/aiStore';
|
|
9
|
+
interface RepairCardProps {
|
|
10
|
+
repair: RepairProposal;
|
|
11
|
+
/** True when the corresponding execution actions are available */
|
|
12
|
+
canExecute: boolean;
|
|
13
|
+
onExecuteAction: (action: RepairAction) => void;
|
|
14
|
+
onDismiss: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare const RepairCard: React.FC<RepairCardProps>;
|
|
17
|
+
export default RepairCard;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReviewBar — canvas-side status bar for the pending AI proposal (M2.2 simplified)
|
|
3
|
+
*
|
|
4
|
+
* The chat-inline ProposalPreviewCard is the single decision point for AI proposals
|
|
5
|
+
* (business step preview, accept/reject). When the user opens the canvas drawer,
|
|
6
|
+
* ReviewBar just reflects that a proposal is pending and offers the same two
|
|
7
|
+
* actions — it doesn't duplicate the review UI or offer per-item selection
|
|
8
|
+
* (that granular-accept UI was engineering-facing and has been removed; the
|
|
9
|
+
* AI-native way to keep only part of a proposal is to say so in chat and let the
|
|
10
|
+
* model regenerate). `applyPartialProposal` remains exported from toolExecutor for
|
|
11
|
+
* integrators who want to build their own granular-accept UI.
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import type { ProposedChange } from '../../store/aiStore';
|
|
15
|
+
interface ReviewBarProps {
|
|
16
|
+
proposal: ProposedChange | null;
|
|
17
|
+
onAccept: () => void;
|
|
18
|
+
onReject: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const ReviewBar: React.FC<ReviewBarProps>;
|
|
21
|
+
export default ReviewBar;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WorkflowDef, WorkflowInstance } from '../../types/conductor';
|
|
3
|
+
interface WorkflowRunCardProps {
|
|
4
|
+
workflowDef: WorkflowDef;
|
|
5
|
+
/** Signature matches WorkflowIDE's onTriggerExecution — one adapter serves both components. */
|
|
6
|
+
onTriggerExecution: (workflowName: string, version: number, input: Record<string, any>) => Promise<{
|
|
7
|
+
workflowId: string;
|
|
8
|
+
}>;
|
|
9
|
+
/** Signature matches WorkflowIDE's onPollExecution: null while pending, WorkflowInstance once available. */
|
|
10
|
+
onPollExecution: (workflowId: string) => Promise<WorkflowInstance | null>;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const WorkflowRunCard: React.FC<WorkflowRunCardProps>;
|
|
14
|
+
export default WorkflowRunCard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WorkflowInstance } from '../types/conductor';
|
|
3
|
+
import './WorkflowRunPanel.css';
|
|
4
|
+
export interface WorkflowRunPanelProps {
|
|
5
|
+
onTriggerExecution?: (workflowName: string, version: number, input: Record<string, any>) => Promise<{
|
|
6
|
+
workflowId: string;
|
|
7
|
+
}>;
|
|
8
|
+
onPollExecution?: (workflowId: string) => Promise<WorkflowInstance | null>;
|
|
9
|
+
executionPollInterval?: number;
|
|
10
|
+
}
|
|
11
|
+
declare const WorkflowRunPanel: React.FC<WorkflowRunPanelProps>;
|
|
12
|
+
export default WorkflowRunPanel;
|
|
@@ -12,6 +12,7 @@ interface NodeWrapperProps {
|
|
|
12
12
|
executionStatus?: ExecutionStatus;
|
|
13
13
|
simRunning?: boolean;
|
|
14
14
|
simDone?: boolean;
|
|
15
|
+
proposalStatus?: 'added' | 'modified' | 'removed';
|
|
15
16
|
}
|
|
16
|
-
declare const NodeWrapper: ({ children, nodeId, selected, isStartOrEnd, isError, hasWarning, isDecision, isHighlighted, executionStatus, simRunning, simDone, }: NodeWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const NodeWrapper: ({ children, nodeId, selected, isStartOrEnd, isError, hasWarning, isDecision, isHighlighted, executionStatus, simRunning, simDone, proposalStatus, }: NodeWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export default NodeWrapper;
|