@mastra/playground-ui 7.0.0-beta.14 → 7.0.0-beta.16

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 (42) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/index.cjs.js +1054 -420
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +1050 -423
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/ui/combobox.d.ts +3 -3
  7. package/dist/src/components/ui/containers/MainContent.d.ts +7 -0
  8. package/dist/src/domains/agents/components/agent-combobox.d.ts +1 -3
  9. package/dist/src/domains/agents/components/agent-layout.d.ts +7 -0
  10. package/dist/src/domains/agents/index.d.ts +1 -0
  11. package/dist/src/domains/configuration/components/mastra-version-footer.d.ts +17 -0
  12. package/dist/src/domains/configuration/hooks/use-mastra-packages.d.ts +1 -0
  13. package/dist/src/domains/configuration/hooks/use-package-updates.d.ts +18 -0
  14. package/dist/src/domains/configuration/index.d.ts +3 -0
  15. package/dist/src/domains/mcps/components/mcp-server-combobox.d.ts +1 -3
  16. package/dist/src/domains/observability/components/helpers.d.ts +11 -3
  17. package/dist/src/domains/observability/components/span-dialog.d.ts +2 -1
  18. package/dist/src/domains/observability/components/span-score-list.d.ts +1 -1
  19. package/dist/src/domains/observability/components/span-tabs.d.ts +2 -1
  20. package/dist/src/domains/observability/components/trace-span-usage.d.ts +1 -1
  21. package/dist/src/domains/observability/components/traces-list.d.ts +1 -1
  22. package/dist/src/domains/observability/components/traces-tools.d.ts +10 -1
  23. package/dist/src/domains/observability/context/tracing-settings-context.d.ts +1 -0
  24. package/dist/src/domains/observability/hooks/use-tracing-settings-state.d.ts +1 -0
  25. package/dist/src/domains/scores/components/score-dialog.d.ts +2 -2
  26. package/dist/src/domains/scores/components/scorer-combobox.d.ts +1 -3
  27. package/dist/src/domains/scores/hooks/use-trace-span-scores.d.ts +41 -1
  28. package/dist/src/domains/tools/components/tool-combobox.d.ts +1 -3
  29. package/dist/src/domains/workflows/components/workflow-combobox.d.ts +1 -3
  30. package/dist/src/domains/workflows/components/workflow-layout.d.ts +7 -0
  31. package/dist/src/domains/workflows/context/workflow-run-context.d.ts +3 -1
  32. package/dist/src/domains/workflows/hooks/use-workflows-actions.d.ts +6 -2
  33. package/dist/src/domains/workflows/index.d.ts +1 -0
  34. package/dist/src/domains/workflows/workflow/workflow-default-node.d.ts +2 -1
  35. package/dist/src/domains/workflows/workflow/workflow-nested-node.d.ts +2 -1
  36. package/dist/src/domains/workflows/workflow/workflow-run-options.d.ts +1 -0
  37. package/dist/src/domains/workflows/workflow/workflow-step-action-bar.d.ts +4 -2
  38. package/dist/src/domains/workflows/workflow/workflow-time-travel-form.d.ts +5 -1
  39. package/dist/src/domains/workflows/workflow/workflow-trigger.d.ts +4 -2
  40. package/dist/src/lib/resize/collapsible-panel.d.ts +5 -0
  41. package/dist/src/lib/resize/separator.d.ts +1 -0
  42. package/package.json +14 -11
package/dist/index.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useAssistantState, useMessage, MessagePrimitive, ActionBarPrimitive, useComposerRuntime, useAttachment, ComposerPrimitive, AttachmentPrimitive, useComposer, ThreadPrimitive, CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, WebSpeechSynthesisAdapter, useExternalStoreRuntime, AssistantRuntimeProvider } from '@assistant-ui/react';
3
- import { CheckIcon as CheckIcon$1, CopyIcon, ShieldAlert, ChevronDown, ChevronRight, RefreshCw, Tag, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, ChevronUpIcon, X, Share2, Check, PlayCircle, Workflow, Layers, List, Clock as Clock$1, CalendarClock, Timer, CornerDownRight, GitBranch, Repeat, Repeat1, Network, CalendarIcon, Braces, ChevronDownIcon, Brackets, PlusIcon, TrashIcon, Plus, Loader2, Circle, EyeOffIcon, EyeIcon, PauseIcon, HourglassIcon, CircleDashed, Footprints, CircleCheck, CircleX, Minus, Maximize, AlertCircleIcon, CirclePause, StopCircle, Cpu, SearchIcon, ChevronsUpDown, Search, BrainIcon, AudioLinesIcon, StopCircleIcon, FileText, CircleXIcon, Link, CloudUpload, Mic, ArrowUp, SaveIcon, ExternalLink, XIcon, TriangleAlertIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon, ChevronsRightIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, CircleAlertIcon, PanelRightIcon, KeyboardIcon, GaugeIcon, ChevronsLeftRightEllipsisIcon, CalculatorIcon, HashIcon, FileInputIcon, FileOutputIcon, ReceiptText, Info, RotateCcw, GripVertical, RefreshCcwIcon, AlertTriangleIcon, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, CircleChevronUpIcon, CircleChevronDownIcon, FileIcon, ChevronsUpIcon, ChevronsDownIcon, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, CircleDashedIcon, ArrowRightToLineIcon, CoinsIcon, BracesIcon, CircleGaugeIcon, PanelTopIcon, ListTreeIcon, PanelLeftIcon, CircleSlash, Trash, Link2 } from 'lucide-react';
3
+ import { CheckIcon as CheckIcon$1, CopyIcon, ShieldAlert, ChevronDown, ChevronRight, RefreshCw, Tag, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, ChevronUpIcon, X, Share2, Check, Clock as Clock$1, PlayCircle, Workflow, Layers, List, CalendarClock, Timer, CornerDownRight, GitBranch, Repeat, Repeat1, Network, CalendarIcon, Braces, ChevronDownIcon, Brackets, PlusIcon, TrashIcon, Plus, Loader2, Circle, EyeOffIcon, EyeIcon, PauseIcon, HourglassIcon, CircleDashed, Footprints, CircleCheck, CircleX, Minus, Maximize, AlertCircleIcon, CirclePause, StopCircle, Cpu, SearchIcon, ChevronsUpDown, Search, ArrowRight, ArrowLeft, BrainIcon, AudioLinesIcon, StopCircleIcon, FileText, CircleXIcon, Link, CloudUpload, Mic, ArrowUp, SaveIcon, ExternalLink, XIcon, TriangleAlertIcon, ChevronRightIcon, ArrowLeftIcon, ArrowRightIcon, ChevronsRightIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, CircleAlertIcon, PanelRightIcon, KeyboardIcon, GaugeIcon, ChevronsLeftRightEllipsisIcon, CalculatorIcon, HashIcon, FileInputIcon, FileOutputIcon, ReceiptText, Info, RotateCcw, GripVertical, RefreshCcwIcon, AlertTriangleIcon, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, CircleChevronUpIcon, CircleChevronDownIcon, FileIcon, ChevronsUpIcon, ChevronsDownIcon, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, CircleDashedIcon, ArrowRightToLineIcon, CoinsIcon, BracesIcon, CircleGaugeIcon, PanelTopIcon, ListTreeIcon, PanelLeftIcon, CircleSlash, Trash, Link2, MoveRight, Copy } from 'lucide-react';
4
4
  import * as React from 'react';
5
5
  import React__default, { forwardRef, memo, useState, useEffect, useRef, useCallback, useMemo, createContext, useContext, Fragment as Fragment$1, useId, Suspense, useLayoutEffect } from 'react';
6
6
  import { Slot } from '@radix-ui/react-slot';
@@ -19,7 +19,7 @@ import CodeMirror, { EditorView as EditorView$1 } from '@uiw/react-codemirror';
19
19
  import { toast as toast$1 } from 'sonner';
20
20
  import './index.css';export { Toaster } from 'sonner';
21
21
  import * as DialogPrimitive from '@radix-ui/react-dialog';
22
- import { useQuery, useMutation, useInfiniteQuery, useQueryClient, QueryClient, QueryClientProvider } from '@tanstack/react-query';
22
+ import { useQuery, useMutation, useInfiniteQuery, useQueryClient, QueryClient, QueryClientProvider, useQueries } from '@tanstack/react-query';
23
23
  export * from '@tanstack/react-query';
24
24
  import { useMastraClient, mapWorkflowStreamChunkToWatchResult, resolveToChildMessages, useChat, toAssistantUIMessage } from '@mastra/react';
25
25
  import { create } from 'zustand';
@@ -74,6 +74,8 @@ import { languages } from '@codemirror/language-data';
74
74
  import { githubDarkInit } from '@uiw/codemirror-theme-github';
75
75
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
76
76
  import * as TabsPrimitive from '@radix-ui/react-tabs';
77
+ import { Separator, usePanelRef, Panel as Panel$1, useDefaultLayout, Group } from 'react-resizable-panels';
78
+ import semver from 'semver';
77
79
 
78
80
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
79
81
 
@@ -4457,6 +4459,7 @@ const BadgeWrapper = ({
4457
4459
  };
4458
4460
 
4459
4461
  const Dialog = DialogPrimitive.Root;
4462
+ const DialogTrigger = DialogPrimitive.Trigger;
4460
4463
  const DialogPortal = DialogPrimitive.Portal;
4461
4464
  const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4462
4465
  DialogPrimitive.Overlay,
@@ -4954,7 +4957,8 @@ function useTracingSettingsState({ entityId, entityType }) {
4954
4957
  return {
4955
4958
  settings,
4956
4959
  setSettings,
4957
- resetAll
4960
+ resetAll,
4961
+ entityType
4958
4962
  };
4959
4963
  }
4960
4964
 
@@ -4963,7 +4967,8 @@ const TracingSettingsContext = createContext({
4963
4967
  },
4964
4968
  resetAll: () => {
4965
4969
  },
4966
- settings: void 0
4970
+ settings: void 0,
4971
+ entityType: void 0
4967
4972
  });
4968
4973
  const TracingSettingsProvider = ({ children, entityId, entityType }) => {
4969
4974
  const state = useTracingSettingsState({ entityId, entityType });
@@ -5036,7 +5041,7 @@ const useExecuteWorkflow = () => {
5036
5041
  startAsyncWorkflowRun
5037
5042
  };
5038
5043
  };
