@loopstack/loopstack-studio 0.22.0 → 0.23.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/dist/app/EnvironmentEmbedRoot.js +20 -18
- package/dist/components/dynamic-form/Form.js +50 -27
- package/dist/components/dynamic-form/InputController.js +3 -1
- package/dist/components/dynamic-form/fields/MarkdownViewField.js +20 -0
- package/dist/components/feedback/ErrorBoundary.js +43 -0
- package/dist/components/{LoadingCentered.js → feedback/LoadingCentered.js} +1 -1
- package/dist/components/feedback/index.js +5 -0
- package/dist/components/index.js +6 -3
- package/dist/components/layout/MainLayout.js +32 -16
- package/dist/components/layout/StudioSidebar.js +165 -0
- package/dist/components/ui-widgets/widgets/SandboxRun.js +1 -0
- package/dist/features/code-explorer/CodeExplorer.js +6 -0
- package/dist/features/code-explorer/components/CodeExplorerTree.js +5 -0
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +82 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBar.js +3 -190
- package/dist/features/code-explorer/components/FileTabsBarBase.js +190 -0
- package/dist/features/code-explorer/index.js +4 -0
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +2 -162
- package/dist/features/code-explorer/utils/fileIcons.js +7 -4
- package/dist/features/debug/components/ConfigFlowViewer.js +1 -1
- package/dist/features/debug/components/PipelineFlowViewer.js +47 -46
- package/dist/features/debug/components/pipeline-flow/WorkflowGraph.js +19 -19
- package/dist/features/debug/index.js +3 -0
- package/dist/features/documents/DocumentRenderer.js +58 -0
- package/dist/features/{workbench → documents}/components/DocumentItem.js +1 -1
- package/dist/features/{workbench → documents}/components/DocumentMetadataPills.js +2 -2
- package/dist/features/{workbench/components → documents}/document-details/DocumentDetails.js +3 -3
- package/dist/features/{workbench/components → documents}/document-details/PromptDetails.js +3 -3
- package/dist/features/documents/index.js +4 -0
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessage.js +5 -5
- package/dist/features/documents/renderers/ClaudeMessage.js +96 -0
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentDebugRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentFormRenderer.js +3 -3
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/DocumentMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/ErrorMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/LinkMessageRenderer.js +1 -1
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/MarkdownMessageRenderer.js +2 -2
- package/dist/features/{workbench/components/document-renderer → documents/renderers}/PlainMessageRenderer.js +1 -1
- package/dist/features/health/index.js +1 -0
- package/dist/features/workbench/NavigationItems.js +29 -29
- package/dist/features/workbench/Workbench.js +71 -99
- package/dist/features/workbench/WorkflowItem.js +63 -55
- package/dist/features/workbench/WorkflowList.js +52 -81
- package/dist/features/workbench/components/NewRunDialog.js +2 -1
- package/dist/features/workbench/components/RemoteFileTabsBar.js +18 -0
- package/dist/features/workbench/components/RemoteFileTree.js +90 -0
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +60 -0
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +4 -3
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +37 -29
- package/dist/features/workbench/components/WorkflowHistoryItem.js +11 -11
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +49 -50
- package/dist/features/workbench/hooks/useWorkflowData.js +49 -0
- package/dist/features/workbench/hooks/useWorkflowListState.js +50 -0
- package/dist/features/workbench/index.js +8 -0
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +145 -0
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +47 -45
- package/dist/features/workspaces/components/CreateWorkspace.js +1 -1
- package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
- package/dist/features/workspaces/components/PipelineForm.js +2 -2
- package/dist/features/workspaces/components/WorkspaceHomePage.js +93 -0
- package/dist/features/workspaces/index.js +3 -0
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +138 -0
- package/dist/hooks/useAuth.js +43 -42
- package/dist/hooks/useConfig.js +31 -35
- package/dist/hooks/useDashboard.js +9 -13
- package/dist/hooks/useDebounce.js +8 -17
- package/dist/hooks/useDocuments.js +4 -9
- package/dist/hooks/useFiles.js +1 -51
- package/dist/hooks/useNamespaces.js +2 -8
- package/dist/hooks/usePipelines.js +132 -155
- package/dist/hooks/useProcessor.js +11 -14
- package/dist/hooks/useWorkflows.js +40 -62
- package/dist/hooks/useWorkspaces.js +105 -110
- package/dist/index.d.ts +105 -3
- package/dist/index.js +15 -7
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
- package/dist/pages/DashboardPage.js +1 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/EmbedWorkbenchPage.js +4 -3
- package/dist/pages/PipelineDebugPage.js +6 -5
- package/dist/pages/PreviewWorkbenchPage.js +228 -128
- package/dist/pages/RunsListPage.js +52 -24
- package/dist/pages/StudioLandingPage.js +1 -0
- package/dist/pages/WorkbenchPage.js +3 -2
- package/dist/pages/WorkspacePage.js +103 -51
- package/dist/pages/WorkspaceRunsPage.js +71 -0
- package/dist/providers/InvalidationEventsProvider.js +9 -11
- package/dist/providers/StudioProvider.js +2 -2
- package/dist/routing/LocalRouter.js +18 -8
- package/package.json +2 -2
- package/dist/features/workbench/components/DocumentRenderer.js +0 -54
- /package/dist/components/{content → feedback}/ErrorAlert.js +0 -0
- /package/dist/components/{snackbars → feedback}/ErrorSnackbar.js +0 -0
- /package/dist/components/{snackbars → feedback}/Snackbar.js +0 -0
- /package/dist/features/{workbench → documents}/components/DocumentList.js +0 -0
- /package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessageContent.js +0 -0
|
@@ -2,30 +2,30 @@ import { usePipeline } from "../../../hooks/usePipelines.js";
|
|
|
2
2
|
import { Background, BackgroundVariant, Controls, index, useEdgesState, useNodesState, useReactFlow } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import StateNode_default from "./pipeline-flow/StateNode.js";
|
|
5
|
-
import WorkflowTransitionEdge_default from "./pipeline-flow/WorkflowTransitionEdge.js";
|
|
6
5
|
import WorkflowGraph_default from "./pipeline-flow/WorkflowGraph.js";
|
|
6
|
+
import WorkflowTransitionEdge_default from "./pipeline-flow/WorkflowTransitionEdge.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { Loader2 } from "lucide-react";
|
|
11
11
|
var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransition: WorkflowTransitionEdge_default }, PipelineFlowViewer_default = (b) => {
|
|
12
|
-
let x = c(
|
|
13
|
-
x[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
14
|
-
let [
|
|
15
|
-
x[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
16
|
-
let [
|
|
17
|
-
x[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
18
|
-
let [
|
|
19
|
-
x[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
20
|
-
let
|
|
21
|
-
x[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
22
|
-
|
|
12
|
+
let x = c(29), { pipelineId: S, workflows: C, pipelineConfig: w, direction: T } = b, E = T === void 0 ? "LR" : T, { data: D } = usePipeline(S), O;
|
|
13
|
+
x[0] === Symbol.for("react.memo_cache_sentinel") ? (O = [], x[0] = O) : O = x[0];
|
|
14
|
+
let [k, A, j] = useNodesState(O), M;
|
|
15
|
+
x[1] === Symbol.for("react.memo_cache_sentinel") ? (M = [], x[1] = M) : M = x[1];
|
|
16
|
+
let [N, P, F] = useEdgesState(M), { fitView: I } = useReactFlow(), L = useRef(!1), R;
|
|
17
|
+
x[2] === Symbol.for("react.memo_cache_sentinel") ? (R = {}, x[2] = R) : R = x[2];
|
|
18
|
+
let [z, B] = useState(R), V;
|
|
19
|
+
x[3] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ new Map(), x[3] = V) : V = x[3];
|
|
20
|
+
let H = useRef(V), U = Object.values(z).some(_temp), W;
|
|
21
|
+
x[4] === Symbol.for("react.memo_cache_sentinel") ? (W = (e, m) => {
|
|
22
|
+
B((h) => h[e] === m ? h : {
|
|
23
23
|
...h,
|
|
24
24
|
[e]: m
|
|
25
25
|
});
|
|
26
|
-
}, x[4] =
|
|
27
|
-
let
|
|
28
|
-
x[5] !==
|
|
26
|
+
}, x[4] = W) : W = x[4];
|
|
27
|
+
let G = W, K;
|
|
28
|
+
x[5] !== P || x[6] !== A || x[7] !== C ? (K = (e, m, h) => {
|
|
29
29
|
let g = C.findIndex((m) => m.id === e) * 250, _ = m.map((e) => ({
|
|
30
30
|
...e,
|
|
31
31
|
position: {
|
|
@@ -33,56 +33,57 @@ var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransiti
|
|
|
33
33
|
y: e.position.y + g
|
|
34
34
|
}
|
|
35
35
|
}));
|
|
36
|
-
|
|
36
|
+
H.current.set(e, {
|
|
37
37
|
nodes: _,
|
|
38
38
|
edges: h
|
|
39
39
|
});
|
|
40
40
|
let v = [], y = [];
|
|
41
|
-
|
|
41
|
+
H.current.forEach((e) => {
|
|
42
42
|
let { nodes: m, edges: h } = e;
|
|
43
43
|
v.push(...m), y.push(...h);
|
|
44
|
-
}),
|
|
45
|
-
}, x[5] =
|
|
46
|
-
let
|
|
47
|
-
if (x[9] !==
|
|
48
|
-
if (!
|
|
49
|
-
|
|
44
|
+
}), A(v), P(y);
|
|
45
|
+
}, x[5] = P, x[6] = A, x[7] = C, x[8] = K) : K = x[8];
|
|
46
|
+
let q = K, J, Y;
|
|
47
|
+
if (x[9] !== I || x[10] !== U || x[11] !== k.length ? (J = () => {
|
|
48
|
+
if (!U && k.length > 0 && !L.current) {
|
|
49
|
+
L.current = !0;
|
|
50
50
|
let e = setTimeout(() => {
|
|
51
|
-
|
|
51
|
+
I({ padding: .2 });
|
|
52
52
|
}, 150);
|
|
53
53
|
return () => clearTimeout(e);
|
|
54
54
|
}
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
], x[9] =
|
|
55
|
+
}, Y = [
|
|
56
|
+
U,
|
|
57
|
+
k.length,
|
|
58
|
+
I
|
|
59
|
+
], x[9] = I, x[10] = U, x[11] = k.length, x[12] = J, x[13] = Y) : (J = x[12], Y = x[13]), useEffect(J, Y), U && k.length === 0) {
|
|
60
60
|
let e;
|
|
61
61
|
return x[14] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
|
|
62
62
|
className: "flex h-full items-center justify-center",
|
|
63
63
|
children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-8 w-8 animate-spin" })
|
|
64
64
|
}), x[14] = e) : e = x[14], e;
|
|
65
65
|
}
|
|
66
|
-
let
|
|
67
|
-
x[15] !==
|
|
68
|
-
pipeline:
|
|
66
|
+
let X;
|
|
67
|
+
x[15] !== E || x[16] !== q || x[17] !== D || x[18] !== w || x[19] !== C ? (X = D && C.map((e) => /* @__PURE__ */ jsx(WorkflowGraph_default, {
|
|
68
|
+
pipeline: D,
|
|
69
69
|
workflow: e,
|
|
70
70
|
pipelineConfig: w,
|
|
71
|
-
onGraphReady:
|
|
72
|
-
onLoadingChange:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
onGraphReady: q,
|
|
72
|
+
onLoadingChange: G,
|
|
73
|
+
direction: E
|
|
74
|
+
}, e.id)), x[15] = E, x[16] = q, x[17] = D, x[18] = w, x[19] = C, x[20] = X) : X = x[20];
|
|
75
|
+
let Z;
|
|
76
|
+
x[21] !== N || x[22] !== k || x[23] !== F || x[24] !== j ? (Z = k.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
76
77
|
className: "text-muted-foreground flex h-full items-center justify-center",
|
|
77
78
|
children: /* @__PURE__ */ jsx("p", {
|
|
78
79
|
className: "font-medium",
|
|
79
80
|
children: "No workflow transitions available"
|
|
80
81
|
})
|
|
81
82
|
}) : /* @__PURE__ */ jsxs(index, {
|
|
82
|
-
nodes:
|
|
83
|
-
edges:
|
|
84
|
-
onNodesChange:
|
|
85
|
-
onEdgesChange:
|
|
83
|
+
nodes: k,
|
|
84
|
+
edges: N,
|
|
85
|
+
onNodesChange: j,
|
|
86
|
+
onEdgesChange: F,
|
|
86
87
|
nodeTypes,
|
|
87
88
|
edgeTypes,
|
|
88
89
|
fitView: !0,
|
|
@@ -96,12 +97,12 @@ var nodeTypes = { stateNode: StateNode_default }, edgeTypes = { workflowTransiti
|
|
|
96
97
|
size: 1,
|
|
97
98
|
className: "opacity-[0.15]"
|
|
98
99
|
}), /* @__PURE__ */ jsx(Controls, { className: "bg-card border-border rounded-lg border shadow-md" })]
|
|
99
|
-
}), x[
|
|
100
|
-
let
|
|
101
|
-
return x[
|
|
100
|
+
}), x[21] = N, x[22] = k, x[23] = F, x[24] = j, x[25] = Z) : Z = x[25];
|
|
101
|
+
let Q;
|
|
102
|
+
return x[26] !== X || x[27] !== Z ? (Q = /* @__PURE__ */ jsxs("div", {
|
|
102
103
|
className: "h-full w-full",
|
|
103
|
-
children: [
|
|
104
|
-
}), x[
|
|
104
|
+
children: [X, Z]
|
|
105
|
+
}), x[26] = X, x[27] = Z, x[28] = Q) : Q = x[28], Q;
|
|
105
106
|
};
|
|
106
107
|
function _temp(e) {
|
|
107
108
|
return e;
|
|
@@ -6,36 +6,36 @@ function countTransitions(e) {
|
|
|
6
6
|
return e ? getTransitions(e).length : 0;
|
|
7
7
|
}
|
|
8
8
|
var WorkflowGraph_default = (s) => {
|
|
9
|
-
let l = c(
|
|
10
|
-
l[0] !==
|
|
11
|
-
m(d.id,
|
|
12
|
-
},
|
|
9
|
+
let l = c(18), { pipeline: u, workflow: d, pipelineConfig: f, onGraphReady: p, onLoadingChange: m, direction: h } = s, g = h === void 0 ? "LR" : h, _ = useWorkflow(d.id), v = _.data, y = useRef(null), b, x;
|
|
10
|
+
l[0] !== _.isLoading || l[1] !== m || l[2] !== d.id ? (b = () => {
|
|
11
|
+
m(d.id, _.isLoading);
|
|
12
|
+
}, x = [
|
|
13
13
|
d.id,
|
|
14
|
-
|
|
14
|
+
_.isLoading,
|
|
15
15
|
m
|
|
16
|
-
], l[0] =
|
|
17
|
-
let
|
|
18
|
-
l[5] !==
|
|
16
|
+
], l[0] = _.isLoading, l[1] = m, l[2] = d.id, l[3] = b, l[4] = x) : (b = l[3], x = l[4]), useEffect(b, x);
|
|
17
|
+
let S;
|
|
18
|
+
l[5] !== g || l[6] !== p || l[7] !== u || l[8] !== f || l[9] !== d.id || l[10] !== v ? (S = () => {
|
|
19
19
|
let e = f ? getTransitions(f) : [], o = JSON.stringify({
|
|
20
20
|
p: countTransitions(u),
|
|
21
|
-
w: countTransitions(
|
|
21
|
+
w: countTransitions(v),
|
|
22
22
|
c: e.length,
|
|
23
|
-
history:
|
|
24
|
-
place:
|
|
23
|
+
history: v?.history?.length,
|
|
24
|
+
place: v?.place
|
|
25
25
|
});
|
|
26
|
-
if (o !==
|
|
27
|
-
|
|
28
|
-
let { nodes: a, edges: s } = buildWorkflowGraph(u,
|
|
26
|
+
if (o !== y.current) {
|
|
27
|
+
y.current = o;
|
|
28
|
+
let { nodes: a, edges: s } = buildWorkflowGraph(u, v, d.id, e, g);
|
|
29
29
|
p(d.id, a, s);
|
|
30
30
|
}
|
|
31
|
-
}, l[5] =
|
|
32
|
-
let
|
|
33
|
-
return l[
|
|
31
|
+
}, l[5] = g, l[6] = p, l[7] = u, l[8] = f, l[9] = d.id, l[10] = v, l[11] = S) : S = l[11];
|
|
32
|
+
let C;
|
|
33
|
+
return l[12] !== p || l[13] !== u || l[14] !== f || l[15] !== d || l[16] !== v ? (C = [
|
|
34
34
|
u,
|
|
35
35
|
d,
|
|
36
|
-
|
|
36
|
+
v,
|
|
37
37
|
f,
|
|
38
38
|
p
|
|
39
|
-
], l[
|
|
39
|
+
], l[12] = p, l[13] = u, l[14] = f, l[15] = d, l[16] = v, l[17] = C) : C = l[17], useEffect(S, C), null;
|
|
40
40
|
};
|
|
41
41
|
export { WorkflowGraph_default as default };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import CompletionMessagePaper_default from "../../components/messages/CompletionMessagePaper.js";
|
|
2
|
+
import OAuthPromptRenderer_default from "../oauth/OAuthPromptRenderer.js";
|
|
3
|
+
import "../oauth/index.js";
|
|
4
|
+
import AiMessage_default from "./renderers/AiMessage.js";
|
|
5
|
+
import ClaudeMessage_default from "./renderers/ClaudeMessage.js";
|
|
6
|
+
import DocumentDebugRenderer_default from "./renderers/DocumentDebugRenderer.js";
|
|
7
|
+
import DocumentFormRenderer_default from "./renderers/DocumentFormRenderer.js";
|
|
8
|
+
import DocumentMessageRenderer_default from "./renderers/DocumentMessageRenderer.js";
|
|
9
|
+
import ErrorMessageRenderer_default from "./renderers/ErrorMessageRenderer.js";
|
|
10
|
+
import LinkMessageRenderer_default from "./renderers/LinkMessageRenderer.js";
|
|
11
|
+
import MarkdownMessageRenderer_default from "./renderers/MarkdownMessageRenderer.js";
|
|
12
|
+
import PlainMessageRenderer_default from "./renderers/PlainMessageRenderer.js";
|
|
13
|
+
import { c } from "react/compiler-runtime";
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
16
|
+
var rendererRegistry = new Map([
|
|
17
|
+
["ai-message", ({ document: e, isLastItem: p }) => /* @__PURE__ */ jsx(AiMessage_default, {
|
|
18
|
+
document: e,
|
|
19
|
+
isLastItem: p
|
|
20
|
+
})],
|
|
21
|
+
["claude-message", ({ document: e, isLastItem: p }) => /* @__PURE__ */ jsx(ClaudeMessage_default, {
|
|
22
|
+
document: e,
|
|
23
|
+
isLastItem: p
|
|
24
|
+
})],
|
|
25
|
+
["debug", ({ document: e }) => /* @__PURE__ */ jsx("div", {
|
|
26
|
+
className: "mb-4 flex",
|
|
27
|
+
children: /* @__PURE__ */ jsx(DocumentDebugRenderer_default, { document: e })
|
|
28
|
+
})],
|
|
29
|
+
["object-form", ({ pipeline: p, workflow: m, document: h, isActive: g }) => /* @__PURE__ */ jsx(CompletionMessagePaper_default, {
|
|
30
|
+
role: "document",
|
|
31
|
+
fullWidth: !0,
|
|
32
|
+
timestamp: new Date(h.createdAt),
|
|
33
|
+
children: /* @__PURE__ */ jsx(DocumentFormRenderer_default, {
|
|
34
|
+
pipeline: p,
|
|
35
|
+
workflow: m,
|
|
36
|
+
document: h,
|
|
37
|
+
enabled: g,
|
|
38
|
+
viewOnly: !g
|
|
39
|
+
})
|
|
40
|
+
})],
|
|
41
|
+
["message", ({ document: e }) => /* @__PURE__ */ jsx(DocumentMessageRenderer_default, { document: e })],
|
|
42
|
+
["error", ({ document: e }) => /* @__PURE__ */ jsx(ErrorMessageRenderer_default, { document: e })],
|
|
43
|
+
["plain", ({ document: e }) => /* @__PURE__ */ jsx(PlainMessageRenderer_default, { document: e })],
|
|
44
|
+
["markdown", ({ document: e }) => /* @__PURE__ */ jsx(MarkdownMessageRenderer_default, { document: e })],
|
|
45
|
+
["link", ({ document: e }) => /* @__PURE__ */ jsx(LinkMessageRenderer_default, { document: e })],
|
|
46
|
+
["oauth-prompt", ({ pipeline: e, workflow: m, document: h, isActive: g }) => /* @__PURE__ */ jsx(OAuthPromptRenderer_default, {
|
|
47
|
+
pipeline: e,
|
|
48
|
+
workflow: m,
|
|
49
|
+
document: h,
|
|
50
|
+
isActive: g
|
|
51
|
+
})]
|
|
52
|
+
]), DocumentRenderer_default = (e) => {
|
|
53
|
+
let p = c(5), m = e.document.ui?.form?.widget ?? "object-form", h;
|
|
54
|
+
p[0] === m ? h = p[1] : (h = rendererRegistry.get(m), p[0] = m, p[1] = h);
|
|
55
|
+
let g = h, _;
|
|
56
|
+
return p[2] !== g || p[3] !== e ? (_ = /* @__PURE__ */ jsx("div", { children: g ? /* @__PURE__ */ jsx(g, { ...e }) : /* @__PURE__ */ jsx(Fragment$1, { children: "unknown document type" }) }), p[2] = g, p[3] = e, p[4] = _) : _ = p[4], _;
|
|
57
|
+
};
|
|
58
|
+
export { DocumentRenderer_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import DocumentRenderer_default from "../DocumentRenderer.js";
|
|
1
2
|
import DocumentMetadataPills_default from "./DocumentMetadataPills.js";
|
|
2
|
-
import DocumentRenderer_default from "./DocumentRenderer.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Badge } from "../../../components/ui/badge.js";
|
|
2
2
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../../../components/ui/dialog.js";
|
|
3
|
-
import DocumentDetails_default from "
|
|
4
|
-
import PromptDetails_default from "
|
|
3
|
+
import DocumentDetails_default from "../document-details/DocumentDetails.js";
|
|
4
|
+
import PromptDetails_default from "../document-details/PromptDetails.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/features/{workbench/components → documents}/document-details/DocumentDetails.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "
|
|
2
|
-
import { Badge } from "
|
|
3
|
-
import { Card, CardContent } from "
|
|
1
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../components/ui/accordion.js";
|
|
2
|
+
import { Badge } from "../../../components/ui/badge.js";
|
|
3
|
+
import { Card, CardContent } from "../../../components/ui/card.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "
|
|
2
|
-
import { Card, CardContent, CardHeader, CardTitle } from "
|
|
3
|
-
import CompletionMessagePaper_default from "
|
|
1
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "../../../components/ui/accordion.js";
|
|
2
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../../../components/ui/card.js";
|
|
3
|
+
import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import DocumentRenderer_default from "./DocumentRenderer.js";
|
|
2
|
+
import DocumentMetadataPills_default from "./components/DocumentMetadataPills.js";
|
|
3
|
+
import DocumentItem_default from "./components/DocumentItem.js";
|
|
4
|
+
import DocumentList_default from "./components/DocumentList.js";
|
package/dist/features/{workbench/components/document-renderer → documents/renderers}/AiMessage.js
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getToolOrDynamicToolName, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "
|
|
2
|
-
import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "
|
|
3
|
-
import { Reasoning, ReasoningContent, ReasoningTrigger } from "
|
|
4
|
-
import { Source, Sources, SourcesContent, SourcesTrigger } from "
|
|
5
|
-
import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "
|
|
1
|
+
import { getToolOrDynamicToolName, isReasoningUIPart, isTextUIPart, isToolOrDynamicToolUIPart } from "../../../node_modules/ai/dist/index.js";
|
|
2
|
+
import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "../../../components/ai-elements/message.js";
|
|
3
|
+
import { Reasoning, ReasoningContent, ReasoningTrigger } from "../../../components/ai-elements/reasoning.js";
|
|
4
|
+
import { Source, Sources, SourcesContent, SourcesTrigger } from "../../../components/ai-elements/sources.js";
|
|
5
|
+
import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/ai-elements/tool.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { Fragment } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Message, MessageAction, MessageActions, MessageContent, MessageResponse } from "../../../components/ai-elements/message.js";
|
|
2
|
+
import { Reasoning, ReasoningContent, ReasoningTrigger } from "../../../components/ai-elements/reasoning.js";
|
|
3
|
+
import { Tool, ToolContent, ToolHeader, ToolInput, ToolOutput } from "../../../components/ai-elements/tool.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { Fragment } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { CopyIcon } from "lucide-react";
|
|
8
|
+
var ClaudeMessage_default = (y) => {
|
|
9
|
+
let b = c(19), { document: x } = y, S = x.content, C = S.id ?? x.id, w, T, E;
|
|
10
|
+
if (b[0] !== S.content || b[1] !== S.role || b[2] !== S.toolResults || b[3] !== C) {
|
|
11
|
+
E = Symbol.for("react.early_return_sentinel");
|
|
12
|
+
bb0: {
|
|
13
|
+
let _ = /* @__PURE__ */ new Map();
|
|
14
|
+
if (S.toolResults) for (let n of S.toolResults) _.set(n.tool_use_id, n);
|
|
15
|
+
if (typeof S.content == "string") {
|
|
16
|
+
let m;
|
|
17
|
+
b[7] === S.content ? m = b[8] : (m = /* @__PURE__ */ jsx(MessageContent, { children: /* @__PURE__ */ jsx(MessageResponse, { children: S.content }) }), b[7] = S.content, b[8] = m);
|
|
18
|
+
let h;
|
|
19
|
+
b[9] !== S.content || b[10] !== S.role ? (h = S.role === "assistant" && /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(MessageAction, {
|
|
20
|
+
onClick: () => void navigator.clipboard.writeText(S.content),
|
|
21
|
+
label: "Copy",
|
|
22
|
+
children: /* @__PURE__ */ jsx(CopyIcon, { className: "size-3" })
|
|
23
|
+
}) }), b[9] = S.content, b[10] = S.role, b[11] = h) : h = b[11];
|
|
24
|
+
let g;
|
|
25
|
+
b[12] !== S.role || b[13] !== m || b[14] !== h ? (g = /* @__PURE__ */ jsxs(Message, {
|
|
26
|
+
from: S.role,
|
|
27
|
+
children: [m, h]
|
|
28
|
+
}), b[12] = S.role, b[13] = m, b[14] = h, b[15] = g) : g = b[15], E = g;
|
|
29
|
+
break bb0;
|
|
30
|
+
}
|
|
31
|
+
let y = S.content;
|
|
32
|
+
w = Fragment, T = y.map((v, y) => {
|
|
33
|
+
switch (v.type) {
|
|
34
|
+
case "text": return /* @__PURE__ */ jsxs(Message, {
|
|
35
|
+
from: S.role,
|
|
36
|
+
children: [/* @__PURE__ */ jsx(MessageContent, { children: /* @__PURE__ */ jsx(MessageResponse, { children: v.text }) }), S.role === "assistant" && /* @__PURE__ */ jsx(MessageActions, { children: /* @__PURE__ */ jsx(MessageAction, {
|
|
37
|
+
onClick: () => void navigator.clipboard.writeText(v.text),
|
|
38
|
+
label: "Copy",
|
|
39
|
+
children: /* @__PURE__ */ jsx(CopyIcon, { className: "size-3" })
|
|
40
|
+
}) })]
|
|
41
|
+
}, `${C}-${y}`);
|
|
42
|
+
case "thinking": return /* @__PURE__ */ jsxs(Reasoning, {
|
|
43
|
+
className: "w-full",
|
|
44
|
+
isStreaming: !1,
|
|
45
|
+
children: [/* @__PURE__ */ jsx(ReasoningTrigger, {}), /* @__PURE__ */ jsx(ReasoningContent, { children: v.thinking })]
|
|
46
|
+
}, `${C}-${y}`);
|
|
47
|
+
case "tool_use": {
|
|
48
|
+
let f = _.get(v.id), p;
|
|
49
|
+
if (f) try {
|
|
50
|
+
p = JSON.parse(f.content);
|
|
51
|
+
} catch {
|
|
52
|
+
p = f.content;
|
|
53
|
+
}
|
|
54
|
+
return /* @__PURE__ */ jsx(Message, {
|
|
55
|
+
from: "assistant",
|
|
56
|
+
children: /* @__PURE__ */ jsxs(Tool, { children: [/* @__PURE__ */ jsx(ToolHeader, {
|
|
57
|
+
state: f ? f.is_error ? "output-error" : "output-available" : "input-available",
|
|
58
|
+
title: v.name,
|
|
59
|
+
type: "tool-call"
|
|
60
|
+
}), /* @__PURE__ */ jsxs(ToolContent, { children: [/* @__PURE__ */ jsx(ToolInput, { input: v.input }), f && /* @__PURE__ */ jsx(ToolOutput, {
|
|
61
|
+
output: p,
|
|
62
|
+
errorText: f.is_error ? f.content : ""
|
|
63
|
+
})] })] })
|
|
64
|
+
}, `${C}-${y}`);
|
|
65
|
+
}
|
|
66
|
+
case "tool_result": {
|
|
67
|
+
if (_.size > 0) return null;
|
|
68
|
+
let f;
|
|
69
|
+
try {
|
|
70
|
+
f = JSON.parse(v.content);
|
|
71
|
+
} catch {
|
|
72
|
+
f = v.content;
|
|
73
|
+
}
|
|
74
|
+
return /* @__PURE__ */ jsx(Message, {
|
|
75
|
+
from: "assistant",
|
|
76
|
+
children: /* @__PURE__ */ jsxs(Tool, { children: [/* @__PURE__ */ jsx(ToolHeader, {
|
|
77
|
+
state: v.is_error ? "output-error" : "output-available",
|
|
78
|
+
title: "Tool Result",
|
|
79
|
+
type: "tool-result"
|
|
80
|
+
}), /* @__PURE__ */ jsx(ToolContent, { children: /* @__PURE__ */ jsx(ToolOutput, {
|
|
81
|
+
output: f,
|
|
82
|
+
errorText: v.is_error ? v.content : ""
|
|
83
|
+
}) })] })
|
|
84
|
+
}, `${C}-${y}`);
|
|
85
|
+
}
|
|
86
|
+
default: return null;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
b[0] = S.content, b[1] = S.role, b[2] = S.toolResults, b[3] = C, b[4] = w, b[5] = T, b[6] = E;
|
|
91
|
+
} else w = b[4], T = b[5], E = b[6];
|
|
92
|
+
if (E !== Symbol.for("react.early_return_sentinel")) return E;
|
|
93
|
+
let D;
|
|
94
|
+
return b[16] !== w || b[17] !== T ? (D = /* @__PURE__ */ jsx(w, { children: T }), b[16] = w, b[17] = T, b[18] = D) : D = b[18], D;
|
|
95
|
+
};
|
|
96
|
+
export { ClaudeMessage_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Form_default from "
|
|
2
|
-
import { useRunPipeline } from "
|
|
3
|
-
import UiActions_default from "
|
|
1
|
+
import Form_default from "../../../components/dynamic-form/Form.js";
|
|
2
|
+
import { useRunPipeline } from "../../../hooks/useProcessor.js";
|
|
3
|
+
import UiActions_default from "../../../components/ui-widgets/UiActions.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import React, { useEffect } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import CompletionMessagePaper_default from "
|
|
1
|
+
import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
|
|
2
2
|
import AiMessageContent_default from "./AiMessageContent.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import React from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Alert, AlertDescription } from "
|
|
1
|
+
import { Alert, AlertDescription } from "../../../components/ui/alert.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import link_default from "
|
|
1
|
+
import link_default from "../../../components/loopstack-elements/link.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import CompletionMessagePaper_default from "
|
|
2
|
-
import MarkdownContent_default from "
|
|
1
|
+
import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
|
|
2
|
+
import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import CompletionMessagePaper_default from "
|
|
1
|
+
import CompletionMessagePaper_default from "../../../components/messages/CompletionMessagePaper.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import LocalHealthCheck_default from "./LocalHealthCheck.js";
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
|
-
import { useFetchWorkflowsByNamespace } from "../../hooks/useWorkflows.js";
|
|
3
2
|
import { Skeleton } from "../../components/ui/skeleton.js";
|
|
4
3
|
import { SidebarMenuSubItem } from "../../components/ui/sidebar.js";
|
|
5
|
-
import {
|
|
4
|
+
import { useFetchWorkflowsByNamespace } from "../../hooks/useWorkflows.js";
|
|
5
|
+
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
6
6
|
import NavigationItem_default from "./components/NavigationItem.js";
|
|
7
7
|
import { useScroll } from "./providers/ScrollProvider.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
|
-
import React
|
|
9
|
+
import React from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { useParams } from "react-router-dom";
|
|
12
|
-
var NavigationItems_default = (
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
let
|
|
18
|
-
if (
|
|
12
|
+
var NavigationItems_default = (p) => {
|
|
13
|
+
let m = c(17), { namespace: h } = p, { router: g } = useStudio(), { pipelineId: _, clickId: v } = useParams(), { activeSectionId: y } = useWorkbenchLayout(), b = useFetchWorkflowsByNamespace(h.id), { setScrollTo: x } = useScroll(), S;
|
|
14
|
+
m[0] !== v || m[1] !== _ || m[2] !== g || m[3] !== x ? (S = (e) => {
|
|
15
|
+
x(!0), _ && g.navigateToWorkflow(_, e, v);
|
|
16
|
+
}, m[0] = v, m[1] = _, m[2] = g, m[3] = x, m[4] = S) : S = m[4];
|
|
17
|
+
let C = S;
|
|
18
|
+
if (b.isPending) {
|
|
19
19
|
let e;
|
|
20
|
-
|
|
20
|
+
m[5] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
|
|
21
21
|
className: "flex items-center gap-2 p-2",
|
|
22
22
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
|
|
23
|
-
}) }),
|
|
24
|
-
let
|
|
25
|
-
|
|
23
|
+
}) }), m[5] = e) : e = m[5];
|
|
24
|
+
let d;
|
|
25
|
+
m[6] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
|
|
26
26
|
className: "flex items-center gap-2 p-2",
|
|
27
27
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
|
|
28
|
-
}) }),
|
|
29
|
-
let
|
|
30
|
-
return
|
|
28
|
+
}) }), m[6] = d) : d = m[6];
|
|
29
|
+
let f;
|
|
30
|
+
return m[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
31
31
|
e,
|
|
32
|
-
|
|
32
|
+
d,
|
|
33
33
|
/* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxs("div", {
|
|
34
34
|
className: "flex items-center gap-2 p-2",
|
|
35
35
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1" })]
|
|
36
36
|
}) })
|
|
37
|
-
] }),
|
|
37
|
+
] }), m[7] = f) : f = m[7], f;
|
|
38
38
|
}
|
|
39
|
-
if (!
|
|
40
|
-
let
|
|
41
|
-
if (
|
|
39
|
+
if (!_ || !b.data?.length) return null;
|
|
40
|
+
let w;
|
|
41
|
+
if (m[8] !== y || m[9] !== b.data || m[10] !== C) {
|
|
42
42
|
let e;
|
|
43
|
-
|
|
43
|
+
m[12] !== y || m[13] !== C ? (e = (e) => /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(NavigationItem_default, {
|
|
44
44
|
workflow: e,
|
|
45
|
-
isSelected:
|
|
46
|
-
navigateTo:
|
|
47
|
-
}) }, `wf-${e.id}`),
|
|
48
|
-
} else
|
|
49
|
-
let
|
|
50
|
-
return
|
|
45
|
+
isSelected: y?.endsWith(e.id) ?? !1,
|
|
46
|
+
navigateTo: C
|
|
47
|
+
}) }, `wf-${e.id}`), m[12] = y, m[13] = C, m[14] = e) : e = m[14], w = b.data.map(e), m[8] = y, m[9] = b.data, m[10] = C, m[11] = w;
|
|
48
|
+
} else w = m[11];
|
|
49
|
+
let T;
|
|
50
|
+
return m[15] === w ? T = m[16] : (T = /* @__PURE__ */ jsx(Fragment$1, { children: w }), m[15] = w, m[16] = T), T;
|
|
51
51
|
};
|
|
52
52
|
export { NavigationItems_default as default };
|