@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.
Files changed (114) hide show
  1. package/dist/_virtual/rolldown_runtime.js +3 -1
  2. package/dist/api/config.js +5 -4
  3. package/dist/api/environments.js +5 -1
  4. package/dist/api/processor.js +4 -1
  5. package/dist/app/EnvironmentEmbedRoot.js +22 -30
  6. package/dist/components/ai-elements/code-block.js +4 -4
  7. package/dist/components/dynamic-form/CodeContent.js +1 -1
  8. package/dist/components/dynamic-form/Form.js +31 -51
  9. package/dist/components/dynamic-form/FormBody.js +1 -1
  10. package/dist/components/motion/FadeIn.js +72 -0
  11. package/dist/components/motion/StreamingText.js +49 -0
  12. package/dist/components/ui/accordion.js +2 -2
  13. package/dist/components/ui-widgets/UiWidget.js +11 -10
  14. package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
  15. package/dist/events/sse-client-events.js +7 -1
  16. package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
  17. package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
  18. package/dist/features/documents/DocumentRenderer.js +18 -17
  19. package/dist/features/documents/components/DocumentItem.js +42 -20
  20. package/dist/features/documents/components/DocumentList.js +34 -36
  21. package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
  22. package/dist/features/documents/document-details/DocumentDetails.js +577 -377
  23. package/dist/features/documents/document-details/PromptDetails.js +118 -130
  24. package/dist/features/documents/document-details/document-debug-utils.js +100 -0
  25. package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
  26. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
  27. package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
  28. package/dist/features/documents/renderers/LlmMessage.js +52 -47
  29. package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
  30. package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
  31. package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
  32. package/dist/features/feature-registry/available-features.js +12 -0
  33. package/dist/features/feature-registry/index.js +2 -1
  34. package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
  35. package/dist/features/git/components/GitBranchBadge.js +31 -0
  36. package/dist/features/git/components/GitCommitList.js +46 -0
  37. package/dist/features/git/components/GitRemoteStatus.js +84 -0
  38. package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
  39. package/dist/features/git/git-feature.js +12 -0
  40. package/dist/features/git/hooks/useGit.js +78 -0
  41. package/dist/features/git/index.js +1 -0
  42. package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
  43. package/dist/features/runs/Runs.js +4 -4
  44. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
  45. package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
  46. package/dist/features/workbench/Workbench.js +25 -33
  47. package/dist/features/workbench/WorkflowItem.js +9 -9
  48. package/dist/features/workbench/WorkflowList.js +61 -62
  49. package/dist/features/workbench/components/NewRunDialog.js +237 -209
  50. package/dist/features/workbench/components/RecentRunItem.js +3 -3
  51. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
  52. package/dist/features/workbench/components/WorkbenchIconSidebar.js +1 -1
  53. package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
  54. package/dist/features/workbench/components/WorkflowForms.js +11 -10
  55. package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
  56. package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
  57. package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
  58. package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
  59. package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
  60. package/dist/features/workbench/index.js +2 -2
  61. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
  62. package/dist/features/workspaces/Workspaces.js +134 -125
  63. package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
  64. package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
  65. package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
  66. package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
  67. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
  68. package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
  69. package/dist/hooks/index.js +3 -2
  70. package/dist/hooks/query-keys.js +43 -30
  71. package/dist/hooks/useConfig.js +28 -22
  72. package/dist/hooks/useEnvironments.js +27 -2
  73. package/dist/hooks/useProcessor.js +14 -1
  74. package/dist/hooks/useWorkflows.js +4 -4
  75. package/dist/index.d.ts +116 -15
  76. package/dist/index.js +9 -8
  77. package/dist/node_modules/d3/src/index.js +13 -13
  78. package/dist/node_modules/d3-scale/src/continuous.js +16 -16
  79. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
  80. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
  81. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
  82. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
  83. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
  84. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
  85. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
  86. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
  87. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
  88. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
  89. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
  90. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
  91. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
  92. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
  93. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
  94. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
  95. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
  96. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
  103. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
  104. package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
  105. package/dist/node_modules/motion/dist/es/react.js +9 -2
  106. package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
  107. package/dist/pages/DebugWorkflowsPage.js +76 -106
  108. package/dist/pages/EmbedWorkbenchPage.js +1 -1
  109. package/dist/pages/PreviewWorkbenchPage.js +6 -6
  110. package/dist/pages/WorkbenchPage.js +43 -47
  111. package/dist/pages/WorkflowDebugPage.js +6 -12
  112. package/dist/pages/WorkspacePage.js +40 -66
  113. package/dist/pages/WorkspaceRunsPage.js +24 -31
  114. package/package.json +2 -2