5039
- const useStreamWorkflow = () => {
5044
+ const useStreamWorkflow = ({ debugMode }) => {
5040
5045
  const client = useMastraClient();
5041
5046
  const { settings } = useTracingSettings();
5042
5047
  const [streamResult, setStreamResult] = useState({});
@@ -5092,6 +5097,10 @@ const useStreamWorkflow = () => {
5092
5097
  if (value.type === "workflow-finish") {
5093
5098
  const streamStatus = value.payload?.workflowStatus;
5094
5099
  const metadata = value.payload?.metadata;
5100
+ setStreamResult((prev) => ({
5101
+ ...prev,
5102
+ status: streamStatus
5103
+ }));
5095
5104
  if (streamStatus === "failed") {
5096
5105
  throw new Error(metadata?.errorMessage || "Workflow execution failed");
5097
5106
  }
@@ -5102,7 +5111,8 @@ const useStreamWorkflow = () => {
5102
5111
  workflowId,
5103
5112
  runId,
5104
5113
  inputData,
5105
- requestContext: playgroundRequestContext
5114
+ requestContext: playgroundRequestContext,
5115
+ perStep
5106
5116
  }) => {
5107
5117
  if (readerRef.current) {
5108
5118
  readerRef.current.releaseLock();
@@ -5120,7 +5130,8 @@ const useStreamWorkflow = () => {
5120
5130
  inputData,
5121
5131
  requestContext,
5122
5132
  closeOnSuspend: true,
5123
- tracingOptions: settings?.tracingOptions
5133
+ tracingOptions: settings?.tracingOptions,
5134
+ perStep: perStep ?? debugMode
5124
5135
  });
5125
5136
  if (!stream) {
5126
5137
  return handleStreamError(new Error("No stream returned"), "No stream returned", setIsStreaming);
@@ -5225,7 +5236,8 @@ const useStreamWorkflow = () => {
5225
5236
  runId,
5226
5237
  step,
5227
5238
  resumeData,
5228
- requestContext: playgroundRequestContext
5239
+ requestContext: playgroundRequestContext,
5240
+ perStep
5229
5241
  }) => {
5230
5242
  if (resumeStreamRef.current) {
5231
5243
  resumeStreamRef.current.releaseLock();
@@ -5242,7 +5254,8 @@ const useStreamWorkflow = () => {
5242
5254
  step,
5243
5255
  resumeData,
5244
5256
  requestContext,
5245
- tracingOptions: settings?.tracingOptions
5257
+ tracingOptions: settings?.tracingOptions,
5258
+ perStep: perStep ?? debugMode
5246
5259
  });
5247
5260
  if (!stream) {
5248
5261
  return handleStreamError(new Error("No stream returned"), "No stream returned", setIsStreaming);
@@ -5288,6 +5301,7 @@ const useStreamWorkflow = () => {
5288
5301
  workflowId,
5289
5302
  requestContext: playgroundRequestContext,
5290
5303
  runId,
5304
+ perStep,
5291
5305
  ...params
5292
5306
  }) => {
5293
5307
  if (timeTravelStreamRef.current) {
@@ -5303,6 +5317,7 @@ const useStreamWorkflow = () => {
5303
5317
  const run = await workflow.createRun({ runId });
5304
5318
  const stream = await run.timeTravelStream({
5305
5319
  ...params,
5320
+ perStep: perStep ?? debugMode,
5306
5321
  requestContext,
5307
5322
  tracingOptions: settings?.tracingOptions
5308
5323
  });
@@ -5554,6 +5569,7 @@ function WorkflowRunProvider({
5554
5569
  const [payload, setPayload] = useState(() => snapshot?.context?.input ?? null);
5555
5570
  const [runId, setRunId] = useState(() => initialRunId ?? "");
5556
5571
  const [isRunning, setIsRunning] = useState(false);
5572
+ const [debugMode, setDebugMode] = useState(false);
5557
5573
  const refetchExecResultInterval = isRunning ? void 0 : ["success", "failed", "canceled", "bailed"].includes(result?.status ?? "") ? void 0 : 5e3;
5558
5574
  const { isLoading: isLoadingRunExecutionResult, data: runExecutionResult } = useWorkflowRunExecutionResult(
5559
5575
  workflowId,
@@ -5583,7 +5599,7 @@ function WorkflowRunProvider({
5583
5599
  closeStreamsAndReset,
5584
5600
  resumeWorkflowStream,
5585
5601
  timeTravelWorkflowStream
5586
- } = useStreamWorkflow();
5602
+ } = useStreamWorkflow({ debugMode });
5587
5603
  const { mutateAsync: cancelWorkflowRun, isPending: isCancellingWorkflowRun } = useCancelWorkflowRun();
5588
5604
  const clearData = () => {
5589
5605
  setResult(null);
@@ -5639,7 +5655,9 @@ function WorkflowRunProvider({
5639
5655
  },
5640
5656
  runSnapshot,
5641
5657
  isLoadingRunExecutionResult,
5642
- withoutTimeTravel
5658
+ withoutTimeTravel,
5659
+ debugMode,
5660
+ setDebugMode
5643
5661
  },
5644
5662
  children: /* @__PURE__ */ jsx(WorkflowStepDetailProvider, { children })
5645
5663
  }
@@ -7817,17 +7835,24 @@ const JsonField = ({
7817
7835
  ] })
7818
7836
  ] });
7819
7837
  };
7820
- const WorkflowTimeTravelForm = ({ stepKey, closeModal }) => {
7838
+ const WorkflowTimeTravelForm = ({
7839
+ stepKey,
7840
+ closeModal,
7841
+ isPerStepRun,
7842
+ isContinueRun,
7843
+ buttonText = "Start time travel",
7844
+ inputData
7845
+ }) => {
7821
7846
  const {
7822
7847
  result,
7823
7848
  workflow,
7824
7849
  timeTravelWorkflowStream,
7825
- createWorkflowRun,
7826
7850
  runId: prevRunId,
7827
- workflowId
7851
+ workflowId,
7852
+ setDebugMode
7828
7853
  } = useContext(WorkflowRunContext);
7829
7854
  const { requestContext } = usePlaygroundStore();
7830
- const stepResult = result?.steps?.[stepKey];
7855
+ const stepResult = inputData ? { payload: inputData } : result?.steps?.[stepKey];
7831
7856
  const [resumeData, setResumeData] = useState(() => "{}");
7832
7857
  const [contextValue, setContextValue] = useState(() => "{}");
7833
7858
  const [nestedContextValue, setNestedContextValue] = useState(() => "{}");
@@ -7853,17 +7878,20 @@ const WorkflowTimeTravelForm = ({ stepKey, closeModal }) => {
7853
7878
  const parsedResume = resumeData.trim() ? JSON.parse(resumeData) : {};
7854
7879
  const parsedContext = contextValue.trim() ? JSON.parse(contextValue) : {};
7855
7880
  const parsedNestedContext = nestedContextValue.trim() ? JSON.parse(nestedContextValue) : {};
7856
- const run = await createWorkflowRun({ workflowId, prevRunId });
7857
7881
  const payload = {
7858
- runId: run.runId,
7882
+ runId: prevRunId,
7859
7883
  workflowId,
7860
7884
  step: stepKey,
7861
7885
  inputData: data,
7862
7886
  resumeData: Object.keys(parsedResume)?.length > 0 ? parsedResume : void 0,
7863
7887
  context: Object.keys(parsedContext)?.length > 0 ? parsedContext : void 0,
7864
7888
  nestedStepsContext: Object.keys(parsedNestedContext)?.length > 0 ? parsedNestedContext : void 0,
7865
- requestContext
7889
+ requestContext,
7890
+ ...isContinueRun ? { perStep: false } : {}
7866
7891
  };
7892
+ if (isContinueRun) {
7893
+ setDebugMode(false);
7894
+ }
7867
7895
  timeTravelWorkflowStream(payload);
7868
7896
  closeModal();
7869
7897
  } catch (error) {
@@ -7887,47 +7915,27 @@ const WorkflowTimeTravelForm = ({ stepKey, closeModal }) => {
7887
7915
  schema: stepSchema,
7888
7916
  defaultValues: stepResult?.payload,
7889
7917
  isSubmitLoading: isSubmitting,
7890
- submitButtonLabel: "Start time travel",
7918
+ submitButtonLabel: buttonText,
7891
7919
  onSubmit: handleSubmit,
7892
7920
  children: /* @__PURE__ */ jsxs("div", { className: "space-y-4 pb-4", children: [
7893
- /* @__PURE__ */ jsx(
7894
- JsonField,
7895
- {
7896
- label: "Resume Data (JSON)",
7897
- value: resumeData,
7898
- onChange: setResumeData,
7899
- helperText: "Provide any resume payloads that should be passed to the step."
7900
- }
7901
- ),
7902
- /* @__PURE__ */ jsx(
7903
- JsonField,
7904
- {
7905
- label: "Context (JSON)",
7906
- value: contextValue,
7907
- onChange: setContextValue,
7908
- helperText: "Only include top level steps (no nested workflow steps) that are required in the time travel execution.",
7909
- exampleCode: prettyJson({
7910
- stepId: {
7911
- status: "success",
7912
- payload: {
7913
- value: "test value"
7914
- },
7915
- output: {
7916
- value: "test output"
7917
- }
7918
- }
7919
- })
7920
- }
7921
- ),
7922
- /* @__PURE__ */ jsx(
7923
- JsonField,
7924
- {
7925
- label: "Nested Step Context (JSON)",
7926
- value: nestedContextValue,
7927
- onChange: setNestedContextValue,
7928
- helperText: "Includes nested workflow steps that are required in the time travel execution.",
7929
- exampleCode: prettyJson({
7930
- nestedWorkflowId: {
7921
+ isPerStepRun || isContinueRun ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
7922
+ /* @__PURE__ */ jsx(
7923
+ JsonField,
7924
+ {
7925
+ label: "Resume Data (JSON)",
7926
+ value: resumeData,
7927
+ onChange: setResumeData,
7928
+ helperText: "Provide any resume payloads that should be passed to the step."
7929
+ }
7930
+ ),
7931
+ /* @__PURE__ */ jsx(
7932
+ JsonField,
7933
+ {
7934
+ label: "Context (JSON)",
7935
+ value: contextValue,
7936
+ onChange: setContextValue,
7937
+ helperText: "Only include top level steps (no nested workflow steps) that are required in the time travel execution.",
7938
+ exampleCode: prettyJson({
7931
7939
  stepId: {
7932
7940
  status: "success",
7933
7941
  payload: {
@@ -7937,10 +7945,32 @@ const WorkflowTimeTravelForm = ({ stepKey, closeModal }) => {
7937
7945
  value: "test output"
7938
7946
  }
7939
7947
  }
7940
- }
7941
- })
7942
- }
7943
- ),
7948
+ })
7949
+ }
7950
+ ),
7951
+ /* @__PURE__ */ jsx(
7952
+ JsonField,
7953
+ {
7954
+ label: "Nested Step Context (JSON)",
7955
+ value: nestedContextValue,
7956
+ onChange: setNestedContextValue,
7957
+ helperText: "Includes nested workflow steps that are required in the time travel execution.",
7958
+ exampleCode: prettyJson({
7959
+ nestedWorkflowId: {
7960
+ stepId: {
7961
+ status: "success",
7962
+ payload: {
7963
+ value: "test value"
7964
+ },
7965
+ output: {
7966
+ value: "test output"
7967
+ }
7968
+ }
7969
+ }
7970
+ })
7971
+ }
7972
+ )
7973
+ ] }),
7944
7974
  formError && /* @__PURE__ */ jsx(Txt, { variant: "ui-sm", className: "text-accent2", children: formError })
7945
7975
  ] })
7946
7976
  }
@@ -7960,7 +7990,8 @@ const WorkflowStepActionBar = ({
7960
7990
  stepId,
7961
7991
  onShowNestedGraph,
7962
7992
  status,
7963
- stepKey
7993
+ stepKey,
7994
+ stepsFlow
7964
7995
  }) => {
7965
7996
  const [isInputOpen, setIsInputOpen] = useState(false);
7966
7997
  const [isOutputOpen, setIsOutputOpen] = useState(false);
@@ -7968,11 +7999,53 @@ const WorkflowStepActionBar = ({
7968
7999
  const [isErrorOpen, setIsErrorOpen] = useState(false);
7969
8000
  const [isTripwireOpen, setIsTripwireOpen] = useState(false);
7970
8001
  const [isTimeTravelOpen, setIsTimeTravelOpen] = useState(false);
7971
- const { withoutTimeTravel } = useContext(WorkflowRunContext);
8002
+ const [isContinueRunOpen, setIsContinueRunOpen] = useState(false);
8003
+ const [isPerStepRunOpen, setIsPerStepRunOpen] = useState(false);
8004
+ const {
8005
+ withoutTimeTravel,
8006
+ debugMode,
8007
+ result,
8008
+ runSnapshot,
8009
+ timeTravelWorkflowStream,
8010
+ runId: prevRunId,
8011
+ workflowId,
8012
+ setDebugMode
8013
+ } = useContext(WorkflowRunContext);
7972
8014
  const { showMapConfig, stepDetail, closeStepDetail } = useWorkflowStepDetail();
8015
+ const { requestContext } = usePlaygroundStore();
8016
+ const workflowStatus = result?.status ?? runSnapshot?.status;
7973
8017
  const dialogContentClass = "bg-surface2 rounded-lg border-sm border-border1 max-w-4xl w-full px-0";
7974
8018
  const dialogTitleClass = "border-b-sm border-border1 pb-4 px-6";
7975
- const showTimeTravel = !withoutTimeTravel && stepKey && !mapConfig;
8019
+ const showTimeTravel = !withoutTimeTravel && stepKey && !mapConfig && workflowStatus !== "running" && workflowStatus !== "paused";
8020
+ const inDebugMode = stepKey && debugMode && workflowStatus === "paused";
8021
+ const stepPayload = useMemo(() => {
8022
+ if (!stepKey || !inDebugMode) return void 0;
8023
+ const previousSteps = stepsFlow?.[stepKey] ?? [];
8024
+ if (previousSteps.length === 0) return void 0;
8025
+ if (previousSteps.length > 1) {
8026
+ return {
8027
+ hasMultiSteps: true,
8028
+ input: previousSteps.reduce(
8029
+ (acc, stepId2) => {
8030
+ if (result?.steps?.[stepId2]?.status === "success") {
8031
+ acc[stepId2] = result?.steps?.[stepId2].output;
8032
+ }
8033
+ return acc;
8034
+ },
8035
+ {}
8036
+ )
8037
+ };
8038
+ }
8039
+ const prevStepId = previousSteps[0];
8040
+ if (result?.steps?.[prevStepId]?.status === "success") {
8041
+ return {
8042
+ hasMultiSteps: false,
8043
+ input: result?.steps?.[prevStepId].output
8044
+ };
8045
+ }
8046
+ return void 0;
8047
+ }, [stepKey, stepsFlow, inDebugMode, result]);
8048
+ const showDebugMode = inDebugMode && stepPayload && !result?.steps[stepKey];
7976
8049
  const isMapConfigOpen = stepDetail?.type === "map-config" && stepDetail?.stepName === stepName;
7977
8050
  const isNestedGraphOpen = stepDetail?.type === "nested-graph" && stepDetail?.stepName === stepName;
7978
8051
  const activeButtonClass = "ring-2 ring-accent1 ring-offset-1 ring-offset-transparent";
@@ -7990,7 +8063,32 @@ const WorkflowStepActionBar = ({
7990
8063
  onShowNestedGraph?.();
7991
8064
  }
7992
8065
  };
7993
- return /* @__PURE__ */ jsx(Fragment, { children: (input || output || error || tripwire || mapConfig || resumeData || onShowNestedGraph || showTimeTravel) && /* @__PURE__ */ jsxs(
8066
+ const handleRunMapStep = (isContinueRun) => {
8067
+ const payload = {
8068
+ runId: prevRunId,
8069
+ workflowId,
8070
+ step: stepKey,
8071
+ inputData: stepPayload?.hasMultiSteps ? void 0 : stepPayload?.input,
8072
+ requestContext,
8073
+ ...isContinueRun ? { perStep: false } : {},
8074
+ ...stepPayload?.hasMultiSteps ? {
8075
+ context: Object.keys(stepPayload.input)?.reduce(
8076
+ (acc, stepId2) => {
8077
+ acc[stepId2] = {
8078
+ output: stepPayload.input[stepId2]
8079
+ };
8080
+ return acc;
8081
+ },
8082
+ {}
8083
+ )
8084
+ } : {}
8085
+ };
8086
+ if (isContinueRun) {
8087
+ setDebugMode(false);
8088
+ }
8089
+ timeTravelWorkflowStream(payload);
8090
+ };
8091
+ return /* @__PURE__ */ jsx(Fragment, { children: (input || output || error || tripwire || mapConfig || resumeData || onShowNestedGraph || showTimeTravel || showDebugMode) && /* @__PURE__ */ jsxs(
7994
8092
  "div",
7995
8093
  {
7996
8094
  className: cn(
@@ -8014,6 +8112,66 @@ const WorkflowStepActionBar = ({
8014
8112
  /* @__PURE__ */ jsx("div", { className: "px-4 overflow-scroll max-h-[600px]", children: /* @__PURE__ */ jsx(WorkflowTimeTravelForm, { stepKey, closeModal: () => setIsTimeTravelOpen(false) }) })
8015
8113
  ] }) })
8016
8114
  ] }),
8115
+ showDebugMode && /* @__PURE__ */ jsxs(Fragment, { children: [
8116
+ /* @__PURE__ */ jsx(
8117
+ Button$1,
8118
+ {
8119
+ onClick: () => {
8120
+ if (mapConfig) {
8121
+ handleRunMapStep();
8122
+ } else {
8123
+ setIsPerStepRunOpen(true);
8124
+ }
8125
+ },
8126
+ children: "Run step"
8127
+ }
8128
+ ),
8129
+ /* @__PURE__ */ jsx(Dialog, { open: isPerStepRunOpen, onOpenChange: setIsPerStepRunOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: dialogContentClass, children: [
8130
+ /* @__PURE__ */ jsxs(DialogTitle, { className: dialogTitleClass, children: [
8131
+ "Run step ",
8132
+ stepKey
8133
+ ] }),
8134
+ /* @__PURE__ */ jsx("div", { className: "px-4 overflow-scroll max-h-[600px]", children: /* @__PURE__ */ jsx(
8135
+ WorkflowTimeTravelForm,
8136
+ {
8137
+ stepKey,
8138
+ closeModal: () => setIsPerStepRunOpen(false),
8139
+ isPerStepRun: true,
8140
+ buttonText: "Run step",
8141
+ inputData: stepPayload?.input
8142
+ }
8143
+ ) })
8144
+ ] }) }),
8145
+ /* @__PURE__ */ jsx(
8146
+ Button$1,
8147
+ {
8148
+ onClick: () => {
8149
+ if (mapConfig) {
8150
+ handleRunMapStep(true);
8151
+ } else {
8152
+ setIsContinueRunOpen(true);
8153
+ }
8154
+ },
8155
+ children: "Continue run"
8156
+ }
8157
+ ),
8158
+ /* @__PURE__ */ jsx(Dialog, { open: isContinueRunOpen, onOpenChange: setIsContinueRunOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: dialogContentClass, children: [
8159
+ /* @__PURE__ */ jsxs(DialogTitle, { className: dialogTitleClass, children: [
8160
+ "Continue run ",
8161
+ stepKey
8162
+ ] }),
8163
+ /* @__PURE__ */ jsx("div", { className: "px-4 overflow-scroll max-h-[600px]", children: /* @__PURE__ */ jsx(
8164
+ WorkflowTimeTravelForm,
8165
+ {
8166
+ stepKey,
8167
+ closeModal: () => setIsContinueRunOpen(false),
8168
+ isContinueRun: true,
8169
+ buttonText: "Continue run",
8170
+ inputData: stepPayload?.input
8171
+ }
8172
+ ) })
8173
+ ] }) })
8174
+ ] }),
8017
8175
  mapConfig && /* @__PURE__ */ jsx(Button$1, { onClick: handleMapConfigClick, className: cn(isMapConfigOpen && activeButtonClass), children: "Map config" }),
8018
8176
  input && /* @__PURE__ */ jsxs(Fragment, { children: [
8019
8177
  /* @__PURE__ */ jsx(Button$1, { onClick: () => setIsInputOpen(true), children: "Input" }),
@@ -8246,7 +8404,11 @@ const Clock = ({ startedAt, endedAt }) => {
8246
8404
  ] });
8247
8405
  };
8248
8406
 
8249
- function WorkflowDefaultNode({ data, parentWorkflowName }) {
8407
+ function WorkflowDefaultNode({
8408
+ data,
8409
+ parentWorkflowName,
8410
+ stepsFlow
8411
+ }) {
8250
8412
  const { steps } = useCurrentRun();
8251
8413
  const {
8252
8414
  label,
@@ -8346,7 +8508,8 @@ function WorkflowDefaultNode({ data, parentWorkflowName }) {
8346
8508
  tripwire: isTripwire ? step?.tripwire : void 0,
8347
8509
  mapConfig,
8348
8510
  status: displayStatus,
8349
- stepKey
8511
+ stepKey,
8512
+ stepsFlow
8350
8513
  }
8351
8514
  )
8352
8515
  ]
@@ -8409,36 +8572,13 @@ function WorkflowLoopResultNode({ data }) {
8409
8572
  );
8410
8573
  }
8411
8574
 
8412
- const WorkflowNestedGraphContext = createContext(
8413
- {}
8414
- );
8415
- function WorkflowNestedGraphProvider({ children }) {
8416
- const { showNestedGraph: showNestedGraphInPanel, closeStepDetail } = useWorkflowStepDetail();
8417
- const showNestedGraph = ({
8418
- label,
8419
- stepGraph,
8420
- fullStep
8421
- }) => {
8422
- showNestedGraphInPanel({ label, stepGraph, fullStep });
8423
- };
8424
- const closeNestedGraph = () => {
8425
- closeStepDetail();
8426
- };
8427
- return /* @__PURE__ */ jsx(
8428
- WorkflowNestedGraphContext.Provider,
8429
- {
8430
- value: {
8431
- showNestedGraph,
8432
- closeNestedGraph
8433
- },
8434
- children
8435
- }
8436
- );
8437
- }
8438
-
8439
- function WorkflowNestedNode({ data, parentWorkflowName }) {
8575
+ function WorkflowNestedNode({
8576
+ data,
8577
+ parentWorkflowName,
8578
+ stepsFlow
8579
+ }) {
8440
8580
  const { steps } = useCurrentRun();
8441
- const { showNestedGraph } = useContext(WorkflowNestedGraphContext);
8581
+ const { showNestedGraph } = useWorkflowStepDetail();
8442
8582
  const {
8443
8583
  label,
8444
8584
  stepId,
@@ -8520,7 +8660,8 @@ function WorkflowNestedNode({ data, parentWorkflowName }) {
8520
8660
  mapConfig,
8521
8661
  onShowNestedGraph: () => showNestedGraph({ label, fullStep: fullLabel, stepGraph }),
8522
8662
  status: displayStatus,
8523
- stepKey
8663
+ stepKey,
8664
+ stepsFlow
8524
8665
  }
8525
8666
  )
8526
8667
  ]
@@ -8577,12 +8718,28 @@ function WorkflowGraphInner({ workflow }) {
8577
8718
  const [nodes, _, onNodesChange] = useNodesState(initialNodes);
8578
8719
  const [edges] = useEdgesState(initialEdges);
8579
8720
  const { steps } = useCurrentRun();
8721
+ const stepsFlow = useMemo(() => {
8722
+ return initialEdges.reduce(
8723
+ (acc, edge) => {
8724
+ if (edge.data) {
8725
+ const stepId = edge.data.nextStepId;
8726
+ const prevStepId = edge.data.previousStepId;
8727
+ return {
8728
+ ...acc,
8729
+ [stepId]: [.../* @__PURE__ */ new Set([...acc[stepId] || [], prevStepId])]
8730
+ };
8731
+ }
8732
+ return acc;
8733
+ },
8734
+ {}
8735
+ );
8736
+ }, [initialEdges]);
8580
8737
  const nodeTypes = {
8581
- "default-node": WorkflowDefaultNode,
8738
+ "default-node": (props) => /* @__PURE__ */ jsx(WorkflowDefaultNode, { ...props, stepsFlow }),
8582
8739
  "condition-node": WorkflowConditionNode,
8583
8740
  "after-node": WorkflowAfterNode,
8584
8741
  "loop-result-node": WorkflowLoopResultNode,
8585
- "nested-node": WorkflowNestedNode
8742
+ "nested-node": (props) => /* @__PURE__ */ jsx(WorkflowNestedNode, { ...props, stepsFlow })
8586
8743
  };
8587
8744
  return /* @__PURE__ */ jsx("div", { className: "w-full h-full bg-surface1", children: /* @__PURE__ */ jsxs(
8588
8745
  ReactFlow,
@@ -8611,6 +8768,33 @@ function WorkflowGraphInner({ workflow }) {
8611
8768
  ) });
8612
8769
  }
8613
8770
 
8771
+ const WorkflowNestedGraphContext = createContext(
8772
+ {}
8773
+ );
8774
+ function WorkflowNestedGraphProvider({ children }) {
8775
+ const { showNestedGraph: showNestedGraphInPanel, closeStepDetail } = useWorkflowStepDetail();
8776
+ const showNestedGraph = ({
8777
+ label,
8778
+ stepGraph,
8779
+ fullStep
8780
+ }) => {
8781
+ showNestedGraphInPanel({ label, stepGraph, fullStep });
8782
+ };
8783
+ const closeNestedGraph = () => {
8784
+ closeStepDetail();
8785
+ };
8786
+ return /* @__PURE__ */ jsx(
8787
+ WorkflowNestedGraphContext.Provider,
8788
+ {
8789
+ value: {
8790
+ showNestedGraph,
8791
+ closeNestedGraph
8792
+ },
8793
+ children
8794
+ }
8795
+ );
8796
+ }
8797
+
8614
8798
  function WorkflowGraph({ workflowId, workflow, isLoading }) {
8615
8799
  const { snapshot } = useContext(WorkflowRunContext);
8616
8800
  if (isLoading) {
@@ -9499,7 +9683,7 @@ const PlaygroundTabs = ({
9499
9683
  setInternalTab(typedValue);
9500
9684
  }
9501
9685
  };
9502
- return /* @__PURE__ */ jsx(Tabs$1, { value: currentTab, onValueChange: handleTabChange, className: cn("h-full", className), children });
9686
+ return /* @__PURE__ */ jsx(Tabs$1, { value: currentTab, onValueChange: handleTabChange, className: cn("h-full overflow-x-auto", className), children });
9503
9687
  };
9504
9688
  const TabList$1 = ({ children, className }) => {
9505
9689
  return /* @__PURE__ */ jsx("div", { className: cn("w-full overflow-x-auto", className), children: /* @__PURE__ */ jsx(TabsList, { className: "border-b border-border1 flex min-w-full shrink-0", children }) });
@@ -9533,9 +9717,17 @@ const TabContent$1 = ({ children, value }) => {
9533
9717
  return /* @__PURE__ */ jsx(TabsContent, { value, className: "h-full overflow-auto flex flex-col", children });
9534
9718
  };
9535
9719
 
9720
+ const WorkflowRunOptions = () => {
9721
+ const { debugMode, setDebugMode } = useContext(WorkflowRunContext);
9722
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9723
+ /* @__PURE__ */ jsx(Txt, { as: "h3", variant: "ui-md", className: "text-icon3", children: "Debug Mode" }),
9724
+ /* @__PURE__ */ jsx(Checkbox, { checked: debugMode, onCheckedChange: (value) => setDebugMode(value) })
9725
+ ] });
9726
+ };
9727
+
9536
9728
  const TracingRunOptions = () => {
9537
9729
  const theme = useCodemirrorTheme$1();
9538
- const { settings, setSettings } = useTracingSettings();
9730
+ const { settings, setSettings, entityType } = useTracingSettings();
9539
9731
  const handleChange = (value) => {
9540
9732
  if (!value) {
9541
9733
  return setSettings({ ...settings, tracingOptions: void 0 });
@@ -9564,7 +9756,8 @@ const TracingRunOptions = () => {
9564
9756
  extensions: [jsonLanguage],
9565
9757
  className: "h-[400px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"
9566
9758
  }
9567
- )
9759
+ ),
9760
+ entityType === "workflow" && /* @__PURE__ */ jsx(WorkflowRunOptions, {})
9568
9761
  ] });
9569
9762
  };
9570
9763
 
@@ -9595,12 +9788,28 @@ function WorkflowNestedGraph({ stepGraph, open, workflowName }) {
9595
9788
  const [nodes, _, onNodesChange] = useNodesState(initialNodes);
9596
9789
  const [edges] = useEdgesState(initialEdges);
9597
9790
  const { steps } = useCurrentRun();
9791
+ const stepsFlow = useMemo(() => {
9792
+ return initialEdges.reduce(
9793
+ (acc, edge) => {
9794
+ if (edge.data) {
9795
+ const stepId = edge.data.nextStepId;
9796
+ const prevStepId = edge.data.previousStepId;
9797
+ return {
9798
+ ...acc,
9799
+ [stepId]: [.../* @__PURE__ */ new Set([...acc[stepId] || [], prevStepId])]
9800
+ };
9801
+ }
9802
+ return acc;
9803
+ },
9804
+ {}
9805
+ );
9806
+ }, [initialEdges]);
9598
9807
  const nodeTypes = {
9599
- "default-node": (props) => /* @__PURE__ */ jsx(WorkflowDefaultNode, { parentWorkflowName: workflowName, ...props }),
9808
+ "default-node": (props) => /* @__PURE__ */ jsx(WorkflowDefaultNode, { parentWorkflowName: workflowName, ...props, stepsFlow }),
9600
9809
  "condition-node": WorkflowConditionNode,
9601
9810
  "after-node": WorkflowAfterNode,
9602
9811
  "loop-result-node": WorkflowLoopResultNode,
9603
- "nested-node": (props) => /* @__PURE__ */ jsx(WorkflowNestedNode, { parentWorkflowName: workflowName, ...props })
9812
+ "nested-node": (props) => /* @__PURE__ */ jsx(WorkflowNestedNode, { parentWorkflowName: workflowName, ...props, stepsFlow })
9604
9813
  };
9605
9814
  useEffect(() => {
9606
9815
  if (open) {
@@ -9670,7 +9879,7 @@ function WorkflowStepDetailContent() {
9670
9879
  open: true,
9671
9880
  workflowName: stepDetail.nestedGraph.fullStep
9672
9881
  }
9673
- ) }) })
9882
+ ) }, stepDetail.nestedGraph.fullStep) })
9674
9883
  ] })
