@loopstack/loopstack-studio 0.29.4 → 0.30.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/_virtual/rolldown_runtime.js +3 -1
- package/dist/api/config.js +5 -4
- package/dist/api/environments.js +5 -1
- package/dist/api/processor.js +4 -1
- package/dist/app/EnvironmentEmbedRoot.js +22 -30
- package/dist/components/ai-elements/code-block.js +4 -4
- package/dist/components/dynamic-form/CodeContent.js +1 -1
- package/dist/components/dynamic-form/Form.js +31 -51
- package/dist/components/dynamic-form/FormBody.js +1 -1
- package/dist/components/motion/FadeIn.js +72 -0
- package/dist/components/motion/StreamingText.js +49 -0
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui-widgets/UiWidget.js +11 -10
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
- package/dist/events/sse-client-events.js +7 -1
- package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
- package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
- package/dist/features/documents/DocumentRenderer.js +18 -17
- package/dist/features/documents/components/DocumentItem.js +42 -20
- package/dist/features/documents/components/DocumentList.js +34 -36
- package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
- package/dist/features/documents/document-details/DocumentDetails.js +577 -377
- package/dist/features/documents/document-details/PromptDetails.js +118 -130
- package/dist/features/documents/document-details/document-debug-utils.js +100 -0
- package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
- package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
- package/dist/features/documents/renderers/LlmMessage.js +52 -47
- package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
- package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
- package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
- package/dist/features/feature-registry/available-features.js +12 -0
- package/dist/features/feature-registry/index.js +2 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
- package/dist/features/git/components/GitBranchBadge.js +31 -0
- package/dist/features/git/components/GitCommitList.js +46 -0
- package/dist/features/git/components/GitRemoteStatus.js +84 -0
- package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
- package/dist/features/git/git-feature.js +12 -0
- package/dist/features/git/hooks/useGit.js +78 -0
- package/dist/features/git/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
- package/dist/features/runs/Runs.js +4 -4
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
- package/dist/features/workbench/Workbench.js +25 -33
- package/dist/features/workbench/WorkflowItem.js +9 -9
- package/dist/features/workbench/WorkflowList.js +61 -62
- package/dist/features/workbench/components/NewRunDialog.js +237 -209
- package/dist/features/workbench/components/RecentRunItem.js +3 -3
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +11 -10
- package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
- package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
- package/dist/features/workbench/index.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
- package/dist/features/workspaces/Workspaces.js +134 -125
- package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
- package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
- package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
- package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
- package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +43 -30
- package/dist/hooks/useConfig.js +28 -22
- package/dist/hooks/useEnvironments.js +27 -2
- package/dist/hooks/useProcessor.js +14 -1
- package/dist/hooks/useWorkflows.js +4 -4
- package/dist/index.d.ts +116 -15
- package/dist/index.js +9 -8
- package/dist/node_modules/d3/src/index.js +13 -13
- package/dist/node_modules/d3-scale/src/continuous.js +16 -16
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
- package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
- package/dist/node_modules/motion/dist/es/react.js +9 -2
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +76 -106
- package/dist/pages/EmbedWorkbenchPage.js +1 -1
- package/dist/pages/PreviewWorkbenchPage.js +6 -6
- package/dist/pages/WorkbenchPage.js +43 -47
- package/dist/pages/WorkflowDebugPage.js +6 -12
- package/dist/pages/WorkspacePage.js +40 -66
- package/dist/pages/WorkspaceRunsPage.js +24 -31
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { __name } from "./chunk-AGHRB4JF.js";
|
|
2
1
|
import select_default from "../../../../d3-selection/src/select.js";
|
|
2
|
+
import { __name } from "./chunk-AGHRB4JF.js";
|
|
3
3
|
import "../../../../d3/src/index.js";
|
|
4
|
-
var getDiagramElement = /* @__PURE__ */ __name((
|
|
4
|
+
var getDiagramElement = /* @__PURE__ */ __name((t, n) => {
|
|
5
5
|
let r;
|
|
6
|
-
return n === "sandbox" && (r = select_default("#i" +
|
|
6
|
+
return n === "sandbox" && (r = select_default("#i" + t)), select_default(n === "sandbox" ? r.nodes()[0].contentDocument.body : "body").select(`[id="${t}"]`);
|
|
7
7
|
}, "getDiagramElement");
|
|
8
8
|
export { getDiagramElement };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import select_default from "../../../../d3-selection/src/select.js";
|
|
1
2
|
import { __name, log } from "./chunk-AGHRB4JF.js";
|
|
2
3
|
import { assignWithDepth_default, common_default, detectType, directiveRegex, sanitizeDirective } from "./chunk-CSCIHK7Q.js";
|
|
3
|
-
import select_default from "../../../../d3-selection/src/select.js";
|
|
4
4
|
import linear_default from "../../../../d3-shape/src/curve/linear.js";
|
|
5
5
|
import { bumpX, bumpY } from "../../../../d3-shape/src/curve/bump.js";
|
|
6
6
|
import basis_default from "../../../../d3-shape/src/curve/basis.js";
|
|
@@ -43,33 +43,33 @@ var import_dist = require_dist(), ZERO_WIDTH_SPACE = "", d3CurveTypes = {
|
|
|
43
43
|
curveStepAfter: stepAfter,
|
|
44
44
|
curveStepBefore: stepBefore
|
|
45
45
|
}, directiveWithoutOpen = /\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi, detectInit = /* @__PURE__ */ __name(function(p, H) {
|
|
46
|
-
let
|
|
47
|
-
if (Array.isArray(
|
|
48
|
-
let p =
|
|
49
|
-
sanitizeDirective(p),
|
|
50
|
-
} else
|
|
51
|
-
if (!
|
|
52
|
-
let
|
|
53
|
-
return
|
|
54
|
-
}, "detectInit"), detectDirective = /* @__PURE__ */ __name(function(p,
|
|
46
|
+
let U = detectDirective(p, /(?:init\b)|(?:initialize\b)/), G = {};
|
|
47
|
+
if (Array.isArray(U)) {
|
|
48
|
+
let p = U.map((p) => p.args);
|
|
49
|
+
sanitizeDirective(p), G = assignWithDepth_default(G, [...p]);
|
|
50
|
+
} else G = U.args;
|
|
51
|
+
if (!G) return;
|
|
52
|
+
let q = detectType(p, H), Y = "config";
|
|
53
|
+
return G[Y] !== void 0 && (q === "flowchart-v2" && (q = "flowchart"), G[q] = G[Y], delete G[Y]), G;
|
|
54
|
+
}, "detectInit"), detectDirective = /* @__PURE__ */ __name(function(p, H = null) {
|
|
55
55
|
try {
|
|
56
56
|
let W = RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*
|
|
57
57
|
`, "ig");
|
|
58
|
-
p = p.trim().replace(W, "").replace(/'/gm, "\""), log.debug(`Detecting diagram directive${
|
|
59
|
-
let G,
|
|
60
|
-
for (; (G = directiveRegex.exec(p)) !== null;) if (G.index === directiveRegex.lastIndex && directiveRegex.lastIndex++, G && !
|
|
58
|
+
p = p.trim().replace(W, "").replace(/'/gm, "\""), log.debug(`Detecting diagram directive${H === null ? "" : " type:" + H} based on the text:${p}`);
|
|
59
|
+
let G, K = [];
|
|
60
|
+
for (; (G = directiveRegex.exec(p)) !== null;) if (G.index === directiveRegex.lastIndex && directiveRegex.lastIndex++, G && !H || H && G[1]?.match(H) || H && G[2]?.match(H)) {
|
|
61
61
|
let p = G[1] ? G[1] : G[2], H = G[3] ? G[3].trim() : G[4] ? JSON.parse(G[4].trim()) : null;
|
|
62
|
-
|
|
62
|
+
K.push({
|
|
63
63
|
type: p,
|
|
64
64
|
args: H
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
return
|
|
67
|
+
return K.length === 0 ? {
|
|
68
68
|
type: p,
|
|
69
69
|
args: null
|
|
70
|
-
} :
|
|
70
|
+
} : K.length === 1 ? K[0] : K;
|
|
71
71
|
} catch (W) {
|
|
72
|
-
return log.error(`ERROR: ${W.message} - Unable to parse directive type: '${
|
|
72
|
+
return log.error(`ERROR: ${W.message} - Unable to parse directive type: '${H}' based on the text: '${p}'`), {
|
|
73
73
|
type: void 0,
|
|
74
74
|
args: null
|
|
75
75
|
};
|
|
@@ -89,13 +89,13 @@ function formatUrl(p, H) {
|
|
|
89
89
|
if (U) return H.securityLevel === "loose" ? U : (0, import_dist.sanitizeUrl)(U);
|
|
90
90
|
}
|
|
91
91
|
__name(formatUrl, "formatUrl");
|
|
92
|
-
var runFunc = /* @__PURE__ */ __name((p, ...
|
|
92
|
+
var runFunc = /* @__PURE__ */ __name((p, ...H) => {
|
|
93
93
|
let W = p.split("."), G = W.length - 1, K = W[G], q = window;
|
|
94
|
-
for (let
|
|
94
|
+
for (let H = 0; H < G; H++) if (q = q[W[H]], !q) {
|
|
95
95
|
log.error(`Function name: ${p} not found in window`);
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
q[K](...
|
|
98
|
+
q[K](...H);
|
|
99
99
|
}, "runFunc");
|
|
100
100
|
function distance(p, H) {
|
|
101
101
|
return !p || !H ? 0 : Math.sqrt((H.x - p.x) ** 2 + (H.y - p.y) ** 2);
|
|
@@ -138,22 +138,22 @@ var roundNumber = /* @__PURE__ */ __name((p, H = 2) => {
|
|
|
138
138
|
U = H;
|
|
139
139
|
}
|
|
140
140
|
throw Error("Could not find a suitable point for the given distance");
|
|
141
|
-
}, "calculatePoint"), calcCardinalityPosition = /* @__PURE__ */ __name((p,
|
|
142
|
-
log.info(`our points ${JSON.stringify(
|
|
143
|
-
let G = calculatePoint(
|
|
141
|
+
}, "calculatePoint"), calcCardinalityPosition = /* @__PURE__ */ __name((p, H, W) => {
|
|
142
|
+
log.info(`our points ${JSON.stringify(H)}`), H[0] !== W && (H = H.reverse());
|
|
143
|
+
let G = calculatePoint(H, 25), K = p ? 10 : 5, q = Math.atan2(H[0].y - G.y, H[0].x - G.x), J = {
|
|
144
144
|
x: 0,
|
|
145
145
|
y: 0
|
|
146
146
|
};
|
|
147
|
-
return J.x = Math.sin(q) * K + (
|
|
147
|
+
return J.x = Math.sin(q) * K + (H[0].x + G.x) / 2, J.y = -Math.cos(q) * K + (H[0].y + G.y) / 2, J;
|
|
148
148
|
}, "calcCardinalityPosition");
|
|
149
|
-
function calcTerminalLabelPosition(p,
|
|
149
|
+
function calcTerminalLabelPosition(p, H, W) {
|
|
150
150
|
let G = structuredClone(W);
|
|
151
|
-
log.info("our points", G),
|
|
151
|
+
log.info("our points", G), H !== "start_left" && H !== "start_right" && G.reverse();
|
|
152
152
|
let K = calculatePoint(G, 25 + p), q = 10 + p * .5, J = Math.atan2(G[0].y - K.y, G[0].x - K.x), Y = {
|
|
153
153
|
x: 0,
|
|
154
154
|
y: 0
|
|
155
155
|
};
|
|
156
|
-
return
|
|
156
|
+
return H === "start_left" ? (Y.x = Math.sin(J + Math.PI) * q + (G[0].x + K.x) / 2, Y.y = -Math.cos(J + Math.PI) * q + (G[0].y + K.y) / 2) : H === "end_right" ? (Y.x = Math.sin(J - Math.PI) * q + (G[0].x + K.x) / 2 - 5, Y.y = -Math.cos(J - Math.PI) * q + (G[0].y + K.y) / 2 - 5) : H === "end_left" ? (Y.x = Math.sin(J) * q + (G[0].x + K.x) / 2 - 5, Y.y = -Math.cos(J) * q + (G[0].y + K.y) / 2 - 5) : (Y.x = Math.sin(J) * q + (G[0].x + K.x) / 2, Y.y = -Math.cos(J) * q + (G[0].y + K.y) / 2), Y;
|
|
157
157
|
}
|
|
158
158
|
__name(calcTerminalLabelPosition, "calcTerminalLabelPosition");
|
|
159
159
|
function getStylesFromArray(p) {
|
|
@@ -188,8 +188,8 @@ var random = /* @__PURE__ */ __name((p) => makeRandomHex(p.length), "random"), g
|
|
|
188
188
|
text: ""
|
|
189
189
|
};
|
|
190
190
|
}, "getTextObj"), drawSimpleText = /* @__PURE__ */ __name(function(p, H) {
|
|
191
|
-
let U = H.text.replace(common_default.lineBreakRegex, " "), [,
|
|
192
|
-
K.attr("x", H.x), K.attr("y", H.y), K.style("text-anchor", H.anchor), K.style("font-family", H.fontFamily), K.style("font-size",
|
|
191
|
+
let U = H.text.replace(common_default.lineBreakRegex, " "), [, W] = parseFontSize(H.fontSize), K = p.append("text");
|
|
192
|
+
K.attr("x", H.x), K.attr("y", H.y), K.style("text-anchor", H.anchor), K.style("font-family", H.fontFamily), K.style("font-size", W), K.style("font-weight", H.fontWeight), K.attr("fill", H.fill), H.class !== void 0 && K.attr("class", H.class);
|
|
193
193
|
let q = K.append("tspan");
|
|
194
194
|
return q.attr("x", H.x + H.textMargin * 2), q.attr("fill", H.fill), q.text(U), K;
|
|
195
195
|
}, "drawSimpleText"), wrapLabel = memoize((p, H, U) => {
|
|
@@ -199,14 +199,14 @@ var random = /* @__PURE__ */ __name((p) => makeRandomHex(p.length), "random"), g
|
|
|
199
199
|
fontFamily: "Arial",
|
|
200
200
|
joinWith: "<br/>"
|
|
201
201
|
}, U), common_default.lineBreakRegex.test(p))) return p;
|
|
202
|
-
let
|
|
203
|
-
return
|
|
202
|
+
let W = p.split(" ").filter(Boolean), K = [], q = "";
|
|
203
|
+
return W.forEach((p, G) => {
|
|
204
204
|
let J = calculateTextWidth(`${p} `, U), Y = calculateTextWidth(q, U);
|
|
205
205
|
if (J > H) {
|
|
206
206
|
let { hyphenatedStrings: W, remainingWord: G } = breakString(p, H, "-", U);
|
|
207
207
|
K.push(q, ...W), q = G;
|
|
208
208
|
} else Y + J >= H ? (K.push(q), q = p) : q = [q, p].filter(Boolean).join(" ");
|
|
209
|
-
|
|
209
|
+
G + 1 === W.length && K.push(q);
|
|
210
210
|
}), K.filter((p) => p !== "").join(U.joinWith);
|
|
211
211
|
}, (p, H, U) => `${p}${H}${U.fontSize}${U.fontWeight}${U.fontFamily}${U.joinWith}`), breakString = memoize((p, H, U = "-", W) => {
|
|
212
212
|
W = Object.assign({
|
|
@@ -235,13 +235,13 @@ function calculateTextWidth(p, H) {
|
|
|
235
235
|
return calculateTextDimensions(p, H).width;
|
|
236
236
|
}
|
|
237
237
|
__name(calculateTextWidth, "calculateTextWidth");
|
|
238
|
-
var calculateTextDimensions = memoize((
|
|
239
|
-
let { fontSize:
|
|
240
|
-
if (!
|
|
238
|
+
var calculateTextDimensions = memoize((H, U) => {
|
|
239
|
+
let { fontSize: W = 12, fontFamily: K = "Arial", fontWeight: q = 400 } = U;
|
|
240
|
+
if (!H) return {
|
|
241
241
|
width: 0,
|
|
242
242
|
height: 0
|
|
243
243
|
};
|
|
244
|
-
let [,
|
|
244
|
+
let [, J] = parseFontSize(W), Y = ["sans-serif", K], X = H.split(common_default.lineBreakRegex), Z = [], Q = select_default("body");
|
|
245
245
|
if (!Q.remove) return {
|
|
246
246
|
width: 0,
|
|
247
247
|
height: 0,
|
|
@@ -257,7 +257,7 @@ var calculateTextDimensions = memoize((p, H) => {
|
|
|
257
257
|
for (let W of X) {
|
|
258
258
|
let G = getTextObj();
|
|
259
259
|
G.text = W || "";
|
|
260
|
-
let
|
|
260
|
+
let K = drawSimpleText($, G).style("font-size", J).style("font-weight", q).style("font-family", p), Y = (K._groups || K)[0][0].getBBox();
|
|
261
261
|
if (Y.width === 0 && Y.height === 0) throw Error("svg element not in render tree");
|
|
262
262
|
U.width = Math.round(Math.max(U.width, Y.width)), H = Math.round(Y.height), U.height += H, U.lineHeight = Math.round(Math.max(U.lineHeight, H));
|
|
263
263
|
}
|