@@ -11,8 +11,10 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
11
11
  enumerable: !(s = __getOwnPropDesc(i, d)) || s.enumerable
12
12
  });
13
13
  return e;
14
+ }, __reExport = (e, n, r, i) => {
15
+ i && (__defProp(e, Symbol.toStringTag, { value: "Module" }), r && __defProp(r, Symbol.toStringTag, { value: "Module" })), __copyProps(e, n, "default"), r && __copyProps(r, n, "default");
14
16
  }, __toESM = (n, r, a) => (a = n == null ? {} : __create(__getProtoOf(n)), __copyProps(r || !n || !n.__esModule ? __defProp(a, "default", {
15
17
  value: n,
16
18
  enumerable: !0
17
19
  }) : a, n));
18
- export { __commonJSMin, __export, __toESM };
20
+ export { __commonJSMin, __export, __reExport, __toESM };
@@ -1,9 +1,10 @@
1
1
  function createConfigApi(e) {
2
2
  return {
3
- getAppTypes: () => e.get("/api/v1/config/workspaces").then((e) => e.data),
4
- getWorkflowTypesByApp: (t) => e.get(`/api/v1/config/workspaces/${encodeURIComponent(t.appBlockName)}/workflows`).then((e) => e.data),
5
- getWorkflowConfig: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.alias)}`).then((e) => e.data),
6
- getWorkflowSource: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.alias)}/source`).then((e) => e.data),
3
+ getApps: () => e.get("/api/v1/config/apps").then((e) => e.data),
4
+ getWorkflowConfig: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}`).then((e) => e.data),
5
+ getWorkflowSource: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}/source`).then((e) => e.data),
6
+ getToolConfigs: () => e.get("/api/v1/config/tools").then((e) => e.data),
7
+ getToolConfig: (t) => e.get(`/api/v1/config/tools/${encodeURIComponent(t.toolName)}`).then((e) => e.data),
7
8
  getAvailableEnvironments: () => e.get("/api/v1/config/environments").then((e) => e.data)
8
9
  };
9
10
  }
@@ -1,4 +1,8 @@
1
1
  function createEnvironmentsApi(e) {
2
- return { resetEnvironment: (t) => e.post(`/api/v1/workspaces/${t.workspaceId}/environments/${t.slotId}/reset`).then((e) => e.data) };
2
+ return {
3
+ getByWorkspace: (t) => e.get(`/api/v1/workspaces/${t}/environments`).then((e) => e.data),
4
+ replaceEnvironments: (t, n) => e.put(`/api/v1/workspaces/${t}/environments`, n).then((e) => e.data),
5
+ resetEnvironment: (t) => e.post(`/api/v1/workspaces/${t.workspaceId}/environments/${t.slotId}/reset`).then((e) => e.data)
6
+ };
3
7
  }
4
8
  export { createEnvironmentsApi };
@@ -1,4 +1,7 @@
1
1
  function createProcessorApi(e) {
2
- return { runWorkflow: (t) => e.post(`/api/v1/processor/run/${t.workflowId}`, t.runWorkflowPayloadDto, t.force === void 0 ? void 0 : { params: { force: t.force } }).then((e) => e.data) };
2
+ return {
3
+ startWorkflow: (t) => e.post("/api/v1/processor/start", t.payload).then((e) => e.data),
4
+ runWorkflow: (t) => e.post(`/api/v1/processor/run/${t.workflowId}`, t.runWorkflowPayloadDto, t.force === void 0 ? void 0 : { params: { force: t.force } }).then((e) => e.data)
5
+ };
3
6
  }
4
7
  export { createProcessorApi };
@@ -4,42 +4,34 @@ import { InvalidationEventsProvider } from "../providers/InvalidationEventsProvi
4
4
  import { useRouter } from "../routing/LocalRouter.js";
5
5
  import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
6
6
  import "../features/feature-registry/index.js";
7
- import { fileExplorerFeature } from "../features/file-explorer/file-explorer-feature.js";
8
- import "../features/file-explorer/index.js";
9
7
  import LocalHealthCheck_default from "../features/health/LocalHealthCheck.js";
10
- import { secretsFeature } from "../features/secrets/secrets-feature.js";
11
- import "../features/secrets/index.js";
12
8
  import { QueryProvider } from "../providers/QueryProvider.js";
13
9
  import { c } from "react/compiler-runtime";
14
10
  import { jsx, jsxs } from "react/jsx-runtime";
15
11
  import { Outlet, useSearchParams } from "react-router-dom";