9675
9884
  ] });
9676
9885
  }
@@ -9810,8 +10019,7 @@ function Combobox({
9810
10019
  emptyText = "No option found.",
9811
10020
  className,
9812
10021
  disabled = false,
9813
- buttonClassName,
9814
- contentClassName
10022
+ variant = "default"
9815
10023
  }) {
9816
10024
  const [open, setOpen] = React.useState(false);
9817
10025
  const [search, setSearch] = React.useState("");
@@ -9889,78 +10097,71 @@ function Combobox({
9889
10097
  Button$2,
9890
10098
  {
9891
10099
  ref: triggerRef,
9892
- variant: "outline",
10100
+ variant,
9893
10101
  role: "combobox",
9894
10102
  "aria-expanded": open,
9895
- className: cn("w-full justify-between", buttonClassName, className),
10103
+ className: cn("w-full justify-between", className),
9896
10104
  disabled,
10105
+ size: "sm",
9897
10106
  children: [
9898
10107
  /* @__PURE__ */ jsx("span", { className: "truncate text-ui-lg", children: selectedOption ? selectedOption.label : placeholder }),
9899
10108
  /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
9900
10109
  ]
9901
10110
  }
9902
10111
  ) }),
9903
- /* @__PURE__ */ jsx(
9904
- PopoverContent,
9905
- {
9906
- className: cn("p-0", contentClassName),
9907
- align: "start",
9908
- style: { width: triggerWidth ? `${triggerWidth}px` : void 0 },
9909
- children: /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", children: [
9910
- /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3 py-2", children: [
9911
- /* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
9912
- /* @__PURE__ */ jsx(
9913
- "input",
10112
+ /* @__PURE__ */ jsx(PopoverContent, { className: "p-0 w-fit", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", children: [
10113
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3 py-2", children: [
10114
+ /* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
10115
+ /* @__PURE__ */ jsx(
10116
+ "input",
10117
+ {
10118
+ ref: inputRef,
10119
+ className: "flex h-8 w-full rounded-md bg-transparent py-1 text-sm placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 outline-none",
10120
+ placeholder: searchPlaceholder,
10121
+ value: search,
10122
+ onChange: (e) => setSearch(e.target.value),
10123
+ onKeyDown: handleKeyDown,
10124
+ role: "combobox",
10125
+ "aria-autocomplete": "list",
10126
+ "aria-controls": "combobox-options",
10127
+ "aria-expanded": open
10128
+ }
10129
+ )
10130
+ ] }),
10131
+ /* @__PURE__ */ jsx(
10132
+ "div",
10133
+ {
10134
+ ref: listRef,
10135
+ id: "combobox-options",
10136
+ role: "listbox",
10137
+ className: "max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",
10138
+ children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-sm", children: emptyText }) : filteredOptions.map((option, index) => {
10139
+ const isSelected = value === option.value;
10140
+ const isHighlighted = index === highlightedIndex;
10141
+ return /* @__PURE__ */ jsxs(
10142
+ "div",
9914
10143
  {
9915
- ref: inputRef,
9916
- className: "flex h-8 w-full rounded-md bg-transparent py-1 text-sm placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 outline-none",
9917
- placeholder: searchPlaceholder,
9918
- value: search,
9919
- onChange: (e) => setSearch(e.target.value),
9920
- onKeyDown: handleKeyDown,
9921
- role: "combobox",
9922
- "aria-autocomplete": "list",
9923
- "aria-controls": "combobox-options",
9924
- "aria-expanded": open
9925
- }
9926
- )
9927
- ] }),
9928
- /* @__PURE__ */ jsx(
9929
- "div",
9930
- {
9931
- ref: listRef,
9932
- id: "combobox-options",
9933
- role: "listbox",
9934
- className: "max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",
9935
- children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-sm", children: emptyText }) : filteredOptions.map((option, index) => {
9936
- const isSelected = value === option.value;
9937
- const isHighlighted = index === highlightedIndex;
9938
- return /* @__PURE__ */ jsxs(
9939
- "div",
9940
- {
9941
- role: "option",
9942
- "aria-selected": isSelected,
9943
- className: cn(
9944
- "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm transition-colors",
9945
- "hover:bg-accent hover:text-accent-foreground",
9946
- isHighlighted && "bg-accent text-accent-foreground",
9947
- isSelected && !isHighlighted && "bg-accent/50"
9948
- ),
9949
- onClick: () => handleSelect(option.value),
9950
- onMouseEnter: () => setHighlightedIndex(index),
9951
- children: [
9952
- /* @__PURE__ */ jsx(Check, { className: cn("mr-2 h-4 w-4", isSelected ? "opacity-100" : "opacity-0") }),
9953
- option.label
9954
- ]
9955
- },
9956
- option.value
9957
- );
9958
- })
9959
- }
9960
- )
9961
- ] })
9962
- }
9963
- )
10144
+ role: "option",
10145
+ "aria-selected": isSelected,
10146
+ className: cn(
10147
+ "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm transition-colors",
10148
+ "hover:bg-accent hover:text-accent-foreground",
10149
+ isHighlighted && "bg-accent text-accent-foreground",
10150
+ isSelected && !isHighlighted && "bg-accent/50"
10151
+ ),
10152
+ onClick: () => handleSelect(option.value),
10153
+ onMouseEnter: () => setHighlightedIndex(index),
10154
+ children: [
10155
+ /* @__PURE__ */ jsx(Check, { className: cn("mr-2 h-4 w-4", isSelected ? "opacity-100" : "opacity-0") }),
10156
+ option.label
10157
+ ]
10158
+ },
10159
+ option.value
10160
+ );
10161
+ })
10162
+ }
10163
+ )
10164
+ ] }) })
9964
10165
  ] });
