@ai-matrx/chat 0.3.15 → 0.3.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/agents/components/agent-widgets/chat-assistant/CompactAssistantInput.js +1 -1
  3. package/dist/agents/components/inputs/AgentVariablesInline.js +1 -1
  4. package/dist/agents/components/inputs/smart-input/AgentTextarea.js +1 -1
  5. package/dist/agents/components/inputs/smart-input/InputActionButtons.js +1 -1
  6. package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPeek.js +6 -6
  7. package/dist/agents/components/run/AgentRunHeader.js +1 -2
  8. package/dist/agents/components/shared/AgentConversationColumn.js +1 -1
  9. package/dist/agents/components/shared/AgentHeader.js +1 -2
  10. package/dist/agents/components/shared/AgentHeaderMobile.js +1 -2
  11. package/dist/agents/components/working-document/DocumentLinkPicker.d.ts +1 -1
  12. package/dist/agents/components/working-document/WorkingDocumentPanel.js +1 -1
  13. package/dist/agents/components/working-document/documents-workspace/DocumentsListRail.js +2 -2
  14. package/dist/agents/components/working-document/documents-workspace/DocumentsWorkspace.js +2 -2
  15. package/dist/agents/hooks/useInstanceInputUndoRedo.d.ts +1 -1
  16. package/dist/agents/hooks/useInstanceInputUndoRedo.js +1 -1
  17. package/dist/agents/hooks/useWorkingDocument.js +7 -6
  18. package/dist/agents/model-registry/model-classes.d.ts +1 -43
  19. package/dist/agents/model-registry/model-classes.js +1 -40
  20. package/dist/agents/model-registry/parse.d.ts +1 -88
  21. package/dist/agents/model-registry/parse.js +1 -246
  22. package/dist/agents/redux/agent-definition/selectors.d.ts +8 -8
  23. package/dist/agents/redux/execution-system/instance-working-document/cx-working-document.service.d.ts +18 -16
  24. package/dist/agents/redux/execution-system/instance-working-document/cx-working-document.service.js +101 -52
  25. package/dist/agents/redux/execution-system/instance-working-document/instance-working-document.slice.d.ts +2 -2
  26. package/dist/agents/redux/execution-system/instance-working-document/instance-working-document.thunks.d.ts +1 -1
  27. package/dist/agents/redux/execution-system/instance-working-document/scratchpad.thunks.d.ts +1 -1
  28. package/dist/agents/utils/platform-keys.d.ts +15 -0
  29. package/dist/agents/utils/platform-keys.js +69 -0
  30. package/dist/cx-chat/components/user-input/ConversationInput.js +1 -1
  31. package/dist/cx-conversation/ConversationInput.js +1 -1
  32. package/dist/host/db-types.d.ts +1017 -1692
  33. package/dist/host/ui-slots.d.ts +47 -64
  34. package/dist/host/ui-slots.js +10 -52
  35. package/dist/public-chat/components/GuidedVariableInputs.js +1 -1
  36. package/dist/public-chat/components/PublicVariableInputs.js +1 -1
  37. package/dist/react.cjs +11 -23
  38. package/dist/react.cjs.map +1 -1
  39. package/dist/react.js +11 -23
  40. package/dist/react.js.map +1 -1
  41. package/dist/surfaces/manifests/_conversation-document.manifest.js +1 -1
  42. package/dist/tool-call-visualization/registry/registry.js +13 -0
  43. package/dist/ui/composer/useTouchOnlyDevice.js +1 -1
  44. package/dist/ui/skills-types.d.ts +1 -275
  45. package/dist/ui/skills-types.js +1 -0
  46. package/package.json +56 -30
  47. package/dist/agents/components/run/run-sidebar/AgentRunsSidebar.d.ts +0 -15
  48. package/dist/agents/components/run/run-sidebar/AgentRunsSidebar.js +0 -201
  49. package/dist/agents/components/run-controls/AgentExecutionTestModal.d.ts +0 -36
  50. package/dist/agents/components/run-controls/AgentExecutionTestModal.js +0 -440
  51. package/dist/agents/components/run-controls/AgentLauncherSidebarTester.d.ts +0 -6
  52. package/dist/agents/components/run-controls/AgentLauncherSidebarTester.js +0 -127
  53. package/dist/agents/components/run-controls/AgentWidgetInvokerTester.d.ts +0 -6
  54. package/dist/agents/components/run-controls/AgentWidgetInvokerTester.js +0 -84
  55. package/dist/agents/components/run-controls/CreatorRunPanel.d.ts +0 -22
  56. package/dist/agents/components/run-controls/CreatorRunPanel.js +0 -108
  57. package/dist/agents/components/run-controls/CreatorRunTabContent.d.ts +0 -30
  58. package/dist/agents/components/run-controls/CreatorRunTabContent.js +0 -319
  59. package/dist/agents/components/run-controls/PayloadTab.d.ts +0 -5
  60. package/dist/agents/components/run-controls/PayloadTab.js +0 -388
  61. package/dist/agents/components/run-controls/TesterSettingsPanel.d.ts +0 -71
  62. package/dist/agents/components/run-controls/TesterSettingsPanel.js +0 -470
  63. package/dist/agents/components/shared/AgentOptionsMenu.d.ts +0 -8
  64. package/dist/agents/components/shared/AgentOptionsMenu.js +0 -776
  65. package/dist/agents/components/shared/AgentPeekDuplicateButton.d.ts +0 -8
  66. package/dist/agents/components/shared/AgentPeekDuplicateButton.js +0 -66
  67. package/dist/agents/components/shared/AgentSaveStatus.d.ts +0 -7
  68. package/dist/agents/components/shared/AgentSaveStatus.js +0 -128
  69. package/dist/agents/components/shared/AgentSaveTapButton.d.ts +0 -18
  70. package/dist/agents/components/shared/AgentSaveTapButton.js +0 -105
  71. package/dist/agents/components/shared/useAgentSaveAction.d.ts +0 -33
  72. package/dist/agents/components/shared/useAgentSaveAction.js +0 -179
  73. package/dist/agents/components/shell/AgentsListHeader.d.ts +0 -1
  74. package/dist/agents/components/shell/AgentsListHeader.js +0 -69
  75. package/dist/agents/components/undo-history/AgentEditHistory.d.ts +0 -9
  76. package/dist/agents/components/undo-history/AgentEditHistory.js +0 -244
  77. package/dist/agents/components/unused/AgentSharedHeader.d.ts +0 -3
  78. package/dist/agents/components/unused/AgentSharedHeader.js +0 -134
  79. package/dist/agents/components/widgets/AgentWidgetsPage.d.ts +0 -11
  80. package/dist/agents/components/widgets/AgentWidgetsPage.js +0 -571
  81. package/dist/agents/components/widgets/WidgetVariableInputs.d.ts +0 -8
  82. package/dist/agents/components/widgets/WidgetVariableInputs.js +0 -80
  83. package/dist/agents/components/widgets/build-widget-launch.d.ts +0 -70
  84. package/dist/agents/components/widgets/build-widget-launch.js +0 -90
  85. package/dist/agents/hooks/useAgentAutoSave.d.ts +0 -1
  86. package/dist/agents/hooks/useAgentAutoSave.js +0 -127
  87. package/dist/agents/hooks/useAgentBuilderWriteHandlers.d.ts +0 -9
  88. package/dist/agents/hooks/useAgentBuilderWriteHandlers.js +0 -102
  89. package/dist/agents/hooks/useAgentDuplicateFlow.d.ts +0 -25
  90. package/dist/agents/hooks/useAgentDuplicateFlow.js +0 -133
  91. package/dist/agents/hooks/useAgentUndoRedo.d.ts +0 -31
  92. package/dist/agents/hooks/useAgentUndoRedo.js +0 -134
  93. package/dist/agents/hooks/useAgentUsages.d.ts +0 -17
  94. package/dist/agents/hooks/useAgentUsages.js +0 -36
  95. package/dist/agents/hooks/useDriftAlerts.d.ts +0 -11
  96. package/dist/agents/hooks/useDriftAlerts.js +0 -36
  97. package/dist/agents/hooks/useDriftReport.d.ts +0 -20
  98. package/dist/agents/hooks/useDriftReport.js +0 -34
  99. package/dist/agents/lifecycle/useAgentLifecycleActions.d.ts +0 -17
  100. package/dist/agents/lifecycle/useAgentLifecycleActions.js +0 -63
  101. package/dist/agents/message-flags/useMessageFlags.d.ts +0 -8
  102. package/dist/agents/message-flags/useMessageFlags.js +0 -68
  103. package/dist/agents/services/agent-definition-snapshot.service.d.ts +0 -15
  104. package/dist/agents/services/agent-definition-snapshot.service.js +0 -20
  105. package/dist/agents/surface-catalog-profile.d.ts +0 -96
  106. package/dist/agents/surface-catalog-profile.js +0 -79
  107. package/dist/cx-chat/hooks/useAgentBootstrap.d.ts +0 -1
  108. package/dist/cx-chat/hooks/useAgentBootstrap.js +0 -110
  109. package/dist/host/builder-door.d.ts +0 -61
  110. package/dist/host/builder-door.js +0 -25
  111. package/dist/next/lazy/CreatorRunPanel.d.ts +0 -1
  112. package/dist/next/lazy/CreatorRunPanel.js +0 -11
  113. package/dist/ui/composer/composerSubmit.d.ts +0 -50
  114. package/dist/ui/composer/composerSubmit.js +0 -32