16
- var defaultFeatures = [secretsFeature, fileExplorerFeature];
17
12
  function EnvironmentEmbedRoot() {
18
- let m = c(11), [h] = useSearchParams(), g;
19
- m[0] === h ? g = m[1] : (g = h.get("url") ?? "http://localhost:3080", m[0] = h, m[1] = g);
20
- let _ = g, v;
21
- m[2] === h ? v = m[3] : (v = h.get("name") ?? "Preview Environment", m[2] = h, m[3] = v);
22
- let y = v, b;
23
- m[4] !== y || m[5] !== _ ? (b = {
13
+ let p = c(11), [m] = useSearchParams(), h;
14
+ p[0] === m ? h = p[1] : (h = m.get("url") ?? "http://localhost:3080", p[0] = m, p[1] = h);
15
+ let g = h, _;
16
+ p[2] === m ? _ = p[3] : (_ = m.get("name") ?? "Preview Environment", p[2] = m, p[3] = _);
17
+ let v = _, y;
18
+ p[4] !== v || p[5] !== g ? (y = {
24
19
  id: "preview-env",
25
- name: y,
26
- url: _
27
- }, m[4] = y, m[5] = _, m[6] = b) : b = m[6];
28
- let x = b, S = useRouter(x.id, "/embed/env"), C;
29
- m[7] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsxs(FeatureRegistryProvider, {
30
- features: defaultFeatures,
31
- children: [
32
- /* @__PURE__ */ jsx(LocalHealthCheck_default, {}),
33
- /* @__PURE__ */ jsx(SseProvider, {}),
34
- /* @__PURE__ */ jsx(InvalidationEventsProvider, {}),
35
- /* @__PURE__ */ jsx(Outlet, {})
36
- ]
37
- }), m[7] = C) : C = m[7];
38
- let w;
39
- return m[8] !== x || m[9] !== S ? (w = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(StudioProvider, {
40
- router: S,
41
- environment: x,
42
- children: C
43
- }) }), m[8] = x, m[9] = S, m[10] = w) : w = m[10], w;
20
+ name: v,
21
+ url: g
22
+ }, p[4] = v, p[5] = g, p[6] = y) : y = p[6];
23
+ let b = y, x = useRouter(b.id, "/embed/env"), S;
24
+ p[7] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsxs(FeatureRegistryProvider, { children: [
25
+ /* @__PURE__ */ jsx(LocalHealthCheck_default, {}),
26
+ /* @__PURE__ */ jsx(SseProvider, {}),
27
+ /* @__PURE__ */ jsx(InvalidationEventsProvider, {}),
28
+ /* @__PURE__ */ jsx(Outlet, {})
29
+ ] }), p[7] = S) : S = p[7];
30
+ let C;
31
+ return p[8] !== b || p[9] !== x ? (C = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(StudioProvider, {
32
+ router: x,
33
+ environment: b,
34
+ children: S
35
+ }) }), p[8] = b, p[9] = x, p[10] = C) : C = p[10], C;
44
36
  }
45
37
  export { EnvironmentEmbedRoot as default };
@@ -56,15 +56,15 @@ const CodeBlock = (l) => {
56
56
  let E;
57
57
  d[12] === m ? E = d[13] : (E = { code: m }, d[12] = m, d[13] = E);
58
58
  let D;
59
- d[14] === p ? D = d[15] : (D = cn("group bg-background text-foreground relative w-full overflow-hidden rounded-md border", p), d[14] = p, d[15] = D);
59
+ d[14] === p ? D = d[15] : (D = cn("group bg-background text-foreground relative min-w-0 w-full overflow-auto overscroll-contain rounded-md border", p), d[14] = p, d[15] = D);
60
60
  let O;
61
61
  d[16] === y ? O = d[17] : (O = /* @__PURE__ */ jsx("div", {
62
- className: "[&>pre]:bg-background! [&>pre]:text-foreground! overflow-x-auto dark:hidden [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
62
+ className: "[&>pre]:bg-background! [&>pre]:text-foreground! dark:hidden [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
63
63
  dangerouslySetInnerHTML: { __html: y }
64
64
  }), d[16] = y, d[17] = O);
65
65
  let k;
66
66
  d[18] === x ? k = d[19] : (k = /* @__PURE__ */ jsx("div", {
67
- className: "[&>pre]:bg-background! [&>pre]:text-foreground! hidden overflow-x-auto dark:block [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
67
+ className: "[&>pre]:bg-background! [&>pre]:text-foreground! hidden dark:block [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
68
68
  dangerouslySetInnerHTML: { __html: x }
69
69
  }), d[18] = x, d[19] = k);
70
70
  let A;
@@ -74,7 +74,7 @@ const CodeBlock = (l) => {
74
74
  }), d[20] = f, d[21] = A);
75
75
  let j;