9965
10166
  }
9966
10167
 
@@ -9971,9 +10172,7 @@ function WorkflowCombobox({
9971
10172
  searchPlaceholder = "Search workflows...",
9972
10173
  emptyText = "No workflows found.",
9973
10174
  className,
9974
- disabled = false,
9975
- buttonClassName = "h-8",
9976
- contentClassName
10175
+ disabled = false
9977
10176
  }) {
9978
10177
  const { data: workflows = {}, isLoading, isError, error } = useWorkflows();
9979
10178
  const { navigate, paths } = useLinkComponent();
@@ -10005,11 +10204,166 @@ function WorkflowCombobox({
10005
10204
  emptyText,
10006
10205
  className,
10007
10206
  disabled: disabled || isLoading || isError,
10008
- buttonClassName,
10009
- contentClassName
10207
+ variant: "ghost"
10208
+ }
10209
+ );
10210
+ }
10211
+
10212
+ function MainContentLayout({
10213
+ children,
10214
+ className,
10215
+ style
10216
+ }) {
10217
+ const devStyleRequested = devUIStyleRequested("MainContentLayout");
10218
+ return /* @__PURE__ */ jsx(
10219
+ "main",
10220
+ {
10221
+ className: cn(`grid grid-rows-[auto_1fr] h-full items-start content-start`, className),
10222
+ style: { ...style, ...devStyleRequested ? { border: "3px dotted red" } : {} },
10223
+ children
10010
10224
  }
10011
10225
  );
10012
10226
  }
10227
+ function MainContentContent({
10228
+ children,
10229
+ className,
10230
+ isCentered = false,
10231
+ isDivided = false,
10232
+ hasLeftServiceColumn = false,
10233
+ style
10234
+ }) {
10235
+ const devStyleRequested = devUIStyleRequested("MainContentContent");
10236
+ const contentClassName = getMainContentContentClassName({ isCentered, isDivided, hasLeftServiceColumn, className });
10237
+ return /* @__PURE__ */ jsx(
10238
+ "div",
10239
+ {
10240
+ className: contentClassName,
10241
+ style: { ...style, ...devStyleRequested ? { border: "3px dotted orange" } : {} },
10242
+ children
10243
+ }
10244
+ );
10245
+ }
10246
+ const getMainContentContentClassName = ({
10247
+ isCentered,
10248
+ isDivided,
10249
+ hasLeftServiceColumn,
10250
+ className
10251
+ }) => {
10252
+ return cn(
10253
+ `grid overflow-y-auto h-full `,
10254
+ `overflow-x-auto min-w-[min-content]`,
10255
+ {
10256
+ "items-start content-start": !isCentered && !isDivided && !hasLeftServiceColumn,
10257
+ "grid place-items-center": isCentered,
10258
+ "grid-cols-[1fr_1fr]": isDivided && !hasLeftServiceColumn,
10259
+ "grid-cols-[12rem_1fr_1fr]": isDivided && hasLeftServiceColumn,
10260
+ "grid-cols-[auto_1fr]": !isDivided && hasLeftServiceColumn
10261
+ },
10262
+ className
10263
+ );
10264
+ };
10265
+ function devUIStyleRequested(name) {
10266
+ try {
10267
+ const raw = localStorage.getItem("add-dev-style-to-components");
10268
+ if (!raw) return false;
10269
+ const components = raw.split(",").map((c) => c.trim()).filter(Boolean);
10270
+ return components.includes(name);
10271
+ } catch (error) {
10272
+ console.error("Error reading or parsing localStorage:", error);
10273
+ return false;
10274
+ }
10275
+ }
10276
+
10277
+ const PanelSeparator = () => {
10278
+ return /* @__PURE__ */ jsx(
10279
+ Separator,
10280
+ {
10281
+ className: clsx(
10282
+ "w-1.5 bg-surface3",
10283
+ "[&[data-separator='hover']]:!bg-surface4",
10284
+ "[&[data-separator='active']]:!bg-surface5",
10285
+ "focus:outline-none"
10286
+ )
10287
+ }
10288
+ );
10289
+ };
10290
+
10291
+ const CollapsiblePanel = ({ collapsedSize, children, direction, ...props }) => {
10292
+ const [collapsed, setCollapsed] = useState(false);
10293
+ const panelRef = usePanelRef();
10294
+ const expand = () => {
10295
+ if (!panelRef.current) return;
10296
+ panelRef.current.expand();
10297
+ };
10298
+ return /* @__PURE__ */ jsx(
10299
+ Panel$1,
10300
+ {
10301
+ panelRef,
10302
+ collapsedSize,
10303
+ ...props,
10304
+ onResize: (size) => {
10305
+ if (!collapsedSize) return;
10306
+ if (typeof collapsedSize !== "number") return;
10307
+ if (size.inPixels <= collapsedSize) {
10308
+ setCollapsed(true);
10309
+ } else if (collapsed) {
10310
+ setCollapsed(false);
10311
+ }
10312
+ },
10313
+ children: collapsed ? /* @__PURE__ */ jsxs(Tooltip, { children: [
10314
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button$1, { onClick: expand, className: "!h-48 border-none", children: /* @__PURE__ */ jsx(Icon, { children: direction === "left" ? /* @__PURE__ */ jsx(ArrowRight, {}) : /* @__PURE__ */ jsx(ArrowLeft, {}) }) }) }) }),
10315
+ /* @__PURE__ */ jsx(TooltipContent, { children: "Expand" })
10316
+ ] }) : children
10317
+ }
10318
+ );
10319
+ };
10320
+
10321
+ const WorkflowLayout = ({ workflowId, children, leftSlot, rightSlot }) => {
10322
+ const { defaultLayout, onLayoutChange } = useDefaultLayout({
10323
+ id: `workflow-layout-${workflowId}`,
10324
+ storage: localStorage
10325
+ });
10326
+ const computedClassName = getMainContentContentClassName({
10327
+ isCentered: false,
10328
+ isDivided: true,
10329
+ hasLeftServiceColumn: Boolean(leftSlot)
10330
+ });
10331
+ return /* @__PURE__ */ jsxs(Group, { className: computedClassName, defaultLayout, onLayoutChange, children: [
10332
+ leftSlot && /* @__PURE__ */ jsxs(Fragment, { children: [
10333
+ /* @__PURE__ */ jsx(
10334
+ CollapsiblePanel,
10335
+ {
10336
+ direction: "left",
10337
+ id: "left-slot",
10338
+ minSize: 200,
10339
+ maxSize: "30%",
10340
+ defaultSize: 200,
10341
+ collapsedSize: 60,
10342
+ collapsible: true,
10343
+ children: leftSlot
10344
+ }
10345
+ ),
10346
+ /* @__PURE__ */ jsx(PanelSeparator, {})
10347
+ ] }),
10348
+ /* @__PURE__ */ jsx(Panel$1, { id: "main-slot", children }),
10349
+ rightSlot && /* @__PURE__ */ jsxs(Fragment, { children: [
10350
+ /* @__PURE__ */ jsx(PanelSeparator, {}),
10351
+ /* @__PURE__ */ jsx(
10352
+ CollapsiblePanel,
10353
+ {
10354
+ direction: "right",
10355
+ id: "right-slot",
10356
+ minSize: 300,
10357
+ maxSize: "50%",
10358
+ defaultSize: 300,
10359
+ collapsedSize: 60,
10360
+ collapsible: true,
10361
+ children: rightSlot
10362
+ }
10363
+ )
10364
+ ] })
10365
+ ] });
10366
+ };
10013
10367
 