@@ -1,127 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useState } from "react";
4
- import { getIconComponent } from "@ai-matrx/icons";
5
- import { Button as SurfaceButton } from "@ai-matrx/design-system";
6
- import { Button } from "@ai-matrx/design-system/controls";
7
- import { Separator } from "@ai-matrx/design-system";
8
- import { Badge } from "@ai-matrx/design-system";
9
- import {
10
- Collapsible,
11
- CollapsibleContent,
12
- CollapsibleTrigger
13
- } from "@ai-matrx/design-system";
14
- import { useAgentLauncherTester } from "../../hooks/useAgentLauncherTester.js";
15
- import {
16
- getAllDisplayTypes,
17
- getDisplayMeta
18
- } from "../../utils/run-ui-utils.js";
19
- import { ChevronDown, TestTube2, TestTube } from "lucide-react";
20
- import { AgentExecutionTestModal } from "./AgentExecutionTestModal.js";
21
- import { TesterSettingsPanel } from "./TesterSettingsPanel.js";
22
- function AgentLauncherSidebarTester({
23
- conversationId,
24
- surfaceKey
25
- }) {
26
- const [isOpen, setIsOpen] = useState(false);
27
- const tester = useAgentLauncherTester(
28
- conversationId,
29
- "agents-other",
30
- surfaceKey
31
- );
32
- const displayTypes = getAllDisplayTypes().map((displayMode) => {
33
- const meta = getDisplayMeta(displayMode);
34
- const IconComponent = getIconComponent(meta.icon);
35
- return {
36
- name: meta.label,
37
- icon: IconComponent,
38
- color: meta.color,
39
- displayMode,
40
- note: meta.description,
41
- testMode: meta.testMode
42
- };
43
- });
44
- return /* @__PURE__ */ jsxs(Collapsible, { open: isOpen, onOpenChange: setIsOpen, children: [
45
- /* @__PURE__ */ jsx(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "border-b border-border", children: /* @__PURE__ */ jsxs(
46
- SurfaceButton,
47
- {
48
- variant: "ghost",
49
- size: "sm",
50
- className: "w-full justify-between h-7 px-2 text-xs",
51
- children: [
52
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
53
- /* @__PURE__ */ jsx(TestTube2, { className: "w-3.5 h-3.5" }),
54
- /* @__PURE__ */ jsx("span", { children: "Test Display Modes" })
55
- ] }),
56
- /* @__PURE__ */ jsx(
57
- ChevronDown,
58
- {
59
- className: `w-3 h-3 transition-transform ${isOpen ? "rotate-180" : ""}`
60
- }
61
- )
62
- ]
63
- }
64
- ) }) }),
65
- /* @__PURE__ */ jsxs(CollapsibleContent, { className: "space-y-2 py-1", children: [
66
- /* @__PURE__ */ jsx(Separator, {}),
67
- /* @__PURE__ */ jsx("div", { className: "px-2", children: /* @__PURE__ */ jsx(
68
- TesterSettingsPanel,
69
- {
70
- controller: tester,
71
- quickTest: {
72
- applyVariables: tester.applyVariables,
73
- setApplyVariables: tester.setApplyVariables,
74
- applyUserInput: tester.applyUserInput,
75
- setApplyUserInput: tester.setApplyUserInput,
76
- applyAppContext: tester.applyAppContext,
77
- setApplyAppContext: tester.setApplyAppContext
78
- },
79
- idPrefix: "launcher-sidebar"
80
- }
81
- ) }),
82
- /* @__PURE__ */ jsx(Separator, {}),
83
- /* @__PURE__ */ jsx("div", { className: "space-y-0 px-1", children: displayTypes.map((display) => /* @__PURE__ */ jsxs(
84
- Button,
85
- {
86
- variant: "quiet",
87
- onClick: () => tester.openWithDisplayType(display.displayMode),
88
- className: "w-full justify-start",
89
- title: display.note,
90
- children: [
91
- display.icon && /* @__PURE__ */ jsx(
92
- display.icon,
93
- {
94
- className: `w-3.5 h-3.5 mr-2 flex-shrink-0 ${display.color}`
95
- }
96
- ),
97
- /* @__PURE__ */ jsx("span", { className: "flex-1 text-left font-medium", children: display.name }),
98
- display.testMode && /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-[8px] h-4 px-1", children: /* @__PURE__ */ jsx(TestTube, { className: "w-2.5 h-2.5" }) })
99
- ]
100
- },
101
- display.displayMode
102
- )) })
103
- ] }),
104
- tester.instance && /* @__PURE__ */ jsx(
105
- AgentExecutionTestModal,
106
- {
107
- surfaceKey,
108
- isOpen: tester.testModalOpen,
109
- onClose: () => tester.setTestModalOpen(false),
110
- testType: tester.testModalType,
111
- agentId: tester.instance.agentId,
112
- sourceInstanceId: conversationId,
113
- autoRun: tester.autoRun,
114
- allowChat: tester.allowChat,
115
- showVariables: tester.showVariablePanel,
116
- applyVariables: tester.applyVariables,
117
- apiEndpointMode: tester.apiEndpointMode,
118
- variablesPanelStyle: tester.variablesPanelStyle,
119
- variables: tester.applyVariables ? tester.currentVariables : {},
120
- userInput: tester.applyUserInput && tester.currentInput ? tester.currentInput : ""
121
- }
122
- )
123
- ] });
124
- }
125
- export {
126
- AgentLauncherSidebarTester
127
- };
@@ -1,6 +0,0 @@
1
- import type { SourceFeature } from "../../types/instance.types.js";
2
- export declare function AgentWidgetInvokerTester({ conversationId, sourceFeature, surfaceKey, }: {
3
- conversationId: string;
4
- sourceFeature: SourceFeature;
5
- surfaceKey: string;
6
- }): import("react").JSX.Element;
@@ -1,84 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { AgentExecutionTestModal } from "./AgentExecutionTestModal.js";
3
- import { DynamicIcon } from "@ai-matrx/icons";
4
- import {
5
- getAllDisplayTypes,
6
- getDisplayMeta
7
- } from "../../utils/run-ui-utils.js";
8
- import { useAgentLauncherTester } from "../../hooks/useAgentLauncherTester.js";
9
- import { TesterSettingsPanel } from "./TesterSettingsPanel.js";
10
- function AgentWidgetInvokerTester({
11
- conversationId,
12
- sourceFeature,
13
- surfaceKey
14
- }) {
15
- const tester = useAgentLauncherTester(
16
- conversationId,
17
- sourceFeature,
18
- surfaceKey
19
- );
20
- const displayTypes = getAllDisplayTypes().map((displayMode) => {
21
- const meta = getDisplayMeta(displayMode);
22
- const IconComponent = (props) => /* @__PURE__ */ jsx(DynamicIcon, { name: meta.icon, ...props });
23
- return {
24
- name: meta.label,
25
- icon: IconComponent,
26
- color: meta.color,
27
- displayMode,
28
- note: meta.description,
29
- testMode: meta.testMode
30
- };
31
- });
32
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row h-full w-full min-w-0 overflow-y-auto sm:overflow-hidden", children: [
33
- /* @__PURE__ */ jsx("div", { className: "w-full sm:w-[230px] shrink-0 border-b sm:border-b-0 sm:border-r border-border sm:overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "p-2", children: /* @__PURE__ */ jsx(
34
- TesterSettingsPanel,
35
- {
36
- controller: tester,
37
- quickTest: {
38
- applyVariables: tester.applyVariables,
39
- setApplyVariables: tester.setApplyVariables,
40
- applyUserInput: tester.applyUserInput,
41
- setApplyUserInput: tester.setApplyUserInput,
42
- applyAppContext: tester.applyAppContext,
43
- setApplyAppContext: tester.setApplyAppContext
44
- },
45
- idPrefix: "widget-test"
46
- }
47
- ) }) }),
48
- /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0 sm:overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "p-2 flex flex-wrap content-start gap-2 justify-center sm:justify-start", children: displayTypes.map((display) => /* @__PURE__ */ jsxs(
49
- "button",
50
- {
51
- onClick: () => tester.openWithDisplayType(display.displayMode),
52
- title: display.note,
53
- className: "flex flex-col items-center justify-center gap-1.5 w-[84px] h-[84px] bg-muted/10 hover:bg-muted/30 border border-transparent hover:border-border rounded-xl transition-all shrink-0",
54
- children: [
55
- display.icon && /* @__PURE__ */ jsx(display.icon, { className: `w-7 h-7 ${display.color}` }),
56
- /* @__PURE__ */ jsx("span", { className: "text-[10px] text-center leading-tight line-clamp-2 break-words w-full p-1", children: display.name })
57
- ]
58
- },
59
- display.displayMode
60
- )) }) }),
61
- tester.instance && /* @__PURE__ */ jsx(
62
- AgentExecutionTestModal,
63
- {
64
- surfaceKey,
65
- isOpen: tester.testModalOpen,
66
- onClose: () => tester.setTestModalOpen(false),
67
- testType: tester.testModalType,
68
- agentId: tester.instance.agentId,
69
- sourceInstanceId: conversationId,
70
- autoRun: tester.autoRun,
71
- allowChat: tester.allowChat,
72
- showVariables: tester.showVariablePanel,
73
- applyVariables: tester.applyVariables,
74
- apiEndpointMode: tester.apiEndpointMode,
75
- variablesPanelStyle: tester.variablesPanelStyle,
76
- variables: tester.applyVariables ? tester.currentVariables : {},
77
- userInput: tester.applyUserInput && tester.currentInput ? tester.currentInput : ""
78
- }
79
- )
80
- ] });
81
- }
82
- export {
83
- AgentWidgetInvokerTester
84
- };
@@ -1,22 +0,0 @@
1
- import { type RunTabId } from "./CreatorRunTabContent.js";
2
- export interface CreatorRunPanelProps {
3
- /**
4
- * The INPUT conversation — where the user is typing and which settings
5
- * adjustments target (Run Settings, System Prompt, Payload, Context,
6
- * Widget Invoker). Equals the display conversation in normal mode; under
7
- * autoClear=true after a split, this is the freshly-prepped instance the
8
- * input area was just moved to.
9
- */
10
- conversationId: string;
11
- /**
12
- * The DISPLAY conversation — where the streaming response lives and where
13
- * telemetry/recovery data is keyed (Last Request, Session, Client, Backend,
14
- * Reset). Falls back to `conversationId` when not provided.
15
- */
16
- displayConversationId?: string;
17
- /** Focus surface for startNewConversation (reset conversation). */
18
- surfaceKey: string;
19
- /** Restrict which tabs are visible. Defaults to all tabs when omitted. */
20
- tabs?: RunTabId[];
21
- }
22
- export declare function CreatorRunPanel({ conversationId, displayConversationId, surfaceKey, tabs: allowedTabs, }: CreatorRunPanelProps): import("react").JSX.Element;
@@ -1,108 +0,0 @@
1
- "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { Badge, Button } from "@ai-matrx/design-system/controls";
4
- import { useState, useCallback, useEffect } from "react";
5
- import { ChevronDown, ChevronUp } from "lucide-react";
6
- import { useAppSelector } from "../../../store/hooks.js";
7
- import { selectConversationTitle } from "../../redux/execution-system/messages/messages.selectors.js";
8
- import { selectInstanceUIState } from "../../redux/execution-system/instance-ui-state/instance-ui-state.selectors.js";
9
- import CreatorRunTabContent, {
10
- useCreatorRunWindows,
11
- ALL_RUN_TABS,
12
- RUN_TAB_LABELS
13
- } from "./CreatorRunTabContent.js";
14
- function CreatorRunPanel({
15
- conversationId,
16
- displayConversationId,
17
- surfaceKey,
18
- tabs: allowedTabs
19
- }) {
20
- const displayId = displayConversationId ?? conversationId;
21
- const [isExpanded, setIsExpanded] = useState(false);
22
- const [activeTab, setActiveTab] = useState(
23
- () => allowedTabs && allowedTabs.length > 0 ? allowedTabs[0] : "actions"
24
- );
25
- const { openStreamDebugWindow, openRunSettingsWindow, windowPanels } = useCreatorRunWindows({ conversationId, displayId });
26
- const conversationTitle = useAppSelector(selectConversationTitle(displayId));
27
- const instanceUIForBadge = useAppSelector(selectInstanceUIState(displayId));
28
- const isOverridden = Boolean(instanceUIForBadge?.serverOverrideUrl);
29
- const totalRequestCount = useAppSelector((state) => {
30
- let count = 0;
31
- for (const id of state.conversations.allConversationIds) {
32
- count += (state.activeRequests.byConversationId[id] ?? []).length;
33
- }
34
- return count;
35
- });
36
- const handleExpand = useCallback(() => setIsExpanded(true), []);
37
- const handleCollapse = useCallback(() => setIsExpanded(false), []);
38
- useEffect(() => {
39
- if (typeof window === "undefined") return void 0;
40
- const handler = (e) => {
41
- const detail = e.detail ?? {};
42
- if (detail.conversationId && detail.conversationId !== conversationId && detail.conversationId !== displayId) {
43
- return;
44
- }
45
- if (!detail.tab) return;
46
- const allowed = allowedTabs ?? ALL_RUN_TABS;
47
- if (!allowed.includes(detail.tab)) return;
48
- setActiveTab(detail.tab);
49
- setIsExpanded(true);
50
- };
51
- window.addEventListener("matrx:openCreatorTab", handler);
52
- return () => window.removeEventListener("matrx:openCreatorTab", handler);
53
- }, [conversationId, displayId, allowedTabs]);
54
- if (!isExpanded) {
55
- return /* @__PURE__ */ jsxs(Fragment, { children: [
56
- /* @__PURE__ */ jsx("div", { className: "border-t border-l border-r border-border", children: /* @__PURE__ */ jsxs(
57
- "button",
58
- {
59
- type: "button",
60
- onClick: handleExpand,
61
- className: "flex items-center gap-2 w-full pl-2 pr-2 py-1 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/40 transition-colors min-w-0",
62
- children: [
63
- /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground truncate shrink-0 max-w-[120px] sm:max-w-none", children: conversationTitle ?? "Creator Panel" }),
64
- /* @__PURE__ */ jsx(
65
- Badge,
66
- {
67
- className: "ml-2 shrink-0",
68
- tone: isOverridden ? "success" : "neutral",
69
- title: isOverridden ? "AI calls for this conversation are routed to the sandbox proxy" : "AI calls for this conversation use the global cloud server",
70
- children: isOverridden ? "Sandbox" : "Cloud"
71
- }
72
- ),
73
- /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3 shrink-0 ml-auto" })
74
- ]
75
- }
76
- ) }),
77
- windowPanels
78
- ] });
79
- }
80
- const visibleTabIds = allowedTabs ?? ALL_RUN_TABS;
81
- const tabs = visibleTabIds.map((id) => ({
82
- id,
83
- label: id === "session" && totalRequestCount > 0 ? `Session (${totalRequestCount})` : RUN_TAB_LABELS[id]
84
- }));
85
- return /* @__PURE__ */ jsxs(Fragment, { children: [
86
- /* @__PURE__ */ jsxs("div", { className: "border-t border-border bg-card", children: [
87
- /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-border min-w-0", children: [
88
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0 overflow-x-auto min-w-0 flex-1 scrollbar-none", children: tabs.map((tab) => /* @__PURE__ */ jsx(Button, { variant: "quiet", pressed: !!(activeTab === tab.id), onClick: () => setActiveTab(tab.id), className: "-mb-px shrink-0", children: tab.label }, tab.id)) }),
89
- /* @__PURE__ */ jsx(Button, { variant: "quiet", icon: /* @__PURE__ */ jsx(ChevronUp, {}), onClick: handleCollapse, title: "Collapse", "aria-label": "Collapse", className: "ml-1 shrink-0" })
90
- ] }),
91
- /* @__PURE__ */ jsx("div", { className: "h-[50dvh] sm:h-72 overflow-y-auto", children: /* @__PURE__ */ jsx(
92
- CreatorRunTabContent,
93
- {
94
- tabId: activeTab,
95
- conversationId,
96
- displayConversationId,
97
- surfaceKey,
98
- onOpenStreamDebugWindow: openStreamDebugWindow,
99
- onOpenRunSettingsWindow: openRunSettingsWindow
100
- }
101
- ) })
102
- ] }),
103
- windowPanels
104
- ] });
105
- }
106
- export {
107
- CreatorRunPanel
108
- };
@@ -1,30 +0,0 @@
1
- export type RunTabId = "actions" | "context" | "payload" | "widget_invoker" | "settings" | "sysprompt" | "last" | "model_context" | "session" | "client" | "backend";
2
- export declare const ALL_RUN_TABS: RunTabId[];
3
- export declare const RUN_TAB_LABELS: Record<RunTabId, string>;
4
- /**
5
- * Owns the two embedded WindowPanels the Actions tab opens. Returns open
6
- * callbacks for the Actions tab plus the `windowPanels` JSX the host renders.
7
- * Window ids are frozen at first render so they never change even if
8
- * conversationId changes (otherwise the hook cleanup unregisters the window
9
- * and the tray chip disappears).
10
- */
11
- export declare function useCreatorRunWindows({ conversationId, displayId, }: {
12
- conversationId: string;
13
- displayId: string;
14
- }): {
15
- openStreamDebugWindow: () => void;
16
- openRunSettingsWindow: () => void;
17
- windowPanels: import("react").JSX.Element;
18
- };
19
- export interface CreatorRunTabContentProps {
20
- tabId: RunTabId;
21
- /** Input conversation — settings/context/payload/system/widgets target this. */
22
- conversationId: string;
23
- /** Display conversation — telemetry tabs key off this. Falls back to input. */
24
- displayConversationId?: string;
25
- /** Focus surface for startNewConversation (reset). */
26
- surfaceKey: string;
27
- onOpenStreamDebugWindow: () => void;
28
- onOpenRunSettingsWindow: () => void;
29
- }
30
- export default function CreatorRunTabContent({ tabId, conversationId, displayConversationId, surfaceKey, onOpenStreamDebugWindow, onOpenRunSettingsWindow, }: CreatorRunTabContentProps): import("react").JSX.Element | null;