@loopstack/loopstack-studio 0.26.0 → 0.27.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/dist/api/index.js +13 -11
- package/dist/components/ui-widgets/UiActions.js +9 -7
- package/dist/features/documents/renderers/AiMessageContent.js +109 -111
- package/dist/features/git/api/git.js +9 -0
- package/dist/features/workbench/WorkflowItem.js +87 -55
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/query-keys.js +45 -24
- package/dist/index.d.ts +48 -0
- package/dist/index.js +2 -2
- package/dist/pages/WorkspacePage.js +2 -4
- package/dist/providers/SseProvider.js +14 -20
- package/package.json +2 -2
package/dist/api/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createFilesApi } from "../features/file-explorer/api/files.js";
|
|
2
|
+
import { createGitApi } from "../features/git/api/git.js";
|
|
2
3
|
import { createAuthApi } from "./auth.js";
|
|
3
4
|
import { createConfigApi } from "./config.js";
|
|
4
5
|
import { createDashboardApi } from "./dashboard.js";
|
|
@@ -9,18 +10,19 @@ import { createSecretsApi } from "./secrets.js";
|
|
|
9
10
|
import { createWorkflowsApi } from "./workflows.js";
|
|
10
11
|
import { createWorkspacesApi } from "./workspaces.js";
|
|
11
12
|
import { createAxiosClient } from "./client.js";
|
|
12
|
-
function createApi(
|
|
13
|
+
function createApi(f) {
|
|
13
14
|
return {
|
|
14
|
-
auth: createAuthApi(
|
|
15
|
-
config: createConfigApi(
|
|
16
|
-
dashboard: createDashboardApi(
|
|
17
|
-
documents: createDocumentsApi(
|
|
18
|
-
environments: createEnvironmentsApi(
|
|
19
|
-
files: createFilesApi(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
auth: createAuthApi(f),
|
|
16
|
+
config: createConfigApi(f),
|
|
17
|
+
dashboard: createDashboardApi(f),
|
|
18
|
+
documents: createDocumentsApi(f),
|
|
19
|
+
environments: createEnvironmentsApi(f),
|
|
20
|
+
files: createFilesApi(f),
|
|
21
|
+
git: createGitApi(f),
|
|
22
|
+
processor: createProcessorApi(f),
|
|
23
|
+
secrets: createSecretsApi(f),
|
|
24
|
+
workflows: createWorkflowsApi(f),
|
|
25
|
+
workspaces: createWorkspacesApi(f)
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
export { createApi };
|
|
@@ -7,25 +7,27 @@ var UiActions_default = (i) => {
|
|
|
7
7
|
if (a[0] !== o || a[1] !== s || a[2] !== l || a[3] !== u || a[4] !== f || a[5] !== d) {
|
|
8
8
|
let r;
|
|
9
9
|
a[7] !== s || a[8] !== l || a[9] !== u || a[10] !== f || a[11] !== d ? (r = (r, i) => {
|
|
10
|
-
let { enabledWhen: a } = r,
|
|
10
|
+
let { enabledWhen: a, showWhen: o } = r, p = r.options?.transition;
|
|
11
|
+
if (o !== void 0 && (!l || !o.includes(l))) return null;
|
|
12
|
+
let m = u || a !== void 0 && (!l || !a.includes(l)) || p !== void 0 && !s.includes(p);
|
|
11
13
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(UiWidget_default, {
|
|
12
14
|
config: r,
|
|
13
15
|
onSubmit: (e) => {
|
|
14
16
|
if (console.log("[UiActions] handleSubmit called", {
|
|
15
|
-
transition:
|
|
17
|
+
transition: p,
|
|
16
18
|
data: e,
|
|
17
|
-
isDisabled:
|
|
19
|
+
isDisabled: m,
|
|
18
20
|
currentPlace: l,
|
|
19
21
|
availableTransitions: s
|
|
20
|
-
}), !
|
|
22
|
+
}), !p) {
|
|
21
23
|
console.error(`[UiActions] Widget "${r.widget}" has no transition configured.`);
|
|
22
24
|
return;
|
|
23
25
|
}
|
|
24
|
-
d(
|
|
26
|
+
d(p, e);
|
|
25
27
|
},
|
|
26
|
-
disabled:
|
|
28
|
+
disabled: m,
|
|
27
29
|
isLoading: f
|
|
28
|
-
}) }, `ui-widget-${i}-${
|
|
30
|
+
}) }, `ui-widget-${i}-${p ?? r.widget}`);
|
|
29
31
|
}, a[7] = s, a[8] = l, a[9] = u, a[10] = f, a[11] = d, a[12] = r) : r = a[12], p = o.map(r), a[0] = o, a[1] = s, a[2] = l, a[3] = u, a[4] = f, a[5] = d, a[6] = p;
|
|
30
32
|
} else p = a[6];
|
|
31
33
|
let m;
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
+
import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
|
|
1
2
|
import { c } from "react/compiler-runtime";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
var getDataUrl = (e,
|
|
5
|
-
let
|
|
6
|
-
return
|
|
5
|
+
var getDataUrl = (e, r) => e instanceof URL ? e.toString() : typeof e == "string" ? `data:${r || "application/octet-stream"};base64,${e}` : "#", TextPartRenderer = (e) => {
|
|
6
|
+
let i = c(2), { part: a } = e, o;
|
|
7
|
+
return i[0] === a.text ? o = i[1] : (o = /* @__PURE__ */ jsx("div", {
|
|
7
8
|
className: "text-sm leading-relaxed whitespace-pre-wrap",
|
|
8
|
-
children:
|
|
9
|
-
}),
|
|
10
|
-
}, ImagePartRenderer = (
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let l;
|
|
14
|
-
a[3] === Symbol.for("react.memo_cache_sentinel") ? (l = { maxHeight: "400px" }, a[3] = l) : l = a[3];
|
|
9
|
+
children: a.text
|
|
10
|
+
}), i[0] = a.text, i[1] = o), o;
|
|
11
|
+
}, ImagePartRenderer = (e) => {
|
|
12
|
+
let i = c(11), { part: s } = e, l;
|
|
13
|
+
i[0] !== s.image || i[1] !== s.mediaType ? (l = getDataUrl(s.image, s.mediaType), i[0] = s.image, i[1] = s.mediaType, i[2] = l) : l = i[2];
|
|
15
14
|
let u;
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
i[3] === Symbol.for("react.memo_cache_sentinel") ? (u = { maxHeight: "400px" }, i[3] = u) : u = i[3];
|
|
16
|
+
let d;
|
|
17
|
+
i[4] === l ? d = i[5] : (d = /* @__PURE__ */ jsx("img", {
|
|
18
|
+
src: l,
|
|
18
19
|
alt: "Uploaded image",
|
|
19
20
|
className: "h-auto max-w-full rounded-lg border shadow-sm",
|
|
20
|
-
style:
|
|
21
|
-
}),
|
|
22
|
-
let d;
|
|
23
|
-
a[6] === o.mediaType ? d = a[7] : (d = o.mediaType && /* @__PURE__ */ jsxs("div", {
|
|
24
|
-
className: "mt-1 text-xs text-gray-500",
|
|
25
|
-
children: ["Type: ", o.mediaType]
|
|
26
|
-
}), a[6] = o.mediaType, a[7] = d);
|
|
21
|
+
style: u
|
|
22
|
+
}), i[4] = l, i[5] = d);
|
|
27
23
|
let f;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
i[
|
|
24
|
+
i[6] === s.mediaType ? f = i[7] : (f = s.mediaType && /* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "mt-1 text-xs text-gray-500",
|
|
26
|
+
children: ["Type: ", s.mediaType]
|
|
27
|
+
}), i[6] = s.mediaType, i[7] = f);
|
|
28
|
+
let p;
|
|
29
|
+
return i[8] !== d || i[9] !== f ? (p = /* @__PURE__ */ jsxs("div", { children: [d, f] }), i[8] = d, i[9] = f, i[10] = p) : p = i[10], p;
|
|
30
|
+
}, FilePartRenderer = (e) => {
|
|
31
|
+
let i = c(8), { part: o } = e, s;
|
|
32
|
+
i[0] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ jsx("div", {
|
|
32
33
|
className: "text-2xl",
|
|
33
34
|
children: "📎"
|
|
34
|
-
}), i[0] =
|
|
35
|
-
let
|
|
36
|
-
i[1] ===
|
|
35
|
+
}), i[0] = s) : s = i[0];
|
|
36
|
+
let l = o.filename || "Unnamed file", u;
|
|
37
|
+
i[1] === l ? u = i[2] : (u = /* @__PURE__ */ jsx("div", {
|
|
37
38
|
className: "text-sm font-medium",
|
|
38
|
-
children:
|
|
39
|
-
}), i[1] =
|
|
40
|
-
let u;
|
|
41
|
-
i[3] === a.mediaType ? u = i[4] : (u = /* @__PURE__ */ jsx("div", {
|
|
42
|
-
className: "text-xs text-gray-500",
|
|
43
|
-
children: a.mediaType
|
|
44
|
-
}), i[3] = a.mediaType, i[4] = u);
|
|
39
|
+
children: l
|
|
40
|
+
}), i[1] = l, i[2] = u);
|
|
45
41
|
let d;
|
|
46
|
-
|
|
42
|
+
i[3] === o.mediaType ? d = i[4] : (d = /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: "text-xs text-gray-500",
|
|
44
|
+
children: o.mediaType
|
|
45
|
+
}), i[3] = o.mediaType, i[4] = d);
|
|
46
|
+
let f;
|
|
47
|
+
return i[5] !== u || i[6] !== d ? (f = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs("div", {
|
|
47
48
|
className: "flex items-center space-x-2",
|
|
48
|
-
children: [
|
|
49
|
-
}) }), i[5] =
|
|
50
|
-
}, ReasoningPartRenderer = (
|
|
51
|
-
let i = c(2), { part:
|
|
52
|
-
return i[0] ===
|
|
49
|
+
children: [s, /* @__PURE__ */ jsxs("div", { children: [u, d] })]
|
|
50
|
+
}) }), i[5] = u, i[6] = d, i[7] = f) : f = i[7], f;
|
|
51
|
+
}, ReasoningPartRenderer = (e) => {
|
|
52
|
+
let i = c(2), { part: o } = e, s;
|
|
53
|
+
return i[0] === o.text ? s = i[1] : (s = o.text ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
53
54
|
className: "mb-2 flex items-center space-x-2",
|
|
54
55
|
children: /* @__PURE__ */ jsx("div", {
|
|
55
56
|
className: "text-sm font-medium text-purple-600",
|
|
@@ -57,118 +58,115 @@ var getDataUrl = (e, n) => e instanceof URL ? e.toString() : typeof e == "string
|
|
|
57
58
|
})
|
|
58
59
|
}), /* @__PURE__ */ jsx("div", {
|
|
59
60
|
className: "text-sm whitespace-pre-wrap text-purple-800",
|
|
60
|
-
children:
|
|
61
|
-
})] }) : "", i[0] =
|
|
62
|
-
}, ToolCallPartRenderer = (
|
|
63
|
-
let i = c(17), { part:
|
|
64
|
-
i[0] ===
|
|
61
|
+
children: o.text
|
|
62
|
+
})] }) : "", i[0] = o.text, i[1] = s), s;
|
|
63
|
+
}, ToolCallPartRenderer = (e) => {
|
|
64
|
+
let i = c(17), { part: o } = e, s;
|
|
65
|
+
i[0] === o.toolName ? s = i[1] : (s = /* @__PURE__ */ jsx("div", {
|
|
65
66
|
className: "text-sm font-medium",
|
|
66
|
-
children:
|
|
67
|
-
}), i[0] =
|
|
68
|
-
let
|
|
69
|
-
i[2] ===
|
|
67
|
+
children: o.toolName
|
|
68
|
+
}), i[0] = o.toolName, i[1] = s);
|
|
69
|
+
let l;
|
|
70
|
+
i[2] === o.providerExecuted ? l = i[3] : (l = o.providerExecuted && /* @__PURE__ */ jsx("span", {
|
|
70
71
|
className: "rounded bg-green-100 px-2 py-1 text-xs text-green-800",
|
|
71
72
|
children: "Executed"
|
|
72
|
-
}), i[2] =
|
|
73
|
-
let l;
|
|
74
|
-
i[4] !== o || i[5] !== s ? (l = /* @__PURE__ */ jsxs("div", {
|
|
75
|
-
className: "flex items-center space-x-2",
|
|
76
|
-
children: [o, s]
|
|
77
|
-
}), i[4] = o, i[5] = s, i[6] = l) : l = i[6];
|
|
73
|
+
}), i[2] = o.providerExecuted, i[3] = l);
|
|
78
74
|
let u;
|
|
79
|
-
i[
|
|
80
|
-
className: "
|
|
81
|
-
children: [
|
|
82
|
-
}), i[
|
|
75
|
+
i[4] !== s || i[5] !== l ? (u = /* @__PURE__ */ jsxs("div", {
|
|
76
|
+
className: "flex items-center space-x-2",
|
|
77
|
+
children: [s, l]
|
|
78
|
+
}), i[4] = s, i[5] = l, i[6] = u) : u = i[6];
|
|
83
79
|
let d;
|
|
84
|
-
i[
|
|
85
|
-
className: "
|
|
86
|
-
children: [
|
|
87
|
-
}), i[
|
|
80
|
+
i[7] === o.toolCallId ? d = i[8] : (d = /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
className: "ml-5 font-mono text-xs text-gray-500",
|
|
82
|
+
children: ["ID: ", o.toolCallId]
|
|
83
|
+
}), i[7] = o.toolCallId, i[8] = d);
|
|
88
84
|
let f;
|
|
89
|
-
i[
|
|
85
|
+
i[9] !== u || i[10] !== d ? (f = /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "mb-2 flex items-center justify-between",
|
|
87
|
+
children: [u, d]
|
|
88
|
+
}), i[9] = u, i[10] = d, i[11] = f) : f = i[11];
|
|
89
|
+
let p;
|
|
90
|
+
i[12] === o.input ? p = i[13] : (p = o.input ? /* @__PURE__ */ jsxs("div", {
|
|
90
91
|
className: "rounded border bg-white p-2 text-xs",
|
|
91
92
|
children: [/* @__PURE__ */ jsx("div", {
|
|
92
93
|
className: "mb-1 text-gray-600",
|
|
93
94
|
children: "Input:"
|
|
94
95
|
}), /* @__PURE__ */ jsx("pre", {
|
|
95
96
|
className: "overflow-x-auto whitespace-pre-wrap",
|
|
96
|
-
children: JSON.stringify(
|
|
97
|
+
children: JSON.stringify(o.input, null, 2)
|
|
97
98
|
})]
|
|
98
|
-
}) : "", i[12] =
|
|
99
|
-
let
|
|
100
|
-
return i[14] !==
|
|
101
|
-
}, ToolResultPartRenderer = (
|
|
102
|
-
let i = c(14), { part:
|
|
103
|
-
i[0] ===
|
|
99
|
+
}) : "", i[12] = o.input, i[13] = p);
|
|
100
|
+
let m;
|
|
101
|
+
return i[14] !== f || i[15] !== p ? (m = /* @__PURE__ */ jsxs("div", { children: [f, p] }), i[14] = f, i[15] = p, i[16] = m) : m = i[16], m;
|
|
102
|
+
}, ToolResultPartRenderer = (e) => {
|
|
103
|
+
let i = c(14), { part: o } = e, s;
|
|
104
|
+
i[0] === o.toolName ? s = i[1] : (s = /* @__PURE__ */ jsxs("div", {
|
|
104
105
|
className: "text-sm font-medium",
|
|
105
|
-
children: [
|
|
106
|
-
}), i[0] =
|
|
107
|
-
let s;
|
|
108
|
-
i[2] === a.toolCallId ? s = i[3] : (s = /* @__PURE__ */ jsxs("div", {
|
|
109
|
-
className: "ml-5 font-mono text-xs text-gray-500",
|
|
110
|
-
children: ["ID: ", a.toolCallId]
|
|
111
|
-
}), i[2] = a.toolCallId, i[3] = s);
|
|
106
|
+
children: [o.toolName, " Result"]
|
|
107
|
+
}), i[0] = o.toolName, i[1] = s);
|
|
112
108
|
let l;
|
|
113
|
-
i[
|
|
114
|
-
className: "
|
|
115
|
-
children: [
|
|
116
|
-
}), i[
|
|
109
|
+
i[2] === o.toolCallId ? l = i[3] : (l = /* @__PURE__ */ jsxs("div", {
|
|
110
|
+
className: "ml-5 font-mono text-xs text-gray-500",
|
|
111
|
+
children: ["ID: ", o.toolCallId]
|
|
112
|
+
}), i[2] = o.toolCallId, i[3] = l);
|
|
117
113
|
let u;
|
|
118
|
-
i[
|
|
114
|
+
i[4] !== s || i[5] !== l ? (u = /* @__PURE__ */ jsxs("div", {
|
|
115
|
+
className: "mb-2 flex items-center justify-between",
|
|
116
|
+
children: [s, l]
|
|
117
|
+
}), i[4] = s, i[5] = l, i[6] = u) : u = i[6];
|
|
119
118
|
let d;
|
|
120
|
-
i[
|
|
119
|
+
i[7] === o.output ? d = i[8] : (d = JSON.stringify(o.output, null, 2), i[7] = o.output, i[8] = d);
|
|
120
|
+
let f;
|
|
121
|
+
i[9] === d ? f = i[10] : (f = /* @__PURE__ */ jsx("div", {
|
|
121
122
|
className: "rounded border bg-white p-2 text-xs",
|
|
122
123
|
children: /* @__PURE__ */ jsx("pre", {
|
|
123
124
|
className: "overflow-x-auto whitespace-pre-wrap",
|
|
124
|
-
children:
|
|
125
|
+
children: d
|
|
125
126
|
})
|
|
126
|
-
}), i[9] =
|
|
127
|
-
let
|
|
128
|
-
return i[11] !==
|
|
129
|
-
}, AiMessageContent_default = (
|
|
130
|
-
let
|
|
131
|
-
|
|
132
|
-
if (
|
|
127
|
+
}), i[9] = d, i[10] = f);
|
|
128
|
+
let p;
|
|
129
|
+
return i[11] !== u || i[12] !== f ? (p = /* @__PURE__ */ jsxs("div", { children: [u, f] }), i[11] = u, i[12] = f, i[13] = p) : p = i[13], p;
|
|
130
|
+
}, AiMessageContent_default = (i) => {
|
|
131
|
+
let o = c(4), { message: s } = i, l = _temp, u;
|
|
132
|
+
o[0] === s ? u = o[1] : (u = () => {
|
|
133
|
+
if (s.role === "system") return /* @__PURE__ */ jsxs("div", {
|
|
133
134
|
className: "rounded-lg border-l-4 border-gray-400 bg-gray-50 p-3 text-sm text-gray-600 italic",
|
|
134
135
|
children: [/* @__PURE__ */ jsx("div", {
|
|
135
136
|
className: "mb-1 font-medium",
|
|
136
137
|
children: "System"
|
|
137
138
|
}), /* @__PURE__ */ jsx("div", {
|
|
138
139
|
className: "whitespace-pre-wrap",
|
|
139
|
-
children:
|
|
140
|
+
children: s.content
|
|
140
141
|
})]
|
|
141
142
|
});
|
|
142
|
-
let { content:
|
|
143
|
-
return typeof
|
|
144
|
-
type: "text",
|
|
145
|
-
text: e
|
|
146
|
-
} }) : Array.isArray(e) ? /* @__PURE__ */ jsx("div", {
|
|
143
|
+
let { content: r } = s;
|
|
144
|
+
return typeof r == "string" ? /* @__PURE__ */ jsx(MarkdownContent_default, { content: r }) : Array.isArray(r) ? /* @__PURE__ */ jsx("div", {
|
|
147
145
|
className: "space-y-2",
|
|
148
|
-
children:
|
|
146
|
+
children: r.map((e, r) => l(e, r))
|
|
149
147
|
}) : /* @__PURE__ */ jsx("div", {
|
|
150
148
|
className: "text-sm text-red-600",
|
|
151
149
|
children: "Invalid content format"
|
|
152
150
|
});
|
|
153
|
-
},
|
|
154
|
-
let
|
|
155
|
-
return
|
|
151
|
+
}, o[0] = s, o[1] = u);
|
|
152
|
+
let d = u, f;
|
|
153
|
+
return o[2] === d ? f = o[3] : (f = /* @__PURE__ */ jsx("div", {
|
|
156
154
|
className: "message-content",
|
|
157
|
-
children:
|
|
158
|
-
}),
|
|
155
|
+
children: d()
|
|
156
|
+
}), o[2] = d, o[3] = f), f;
|
|
159
157
|
};
|
|
160
|
-
function _temp(e,
|
|
158
|
+
function _temp(e, r) {
|
|
161
159
|
switch (e.type) {
|
|
162
|
-
case "text": return /* @__PURE__ */ jsx(TextPartRenderer, { part: e },
|
|
163
|
-
case "image": return /* @__PURE__ */ jsx(ImagePartRenderer, { part: e },
|
|
164
|
-
case "file": return /* @__PURE__ */ jsx(FilePartRenderer, { part: e },
|
|
165
|
-
case "reasoning": return /* @__PURE__ */ jsx(ReasoningPartRenderer, { part: e },
|
|
166
|
-
case "tool-call": return /* @__PURE__ */ jsx(ToolCallPartRenderer, { part: e },
|
|
167
|
-
case "tool-result": return /* @__PURE__ */ jsx(ToolResultPartRenderer, { part: e },
|
|
160
|
+
case "text": return /* @__PURE__ */ jsx(TextPartRenderer, { part: e }, r);
|
|
161
|
+
case "image": return /* @__PURE__ */ jsx(ImagePartRenderer, { part: e }, r);
|
|
162
|
+
case "file": return /* @__PURE__ */ jsx(FilePartRenderer, { part: e }, r);
|
|
163
|
+
case "reasoning": return /* @__PURE__ */ jsx(ReasoningPartRenderer, { part: e }, r);
|
|
164
|
+
case "tool-call": return /* @__PURE__ */ jsx(ToolCallPartRenderer, { part: e }, r);
|
|
165
|
+
case "tool-result": return /* @__PURE__ */ jsx(ToolResultPartRenderer, { part: e }, r);
|
|
168
166
|
default: return /* @__PURE__ */ jsxs("div", {
|
|
169
167
|
className: "rounded bg-gray-100 p-2 text-sm",
|
|
170
168
|
children: ["Unknown content type: ", e.type]
|
|
171
|
-
},
|
|
169
|
+
}, r);
|
|
172
170
|
}
|
|
173
171
|
}
|
|
174
172
|
export { AiMessageContent_default as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function createGitApi(e) {
|
|
2
|
+
return {
|
|
3
|
+
getStatus: (t) => e.get(`/api/v1/workspaces/${t.workspaceId}/git/status`).then((e) => e.data),
|
|
4
|
+
getLog: (t) => e.get(`/api/v1/workspaces/${t.workspaceId}/git/log`, { params: t.limit ? { limit: t.limit } : void 0 }).then((e) => e.data),
|
|
5
|
+
getRemote: (t) => e.get(`/api/v1/workspaces/${t.workspaceId}/git/remote`).then((e) => e.data),
|
|
6
|
+
removeRemote: (t) => e.delete(`/api/v1/workspaces/${t.workspaceId}/git/remote`).then((e) => e.data)
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export { createGitApi };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { Button } from "../../components/ui/button.js";
|
|
2
3
|
import LoadingCentered_default from "../../components/feedback/LoadingCentered.js";
|
|
3
4
|
import ErrorSnackbar_default from "../../components/feedback/ErrorSnackbar.js";
|
|
4
|
-
import
|
|
5
|
+
import { require_enums } from "../../packages/contracts/dist/enums/index.js";
|
|
6
|
+
import { useRunWorkflow } from "../../hooks/useProcessor.js";
|
|
5
7
|
import DocumentList_default from "../documents/components/DocumentList.js";
|
|
6
8
|
import "../documents/index.js";
|
|
7
9
|
import WorkflowForms_default from "./components/WorkflowForms.js";
|
|
@@ -10,64 +12,94 @@ import { c } from "react/compiler-runtime";
|
|
|
10
12
|
import React, { useEffect } from "react";
|
|
11
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
14
|
import { useParams } from "react-router-dom";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
15
|
+
import { AlertCircle, RefreshCw } from "lucide-react";
|
|
16
|
+
var import_enums = require_enums(), WorkflowItem_default = (h) => {
|
|
17
|
+
let g = c(55), { workflow: _, workflowId: v, scrollTo: y, settings: b, embed: x } = h, { workflowId: S, clickId: C } = useParams(), w = useRunWorkflow(), T;
|
|
18
|
+
g[0] !== b.showFullMessageHistory || g[1] !== v ? (T = {
|
|
19
|
+
workflowId: v,
|
|
20
|
+
showFullMessageHistory: b.showFullMessageHistory
|
|
21
|
+
}, g[0] = b.showFullMessageHistory, g[1] = v, g[2] = T) : T = g[2];
|
|
22
|
+
let { workflow: E, workflowLoading: D, workflowReady: O, workflowError: k, documents: A, documentsLoading: j, documentsReady: M, documentsError: N, isLoading: P, handleRun: F } = useWorkflowData(T), I;
|
|
23
|
+
g[3] !== M || g[4] !== S || g[5] !== y || g[6] !== v || g[7] !== O ? (I = () => {
|
|
24
|
+
S === v && O && M && y(v);
|
|
25
|
+
}, g[3] = M, g[4] = S, g[5] = y, g[6] = v, g[7] = O, g[8] = I) : I = g[8];
|
|
26
|
+
let L;
|
|
27
|
+
g[9] !== C || g[10] !== M || g[11] !== S || g[12] !== y || g[13] !== v || g[14] !== O ? (L = [
|
|
28
|
+
O,
|
|
29
|
+
M,
|
|
30
|
+
v,
|
|
31
|
+
S,
|
|
32
|
+
C,
|
|
33
|
+
y
|
|
34
|
+
], g[9] = C, g[10] = M, g[11] = S, g[12] = y, g[13] = v, g[14] = O, g[15] = L) : L = g[15], useEffect(I, L);
|
|
35
|
+
let R;
|
|
36
|
+
g[16] === E?.availableTransitions ? R = g[17] : (R = E?.availableTransitions?.some(_temp), g[16] = E?.availableTransitions, g[17] = R);
|
|
37
|
+
let z = R, B = E?.hasError && E.status === import_enums.WorkflowState.Waiting, V = E?.hasError && !B && z !== !1, H;
|
|
38
|
+
g[18] !== w || g[19] !== v ? (H = () => {
|
|
39
|
+
w.mutate({
|
|
40
|
+
workflowId: v,
|
|
41
|
+
runWorkflowPayloadDto: {},
|
|
42
|
+
force: !0
|
|
43
|
+
});
|
|
44
|
+
}, g[18] = w, g[19] = v, g[20] = H) : H = g[20];
|
|
45
|
+
let U = H, W = x ? "p-0" : "p-4", G;
|
|
46
|
+
g[21] === W ? G = g[22] : (G = cn("flex flex-col", W), g[21] = W, g[22] = G);
|
|
47
|
+
let K = D || j, q;
|
|
48
|
+
g[23] === K ? q = g[24] : (q = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: K }), g[23] = K, g[24] = q);
|
|
49
|
+
let J;
|
|
50
|
+
g[25] === N ? J = g[26] : (J = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: N }), g[25] = N, g[26] = J);
|
|
51
|
+
let Y;
|
|
52
|
+
g[27] !== E || g[28] !== A || g[29] !== P || g[30] !== y || g[31] !== b || g[32] !== _ || g[33] !== O ? (Y = O && E && /* @__PURE__ */ jsx(DocumentList_default, {
|
|
53
|
+
workflow: _,
|
|
54
|
+
childWorkflow: E,
|
|
55
|
+
documents: A,
|
|
56
|
+
scrollTo: y,
|
|
57
|
+
settings: b,
|
|
58
|
+
isLoading: P
|
|
59
|
+
}), g[27] = E, g[28] = A, g[29] = P, g[30] = y, g[31] = b, g[32] = _, g[33] = O, g[34] = Y) : Y = g[34];
|
|
60
|
+
let X;
|
|
61
|
+
g[35] === P ? X = g[36] : (X = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: P }), g[35] = P, g[36] = X);
|
|
62
|
+
let Z;
|
|
63
|
+
g[37] !== V || g[38] !== E?.hasError || g[39] !== U || g[40] !== w.isPending || g[41] !== k ? (Z = k && E?.hasError && /* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: "mt-3 flex items-center gap-2 px-1",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "text-destructive h-4 w-4 shrink-0" }),
|
|
67
|
+
/* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: "text-destructive flex-1 text-sm",
|
|
69
|
+
children: k
|
|
70
|
+
}),
|
|
71
|
+
V && /* @__PURE__ */ jsxs(Button, {
|
|
72
|
+
variant: "outline",
|
|
73
|
+
size: "sm",
|
|
74
|
+
disabled: w.isPending,
|
|
75
|
+
onClick: U,
|
|
76
|
+
children: [w.isPending ? /* @__PURE__ */ jsx("div", { className: "mr-1 h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(RefreshCw, { className: "mr-1 h-3.5 w-3.5" }), "Retry"]
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
}), g[37] = V, g[38] = E?.hasError, g[39] = U, g[40] = w.isPending, g[41] = k, g[42] = Z) : Z = g[42];
|
|
80
|
+
let Q;
|
|
81
|
+
g[43] !== E || g[44] !== F || g[45] !== _ ? (Q = !!E && /* @__PURE__ */ jsx("div", {
|
|
53
82
|
className: "mt-6",
|
|
54
83
|
children: /* @__PURE__ */ jsx(WorkflowForms_default, {
|
|
55
|
-
workflow:
|
|
56
|
-
parentWorkflow:
|
|
57
|
-
onSubmit:
|
|
84
|
+
workflow: E,
|
|
85
|
+
parentWorkflow: _,
|
|
86
|
+
onSubmit: F
|
|
58
87
|
})
|
|
59
|
-
}),
|
|
60
|
-
let
|
|
61
|
-
return
|
|
62
|
-
className:
|
|
88
|
+
}), g[43] = E, g[44] = F, g[45] = _, g[46] = Q) : Q = g[46];
|
|
89
|
+
let $;
|
|
90
|
+
return g[47] !== J || g[48] !== Y || g[49] !== X || g[50] !== Z || g[51] !== Q || g[52] !== G || g[53] !== q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
91
|
+
className: G,
|
|
63
92
|
children: [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
93
|
+
q,
|
|
94
|
+
J,
|
|
95
|
+
Y,
|
|
96
|
+
X,
|
|
97
|
+
Z,
|
|
98
|
+
Q
|
|
70
99
|
]
|
|
71
|
-
}),
|
|
100
|
+
}), g[47] = J, g[48] = Y, g[49] = X, g[50] = Z, g[51] = Q, g[52] = G, g[53] = q, g[54] = $) : $ = g[54], $;
|
|
72
101
|
};
|
|
102
|
+
function _temp(t) {
|
|
103
|
+
return t.trigger !== "manual";
|
|
104
|
+
}
|
|
73
105
|
export { WorkflowItem_default as default };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
1
|
+
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
2
2
|
import { useApiClient } from "./useApi.js";
|
|
3
3
|
import { useIsMobile } from "./use-mobile.js";
|
|
4
4
|
import { useAvailableEnvironments, useWorkflowConfig, useWorkspaceConfig } from "./useConfig.js";
|
package/dist/hooks/query-keys.js
CHANGED
|
@@ -7,11 +7,11 @@ function getHealthCacheKey(e) {
|
|
|
7
7
|
function getWorkspaceTypesCacheKey(e) {
|
|
8
8
|
return ["workspace-types", e];
|
|
9
9
|
}
|
|
10
|
-
function getWorkflowTypesCacheKey(e,
|
|
10
|
+
function getWorkflowTypesCacheKey(e, y) {
|
|
11
11
|
return [
|
|
12
12
|
"workflowTypes",
|
|
13
13
|
e,
|
|
14
|
-
|
|
14
|
+
y
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
17
|
function getAvailableEnvironmentsCacheKey(e) {
|
|
@@ -24,81 +24,102 @@ function getDashboardStatsCacheKey(e) {
|
|
|
24
24
|
e
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
|
-
function getWorkflowCacheKey(e,
|
|
27
|
+
function getWorkflowCacheKey(e, y) {
|
|
28
28
|
return [
|
|
29
29
|
"workflow",
|
|
30
30
|
e,
|
|
31
|
-
|
|
31
|
+
y
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
34
|
function getWorkflowsCacheKey(e) {
|
|
35
35
|
return ["workflows", e];
|
|
36
36
|
}
|
|
37
|
-
function getChildWorkflowsCacheKey(e,
|
|
37
|
+
function getChildWorkflowsCacheKey(e, y) {
|
|
38
38
|
return [
|
|
39
39
|
"childWorkflows",
|
|
40
40
|
e,
|
|
41
|
-
|
|
41
|
+
y
|
|
42
42
|
];
|
|
43
43
|
}
|
|
44
|
-
function getWorkflowConfigCacheKey(e,
|
|
44
|
+
function getWorkflowConfigCacheKey(e, y) {
|
|
45
45
|
return [
|
|
46
46
|
"workflowConfig",
|
|
47
47
|
e,
|
|
48
|
-
|
|
48
|
+
y
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
|
-
function getWorkflowSourceCacheKey(e,
|
|
51
|
+
function getWorkflowSourceCacheKey(e, y) {
|
|
52
52
|
return [
|
|
53
53
|
"workflowSource",
|
|
54
54
|
e,
|
|
55
|
-
|
|
55
|
+
y
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
|
-
function getWorkspaceCacheKey(e,
|
|
58
|
+
function getWorkspaceCacheKey(e, y) {
|
|
59
59
|
return [
|
|
60
60
|
"workspace",
|
|
61
61
|
e,
|
|
62
|
-
|
|
62
|
+
y
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
65
|
function getWorkspacesCacheKey(e) {
|
|
66
66
|
return ["workspaces", e];
|
|
67
67
|
}
|
|
68
|
-
function getDocumentCacheKey(e,
|
|
68
|
+
function getDocumentCacheKey(e, y) {
|
|
69
69
|
return [
|
|
70
70
|
"document",
|
|
71
71
|
e,
|
|
72
|
-
|
|
72
|
+
y
|
|
73
73
|
];
|
|
74
74
|
}
|
|
75
|
-
function getDocumentsCacheKey(e,
|
|
75
|
+
function getDocumentsCacheKey(e, y) {
|
|
76
76
|
return [
|
|
77
77
|
"documents",
|
|
78
78
|
e,
|
|
79
|
-
|
|
79
|
+
y
|
|
80
80
|
];
|
|
81
81
|
}
|
|
82
|
-
function getSecretsCacheKey(e,
|
|
82
|
+
function getSecretsCacheKey(e, y) {
|
|
83
83
|
return [
|
|
84
84
|
"secrets",
|
|
85
85
|
e,
|
|
86
|
-
|
|
86
|
+
y
|
|
87
87
|
];
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function getGitStatusCacheKey(e, y) {
|
|
90
|
+
return [
|
|
91
|
+
"gitStatus",
|
|
92
|
+
e,
|
|
93
|
+
y
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
function getGitLogCacheKey(e, y) {
|
|
97
|
+
return [
|
|
98
|
+
"gitLog",
|
|
99
|
+
e,
|
|
100
|
+
y
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
function getGitRemoteCacheKey(e, y) {
|
|
104
|
+
return [
|
|
105
|
+
"gitRemote",
|
|
106
|
+
e,
|
|
107
|
+
y
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
function getFileTreeCacheKey(e, y) {
|
|
90
111
|
return [
|
|
91
112
|
"fileTree",
|
|
92
113
|
e,
|
|
93
|
-
|
|
114
|
+
y
|
|
94
115
|
];
|
|
95
116
|
}
|
|
96
|
-
function getFileContentCacheKey(e,
|
|
117
|
+
function getFileContentCacheKey(e, y, b) {
|
|
97
118
|
return [
|
|
98
119
|
"fileContent",
|
|
99
120
|
e,
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
y,
|
|
122
|
+
b
|
|
102
123
|
];
|
|
103
124
|
}
|
|
104
|
-
export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
|
|
125
|
+
export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
|
package/dist/index.d.ts
CHANGED
|
@@ -297,6 +297,23 @@ declare function createApi(http: AxiosInstance): {
|
|
|
297
297
|
path: string;
|
|
298
298
|
}) => Promise<FileContent>;
|
|
299
299
|
};
|
|
300
|
+
git: {
|
|
301
|
+
getStatus: (params: {
|
|
302
|
+
workspaceId: string;
|
|
303
|
+
}) => Promise<GitStatusResponse>;
|
|
304
|
+
getLog: (params: {
|
|
305
|
+
workspaceId: string;
|
|
306
|
+
limit?: number;
|
|
307
|
+
}) => Promise<GitLogResponse>;
|
|
308
|
+
getRemote: (params: {
|
|
309
|
+
workspaceId: string;
|
|
310
|
+
}) => Promise<GitRemoteResponse | null>;
|
|
311
|
+
removeRemote: (params: {
|
|
312
|
+
workspaceId: string;
|
|
313
|
+
}) => Promise<{
|
|
314
|
+
success: boolean;
|
|
315
|
+
}>;
|
|
316
|
+
};
|
|
300
317
|
processor: {
|
|
301
318
|
runWorkflow: (params: {
|
|
302
319
|
workflowId: string;
|
|
@@ -754,6 +771,12 @@ export declare function getFileContentCacheKey(envKey: string, workflowId: strin
|
|
|
754
771
|
|
|
755
772
|
export declare function getFileTreeCacheKey(envKey: string, workflowId: string): string[];
|
|
756
773
|
|
|
774
|
+
export declare function getGitLogCacheKey(envKey: string, workspaceId: string): string[];
|
|
775
|
+
|
|
776
|
+
export declare function getGitRemoteCacheKey(envKey: string, workspaceId: string): string[];
|
|
777
|
+
|
|
778
|
+
export declare function getGitStatusCacheKey(envKey: string, workspaceId: string): string[];
|
|
779
|
+
|
|
757
780
|
export declare function getHealthCacheKey(envKey: string): string[];
|
|
758
781
|
|
|
759
782
|
/**
|
|
@@ -786,6 +809,31 @@ export declare function getWorkspacesCacheKey(envKey: string): string[];
|
|
|
786
809
|
|
|
787
810
|
export declare function getWorkspaceTypesCacheKey(envKey: string): string[];
|
|
788
811
|
|
|
812
|
+
declare interface GitCommit {
|
|
813
|
+
hash: string;
|
|
814
|
+
shortHash: string;
|
|
815
|
+
message: string;
|
|
816
|
+
author: string;
|
|
817
|
+
date: string;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
declare interface GitLogResponse {
|
|
821
|
+
commits: GitCommit[];
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
declare interface GitRemoteResponse {
|
|
825
|
+
name: string;
|
|
826
|
+
url: string;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
declare interface GitStatusResponse {
|
|
830
|
+
branch: string;
|
|
831
|
+
staged: string[];
|
|
832
|
+
modified: string[];
|
|
833
|
+
untracked: string[];
|
|
834
|
+
deleted: string[];
|
|
835
|
+
}
|
|
836
|
+
|
|
789
837
|
export declare const GoogleLogo: default_2.FC<GoogleLogoProps>;
|
|
790
838
|
|
|
791
839
|
declare interface GoogleLogoProps {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./hooks/query-keys.js";
|
|
1
|
+
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./hooks/query-keys.js";
|
|
2
2
|
import { createApiClient } from "./services/createApiClient.js";
|
|
3
3
|
import { eventBus } from "./services/eventEmitter.js";
|
|
4
4
|
import "./services/index.js";
|
|
@@ -89,4 +89,4 @@ import "./features/secrets/index.js";
|
|
|
89
89
|
import EnvironmentEmbedRoot from "./app/EnvironmentEmbedRoot.js";
|
|
90
90
|
import { StudioSidebar } from "./components/layout/StudioSidebar.js";
|
|
91
91
|
import "./features/health/index.js";
|
|
92
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CreateWorkspace_default as CreateWorkspace, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, FeatureRegistryProvider, GoogleLogo, Input, InvalidationEventsProvider, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, SseProvider, StudioLandingPage, StudioPreferencesProvider, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkflowDebugPage_default as WorkflowDebugPage, WorkspacePage_default as WorkspacePage, WorkspaceRunsPage_default as WorkspaceRunsPage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, fileExplorerFeature, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey, secretsFeature, useApiClient, useAvailableEnvironments, useBatchDeleteWorkflows, useBatchDeleteWorkspaces, useChildWorkflows, useComponentOverrides, useCreateWorkflow, useCreateWorkspace, useDeleteWorkflow, useDeleteWorkspace, useFilterWorkflows, useFilterWorkspaces, useIsMobile, useOptionalStudioPreferences, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useStudioOptional, useStudioPreferences, useUpdateWorkflow, useUpdateWorkspace, useWorkflow, useWorkflowCheckpoints, useWorkflowConfig, useWorkflowConfigByName, useWorkflowSource, useWorkspace, useWorkspaceConfig };
|
|
92
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, CompletionMessagePaper_default as CompletionMessagePaper, ComponentOverridesProvider, ConfirmDialog_default as ConfirmDialog, CreateWorkspace_default as CreateWorkspace, CustomListView_default as CustomItemListView, DashboardPage, DataList, DataTable, DataTableBatchAction_default as DataTableBatchActions, DataTableFilters_default as DataTableFilters, DataTablePagination_default as DataTablePagination, DataTableToolbar_default as DataTableToolbar, DebugPage_default as DebugPage, DebugWorkflowDetailsPage, DebugWorkflowsPage, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiscordLogo, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmbedWorkbenchPage, EnvironmentEmbedRoot, EnvironmentSlotSelector, ErrorAlert_default as ErrorAlert, ErrorBoundary, ErrorSnackbar_default as ErrorSnackbar, FeatureRegistryProvider, GoogleLogo, Input, InvalidationEventsProvider, ListView_default as ItemListView, Label, LoadingCentered_default as LoadingCentered, LocalHealthCheck_default as LocalHealthCheck, LocalRouter, MainLayout_default as MainLayout, PageBreadcrumbs_default as PageBreadcrumbs, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewWorkbenchPage, RadioGroup, RadioGroupItem, RunsListPage, RunsPage, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Snackbar_default as Snackbar, SseProvider, StudioLandingPage, StudioPreferencesProvider, StudioProvider, StudioSidebar, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WorkbenchPage, WorkflowDebugPage_default as WorkflowDebugPage, WorkspacePage_default as WorkspacePage, WorkspaceRunsPage_default as WorkspaceRunsPage, WorkspacesPage, badgeVariants, buttonVariants, createApiClient, eventBus, fileExplorerFeature, getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey, secretsFeature, useApiClient, useAvailableEnvironments, useBatchDeleteWorkflows, useBatchDeleteWorkspaces, useChildWorkflows, useComponentOverrides, useCreateWorkflow, useCreateWorkspace, useDeleteWorkflow, useDeleteWorkspace, useFilterWorkflows, useFilterWorkspaces, useIsMobile, useOptionalStudioPreferences, useRouter, useSetFavouriteWorkspace, useSidebar, useStudio, useStudioOptional, useStudioPreferences, useUpdateWorkflow, useUpdateWorkspace, useWorkflow, useWorkflowCheckpoints, useWorkflowConfig, useWorkflowConfigByName, useWorkflowSource, useWorkspace, useWorkspaceConfig };
|
|
@@ -20,10 +20,8 @@ var WorkspacePage_default = () => {
|
|
|
20
20
|
}
|
|
21
21
|
let t;
|
|
22
22
|
if (_[0] !== x.data || _[1] !== C) {
|
|
23
|
-
let
|
|
24
|
-
_[3] === C ?
|
|
25
|
-
let g = x.data.find(h)?.ui;
|
|
26
|
-
t = (g?.widgets ?? g?.actions)?.find(_temp), _[0] = x.data, _[1] = C, _[2] = t;
|
|
23
|
+
let g;
|
|
24
|
+
_[3] === C ? g = _[4] : (g = (t) => t.className === C.className, _[3] = C, _[4] = g), t = x.data.find(g)?.ui?.widgets?.find(_temp), _[0] = x.data, _[1] = C, _[2] = t;
|
|
27
25
|
} else t = _[2];
|
|
28
26
|
w = t;
|
|
29
27
|
}
|
|
@@ -5,29 +5,14 @@ import { useMe } from "../hooks/useAuth.js";
|
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { useEffect, useRef } from "react";
|
|
7
7
|
function SseProvider() {
|
|
8
|
-
let
|
|
9
|
-
return
|
|
8
|
+
let e = c(5), { environment: l } = useStudio(), { data: u, isSuccess: d } = useMe(), f = useRef(null), p, m;
|
|
9
|
+
return e[0] !== l.url || e[1] !== d || e[2] !== u ? (p = () => {
|
|
10
10
|
if (l.url && d && u) {
|
|
11
11
|
f.current &&= (f.current.close(), null);
|
|
12
|
-
let
|
|
12
|
+
let e = `${l.url}/api/v1/sse/stream`, o = new EventSource(e, { withCredentials: !0 });
|
|
13
13
|
return f.current = o, o.onopen = _temp, o.onerror = () => {
|
|
14
14
|
o.readyState === EventSource.CLOSED && console.warn("SSE connection closed. Refresh the page if it does not recover.");
|
|
15
|
-
},
|
|
16
|
-
"workflow.created",
|
|
17
|
-
"workflow.updated",
|
|
18
|
-
"document.created",
|
|
19
|
-
"workspace.updated"
|
|
20
|
-
].forEach((a) => {
|
|
21
|
-
o.addEventListener(a, (o) => {
|
|
22
|
-
try {
|
|
23
|
-
let a = JSON.parse(o.data);
|
|
24
|
-
eventBus.emit(a.type, a);
|
|
25
|
-
} catch (e) {
|
|
26
|
-
let o = e;
|
|
27
|
-
console.error(`Error parsing SSE event [${a}]:`, o);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}), () => {
|
|
15
|
+
}, o.onmessage = _temp2, () => {
|
|
31
16
|
o.close(), f.current = null;
|
|
32
17
|
};
|
|
33
18
|
}
|
|
@@ -35,7 +20,16 @@ function SseProvider() {
|
|
|
35
20
|
l.url,
|
|
36
21
|
d,
|
|
37
22
|
u
|
|
38
|
-
],
|
|
23
|
+
], e[0] = l.url, e[1] = d, e[2] = u, e[3] = p, e[4] = m) : (p = e[3], m = e[4]), useEffect(p, m), null;
|
|
24
|
+
}
|
|
25
|
+
function _temp2(o) {
|
|
26
|
+
try {
|
|
27
|
+
let s = JSON.parse(o.data);
|
|
28
|
+
eventBus.emit(s.type, s);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
let o = e;
|
|
31
|
+
console.error("Error parsing SSE event:", o);
|
|
32
|
+
}
|
|
39
33
|
}
|
|
40
34
|
function _temp() {
|
|
41
35
|
console.log("SSE connection established");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopstack/loopstack-studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"repository": "loopstack-ai/loopstack-studio",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@fontsource/roboto": "^5.2.10",
|
|
28
28
|
"@hookform/resolvers": "^5.2.2",
|
|
29
|
-
"@loopstack/contracts": "^0.
|
|
29
|
+
"@loopstack/contracts": "^0.28.0",
|
|
30
30
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
31
31
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
32
32
|
"@radix-ui/react-avatar": "^1.1.11",
|