10014
10368
  const LoadingBadge = () => {
10015
10369
  return /* @__PURE__ */ jsx(
@@ -11283,7 +11637,7 @@ const Thread = ({ agentName, agentId, hasMemory, hasModelList }) => {
11283
11637
  return /* @__PURE__ */ jsxs(ThreadWrapper, { children: [
11284
11638
  /* @__PURE__ */ jsxs(ThreadPrimitive.Viewport, { ref: areaRef, autoScroll: false, className: "overflow-y-scroll scroll-smooth h-full", children: [
11285
11639
  /* @__PURE__ */ jsx(ThreadWelcome, { agentName }),
11286
- /* @__PURE__ */ jsx("div", { className: "max-w-[568px] w-full mx-auto px-4 pb-7", children: /* @__PURE__ */ jsx(
11640
+ /* @__PURE__ */ jsx("div", { className: "max-w-3xl w-full mx-auto px-4 pb-7", children: /* @__PURE__ */ jsx(
11287
11641
  ThreadPrimitive.Messages,
11288
11642
  {
11289
11643
  components: {
@@ -11321,11 +11675,11 @@ const Composer = ({ hasMemory, agentId }) => {
11321
11675
  const { setThreadInput } = useThreadInput();
11322
11676
  const textareaRef = useRef(null);
11323
11677
  return /* @__PURE__ */ jsx("div", { className: "mx-4", children: /* @__PURE__ */ jsxs(ComposerPrimitive.Root, { children: [
11324
- /* @__PURE__ */ jsx("div", { className: "max-w-[568px] w-full mx-auto pb-2", children: /* @__PURE__ */ jsx(ComposerAttachments, {}) }),
11678
+ /* @__PURE__ */ jsx("div", { className: "max-w-3xl w-full mx-auto pb-2", children: /* @__PURE__ */ jsx(ComposerAttachments, {}) }),
11325
11679
  /* @__PURE__ */ jsxs(
11326
11680
  "div",
11327
11681
  {
11328
- className: "bg-surface3 rounded-lg border-sm border-border1 py-4 mt-auto max-w-[568px] w-full mx-auto px-4 focus-within:outline focus-within:outline-accent1 -outline-offset-2",
11682
+ className: "bg-surface3 rounded-lg border-sm border-border1 py-4 mt-auto max-w-3xl w-full mx-auto px-4 focus-within:outline focus-within:outline-accent1 -outline-offset-2",
11329
11683
  onClick: () => {
11330
11684
  textareaRef.current?.focus();
11331
11685
  },
@@ -12492,149 +12846,151 @@ const AgentAdvancedSettings = () => {
12492
12846
  setError("Invalid JSON");
12493
12847
  }
12494
12848
  };
12495
- const collapsibleClassName = "rounded-lg border-sm border-border1 bg-surface3 overflow-clip";
12496
- const collapsibleTriggerClassName = "text-icon3 text-ui-lg font-medium flex items-center gap-2 w-full p-[10px] justify-between";
12497
- const collapsibleContentClassName = "bg-surface2 p-[10px] grid grid-cols-2 gap-[10px]";
12498
- const buttonClass = "text-icon3 hover:text-icon6";
12499
- return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Collapsible, { className: collapsibleClassName, open: isOpen, onOpenChange: setIsOpen, children: [
12500
- /* @__PURE__ */ jsxs(CollapsibleTrigger, { className: collapsibleTriggerClassName, children: [
12501
- "Advanced Settings",
12502
- /* @__PURE__ */ jsx(Icon, { className: cn("transition-transform", isOpen ? "rotate-0" : "-rotate-90"), children: /* @__PURE__ */ jsx(ChevronDown, {}) })
12503
- ] }),
12504
- /* @__PURE__ */ jsxs(CollapsibleContent, { className: collapsibleContentClassName, children: [
12505
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12506
- /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "frequency-penalty", children: "Frequency Penalty" }),
12507
- /* @__PURE__ */ jsx(
12508
- Input,
12509
- {
12510
- id: "frequency-penalty",
12511
- type: "number",
12512
- step: "0.1",
12513
- min: "-1",
12514
- max: "1",
12515
- value: settings?.modelSettings?.frequencyPenalty ?? "",
12516
- onChange: (e) => setSettings({
12517
- ...settings,
12518
- modelSettings: {
12519
- ...settings?.modelSettings,
12520
- frequencyPenalty: e.target.value ? Number(e.target.value) : void 0
12521
- }
12522
- })
12523
- }
12524
- )
12525
- ] }),
12526
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12527
- /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "presence-penalty", children: "Presence Penalty" }),
12528
- /* @__PURE__ */ jsx(
12529
- Input,
12530
- {
12531
- id: "presence-penalty",
12532
- type: "number",
12533
- step: "0.1",
12534
- min: "-1",
12535
- max: "1",
12536
- value: settings?.modelSettings?.presencePenalty ?? "",
12537
- onChange: (e) => setSettings({
12538
- ...settings,
12539
- modelSettings: {
12540
- ...settings?.modelSettings,
12541
- presencePenalty: e.target.value ? Number(e.target.value) : void 0
12542
- }
12543
- })
12544
- }
12545
- )
12546
- ] }),
12547
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12548
- /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "top-k", children: "Top K" }),
12549
- /* @__PURE__ */ jsx(
12550
- Input,
12551
- {
12552
- id: "top-k",
12553
- type: "number",
12554
- value: settings?.modelSettings?.topK || "",
12555
- onChange: (e) => setSettings({
12556
- ...settings,
12557
- modelSettings: {
12558
- ...settings?.modelSettings,
12559
- topK: e.target.value ? Number(e.target.value) : void 0
12560
- }
12561
- })
12562
- }
12563
- )
12564
- ] }),
12565
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12566
- /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "max-tokens", children: "Max Tokens" }),
12567
- /* @__PURE__ */ jsx(
12568
- Input,
12569
- {
12570
- id: "max-tokens",
12571
- type: "number",
12572
- value: settings?.modelSettings?.maxTokens || "",
12573
- onChange: (e) => setSettings({
12574
- ...settings,
12575
- modelSettings: {
12576
- ...settings?.modelSettings,
12577
- maxTokens: e.target.value ? Number(e.target.value) : void 0
12578
- }
12579
- })
12580
- }
12581
- )
12582
- ] }),
12583
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12584
- /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "max-steps", children: "Max Steps" }),
12585
- /* @__PURE__ */ jsx(
12586
- Input,
12587
- {
12588
- id: "max-steps",
12589
- type: "number",
12590
- value: settings?.modelSettings?.maxSteps || "",
12591
- onChange: (e) => setSettings({
12592
- ...settings,
12593
- modelSettings: {
12594
- ...settings?.modelSettings,
12595
- maxSteps: e.target.value ? Number(e.target.value) : void 0
12596
- }
12597
- })
12598
- }
12599
- )
12600
- ] }),
12601
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12602
- /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "max-retries", children: "Max Retries" }),
12603
- /* @__PURE__ */ jsx(
12604
- Input,
12605
- {
12606
- id: "max-retries",
12607
- type: "number",
12608
- value: settings?.modelSettings?.maxRetries || "",
12609
- onChange: (e) => setSettings({
12610
- ...settings,
12611
- modelSettings: {
12612
- ...settings?.modelSettings,
12613
- maxRetries: e.target.value ? Number(e.target.value) : void 0
12614
- }
12615
- })
12616
- }
12617
- )
12849
+ const collapsibleClassName = "rounded-lg border-sm border-border1 bg-surface3 overflow-clip";
12850
+ const collapsibleTriggerClassName = "text-icon3 text-ui-lg font-medium flex items-center gap-2 w-full p-[10px] justify-between";
12851
+ const collapsibleContentClassName = "bg-surface2 p-[10px] @container/collapsible";
12852
+ const buttonClass = "text-icon3 hover:text-icon6";
12853
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Collapsible, { className: collapsibleClassName, open: isOpen, onOpenChange: setIsOpen, children: [
12854
+ /* @__PURE__ */ jsxs(CollapsibleTrigger, { className: collapsibleTriggerClassName, children: [
12855
+ "Advanced Settings",
12856
+ /* @__PURE__ */ jsx(Icon, { className: cn("transition-transform", isOpen ? "rotate-0" : "-rotate-90"), children: /* @__PURE__ */ jsx(ChevronDown, {}) })
12857
+ ] }),
12858
+ /* @__PURE__ */ jsxs(CollapsibleContent, { className: collapsibleContentClassName, children: [
12859
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-2 pb-2 @xs/collapsible:grid-cols-2", children: [
12860
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12861
+ /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "frequency-penalty", children: "Frequency Penalty" }),
12862
+ /* @__PURE__ */ jsx(
12863
+ Input,
12864
+ {
12865
+ id: "frequency-penalty",
12866
+ type: "number",
12867
+ step: "0.1",
12868
+ min: "-1",
12869
+ max: "1",
12870
+ value: settings?.modelSettings?.frequencyPenalty ?? "",
12871
+ onChange: (e) => setSettings({
12872
+ ...settings,
12873
+ modelSettings: {
12874
+ ...settings?.modelSettings,
12875
+ frequencyPenalty: e.target.value ? Number(e.target.value) : void 0
12876
+ }
12877
+ })
12878
+ }
12879
+ )
12880
+ ] }),
12881
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12882
+ /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "presence-penalty", children: "Presence Penalty" }),
12883
+ /* @__PURE__ */ jsx(
12884
+ Input,
12885
+ {
12886
+ id: "presence-penalty",
12887
+ type: "number",
12888
+ step: "0.1",
12889
+ min: "-1",
12890
+ max: "1",
12891
+ value: settings?.modelSettings?.presencePenalty ?? "",
12892
+ onChange: (e) => setSettings({
12893
+ ...settings,
12894
+ modelSettings: {
12895
+ ...settings?.modelSettings,
12896
+ presencePenalty: e.target.value ? Number(e.target.value) : void 0
12897
+ }
12898
+ })
12899
+ }
12900
+ )
12901
+ ] }),
12902
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12903
+ /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "top-k", children: "Top K" }),
12904
+ /* @__PURE__ */ jsx(
12905
+ Input,
12906
+ {
12907
+ id: "top-k",
12908
+ type: "number",
12909
+ value: settings?.modelSettings?.topK || "",
12910
+ onChange: (e) => setSettings({
12911
+ ...settings,
12912
+ modelSettings: {
12913
+ ...settings?.modelSettings,
12914
+ topK: e.target.value ? Number(e.target.value) : void 0
12915
+ }
12916
+ })
12917
+ }
12918
+ )
12919
+ ] }),
12920
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12921
+ /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "max-tokens", children: "Max Tokens" }),
12922
+ /* @__PURE__ */ jsx(
12923
+ Input,
12924
+ {
12925
+ id: "max-tokens",
12926
+ type: "number",
12927
+ value: settings?.modelSettings?.maxTokens || "",
12928
+ onChange: (e) => setSettings({
12929
+ ...settings,
12930
+ modelSettings: {
12931
+ ...settings?.modelSettings,
12932
+ maxTokens: e.target.value ? Number(e.target.value) : void 0
12933
+ }
12934
+ })
12935
+ }
12936
+ )
12937
+ ] }),
12938
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12939
+ /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "max-steps", children: "Max Steps" }),
12940
+ /* @__PURE__ */ jsx(
12941
+ Input,
12942
+ {
12943
+ id: "max-steps",
12944
+ type: "number",
12945
+ value: settings?.modelSettings?.maxSteps || "",
12946
+ onChange: (e) => setSettings({
12947
+ ...settings,
12948
+ modelSettings: {
12949
+ ...settings?.modelSettings,
12950
+ maxSteps: e.target.value ? Number(e.target.value) : void 0
12951
+ }
12952
+ })
12953
+ }
12954
+ )
12955
+ ] }),
12956
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12957
+ /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "max-retries", children: "Max Retries" }),
12958
+ /* @__PURE__ */ jsx(
12959
+ Input,
12960
+ {
12961
+ id: "max-retries",
12962
+ type: "number",
12963
+ value: settings?.modelSettings?.maxRetries || "",
12964
+ onChange: (e) => setSettings({
12965
+ ...settings,
12966
+ modelSettings: {
12967
+ ...settings?.modelSettings,
12968
+ maxRetries: e.target.value ? Number(e.target.value) : void 0
12969
+ }
12970
+ })
12971
+ }
12972
+ )
12973
+ ] }),
12974
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12975
+ /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "seed", children: "Seed" }),
12976
+ /* @__PURE__ */ jsx(
12977
+ Input,
12978
+ {
12979
+ id: "seed",
12980
+ type: "number",
12981
+ value: settings?.modelSettings?.seed || "",
12982
+ onChange: (e) => setSettings({
12983
+ ...settings,
12984
+ modelSettings: {
12985
+ ...settings?.modelSettings,
12986
+ seed: e.target.value ? Number(e.target.value) : void 0
12987
+ }
12988
+ })
12989
+ }
12990
+ )
12991
+ ] })
12618
12992
  ] }),