76
76
  d[22] !== O || d[23] !== k || d[24] !== A ? (j = /* @__PURE__ */ jsxs("div", {
77
- className: "relative",
77
+ className: "relative min-w-max",
78
78
  children: [
79
79
  O,
80
80
  k,
@@ -1,8 +1,8 @@
1
1
  import { c } from "react/compiler-runtime";
2
2
  import React from "react";
3
3
  import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
4
- import Markdown from "react-markdown";
5
4
  import { Prism } from "react-syntax-highlighter";
5
+ import Markdown from "react-markdown";
6
6
  var adaptedPrism = {
7
7
  "code[class*=\"language-\"]": {
8
8
  color: "black",
@@ -1,61 +1,41 @@
1
1
  import { FormElementHeader } from "./FormElementHeader.js";
2
2
  import FormBody_default from "./FormBody.js";
3
3
  import { c } from "react/compiler-runtime";
4
- import React, { useEffect, useRef } from "react";
4
+ import React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { FormProvider } from "react-hook-form";
7
- function extractSchemaDefaults(t) {
8
- if (t.default !== void 0) return t.default;
9
- if (t.properties) {
10
- let o = {}, s = !1;
11
- for (let [l, u] of Object.entries(t.properties)) if (u.default !== void 0) o[l] = u.default, s = !0;
12
- else if (u.type === "object" && u.properties) {
13
- let t = extractSchemaDefaults(u);
14
- t !== void 0 && (o[l] = t, s = !0);
15
- }
16
- return s ? o : void 0;
17
- }
18
- }
19
- var Form_default = (l) => {
20
- let d = c(28), { form: f, schema: p, ui: m, mimeType: h, disabled: g, viewOnly: _, actions: v } = l, y = m, b = p, x = useRef(!1), S;
21
- d[0] !== f || d[1] !== b ? (S = () => {
22
- if (x.current) return;
23
- let t = extractSchemaDefaults(b);
24
- t && (x.current = !0, f.reset(t));
25
- }, d[0] = f, d[1] = b, d[2] = S) : S = d[2];
7
+ var Form_default = (o) => {
8
+ let s = c(23), { form: l, schema: u, ui: d, mimeType: f, disabled: p, viewOnly: m, actions: h } = o, g = d, _ = g?.form?.title, v = g?.form?.description, y;
9
+ s[0] !== p || s[1] !== _ || s[2] !== v ? (y = /* @__PURE__ */ jsx(FormElementHeader, {
10
+ title: _,
11
+ description: v,
12
+ disabled: p
13
+ }), s[0] = p, s[1] = _, s[2] = v, s[3] = y) : y = s[3];
14
+ let b = u, x = d?.form, S;
15
+ s[4] !== p || s[5] !== l || s[6] !== f || s[7] !== b || s[8] !== x || s[9] !== m ? (S = /* @__PURE__ */ jsx(FormBody_default, {
16
+ form: l,
17
+ mimeType: f,
18
+ schema: b,
19
+ ui: x,
20
+ disabled: p,
21
+ viewOnly: m
22
+ }), s[4] = p, s[5] = l, s[6] = f, s[7] = b, s[8] = x, s[9] = m, s[10] = S) : S = s[10];
26
23
  let C;
27
- d[3] === p ? C = d[4] : (C = [p], d[3] = p, d[4] = C), useEffect(S, C);
28
- let w = y?.form?.title, T = y?.form?.description, E;
29
- d[5] !== g || d[6] !== w || d[7] !== T ? (E = /* @__PURE__ */ jsx(FormElementHeader, {
30
- title: w,
31
- description: T,
32
- disabled: g
33
- }), d[5] = g, d[6] = w, d[7] = T, d[8] = E) : E = d[8];
34
- let D = p, O = m?.form, k;
35
- d[9] !== g || d[10] !== f || d[11] !== h || d[12] !== D || d[13] !== O || d[14] !== _ ? (k = /* @__PURE__ */ jsx(FormBody_default, {
36
- form: f,
37
- mimeType: h,
38
- schema: D,
39
- ui: O,
40
- disabled: g,
41
- viewOnly: _
42
- }), d[9] = g, d[10] = f, d[11] = h, d[12] = D, d[13] = O, d[14] = _, d[15] = k) : k = d[15];
43
- let A;
44
- d[16] !== v || d[17] !== _ ? (A = !_ && !!v && /* @__PURE__ */ jsx("div", {
24
+ s[11] !== h || s[12] !== m ? (C = !m && !!h && /* @__PURE__ */ jsx("div", {
45
25
  className: "mt-4 flex w-full justify-end",
46
- children: v
47
- }), d[16] = v, d[17] = _, d[18] = A) : A = d[18];
48
- let j;
49
- d[19] !== k || d[20] !== A ? (j = /* @__PURE__ */ jsxs("form", { children: [k, A] }), d[19] = k, d[20] = A, d[21] = j) : j = d[21];
50
- let M;
51
- d[22] !== j || d[23] !== E ? (M = /* @__PURE__ */ jsxs("div", {
26
+ children: h
27
+ }), s[11] = h, s[12] = m, s[13] = C) : C = s[13];
28
+ let w;
29
+ s[14] !== S || s[15] !== C ? (w = /* @__PURE__ */ jsxs("form", { children: [S, C] }), s[14] = S, s[15] = C, s[16] = w) : w = s[16];
30
+ let T;
31
+ s[17] !== y || s[18] !== w ? (T = /* @__PURE__ */ jsxs("div", {
52
32
  className: "container mx-auto",
53
- children: [E, j]
54
- }), d[22] = j, d[23] = E, d[24] = M) : M = d[24];
55
- let N;
56
- return d[25] !== f || d[26] !== M ? (N = /* @__PURE__ */ jsx(FormProvider, {
57
- ...f,
58
- children: M
59
- }), d[25] = f, d[26] = M, d[27] = N) : N = d[27], N;
33
+ children: [y, w]
34
+ }), s[17] = y, s[18] = w, s[19] = T) : T = s[19];
35
+ let E;
36
+ return s[20] !== l || s[21] !== T ? (E = /* @__PURE__ */ jsx(FormProvider, {
37
+ ...l,
38
+ children: T
39
+ }), s[20] = l, s[21] = T, s[22] = E) : E = s[22], E;
60
40
  };
61
41
  export { Form_default as default };
@@ -1,5 +1,5 @@
1
- import CodeContent_default from "./CodeContent.js";
2
1
  import MarkdownContent_default from "./MarkdownContent.js";
2
+ import CodeContent_default from "./CodeContent.js";
3
3
  import { ObjectController } from "./ObjectController.js";
4
4
  import React from "react";
5
5
  import { jsx } from "react/jsx-runtime";
@@ -0,0 +1,72 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { motion, react_exports } from "../../node_modules/motion/dist/es/react.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { jsx } from "react/jsx-runtime";
5
+ function FadeIn(a) {
6
+ let o = c(16), { children: s, className: l, delay: u, y: d, duration: f } = a, p = u === void 0 ? 0 : u, m = d === void 0 ? 6 : d, h = f === void 0 ? .22 : f;
7
+ if ((0, react_exports.useReducedMotion)()) {
8
+ let e;
9
+ return o[0] !== s || o[1] !== l ? (e = /* @__PURE__ */ jsx("div", {
10
+ className: l,
11
+ children: s
12
+ }), o[0] = s, o[1] = l, o[2] = e) : e = o[2], e;
13
+ }
14
+ let g;
15
+ o[3] === l ? g = o[4] : (g = cn(l), o[3] = l, o[4] = g);
16
+ let _;
17
+ o[5] === m ? _ = o[6] : (_ = {
18
+ opacity: 0,
19
+ y: m
20
+ }, o[5] = m, o[6] = _);
21
+ let v;
22
+ o[7] === Symbol.for("react.memo_cache_sentinel") ? (v = {
23
+ opacity: 1,
24
+ y: 0
25
+ }, o[7] = v) : v = o[7];
26
+ let y;
27
+ o[8] !== p || o[9] !== h ? (y = {
28
+ duration: h,
29
+ delay: p,
30
+ ease: "easeOut"
31
+ }, o[8] = p, o[9] = h, o[10] = y) : y = o[10];
32
+ let b;
33
+ return o[11] !== s || o[12] !== g || o[13] !== _ || o[14] !== y ? (b = /* @__PURE__ */ jsx(motion.div, {
34
+ className: g,
35
+ initial: _,
36
+ animate: v,
37
+ transition: y,
38
+ children: s
39
+ }), o[11] = s, o[12] = g, o[13] = _, o[14] = y, o[15] = b) : b = o[15], b;
40
+ }
41
+ function FadeInBlock(a) {
42
+ let o = c(11), { children: s, className: l } = a;
43
+ if ((0, react_exports.useReducedMotion)()) {
44
+ let e;
45
+ return o[0] !== s || o[1] !== l ? (e = /* @__PURE__ */ jsx("div", {
46
+ className: l,
47
+ children: s
48
+ }), o[0] = s, o[1] = l, o[2] = e) : e = o[2], e;
49
+ }
50
+ let u;
51
+ o[3] === l ? u = o[4] : (u = cn(l), o[3] = l, o[4] = u);
52
+ let d, f, p;
53
+ o[5] === Symbol.for("react.memo_cache_sentinel") ? (d = {
54
+ opacity: 0,
55
+ y: 4
56
+ }, f = {
57
+ opacity: 1,
58
+ y: 0
59
+ }, p = {
60
+ duration: .18,
61
+ ease: "easeOut"
62
+ }, o[5] = d, o[6] = f, o[7] = p) : (d = o[5], f = o[6], p = o[7]);
63
+ let m;
64
+ return o[8] !== s || o[9] !== u ? (m = /* @__PURE__ */ jsx(motion.div, {
65
+ className: u,
66
+ initial: d,
67
+ animate: f,
68
+ transition: p,
69
+ children: s
70
+ }), o[8] = s, o[9] = u, o[10] = m) : m = o[10], m;
71
+ }
72
+ export { FadeIn, FadeInBlock };
@@ -0,0 +1,49 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { motion, react_exports } from "../../node_modules/motion/dist/es/react.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { useMemo } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function StreamingText(a) {
7
+ let o = c(16), { text: s, className: l } = a, u = (0, react_exports.useReducedMotion)(), d;
8
+ o[0] === s ? d = o[1] : (d = s.match(/\S+\s*|\s+/g) ?? (s ? [s] : []), o[0] = s, o[1] = d);
9
+ let f = d;
10
+ if (u) {
11
+ let n;
12
+ o[2] === l ? n = o[3] : (n = cn("whitespace-pre-wrap", l), o[2] = l, o[3] = n);
13
+ let r;
14
+ return o[4] !== n || o[5] !== s ? (r = /* @__PURE__ */ jsx("span", {
15
+ className: n,
16
+ children: s
17
+ }), o[4] = n, o[5] = s, o[6] = r) : r = o[6], r;
18
+ }
19
+ let p;
20
+ o[7] === l ? p = o[8] : (p = cn("whitespace-pre-wrap", l), o[7] = l, o[8] = p);
21
+ let m;
22
+ if (o[9] !== f) {
23
+ let e;
24
+ o[11] === f.length ? e = o[12] : (e = (e, r) => {
25
+ let i = r === f.length - 1;
26
+ return /* @__PURE__ */ jsx(motion.span, {
27
+ initial: i ? {
28
+ opacity: 0,
29
+ y: 2
30
+ } : !1,
31
+ animate: {
32
+ opacity: 1,
33
+ y: 0
34
+ },
35
+ transition: {
36
+ duration: .18,
37
+ ease: "easeOut"
38
+ },
39
+ children: e
40
+ }, r);
41
+ }, o[11] = f.length, o[12] = e), m = f.map(e), o[9] = f, o[10] = m;
42
+ } else m = o[10];
43
+ let h;
44
+ return o[13] !== p || o[14] !== m ? (h = /* @__PURE__ */ jsx("span", {
45
+ className: p,
46
+ children: m
47
+ }), o[13] = p, o[14] = m, o[15] = h) : h = o[15], h;
48
+ }
49
+ export { StreamingText };
@@ -47,7 +47,7 @@ function AccordionContent(i) {
47
47
  let a = c(12), o, s, l;
48
48
  a[0] === i ? (o = a[1], s = a[2], l = a[3]) : ({className: s, children: o, ...l} = i, a[0] = i, a[1] = o, a[2] = s, a[3] = l);
49
49
  let u;
50
- a[4] === s ? u = a[5] : (u = cn("pt-0 pb-4", s), a[4] = s, a[5] = u);
50
+ a[4] === s ? u = a[5] : (u = cn("min-w-0 pt-0 pb-4", s), a[4] = s, a[5] = u);
51
51
  let d;
52
52
  a[6] !== o || a[7] !== u ? (d = /* @__PURE__ */ jsx("div", {
53
53
  className: u,
@@ -56,7 +56,7 @@ function AccordionContent(i) {
56
56
  let f;
57
57
  return a[9] !== l || a[10] !== d ? (f = /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
58
58
  "data-slot": "accordion-content",
59
- className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
59
+ className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm data-[state=open]:overflow-visible",
60
60
  ...l,
61
61
  children: d
62
62
  }), a[9] = l, a[10] = d, a[11] = f) : f = a[11], f;
@@ -6,43 +6,44 @@ import { c } from "react/compiler-runtime";
6
6
  import React from "react";
7
7
  import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
8
8
  var UiWidget_default = (s) => {
9
- let l = c(18), { config: u, onSubmit: d, disabled: f, isLoading: p } = s, m = u.options;
9
+ let l = c(19), { config: u, onSubmit: d, disabled: f, isLoading: p } = s, m = u.options;
10
10
  switch (u.widget) {
11
11
  case "prompt-input": {
12
12
  let a;
13
- return l[0] !== f || l[1] !== d || l[2] !== m ? (a = /* @__PURE__ */ jsx(AiPromptInput_default, {
13
+ return l[0] !== f || l[1] !== p || l[2] !== d || l[3] !== m ? (a = /* @__PURE__ */ jsx(AiPromptInput_default, {
14
14
  disabled: f,
15
+ isLoading: p,
15
16
  onSubmit: d,
16
17
  ui: m
17
- }), l[0] = f, l[1] = d, l[2] = m, l[3] = a) : a = l[3], a;
18
+ }), l[0] = f, l[1] = p, l[2] = d, l[3] = m, l[4] = a) : a = l[4], a;
18
19
  }
19
20
  case "button": {
20
21
  let e = m, a;
21
- return l[4] !== f || l[5] !== p || l[6] !== d || l[7] !== e ? (a = /* @__PURE__ */ jsx(SubmitButton, {
22
+ return l[5] !== f || l[6] !== p || l[7] !== d || l[8] !== e ? (a = /* @__PURE__ */ jsx(SubmitButton, {
22
23
  ui: e,
23
24
  disabled: f,
24
25
  onClick: d,
25
26
  isLoading: p
26
- }), l[4] = f, l[5] = p, l[6] = d, l[7] = e, l[8] = a) : a = l[8], a;
27
+ }), l[5] = f, l[6] = p, l[7] = d, l[8] = e, l[9] = a) : a = l[9], a;
27
28
  }
28
29
  case "button-full-w": {
29
30
  let e = m, o;
30
- return l[9] !== f || l[10] !== p || l[11] !== d || l[12] !== e ? (o = /* @__PURE__ */ jsx(ButtonFullWidth, {
31
+ return l[10] !== f || l[11] !== p || l[12] !== d || l[13] !== e ? (o = /* @__PURE__ */ jsx(ButtonFullWidth, {
31
32
  ui: e,
32
33
  disabled: f,
33
34
  onClick: d,
34
35
  isLoading: p
35
- }), l[9] = f, l[10] = p, l[11] = d, l[12] = e, l[13] = o) : o = l[13], o;
36
+ }), l[10] = f, l[11] = p, l[12] = d, l[13] = e, l[14] = o) : o = l[14], o;
36
37
  }
37
38
  case "sandbox-run": {
38
39
  let e = m, a;
39
- return l[14] !== f || l[15] !== e ? (a = /* @__PURE__ */ jsx(SandboxRun, {
40
+ return l[15] !== f || l[16] !== e ? (a = /* @__PURE__ */ jsx(SandboxRun, {
40
41
  ui: e,
41
42
  disabled: f
42
- }), l[14] = f, l[15] = e, l[16] = a) : a = l[16], a;
43
+ }), l[15] = f, l[16] = e, l[17] = a) : a = l[17], a;
43
44
  }
44
45
  }
45
46
  let h;
46
- return l[17] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx(Fragment$1, {}), l[17] = h) : h = l[17], h;
47
+ return l[18] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx(Fragment$1, {}), l[18] = h) : h = l[18], h;
47
48
  };
48
49
  export { UiWidget_default as default };
@@ -4,40 +4,43 @@ import { useState } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { Pill } from "lucide-react";
6
6
  function AiPromptInput(d) {
7
- let f = c(18), { onSubmit: p, disabled: m, ui: h } = d, [g, _] = useState(""), v = h?.label ?? "Submit", y;
8
- f[0] === p ? y = f[1] : (y = (e, u) => {
9
- u.preventDefault(), e.text && (p(e.text), _(""));
10
- }, f[0] = p, f[1] = y);
11
- let b;
12
- f[2] === Symbol.for("react.memo_cache_sentinel") ? (b = (e) => _(e.target.value), f[2] = b) : b = f[2];
13
- let x = m || !1, S;
14
- f[3] !== g || f[4] !== x ? (S = /* @__PURE__ */ jsx(PromptInputBody, { children: /* @__PURE__ */ jsx(PromptInputTextarea, {
15
- value: g,
16
- onChange: b,
7
+ let f = c(19), { onSubmit: p, disabled: m, isLoading: h, ui: g } = d, _ = h === void 0 ? !1 : h, [v, y] = useState(""), b = g?.label ?? "Submit", x;
8
+ f[0] === p ? x = f[1] : (x = (e, u) => {
9
+ u.preventDefault(), e.text && (p(e.text), y(""));
10
+ }, f[0] = p, f[1] = x);
11
+ let S;
12
+ f[2] === Symbol.for("react.memo_cache_sentinel") ? (S = (e) => y(e.target.value), f[2] = S) : S = f[2];
13
+ let C = m || _, w;
14
+ f[3] !== v || f[4] !== C ? (w = /* @__PURE__ */ jsx(PromptInputBody, { children: /* @__PURE__ */ jsx(PromptInputTextarea, {
15
+ value: v,
16
+ onChange: S,
17
17
  placeholder: "Type your message...",
18
- disabled: x,
18
+ disabled: C,
19
19
  rows: 1,
20
20
  className: "flex-1"
21
- }) }), f[3] = g, f[4] = x, f[5] = S) : S = f[5];
22
- let C;
23
- f[6] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(Pill, {
21
+ }) }), f[3] = v, f[4] = C, f[5] = w) : w = f[5];
22
+ let T;
23
+ f[6] === Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ jsx(Pill, {
24
24
  size: "16",
25
25
  className: "mr-2"
26
- }), f[6] = C) : C = f[6];
27
- let w;
28
- f[7] === v ? w = f[8] : (w = /* @__PURE__ */ jsxs("div", {
26
+ }), f[6] = T) : T = f[6];
27
+ let E;
28
+ f[7] === b ? E = f[8] : (E = /* @__PURE__ */ jsxs("div", {
29
29
  className: "mr-4 flex items-center",
30
- children: [C, v]
31
- }), f[7] = v, f[8] = w);
32
- let T = m || !1, E;
33
- f[9] === T ? E = f[10] : (E = /* @__PURE__ */ jsx(PromptInputSubmit, { disabled: T }), f[9] = T, f[10] = E);
34
- let D;
35
- f[11] !== w || f[12] !== E ? (D = /* @__PURE__ */ jsxs(PromptInputFooter, { children: [w, E] }), f[11] = w, f[12] = E, f[13] = D) : D = f[13];
36
- let O;
37
- return f[14] !== y || f[15] !== S || f[16] !== D ? (O = /* @__PURE__ */ jsxs(PromptInput, {
38
- onSubmit: y,
39
- children: [S, D]
40
- }), f[14] = y, f[15] = S, f[16] = D, f[17] = O) : O = f[17], O;
30
+ children: [T, b]
31
+ }), f[7] = b, f[8] = E);
32
+ let D = m || _, O = _ ? "streaming" : "ready", k;
33
+ f[9] !== D || f[10] !== O ? (k = /* @__PURE__ */ jsx(PromptInputSubmit, {
34
+ disabled: D,
35
+ status: O
36
+ }), f[9] = D, f[10] = O, f[11] = k) : k = f[11];
37
+ let A;
38
+ f[12] !== k || f[13] !== E ? (A = /* @__PURE__ */ jsxs(PromptInputFooter, { children: [E, k] }), f[12] = k, f[13] = E, f[14] = A) : A = f[14];
39
+ let j;
40
+ return f[15] !== A || f[16] !== x || f[17] !== w ? (j = /* @__PURE__ */ jsxs(PromptInput, {
41
+ onSubmit: x,
42
+ children: [w, A]
43
+ }), f[15] = A, f[16] = x, f[17] = w, f[18] = j) : j = f[18], j;
41
44
  }
42
45
  var AiPromptInput_default = AiPromptInput;
43
46
  export { AiPromptInput_default as default };
@@ -2,6 +2,12 @@ const SseClientEvents = {
2
2
  WORKFLOW_CREATED: "workflow.created",
3
3
  WORKFLOW_UPDATED: "workflow.updated",
4
4
  DOCUMENT_CREATED: "document.created",
5
- SSE_CONNECTED: "sse.connected"
5
+ SSE_CONNECTED: "sse.connected",
6
+ LLM_RESPONSE_START: "llm.response.start",
7
+ LLM_RESPONSE_TEXT_DELTA: "llm.response.text_delta",
8
+ LLM_RESPONSE_THINKING_DELTA: "llm.response.thinking_delta",
9
+ LLM_RESPONSE_TOOL_CALL: "llm.response.tool_call",
10
+ LLM_RESPONSE_DONE: "llm.response.done",
11
+ LLM_RESPONSE_ERROR: "llm.response.error"
6
12
  };
7
13
  export { SseClientEvents };
@@ -1,10 +1,10 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { ScrollArea, ScrollBar } from "../../../components/ui/scroll-area.js";
3
- import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
4
3
  import { ReactFlowProvider } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
4
+ import MarkdownContent_default from "../../../components/dynamic-form/MarkdownContent.js";
5
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../components/ui/tabs.js";
5
6
  import ConfigFlowViewer_default from "../../debug/components/ConfigFlowViewer.js";
6
7
  import "../../debug/index.js";
7
- import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../components/ui/tabs.js";
8
8
  import { c } from "react/compiler-runtime";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  import { Loader2 } from "lucide-react";