@loopstack/loopstack-studio 0.35.1 → 0.37.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/features/documents/DocumentRenderer.js +7 -7
- package/dist/features/documents/renderers/DocumentFormRenderer.js +1 -1
- package/dist/features/documents/renderers/DocumentMessageRenderer.js +23 -9
- package/dist/features/documents/renderers/LlmMessage.js +90 -50
- package/dist/features/file-explorer/components/FileExplorerPanel.js +66 -73
- package/dist/features/file-explorer/hooks/useFileExplorer.js +29 -25
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +53 -53
- package/dist/features/git/components/WorkbenchGitPanel.js +36 -33
- package/dist/features/git/hooks/useGit.js +36 -33
- package/dist/features/oauth/OAuthCallbackPage.js +2 -0
- package/dist/features/run-view/RunView.js +153 -0
- package/dist/features/run-view/Transcript.js +127 -0
- package/dist/features/run-view/prompts/FormPrompt.js +129 -0
- package/dist/features/run-view/prompts/OAuthPrompt.js +94 -0
- package/dist/features/run-view/prompts/SandboxRunButton.js +35 -0
- package/dist/features/run-view/prompts/SecretPrompt.js +69 -0
- package/dist/features/run-view/prompts/SimplePrompts.js +196 -0
- package/dist/features/run-view/prompts/cards.js +90 -0
- package/dist/features/run-view/prompts/registry.js +16 -0
- package/dist/features/run-view/transcript.js +24 -0
- package/dist/features/run-view/useRunPrompts.js +111 -0
- package/dist/features/run-view/useRunTree.js +59 -0
- package/dist/features/run-view/useTreeLlmStreams.js +91 -0
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +1 -1
- package/dist/features/workbench/WorkflowList.js +111 -52
- package/dist/features/workbench/components/EnvironmentSelector.js +46 -0
- package/dist/features/workbench/components/NewRunDialog.js +1 -1
- package/dist/features/workbench/index.js +1 -1
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +68 -56
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +351 -228
- package/dist/packages/client/dist/resources/workflows.js +2 -1
- package/dist/packages/client/dist/stream/invalidations.js +9 -2
- package/dist/packages/client/dist/stream/stream.js +73 -28
- package/dist/packages/contracts/dist/park-view/index.js +2 -0
- package/dist/packages/contracts/dist/park-view/park-view.rules.js +102 -0
- package/dist/packages/contracts/dist/park-view/park-view.types.js +15 -0
- package/dist/packages/contracts/dist/types/types/ui-message.type.js +15 -2
- package/dist/pages/PreviewWorkbenchPage.js +23 -23
- package/dist/providers/StudioPreferencesProvider.js +2 -1
- package/package.json +4 -4
|
@@ -1,77 +1,89 @@
|
|
|
1
1
|
import { useWorkspaceEnvironments } from "../../../hooks/useEnvironments.js";
|
|
2
2
|
import { useOptionalStudioPreferences } from "../../../providers/StudioPreferencesProvider.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
4
|
+
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
var WorkbenchLayoutContext = createContext(null);
|
|
7
|
-
function WorkbenchLayoutProvider(
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
function WorkbenchLayoutProvider(u) {
|
|
8
|
+
let d = c(39), { children: f, workspaceId: p, workflow: m, getPreviewUrl: h, getEnvironmentPreviewUrl: g } = u, _ = useOptionalStudioPreferences(), { data: v } = useWorkspaceEnvironments(p), [y, b] = useState(null), x;
|
|
9
|
+
d[0] === Symbol.for("react.memo_cache_sentinel") ? (x = {}, d[0] = x) : x = d[0];
|
|
10
|
+
let [S, C] = useState(x), w = _ ? _.preferences.activePanel : y, T = _ ? _.preferences.panelSizes : S, [E, D] = useState(null), [O, k] = useState(""), A, j;
|
|
11
|
+
d[1] !== v || d[2] !== O ? (A = () => {
|
|
12
|
+
if (!v?.length) return;
|
|
13
|
+
let e = v.find((e) => e.slotId === O);
|
|
14
|
+
e?.status !== "running" && k((v.find(_temp) ?? e ?? v[0]).slotId);
|
|
15
|
+
}, j = [v, O], d[1] = v, d[2] = O, d[3] = A, d[4] = j) : (A = d[3], j = d[4]), useEffect(A, j);
|
|
16
|
+
let M;
|
|
17
|
+
d[5] === v ? M = d[6] : (M = v === void 0 || v.some(_temp2), d[5] = v, d[6] = M);
|
|
18
|
+
let N = M, P;
|
|
19
|
+
d[7] === Symbol.for("react.memo_cache_sentinel") ? (P = {
|
|
14
20
|
runs: "medium",
|
|
15
21
|
preview: "medium",
|
|
16
22
|
files: "medium",
|
|
17
23
|
environment: "small"
|
|
18
|
-
},
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
let P = N, F;
|
|
24
|
-
l[6] !== S || l[7] !== P ? (F = (e) => {
|
|
25
|
-
P(S === e ? null : e);
|
|
26
|
-
}, l[6] = S, l[7] = P, l[8] = F) : F = l[8];
|
|
27
|
-
let I = F, L;
|
|
28
|
-
l[9] === P ? L = l[10] : (L = () => {
|
|
29
|
-
P(null);
|
|
30
|
-
}, l[9] = P, l[10] = L);
|
|
24
|
+
}, d[7] = P) : P = d[7];
|
|
25
|
+
let F = P, I = w ? T[w] ?? F[w] ?? "small" : "small", L;
|
|
26
|
+
d[8] === _ ? L = d[9] : (L = (e) => {
|
|
27
|
+
_ ? _.setPreference("activePanel", e) : b(e);
|
|
28
|
+
}, d[8] = _, d[9] = L);
|
|
31
29
|
let R = L, z;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
...C,
|
|
36
|
-
[S]: e
|
|
37
|
-
};
|
|
38
|
-
h ? h.setPreference("panelSizes", o) : x(o);
|
|
39
|
-
}, l[11] = S, l[12] = C, l[13] = h, l[14] = z) : z = l[14];
|
|
30
|
+
d[10] !== w || d[11] !== R ? (z = (e) => {
|
|
31
|
+
R(w === e ? null : e);
|
|
32
|
+
}, d[10] = w, d[11] = R, d[12] = z) : z = d[12];
|
|
40
33
|
let B = z, V;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
34
|
+
d[13] === R ? V = d[14] : (V = () => {
|
|
35
|
+
R(null);
|
|
36
|
+
}, d[13] = R, d[14] = V);
|
|
44
37
|
let H = V, U;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
panelSize: M,
|
|
54
|
-
togglePanel: I,
|
|
55
|
-
closePanel: R,
|
|
56
|
-
setPanelSize: B,
|
|
57
|
-
selectedSlotId: E,
|
|
58
|
-
setSelectedSlotId: D,
|
|
59
|
-
openPreviewWithEnvironment: H,
|
|
60
|
-
activeSectionId: w,
|
|
61
|
-
setActiveSectionId: T
|
|
62
|
-
}, l[17] = S, l[18] = w, l[19] = R, l[20] = g, l[21] = m, l[22] = p, l[23] = H, l[24] = M, l[25] = k, l[26] = E, l[27] = B, l[28] = I, l[29] = f, l[30] = d, l[31] = U) : U = l[31];
|
|
38
|
+
d[15] !== w || d[16] !== T || d[17] !== _ ? (U = (e) => {
|
|
39
|
+
if (!w) return;
|
|
40
|
+
let l = {
|
|
41
|
+
...T,
|
|
42
|
+
[w]: e
|
|
43
|
+
};
|
|
44
|
+
_ ? _.setPreference("panelSizes", l) : C(l);
|
|
45
|
+
}, d[15] = w, d[16] = T, d[17] = _, d[18] = U) : U = d[18];
|
|
63
46
|
let W = U, G;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
47
|
+
d[19] === R ? G = d[20] : (G = (e) => {
|
|
48
|
+
k(e), R("preview");
|
|
49
|
+
}, d[19] = R, d[20] = G);
|
|
50
|
+
let K = G, q;
|
|
51
|
+
d[21] !== w || d[22] !== E || d[23] !== H || d[24] !== v || d[25] !== g || d[26] !== h || d[27] !== K || d[28] !== I || d[29] !== N || d[30] !== O || d[31] !== W || d[32] !== B || d[33] !== m || d[34] !== p ? (q = {
|
|
52
|
+
workspaceId: p,
|
|
53
|
+
workflow: m,
|
|
54
|
+
previewPanelEnabled: N,
|
|
55
|
+
getPreviewUrl: h,
|
|
56
|
+
getEnvironmentPreviewUrl: g,
|
|
57
|
+
environments: v,
|
|
58
|
+
activePanel: w,
|
|
59
|
+
panelSize: I,
|
|
60
|
+
togglePanel: B,
|
|
61
|
+
closePanel: H,
|
|
62
|
+
setPanelSize: W,
|
|
63
|
+
selectedSlotId: O,
|
|
64
|
+
setSelectedSlotId: k,
|
|
65
|
+
openPreviewWithEnvironment: K,
|
|
66
|
+
activeSectionId: E,
|
|
67
|
+
setActiveSectionId: D
|
|
68
|
+
}, d[21] = w, d[22] = E, d[23] = H, d[24] = v, d[25] = g, d[26] = h, d[27] = K, d[28] = I, d[29] = N, d[30] = O, d[31] = W, d[32] = B, d[33] = m, d[34] = p, d[35] = q) : q = d[35];
|
|
69
|
+
let J = q, Y;
|
|
70
|
+
return d[36] !== f || d[37] !== J ? (Y = /* @__PURE__ */ jsx(WorkbenchLayoutContext.Provider, {
|
|
71
|
+
value: J,
|
|
72
|
+
children: f
|
|
73
|
+
}), d[36] = f, d[37] = J, d[38] = Y) : Y = d[38], Y;
|
|
68
74
|
}
|
|
69
|
-
function
|
|
75
|
+
function _temp2(e) {
|
|
70
76
|
return !!e.connectionUrl && (!!e.workerId || e.local);
|
|
71
77
|
}
|
|
78
|
+
function _temp(e) {
|
|
79
|
+
return e.status === "running";
|
|
80
|
+
}
|
|
72
81
|
function useWorkbenchLayout() {
|
|
73
82
|
let e = useContext(WorkbenchLayoutContext);
|
|
74
83
|
if (!e) throw Error("useWorkbenchLayout must be used within a WorkbenchLayoutProvider");
|
|
75
84
|
return e;
|
|
76
85
|
}
|
|
77
|
-
|
|
86
|
+
function useOptionalWorkbenchLayout() {
|
|
87
|
+
return useContext(WorkbenchLayoutContext);
|
|
88
|
+
}
|
|
89
|
+
export { WorkbenchLayoutProvider, useOptionalWorkbenchLayout, useWorkbenchLayout };
|
|
@@ -2,8 +2,8 @@ import "../../../hooks/useWorkflows.js";
|
|
|
2
2
|
import "../../../providers/StudioProvider.js";
|
|
3
3
|
import "../../../components/ui/button.js";
|
|
4
4
|
import "../../../components/feedback/ErrorSnackbar.js";
|
|
5
|
-
import "../../../hooks/useProcessor.js";
|
|
6
5
|
import "../../../components/dynamic-form/Form.js";
|
|
6
|
+
import "../../../hooks/useProcessor.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { Loader2, Play } from "lucide-react";
|
package/dist/index.d.ts
CHANGED
|
@@ -954,6 +954,8 @@ declare interface StudioPreferences {
|
|
|
954
954
|
leftSidebarOpen: boolean;
|
|
955
955
|
activePanel: PanelId | null;
|
|
956
956
|
panelSizes: Partial<Record<PanelId, PanelSize>>;
|
|
957
|
+
/** Workbench workflow area: legacy document tree or the canonical run view. */
|
|
958
|
+
workbenchView: 'classic' | 'run';
|
|
957
959
|
}
|
|
958
960
|
|
|
959
961
|
declare interface StudioPreferencesContextType {
|