12619
12993
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12620
- /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "seed", children: "Seed" }),
12621
- /* @__PURE__ */ jsx(
12622
- Input,
12623
- {
12624
- id: "seed",
12625
- type: "number",
12626
- value: settings?.modelSettings?.seed || "",
12627
- onChange: (e) => setSettings({
12628
- ...settings,
12629
- modelSettings: {
12630
- ...settings?.modelSettings,
12631
- seed: e.target.value ? Number(e.target.value) : void 0
12632
- }
12633
- })
12634
- }
12635
- )
12636
- ] }),
12637
- /* @__PURE__ */ jsxs("div", { className: "space-y-1 col-span-2", children: [
12638
12994
  /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
12639
12995
  /* @__PURE__ */ jsx(Txt, { as: "label", className: "text-icon3", variant: "ui-sm", htmlFor: "provider-options", children: "Provider Options" }),
12640
12996
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
@@ -12821,7 +13177,7 @@ const AgentSettings = ({ agentId }) => {
12821
13177
  radioValue = settings?.modelSettings?.chatWithGenerateLegacy ? "generateLegacy" : "streamLegacy";
12822
13178
  }
12823
13179
  return /* @__PURE__ */ jsxs("div", { className: "px-5 text-xs py-2 pb-4", children: [
12824
- /* @__PURE__ */ jsxs("section", { className: "space-y-7", children: [
13180
+ /* @__PURE__ */ jsxs("section", { className: "space-y-7 @container", children: [
12825
13181
  /* @__PURE__ */ jsx(Entry, { label: "Chat Method", children: /* @__PURE__ */ jsxs(
12826
13182
  RadioGroup,
12827
13183
  {
@@ -12836,7 +13192,7 @@ const AgentSettings = ({ agentId }) => {
12836
13192
  chatWithNetwork: value === "network"
12837
13193
  }
12838
13194
  }),
12839
- className: "flex flex-row gap-4",
13195
+ className: "flex flex-col gap-4 @xs:flex-row",
12840
13196
  children: [
12841
13197
  !isSupportedModel && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
12842
13198
  /* @__PURE__ */ jsx(RadioGroupItem, { value: "generateLegacy", id: "generateLegacy", className: "text-icon6" }),
@@ -12868,7 +13224,7 @@ const AgentSettings = ({ agentId }) => {
12868
13224
  })
12869
13225
  }
12870
13226
  ) }),
12871
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-8", children: [
13227
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 @xs:grid-cols-2 gap-8", children: [
12872
13228
  /* @__PURE__ */ jsx(Entry, { label: "Temperature", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row justify-between items-center gap-2", children: [
12873
13229
  /* @__PURE__ */ jsx(
12874
13230
  Slider,
@@ -13708,62 +14064,6 @@ const CombinedButtons = ({ className, children }) => {
13708
14064
  );
13709
14065
  };
13710
14066
 
13711
- function MainContentLayout({
13712
- children,
13713
- className,
13714
- style
13715
- }) {
13716
- const devStyleRequested = devUIStyleRequested("MainContentLayout");
13717
- return /* @__PURE__ */ jsx(
13718
- "main",
13719
- {
13720
- className: cn(`grid grid-rows-[auto_1fr] h-full items-start content-start`, className),
13721
- style: { ...style, ...devStyleRequested ? { border: "3px dotted red" } : {} },
13722
- children
13723
- }
13724
- );
13725
- }
13726
- function MainContentContent({
13727
- children,
13728
- className,
13729
- isCentered = false,
13730
- isDivided = false,
13731
- hasLeftServiceColumn = false,
13732
- style
13733
- }) {
13734
- const devStyleRequested = devUIStyleRequested("MainContentContent");
13735
- return /* @__PURE__ */ jsx(
13736
- "div",
13737
- {
13738
- className: cn(
13739
- `grid overflow-y-auto h-full `,
13740
- `overflow-x-auto min-w-[min-content]`,
13741
- {
13742
- "items-start content-start": !isCentered && !isDivided && !hasLeftServiceColumn,
13743
- "grid place-items-center": isCentered,
13744
- "grid-cols-[1fr_1fr]": isDivided && !hasLeftServiceColumn,
13745
- "grid-cols-[12rem_1fr_1fr]": isDivided && hasLeftServiceColumn,
13746
- "grid-cols-[auto_1fr]": !isDivided && hasLeftServiceColumn
13747
- },
13748
- className
13749
- ),
13750
- style: { ...style, ...devStyleRequested ? { border: "3px dotted orange" } : {} },
13751
- children
13752
- }
13753
- );
13754
- }
13755
- function devUIStyleRequested(name) {
13756
- try {
13757
- const raw = localStorage.getItem("add-dev-style-to-components");
13758
- if (!raw) return false;
13759
- const components = raw.split(",").map((c) => c.trim()).filter(Boolean);
13760
- return components.includes(name);
13761
- } catch (error) {
13762
- console.error("Error reading or parsing localStorage:", error);
13763
- return false;
13764
- }
13765
- }
13766
-
13767
14067
  function ButtonsGroup({ children, className }) {
13768
14068
  return /* @__PURE__ */ jsx("div", { className: cn(`flex gap-2 items-center`, "[&>button]:flex-grow", className), children });
13769
14069
  }
@@ -14911,9 +15211,7 @@ function ScorerCombobox({
14911
15211
  searchPlaceholder = "Search scorers...",
14912
15212
  emptyText = "No scorers found.",
14913
15213
  className,
14914
- disabled = false,
14915
- buttonClassName = "h-8",
14916
- contentClassName
15214
+ disabled = false
14917
15215
  }) {
14918
15216
  const { data: scorers = {}, isLoading, isError, error } = useScorers();
14919
15217
  const { navigate, paths } = useLinkComponent();
@@ -14945,8 +15243,7 @@ function ScorerCombobox({
14945
15243
  emptyText,
14946
15244
  className,
14947
15245
  disabled: disabled || isLoading || isError,
14948
- buttonClassName,
14949
- contentClassName
15246
+ variant: "ghost"
14950
15247
  }
14951
15248
  );
14952
15249
  }
@@ -15240,8 +15537,8 @@ const AgentMetadataModelSwitcher = ({
15240
15537
  setLoading(false);
15241
15538
  }
15242
15539
  };
15243
- return /* @__PURE__ */ jsxs(Fragment, { children: [
15244
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col xl:flex-row items-stretch xl:items-center gap-2 w-full", children: [
15540
+ return /* @__PURE__ */ jsxs("div", { className: "@container", children: [
15541
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col @xs:flex-row items-stretch @xs:items-center gap-2 w-full", children: [
15245
15542
  /* @__PURE__ */ jsxs(
15246
15543
  Popover,
15247
15544
  {
@@ -15254,7 +15551,7 @@ const AgentMetadataModelSwitcher = ({
15254
15551
  }
15255
15552
  },
15256
15553
  children: [
15257
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: "relative w-full xl:w-2/5", children: [
15554
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: "relative w-full @xs:w-2/5", children: [
15258
15555
  !isSearchingProvider && currentModelProvider && /* @__PURE__ */ jsxs(Fragment, { children: [
15259
15556
  /* @__PURE__ */ jsx("div", { className: "absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none z-10", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
15260
15557
  /* @__PURE__ */ jsx(ProviderLogo, { providerId: currentModelProvider, size: 16 }),
@@ -15433,7 +15730,7 @@ const AgentMetadataModelSwitcher = ({
15433
15730
  "aria-label": "Search models",
15434
15731
  spellCheck: "false",
15435
15732
  ref: modelInputRef,
15436
- className: "w-full xl:w-3/5",
15733
+ className: "w-full @xs:w-3/5",
15437
15734
  type: "text",
15438
15735
  value: modelSearch || selectedModel,
15439
15736
  onChange: (e) => {
@@ -16057,7 +16354,7 @@ const AgentEntityHeader = ({ agentId }) => {
16057
16354
  };
16058
16355
 
16059
16356
  const Threads = ({ children }) => {
16060
- return /* @__PURE__ */ jsx("nav", { className: "bg-surface2 border-r-sm border-border1 min-h-full overflow-hidden", children });
16357
+ return /* @__PURE__ */ jsx("nav", { className: "bg-surface2 min-h-full overflow-hidden", children });
16061
16358
  };
16062
16359
  const ThreadLink = ({ children, as: Component = "a", href, className, prefetch, to }) => {
16063
16360
  return /* @__PURE__ */ jsx(
@@ -16260,9 +16557,7 @@ function AgentCombobox({
16260
16557
  searchPlaceholder = "Search agents...",
16261
16558
  emptyText = "No agents found.",
16262
16559
  className,
16263
- disabled = false,
16264
- buttonClassName = "h-8",
16265
- contentClassName
16560
+ disabled = false
16266
16561
  }) {
16267
16562
  const { data: agents = {}, isLoading, isError, error } = useAgents();
16268
16563
  const { navigate, paths } = useLinkComponent();
@@ -16294,8 +16589,7 @@ function AgentCombobox({
16294
16589
  emptyText,
16295
16590
  className,
16296
16591
  disabled: disabled || isLoading || isError,
16297
- buttonClassName,
16298
- contentClassName
16592
+ variant: "ghost"
16299
16593
  }
16300
16594
  );
16301
16595
  }
@@ -17171,7 +17465,7 @@ const useAgentInformationSettings = ({ modelId }) => {
17171
17465
  const AgentInformationLayout = ({ children, agentId }) => {
17172
17466
  const { data: agent } = useAgent(agentId);
17173
17467
  useAgentInformationSettings({ modelId: agent?.modelId || "" });
17174
- return /* @__PURE__ */ jsx("div", { className: "grid grid-rows-[auto_1fr] h-full items-start overflow-y-auto border-l-sm border-border1", children });
17468
+ return /* @__PURE__ */ jsx("div", { className: "grid grid-rows-[auto_1fr] h-full items-start overflow-y-auto", children });
17175
17469
  };
17176
17470
  const AgentInformationTabLayout = ({ children, agentId }) => {
17177
17471
  const { data: memory, isLoading: isMemoryLoading } = useMemory(agentId);
@@ -17183,6 +17477,53 @@ const AgentInformationTabLayout = ({ children, agentId }) => {
17183
17477
  return /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden border-t-sm border-border1 flex flex-col", children: /* @__PURE__ */ jsx(PlaygroundTabs, { defaultTab: "overview", value: selectedTab, onValueChange: handleTabChange, children }) });
17184
17478
  };
17185
17479
 
17480
+ const AgentLayout = ({ agentId, children, leftSlot, rightSlot }) => {
17481
+ const { defaultLayout, onLayoutChange } = useDefaultLayout({
17482
+ id: `agent-layout-${agentId}`,
17483
+ storage: localStorage
17484
+ });
17485
+ const computedClassName = getMainContentContentClassName({
17486
+ isCentered: false,
17487
+ isDivided: true,
17488
+ hasLeftServiceColumn: Boolean(leftSlot)
17489
+ });
17490
+ return /* @__PURE__ */ jsxs(Group, { className: computedClassName, defaultLayout, onLayoutChange, children: [
17491
+ leftSlot && /* @__PURE__ */ jsxs(Fragment, { children: [
17492
+ /* @__PURE__ */ jsx(
17493
+ CollapsiblePanel,
17494
+ {
17495
+ direction: "left",
17496
+ id: "left-slot",
17497
+ minSize: 200,
17498
+ maxSize: "30%",
17499
+ defaultSize: 200,
17500
+ collapsedSize: 60,
17501
+ collapsible: true,
17502
+ children: leftSlot
17503
+ }
17504
+ ),
17505
+ /* @__PURE__ */ jsx(PanelSeparator, {})
17506
+ ] }),
17507
+ /* @__PURE__ */ jsx(Panel$1, { id: "main-slot", className: "grid overflow-y-auto relative bg-surface1 py-4", children }),
17508
+ rightSlot && /* @__PURE__ */ jsxs(Fragment, { children: [
17509
+ /* @__PURE__ */ jsx(PanelSeparator, {}),
17510
+ /* @__PURE__ */ jsx(
17511
+ CollapsiblePanel,
17512
+ {
17513
+ direction: "right",
17514
+ id: "right-slot",
17515
+ minSize: 300,
17516
+ maxSize: "50%",
17517
+ defaultSize: 300,
17518
+ collapsedSize: 60,
17519
+ collapsible: true,
17520
+ children: rightSlot
17521
+ }
17522
+ )
17523
+ ] })
17524
+ ] });
17525
+ };
17526
+
17186
17527
  const NameCell$1 = ({ row }) => {
17187
17528
  const { Link, paths } = useLinkComponent();
17188
17529
  const tool = row.original;
@@ -17410,9 +17751,7 @@ function ToolCombobox({
17410
17751
  searchPlaceholder = "Search tools...",
17411
17752
  emptyText = "No tools found.",
17412
17753
  className,
17413
- disabled = false,
17414
- buttonClassName = "h-8",
17415
- contentClassName
17754
+ disabled = false
17416
17755
  }) {
17417
17756
  const { data: tools = {}, isLoading: isLoadingTools, isError: isErrorTools, error: errorTools } = useTools();
17418
17757
  const { data: agents = {}, isLoading: isLoadingAgents, isError: isErrorAgents, error: errorAgents } = useAgents();
@@ -17466,8 +17805,7 @@ function ToolCombobox({
17466
17805
  emptyText,
17467
17806
  className,
17468
17807
  disabled: disabled || isLoadingTools || isLoadingAgents || isErrorTools || isErrorAgents,
17469
- buttonClassName,
17470
- contentClassName
17808
+ variant: "ghost"
17471
17809
  }
17472
17810
  );
17473
17811
  }
@@ -18150,7 +18488,7 @@ const formatHierarchicalSpans = (spans) => {
18150
18488
  });
18151
18489
  spans.forEach((spanRecord) => {
18152
18490
  const uiSpan = spanMap.get(spanRecord.spanId);
18153
- if (spanRecord?.parentSpanId === null) {
18491
+ if (spanRecord?.parentSpanId == null) {
18154
18492
  if (overallEndDate && uiSpan.endTime && overallEndDate > new Date(uiSpan.endTime)) {
18155
18493
  uiSpan.endTime = overallEndDate.toISOString();
18156
18494
  const overallEndTime = new Date(overallEndDate).getTime();
@@ -18745,17 +19083,21 @@ function useTraceInfo(trace) {
18745
19083
  }
18746
19084
  const agentsLink = paths.agentsLink();
18747
19085
  const workflowsLink = paths.workflowsLink();
18748
- const agentLink = paths.agentLink(trace?.metadata?.resourceId);
18749
- const workflowLink = paths.workflowLink(trace?.attributes?.workflowId);
19086
+ const entityId = trace.entityId;
19087
+ const entityType = trace.entityType;
19088
+ const entityName = trace.entityName;
19089
+ const isAgent = entityType === "agent";
19090
+ const isWorkflow = entityType === "workflow_run";
19091
+ const entityLink = isAgent && entityId ? paths.agentLink(entityId) : isWorkflow && entityId ? paths.workflowLink(entityId) : void 0;
18750
19092
  return [
18751
19093
  {
18752
19094
  key: "entityId",
18753
19095
  label: "Entity Id",
18754
19096
  value: [
18755
19097
  {
18756
- id: trace?.metadata?.resourceId,
18757
- name: trace?.attributes?.agentId || trace?.attributes?.workflowId || "-",
18758
- path: trace?.attributes?.agentId ? agentLink : trace?.attributes?.workflowId ? workflowLink : void 0
19098
+ id: entityId ?? "unknown",
19099
+ name: entityName || entityId || "-",
19100
+ path: entityLink
18759
19101
  }
18760
19102
  ]
18761
19103
  },
@@ -18764,9 +19106,9 @@ function useTraceInfo(trace) {
18764
19106
  label: "Entity Type",
18765
19107
  value: [
18766
19108
  {
18767
- id: trace?.attributes?.agentId || trace?.attributes?.workflowId,
18768
- name: trace?.attributes?.agentId ? "Agent" : trace?.attributes?.workflowId ? "Workflow" : "-",
18769
- path: trace?.attributes?.agentId ? agentsLink : trace?.attributes?.workflowId ? workflowsLink : void 0
19109
+ id: entityType ?? "unknown",
19110
+ name: entityType ?? "-",
19111
+ path: isAgent ? agentsLink : isWorkflow ? workflowsLink : void 0
18770
19112
  }
18771
19113
  ]
18772
19114
  },
@@ -18808,11 +19150,12 @@ function getSpanInfo({ span }) {
18808
19150
  value: span?.endedAt ? format(new Date(span.endedAt), "MMM dd, h:mm:ss.SSS aaa") : "-"
18809
19151
  }
18810
19152
  ];
18811
- if (span?.attributes?.finishReason) {
19153
+ const finishReason = span?.attributes?.finishReason;
19154
+ if (finishReason) {
18812
19155
  baseInfo.push({
18813
19156
  key: "finishReason",
18814
19157
  label: "Finish Reason",
18815
- value: span.attributes.finishReason
19158
+ value: finishReason
18816
19159
  });
18817
19160
  }
18818
19161
  return baseInfo;
@@ -18915,9 +19258,10 @@ function TraceSpanUsage({ traceUsage, traceSpans = [], spanUsage, className }) {
18915
19258
  return null;
18916
19259
  }
18917
19260
  const generationSpans = traceSpans.filter((span) => span.spanType === "model_generation");
18918
- const hasV5Format = generationSpans.some(
18919
- (span) => span.attributes?.usage?.inputTokens !== void 0 || span.attributes?.usage?.outputTokens !== void 0
18920
- );
19261
+ const hasV5Format = generationSpans.some((span) => {
19262
+ const usage = span.attributes?.usage;
19263
+ return usage && "inputTokens" in usage;
19264
+ });
18921
19265
  const tokensByProvider = generationSpans.reduce(
18922
19266
  (acc, span) => {
18923
19267
  const spanUsage2 = span.attributes?.usage || {};
@@ -18945,8 +19289,8 @@ function TraceSpanUsage({ traceUsage, traceSpans = [], spanUsage, className }) {
18945
19289
  const v5Acc = acc[spanModelProvider];
18946
19290
  v5Acc.inputTokens += inputTokens;
18947
19291
  v5Acc.outputTokens += outputTokens;
18948
- v5Acc.reasoningTokens += reasoningTokens;
18949
- v5Acc.cachedInputTokens += cachedInputTokens;
19292
+ v5Acc.reasoningTokens = (v5Acc.reasoningTokens ?? 0) + reasoningTokens;
19293
+ v5Acc.cachedInputTokens = (v5Acc.cachedInputTokens ?? 0) + cachedInputTokens;
18950
19294
  v5Acc.totalTokens += spanUsage2.totalTokens || inputTokens + outputTokens;
18951
19295
  } else if ("promptTokens" in acc[spanModelProvider] && !hasV5Format) {
18952
19296
  const promptTokens = spanUsage2.promptTokens ?? 0;
@@ -19203,7 +19547,7 @@ function SpanTabs({
19203
19547
  ] })
19204
19548
  ] }),
19205
19549
  /* @__PURE__ */ jsx(Tabs.Content, { value: "details", children: /* @__PURE__ */ jsxs(Sections, { children: [
19206
- span?.attributes?.usage && /* @__PURE__ */ jsx(TraceSpanUsage, { spanUsage: span.attributes.usage }),
19550
+ span?.attributes?.usage ? /* @__PURE__ */ jsx(TraceSpanUsage, { spanUsage: span.attributes.usage }) : null,
19207
19551
  /* @__PURE__ */ jsx(KeyValueList, { data: spanInfo, LinkComponent: Link }),
19208
19552
  /* @__PURE__ */ jsx(SpanDetails, { span })
19209
19553
  ] }) }),
@@ -19737,7 +20081,7 @@ function TracesList({
19737
20081
  date: isTodayDate ? "Today" : format(createdAtDate, "MMM dd"),
19738
20082
  time: format(createdAtDate, "h:mm:ss aaa"),
19739
20083
  name: trace?.name,
19740
- entityId: trace?.attributes?.agentId || trace?.attributes?.workflowId,
20084
+ entityId: trace?.entityName || trace?.entityId || trace?.attributes?.agentId || trace?.attributes?.workflowId,
19741
20085
  status: trace?.attributes?.status
19742
20086
  };
19743
20087
  return /* @__PURE__ */ jsx(
@@ -19843,7 +20187,7 @@ function SpanScoreList({
19843
20187
  entry,
19844
20188
  children: traceScoresListColumns.map((col) => {
19845
20189
  const key = `col-${col.name}`;
19846
- return /* @__PURE__ */ jsx(EntryList.EntryText, { children: entry?.[col.name] }, key);
20190
+ return /* @__PURE__ */ jsx(EntryList.EntryText, { children: String(entry?.[col.name] ?? "") }, key);
19847
20191
  })
19848
20192
  },
19849
20193
  score.id
@@ -20481,9 +20825,7 @@ function MCPServerCombobox({
20481
20825
  searchPlaceholder = "Search MCP servers...",
20482
20826
  emptyText = "No MCP servers found.",
20483
20827
  className,
20484
- disabled = false,
20485
- buttonClassName = "h-8",
20486
- contentClassName
20828
+ disabled = false
20487
20829
  }) {
20488
20830
  const { data: mcpServers = [], isLoading, isError, error } = useMCPServers();
20489
20831
  const { navigate, paths } = useLinkComponent();
@@ -20515,8 +20857,7 @@ function MCPServerCombobox({
20515
20857
  emptyText,
20516
20858
  className,
20517
20859
  disabled: disabled || isLoading || isError,
20518
- buttonClassName,
20519
- contentClassName
20860
+ variant: "ghost"
20520
20861
  }
20521
20862
  );
20522
20863
  }
@@ -20685,6 +21026,292 @@ const StudioConfigForm = ({ initialConfig }) => {
20685
21026
  ] });
20686
21027
  };
20687
21028
 
21029
+ const useMastraPackages = () => {
21030
+ const client = useMastraClient();
21031
+ return useQuery({
21032
+ queryKey: ["mastra-packages"],
21033
+ queryFn: () => {
21034
+ return client.getSystemPackages();
21035
+ }
21036
+ });
21037
+ };
21038
+
21039
+ async function fetchPackageInfo(packageName, installedVersion) {
21040
+ const prereleaseComponents = semver.prerelease(installedVersion);
21041
+ const prereleaseTag = prereleaseComponents ? String(prereleaseComponents[0]) : null;
21042
+ try {
21043
+ const response = await fetch(`https://registry.npmjs.org/${encodeURIComponent(packageName)}`);
21044
+ if (!response.ok) {
21045
+ return {
21046
+ name: packageName,
21047
+ version: installedVersion,
21048
+ latestVersion: null,
21049
+ isOutdated: false,
21050
+ isDeprecated: false,
21051
+ prereleaseTag,
21052
+ targetPrereleaseTag: null
21053
+ };
21054
+ }
21055
+ const data = await response.json();
21056
+ const latestVersion = data["dist-tags"]?.latest ?? null;
21057
+ const versionInfo = data.versions?.[installedVersion];
21058
+ const deprecationMessage = versionInfo?.deprecated;
21059
+ const targetPrereleaseComponents = latestVersion ? semver.prerelease(latestVersion) : null;
21060
+ const targetPrereleaseTag = targetPrereleaseComponents ? String(targetPrereleaseComponents[0]) : null;
21061
+ let isOutdated = false;
21062
+ if (latestVersion !== null && semver.valid(installedVersion) && semver.valid(latestVersion)) {
21063
+ isOutdated = semver.gt(latestVersion, installedVersion);
21064
+ }
21065
+ return {
21066
+ name: packageName,
21067
+ version: installedVersion,
21068
+ latestVersion,
21069
+ isOutdated,
21070
+ isDeprecated: !!deprecationMessage,
21071
+ prereleaseTag,
21072
+ targetPrereleaseTag,
21073
+ deprecationMessage
21074
+ };
21075
+ } catch {
21076
+ return {
21077
+ name: packageName,
21078
+ version: installedVersion,
21079
+ latestVersion: null,
21080
+ isOutdated: false,
21081
+ isDeprecated: false,
21082
+ prereleaseTag,
21083
+ targetPrereleaseTag: null
21084
+ };
21085
+ }
21086
+ }
21087
+ function usePackageUpdates(packages) {
21088
+ const queries = useQueries({
21089
+ queries: packages.map((pkg) => ({
21090
+ queryKey: ["package-update", pkg.name, pkg.version],
21091
+ queryFn: () => fetchPackageInfo(pkg.name, pkg.version),
21092
+ staleTime: 1e3 * 60 * 60,
21093
+ // 1 hour - latest versions don't change often
21094
+ gcTime: 1e3 * 60 * 60 * 24
21095
+ // 24 hours
21096
+ }))
21097
+ });
21098
+ const isLoading = queries.some((q) => q.isLoading);
21099
+ const packageUpdates = queries.map((q) => q.data).filter((p) => p !== void 0);
21100
+ const allComplete = !isLoading && packageUpdates.length === packages.length;
21101
+ const outdatedCount = allComplete ? packageUpdates.filter((p) => p.isOutdated && !p.isDeprecated).length : 0;
21102
+ const deprecatedCount = allComplete ? packageUpdates.filter((p) => p.isDeprecated).length : 0;
21103
+ return {
21104
+ packages: packageUpdates,
21105
+ isLoading,
21106
+ outdatedCount,
21107
+ deprecatedCount
21108
+ };
21109
+ }
21110
+
21111
+ const packageManagerCommands = {
21112
+ pnpm: "pnpm add",
21113
+ npm: "npm install",
21114
+ yarn: "yarn add",
21115
+ bun: "bun add"
21116
+ };
21117
+ const MastraVersionFooter = ({ collapsed }) => {
21118
+ const { data, isLoading: isLoadingPackages } = useMastraPackages();
21119
+ const installedPackages = data?.packages ?? [];
21120
+ const {
21121
+ packages: packageUpdates,
21122
+ isLoading: isLoadingUpdates,
21123
+ outdatedCount,
21124
+ deprecatedCount
21125
+ } = usePackageUpdates(installedPackages);
21126
+ const [packageManager, setPackageManager] = useState("pnpm");
21127
+ if (collapsed) {
21128
+ return null;
21129
+ }
21130
+ if (isLoadingPackages) {
21131
+ return /* @__PURE__ */ jsx("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx("div", { className: "animate-pulse h-4 bg-surface2 rounded w-16" }) });
21132
+ }
21133
+ const mastraCorePackage = installedPackages.find((pkg) => pkg.name === "@mastra/core");
21134
+ if (!mastraCorePackage && installedPackages.length === 0) {
21135
+ return null;
21136
+ }
21137
+ const mainVersion = mastraCorePackage?.version ?? installedPackages[0]?.version ?? "";
21138
+ const updateCommand = generateUpdateCommand(packageUpdates, packageManager);
21139
+ return /* @__PURE__ */ jsxs(Dialog, { children: [
21140
+ /* @__PURE__ */ jsx(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { className: "px-3 py-2 hover:bg-surface2 transition-colors rounded w-full text-left", children: [
21141
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5", children: /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-sm", className: "text-accent1 font-mono", children: "mastra version:" }) }),
21142
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
21143
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-sm", className: "text-icon3 font-mono", children: mainVersion }),
21144
+ isLoadingUpdates && /* @__PURE__ */ jsx(Spinner, { className: "w-3 h-3", color: "currentColor" }),
21145
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center -space-x-1.5", children: [
21146
+ outdatedCount > 0 && /* @__PURE__ */ jsx(CountBadge, { count: outdatedCount, variant: "warning" }),
21147
+ deprecatedCount > 0 && /* @__PURE__ */ jsx(CountBadge, { count: deprecatedCount, variant: "error" })
21148
+ ] })
21149
+ ] })
21150
+ ] }) }),
21151
+ /* @__PURE__ */ jsx(
21152
+ PackagesModalContent,
21153
+ {
21154
+ packages: packageUpdates,
21155
+ isLoadingUpdates,
21156
+ outdatedCount,
21157
+ deprecatedCount,
21158
+ updateCommand,
21159
+ packageManager,
21160
+ onPackageManagerChange: setPackageManager
21161
+ }
21162
+ )
21163
+ ] });
21164
+ };
21165
+ function generateUpdateCommand(packages, packageManager) {
21166
+ const outdatedPackages = packages.filter((p) => p.isOutdated || p.isDeprecated);
21167
+ if (outdatedPackages.length === 0) return null;
21168
+ const command = packageManagerCommands[packageManager];
21169
+ const packageArgs = outdatedPackages.map((p) => `${p.name}@${p.targetPrereleaseTag ?? "latest"}`).join(" ");
21170
+ return `${command} ${packageArgs}`;
21171
+ }
21172
+ function CountBadge({ count, variant }) {
21173
+ return /* @__PURE__ */ jsx(
21174
+ "span",
21175
+ {
21176
+ className: cn(
21177
+ "inline-flex items-center justify-center min-w-[1.125rem] h-[1.125rem] px-1 rounded-full text-[0.625rem] font-bold text-black",
21178
+ variant === "error" ? "bg-red-700" : "bg-yellow-700"
21179
+ ),
21180
+ children: count
21181
+ }
21182
+ );
21183
+ }
21184
+ function StatusBadge({ value, variant }) {
21185
+ return /* @__PURE__ */ jsx(
21186
+ "span",
21187
+ {
21188
+ className: cn(
21189
+ "inline-flex font-bold rounded-md px-1.5 py-0.5 items-center justify-center text-black text-xs min-w-[1.25rem]",
21190
+ variant === "error" ? "bg-red-700" : "bg-yellow-700"
21191
+ ),
21192
+ children: value
21193
+ }
21194
+ );
21195
+ }
21196
+ const PackagesModalContent = ({
21197
+ packages,
21198
+ isLoadingUpdates,
21199
+ outdatedCount,
21200
+ deprecatedCount,
21201
+ updateCommand,
21202
+ packageManager,
21203
+ onPackageManagerChange
21204
+ }) => {
21205
+ const hasUpdates = outdatedCount > 0 || deprecatedCount > 0;
21206
+ const packagesText = packages.map((pkg) => `${pkg.name}@${pkg.version}`).join("\n");
21207
+ const { isCopied: isCopiedAll, handleCopy: handleCopyAll } = useCopyToClipboard({
21208
+ text: packagesText,
21209
+ copyMessage: "Copied package versions!"
21210
+ });
21211
+ const { isCopied: isCopiedCommand, handleCopy: handleCopyCommand } = useCopyToClipboard({
21212
+ text: updateCommand ?? "",
21213
+ copyMessage: "Copied update command!"
21214
+ });
21215
+ return /* @__PURE__ */ jsxs(DialogContent, { className: "bg-surface1 border-border1 max-w-2xl", children: [
21216
+ /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-text1", children: "Installed Mastra Packages" }) }),
21217
+ /* @__PURE__ */ jsx("div", { className: "text-sm text-icon3 py-2", children: isLoadingUpdates ? /* @__PURE__ */ jsx("span", { className: "text-icon3", children: "Checking for updates..." }) : !hasUpdates ? /* @__PURE__ */ jsx("span", { className: "text-accent1", children: "✓ All packages are up to date" }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
21218
+ outdatedCount > 0 && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5", children: [
21219
+ /* @__PURE__ */ jsx(StatusBadge, { value: outdatedCount, variant: "warning" }),
21220
+ /* @__PURE__ */ jsxs("span", { children: [
21221
+ "package",
21222
+ outdatedCount !== 1 ? "s" : "",
21223
+ " outdated"
21224
+ ] })
21225
+ ] }),
21226
+ deprecatedCount > 0 && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5", children: [
21227
+ /* @__PURE__ */ jsx(StatusBadge, { value: deprecatedCount, variant: "error" }),
21228
+ /* @__PURE__ */ jsxs("span", { children: [
21229
+ "package",
21230
+ deprecatedCount !== 1 ? "s" : "",
21231
+ " deprecated"
21232
+ ] })
21233
+ ] })
21234
+ ] }) }),
21235
+ /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto border border-border1 rounded-md", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-[1fr_auto_auto] text-sm", children: packages.map((pkg, index) => /* @__PURE__ */ jsxs("div", { className: cn("contents", index > 0 && "[&>div]:border-t [&>div]:border-border1"), children: [
21236
+ /* @__PURE__ */ jsx("div", { className: "py-2 px-3 font-mono text-text1 truncate min-w-0", children: /* @__PURE__ */ jsxs(
21237
+ "a",
21238
+ {
21239
+ href: `https://www.npmjs.com/package/${pkg.name}`,
21240
+ target: "_blank",
21241
+ rel: "noopener noreferrer",
21242
+ className: "hover:text-accent1 hover:underline inline-flex items-center gap-1 group",
21243
+ children: [
21244
+ pkg.name,
21245
+ /* @__PURE__ */ jsx(ExternalLink, { className: "w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity" })
21246
+ ]
21247
+ }
21248
+ ) }),
21249
+ /* @__PURE__ */ jsx("div", { className: "py-2 px-3 font-mono text-icon3 flex items-center gap-1.5", children: pkg.isOutdated || pkg.isDeprecated ? /* @__PURE__ */ jsxs(Tooltip, { children: [
21250
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
21251
+ "span",
21252
+ {
21253
+ className: cn(
21254
+ "cursor-help",
21255
+ pkg.isDeprecated ? "text-red-500" : pkg.isOutdated ? "text-yellow-500" : ""
21256
+ ),
21257
+ children: pkg.version
21258
+ }
21259
+ ) }),
21260
+ /* @__PURE__ */ jsx(TooltipContent, { children: pkg.isDeprecated ? pkg.deprecationMessage || "This version is deprecated" : "Newer version available" })
21261
+ ] }) : /* @__PURE__ */ jsx("span", { children: pkg.version }) }),
21262
+ /* @__PURE__ */ jsx("div", { className: "py-2 px-3 font-mono text-icon3 flex items-center", children: (pkg.isOutdated || pkg.isDeprecated) && pkg.latestVersion && /* @__PURE__ */ jsxs(Fragment, { children: [
21263
+ /* @__PURE__ */ jsx(MoveRight, { className: "w-4 h-4 mx-2 text-icon3" }),
21264
+ /* @__PURE__ */ jsx("span", { className: "text-accent1", children: pkg.latestVersion })
21265
+ ] }) })
21266
+ ] }, pkg.name)) }) }),
21267
+ /* @__PURE__ */ jsxs(
21268
+ "button",
21269
+ {
21270
+ onClick: handleCopyAll,
21271
+ className: "flex items-center justify-center gap-2 w-full py-2 px-3 rounded bg-surface2 hover:bg-surface3 text-icon3 hover:text-icon1 transition-colors",
21272
+ children: [
21273
+ isCopiedAll ? /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-accent1" }) : /* @__PURE__ */ jsx(Copy, { className: "w-4 h-4" }),
21274
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-sm", children: isCopiedAll ? "Copied!" : "Copy current versions" })
21275
+ ]
21276
+ }
21277
+ ),
21278
+ hasUpdates && updateCommand && /* @__PURE__ */ jsxs("div", { className: "space-y-3 pt-2 border-t border-border1", children: [
21279
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-icon3 pt-3", children: [
21280
+ /* @__PURE__ */ jsx(Info, { className: "w-4 h-4" }),
21281
+ /* @__PURE__ */ jsx("span", { children: "Use the command below to update your packages" })
21282
+ ] }),
21283
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
21284
+ /* @__PURE__ */ jsx(
21285
+ SelectField,
21286
+ {
21287
+ value: packageManager,
21288
+ onValueChange: (value) => onPackageManagerChange(value),
21289
+ options: [
21290
+ { label: "pnpm", value: "pnpm" },
21291
+ { label: "npm", value: "npm" },
21292
+ { label: "yarn", value: "yarn" },
21293
+ { label: "bun", value: "bun" }
21294
+ ]
21295
+ }
21296
+ ),
21297
+ /* @__PURE__ */ jsx("pre", { className: "flex-1 text-sm text-icon3 bg-surface2 rounded-md px-3 py-1.5 overflow-x-auto whitespace-pre-wrap break-all", children: updateCommand })
21298
+ ] }),
21299
+ /* @__PURE__ */ jsxs(
21300
+ "button",
21301
+ {
21302
+ onClick: handleCopyCommand,
21303
+ className: "flex items-center justify-center gap-2 w-full py-2 px-3 rounded bg-surface2 hover:bg-surface3 text-icon3 hover:text-icon1 transition-colors",
21304
+ children: [
21305
+ isCopiedCommand ? /* @__PURE__ */ jsx(Check, { className: "w-4 h-4 text-accent1" }) : /* @__PURE__ */ jsx(Copy, { className: "w-4 h-4" }),
21306
+ /* @__PURE__ */ jsx(Txt, { as: "span", variant: "ui-sm", children: isCopiedCommand ? "Copied!" : "Copy command" })
21307
+ ]
21308
+ }
21309
+ )
21310
+ ] })
21311
+ ] });
21312
+ };
21313
+ const MastraPackagesInfo = MastraVersionFooter;
21314
+
20688
21315
  const PlaygroundConfigGuard = () => {
20689
21316
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col h-screen w-full items-center justify-center bg-surface1", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md w-full mx-auto px-4 pt-4", children: [
20690
21317
  /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center pb-4", children: /* @__PURE__ */ jsx(LogoWithoutText, { className: "size-32" }) }),
@@ -20692,5 +21319,5 @@ const PlaygroundConfigGuard = () => {
20692
21319
  ] }) });
20693
21320
  };
20694
21321
 
20695
- export { AgentChat, AgentCoinIcon, AgentCombobox, AgentEntityHeader, AgentIcon, AgentInformation, AgentInformationLayout, AgentInformationTabLayout, AgentMemory, AgentMetadata, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataNetworkList, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentPromptExperimentProvider, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentToolPanel, AgentsTable, AiIcon, Alert$1 as Alert, AlertDescription$1 as AlertDescription, AlertDialog, AlertTitle$1 as AlertTitle, ApiIcon, Badge, BranchIcon, Breadcrumb, Button$1 as Button, ButtonsGroup, Cell, ChatThreads, CheckIcon, ChevronIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, CommitIcon, CrossIcon, Crumb, DateTimeCell, DateTimePicker, DateTimePickerContent, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, DividerIcon, DocsIcon, DynamicForm, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, InputField, JudgeIcon, Kbd, KeyValueList, LatencyIcon, LinkComponentProvider, LogoWithoutText, LogsIcon, MCPDetail, MCPServerCombobox, MCPTable, MCPToolPanel, MainContentContent, MainContentLayout, MainSidebar, MainSidebarProvider, McpCoinIcon, McpServerIcon, MemoryIcon, MemorySearch, Notification, OpenAIIcon, PageHeader, PlaygroundConfigGuard, PlaygroundQueryClient, PlaygroundTabs, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, RequestContext, RequestContextWrapper, Row, ScoreDialog, ScorerCombobox, ScorersTable, ScoresList, ScoresTools, SearchField, Searchbar, SearchbarWrapper, Section, Sections, SelectField, SettingsIcon, SideDialog, Skeleton, SlashIcon, SpanScoreList, SpanScoring, SpanTabs, StudioConfigContext, StudioConfigForm, StudioConfigProvider, Tab$1 as Tab, TabContent$1 as TabContent, TabList$1 as TabList, Table, Tbody, TemplateFailure, TemplateForm, TemplateInfo, TemplateInstallation, TemplateSuccess, TemplatesList, TemplatesTools, TextAndIcon, Th, Thead, ThreadDeleteButton, ThreadInputProvider, ThreadItem, ThreadLink, ThreadList, Threads, ToolCoinIcon, ToolCombobox, ToolFallback, ToolIconMap, ToolInformation, ToolPanel, ToolTable, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceDialog, TraceIcon, TraceTimeline, TraceTimelineSpan, TraceTimelineTools, TracesList, TracesTools, TracingSettingsContext, TracingSettingsProvider, TsIcon, Txt, TxtCell, VariablesIcon, WorkflowCoinIcon, WorkflowCombobox, WorkflowGraph, WorkflowIcon, WorkflowInformation, WorkflowRunContext, WorkflowRunDetail, WorkflowRunList, WorkflowRunProvider, WorkflowStepDetailContext, WorkflowStepDetailProvider, WorkflowTable, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, convertWorkflowRunStateToStreamResult, extractPrompt, formatHierarchicalSpans, getColumnTemplate, getShortId, getSpanTypeUi, getToNextEntryFn, getToPreviousEntryFn, parseError, providerMapToIcon, scoresListColumns, spanTypePrefixes, toast, traceScoresListColumns, tracesListColumns, useAgent, useAgentInformationSettings, useAgentInformationTab, useAgentPromptExperiment, useAgentSettings, useAgents, useCancelWorkflowRun, useCurrentRun, useDeleteThread, useDeleteWorkflowRun, useExecuteAgentTool, useExecuteMCPTool, useExecuteTool, useExecuteWorkflow, useInView, useLinkComponent, useMCPServerTool, useMCPServerTools, useMCPServers, useMainSidebar, useMemory, useMemoryConfig, useMemorySearch, usePlaygroundStore, useReorderModelList, useResetAgentModel, useScorer, useScorers, useScoresByScorerId, useSpeechRecognition, useStreamWorkflow, useStudioConfig, useThreadInput, useThreads, useTool, useTools, useTraceSpanScores, useTracingSettings, useUpdateAgentModel, useUpdateModelInModelList, useWorkflow, useWorkflowRunExecutionResult, useWorkflowRuns, useWorkflowStepDetail, useWorkflows, useWorkingMemory };
21322
+ export { AgentChat, AgentCoinIcon, AgentCombobox, AgentEntityHeader, AgentIcon, AgentInformation, AgentInformationLayout, AgentInformationTabLayout, AgentLayout, AgentMemory, AgentMetadata, AgentMetadataList, AgentMetadataListEmpty, AgentMetadataListItem, AgentMetadataNetworkList, AgentMetadataScorerList, AgentMetadataSection, AgentMetadataToolList, AgentMetadataWorkflowList, AgentMetadataWrapper, AgentNetworkCoinIcon, AgentPromptExperimentProvider, AgentSettings, AgentSettingsContext, AgentSettingsProvider, AgentToolPanel, AgentsTable, AiIcon, Alert$1 as Alert, AlertDescription$1 as AlertDescription, AlertDialog, AlertTitle$1 as AlertTitle, ApiIcon, Badge, BranchIcon, Breadcrumb, Button$1 as Button, ButtonsGroup, Cell, ChatThreads, CheckIcon, ChevronIcon, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, CommitIcon, CrossIcon, Crumb, DateTimeCell, DateTimePicker, DateTimePickerContent, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, DividerIcon, DocsIcon, DynamicForm, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, FiltersIcon, FolderIcon, GithubCoinIcon, GithubIcon, GoogleIcon, Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, Icon, InfoIcon, InputField, JudgeIcon, Kbd, KeyValueList, LatencyIcon, LinkComponentProvider, LogoWithoutText, LogsIcon, MCPDetail, MCPServerCombobox, MCPTable, MCPToolPanel, MainContentContent, MainContentLayout, MainSidebar, MainSidebarProvider, MastraPackagesInfo, MastraVersionFooter, McpCoinIcon, McpServerIcon, MemoryIcon, MemorySearch, Notification, OpenAIIcon, PageHeader, PlaygroundConfigGuard, PlaygroundQueryClient, PlaygroundTabs, PromptIcon, RadioGroup, RadioGroupItem, RepoIcon, RequestContext, RequestContextWrapper, Row, ScoreDialog, ScorerCombobox, ScorersTable, ScoresList, ScoresTools, SearchField, Searchbar, SearchbarWrapper, Section, Sections, SelectField, SettingsIcon, SideDialog, Skeleton, SlashIcon, SpanScoreList, SpanScoring, SpanTabs, StudioConfigContext, StudioConfigForm, StudioConfigProvider, Tab$1 as Tab, TabContent$1 as TabContent, TabList$1 as TabList, Table, Tbody, TemplateFailure, TemplateForm, TemplateInfo, TemplateInstallation, TemplateSuccess, TemplatesList, TemplatesTools, TextAndIcon, Th, Thead, ThreadDeleteButton, ThreadInputProvider, ThreadItem, ThreadLink, ThreadList, Threads, ToolCoinIcon, ToolCombobox, ToolFallback, ToolIconMap, ToolInformation, ToolPanel, ToolTable, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceDialog, TraceIcon, TraceTimeline, TraceTimelineSpan, TraceTimelineTools, TracesList, TracesTools, TracingSettingsContext, TracingSettingsProvider, TsIcon, Txt, TxtCell, VariablesIcon, WorkflowCoinIcon, WorkflowCombobox, WorkflowGraph, WorkflowIcon, WorkflowInformation, WorkflowLayout, WorkflowRunContext, WorkflowRunDetail, WorkflowRunList, WorkflowRunProvider, WorkflowStepDetailContext, WorkflowStepDetailProvider, WorkflowTable, WorkflowTrigger, WorkingMemoryContext, WorkingMemoryProvider, convertWorkflowRunStateToStreamResult, extractPrompt, formatHierarchicalSpans, getColumnTemplate, getMainContentContentClassName, getShortId, getSpanTypeUi, getToNextEntryFn, getToPreviousEntryFn, parseError, providerMapToIcon, scoresListColumns, spanTypePrefixes, toast, traceScoresListColumns, tracesListColumns, useAgent, useAgentInformationSettings, useAgentInformationTab, useAgentPromptExperiment, useAgentSettings, useAgents, useCancelWorkflowRun, useCurrentRun, useDeleteThread, useDeleteWorkflowRun, useExecuteAgentTool, useExecuteMCPTool, useExecuteTool, useExecuteWorkflow, useInView, useLinkComponent, useMCPServerTool, useMCPServerTools, useMCPServers, useMainSidebar, useMastraPackages, useMemory, useMemoryConfig, useMemorySearch, usePackageUpdates, usePlaygroundStore, useReorderModelList, useResetAgentModel, useScorer, useScorers, useScoresByScorerId, useSpeechRecognition, useStreamWorkflow, useStudioConfig, useThreadInput, useThreads, useTool, useTools, useTraceSpanScores, useTracingSettings, useUpdateAgentModel, useUpdateModelInModelList, useWorkflow, useWorkflowRunExecutionResult, useWorkflowRuns, useWorkflowStepDetail, useWorkflows, useWorkingMemory };
20696
21323
  //# sourceMappingURL=index.es.js.map