@ai-matrx/chat 0.3.11 → 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.
- package/CHANGELOG.md +83 -0
- package/dist/agent-copy/export.d.ts +10 -2
- package/dist/agent-copy/export.js +3 -2
- package/dist/agents/components/agent-widgets/chat-assistant/CompactAssistantInput.js +1 -1
- package/dist/agents/components/debug/SandboxFileViewer.js +1 -3
- package/dist/agents/components/inputs/AgentVariablesInline.js +1 -1
- package/dist/agents/components/inputs/smart-input/AgentTextarea.js +1 -1
- package/dist/agents/components/inputs/smart-input/InputActionButtons.js +1 -1
- package/dist/agents/components/inputs/smart-input/composer/ComposerAgentPeek.js +6 -6
- package/dist/agents/components/messages-display/TranscriptIntegrityCopyButton.js +4 -4
- package/dist/agents/components/messages-display/user/UserActionBar.js +3 -18
- package/dist/agents/components/run/AgentRunHeader.js +1 -2
- package/dist/agents/components/shared/AgentConversationColumn.js +1 -1
- package/dist/agents/components/shared/AgentHeader.js +1 -2
- package/dist/agents/components/shared/AgentHeaderMobile.js +1 -2
- package/dist/agents/components/working-document/DocumentLinkPicker.d.ts +1 -1
- package/dist/agents/components/working-document/WorkingDocumentPanel.js +1 -1
- package/dist/agents/components/working-document/documents-workspace/DocumentsListRail.js +2 -2
- package/dist/agents/components/working-document/documents-workspace/DocumentsWorkspace.js +2 -2
- package/dist/agents/hooks/useInstanceInputUndoRedo.d.ts +1 -1
- package/dist/agents/hooks/useInstanceInputUndoRedo.js +1 -1
- package/dist/agents/hooks/useWorkingDocument.js +7 -6
- package/dist/agents/model-registry/model-classes.d.ts +1 -43
- package/dist/agents/model-registry/model-classes.js +1 -40
- package/dist/agents/model-registry/parse.d.ts +1 -88
- package/dist/agents/model-registry/parse.js +1 -246
- package/dist/agents/prompt-preview/PromptPreviewContent.js +1 -3
- package/dist/agents/redux/agent-definition/selectors.d.ts +8 -8
- package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +14 -0
- package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.js +30 -0
- package/dist/agents/redux/execution-system/client-capabilities/desktop-native.provider.js +10 -1
- package/dist/agents/redux/execution-system/instance-working-document/cx-working-document.service.d.ts +18 -16
- package/dist/agents/redux/execution-system/instance-working-document/cx-working-document.service.js +101 -52
- package/dist/agents/redux/execution-system/instance-working-document/instance-working-document.slice.d.ts +2 -2
- package/dist/agents/redux/execution-system/instance-working-document/instance-working-document.thunks.d.ts +1 -1
- package/dist/agents/redux/execution-system/instance-working-document/scratchpad.thunks.d.ts +1 -1
- package/dist/agents/redux/execution-system/message-crud/refetch-single-message.thunk.js +5 -0
- package/dist/agents/redux/execution-system/thunks/process-stream.js +2 -2
- package/dist/agents/redux/execution-system/utils/stream-block-accumulator.d.ts +14 -0
- package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +28 -0
- package/dist/agents/utils/platform-keys.d.ts +15 -0
- package/dist/agents/utils/platform-keys.js +69 -0
- package/dist/context/sources/scopes.d.ts +1 -1
- package/dist/cx-chat/components/user-input/ConversationInput.js +1 -1
- package/dist/cx-conversation/ConversationInput.js +1 -1
- package/dist/host/db-types.d.ts +23242 -23071
- package/dist/host/ui-slots.d.ts +50 -64
- package/dist/host/ui-slots.js +12 -52
- package/dist/public-chat/components/GuidedVariableInputs.js +1 -1
- package/dist/public-chat/components/PublicVariableInputs.js +1 -1
- package/dist/react.cjs +11 -23
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +11 -23
- package/dist/react.js.map +1 -1
- package/dist/surfaces/manifests/_conversation-document.manifest.js +1 -1
- package/dist/tool-call-visualization/registry/registry.js +13 -0
- package/dist/ui/composer/useTouchOnlyDevice.js +1 -1
- package/dist/ui/skills-types.d.ts +1 -275
- package/dist/ui/skills-types.js +1 -0
- package/dist/voice-agent/components/VoiceDebugPanel.js +1 -3
- package/package.json +60 -34
- package/dist/agents/components/run/run-sidebar/AgentRunsSidebar.d.ts +0 -15
- package/dist/agents/components/run/run-sidebar/AgentRunsSidebar.js +0 -201
- package/dist/agents/components/run-controls/AgentExecutionTestModal.d.ts +0 -36
- package/dist/agents/components/run-controls/AgentExecutionTestModal.js +0 -440
- package/dist/agents/components/run-controls/AgentLauncherSidebarTester.d.ts +0 -6
- package/dist/agents/components/run-controls/AgentLauncherSidebarTester.js +0 -127
- package/dist/agents/components/run-controls/AgentWidgetInvokerTester.d.ts +0 -6
- package/dist/agents/components/run-controls/AgentWidgetInvokerTester.js +0 -84
- package/dist/agents/components/run-controls/CreatorRunPanel.d.ts +0 -22
- package/dist/agents/components/run-controls/CreatorRunPanel.js +0 -108
- package/dist/agents/components/run-controls/CreatorRunTabContent.d.ts +0 -30
- package/dist/agents/components/run-controls/CreatorRunTabContent.js +0 -319
- package/dist/agents/components/run-controls/PayloadTab.d.ts +0 -5
- package/dist/agents/components/run-controls/PayloadTab.js +0 -388
- package/dist/agents/components/run-controls/TesterSettingsPanel.d.ts +0 -71
- package/dist/agents/components/run-controls/TesterSettingsPanel.js +0 -470
- package/dist/agents/components/shared/AgentOptionsMenu.d.ts +0 -8
- package/dist/agents/components/shared/AgentOptionsMenu.js +0 -776
- package/dist/agents/components/shared/AgentPeekDuplicateButton.d.ts +0 -8
- package/dist/agents/components/shared/AgentPeekDuplicateButton.js +0 -66
- package/dist/agents/components/shared/AgentSaveStatus.d.ts +0 -7
- package/dist/agents/components/shared/AgentSaveStatus.js +0 -128
- package/dist/agents/components/shared/AgentSaveTapButton.d.ts +0 -18
- package/dist/agents/components/shared/AgentSaveTapButton.js +0 -105
- package/dist/agents/components/shared/useAgentSaveAction.d.ts +0 -33
- package/dist/agents/components/shared/useAgentSaveAction.js +0 -179
- package/dist/agents/components/shell/AgentsListHeader.d.ts +0 -1
- package/dist/agents/components/shell/AgentsListHeader.js +0 -69
- package/dist/agents/components/undo-history/AgentEditHistory.d.ts +0 -9
- package/dist/agents/components/undo-history/AgentEditHistory.js +0 -244
- package/dist/agents/components/unused/AgentSharedHeader.d.ts +0 -3
- package/dist/agents/components/unused/AgentSharedHeader.js +0 -134
- package/dist/agents/components/widgets/AgentWidgetsPage.d.ts +0 -11
- package/dist/agents/components/widgets/AgentWidgetsPage.js +0 -571
- package/dist/agents/components/widgets/WidgetVariableInputs.d.ts +0 -8
- package/dist/agents/components/widgets/WidgetVariableInputs.js +0 -80
- package/dist/agents/components/widgets/build-widget-launch.d.ts +0 -70
- package/dist/agents/components/widgets/build-widget-launch.js +0 -90
- package/dist/agents/hooks/useAgentAutoSave.d.ts +0 -1
- package/dist/agents/hooks/useAgentAutoSave.js +0 -127
- package/dist/agents/hooks/useAgentBuilderWriteHandlers.d.ts +0 -9
- package/dist/agents/hooks/useAgentBuilderWriteHandlers.js +0 -102
- package/dist/agents/hooks/useAgentDuplicateFlow.d.ts +0 -25
- package/dist/agents/hooks/useAgentDuplicateFlow.js +0 -133
- package/dist/agents/hooks/useAgentUndoRedo.d.ts +0 -31
- package/dist/agents/hooks/useAgentUndoRedo.js +0 -134
- package/dist/agents/hooks/useAgentUsages.d.ts +0 -17
- package/dist/agents/hooks/useAgentUsages.js +0 -36
- package/dist/agents/hooks/useDriftAlerts.d.ts +0 -11
- package/dist/agents/hooks/useDriftAlerts.js +0 -36
- package/dist/agents/hooks/useDriftReport.d.ts +0 -20
- package/dist/agents/hooks/useDriftReport.js +0 -34
- package/dist/agents/lifecycle/useAgentLifecycleActions.d.ts +0 -17
- package/dist/agents/lifecycle/useAgentLifecycleActions.js +0 -63
- package/dist/agents/message-flags/useMessageFlags.d.ts +0 -8
- package/dist/agents/message-flags/useMessageFlags.js +0 -68
- package/dist/agents/services/agent-definition-snapshot.service.d.ts +0 -15
- package/dist/agents/services/agent-definition-snapshot.service.js +0 -20
- package/dist/agents/surface-catalog-profile.d.ts +0 -96
- package/dist/agents/surface-catalog-profile.js +0 -79
- package/dist/cx-chat/hooks/useAgentBootstrap.d.ts +0 -1
- package/dist/cx-chat/hooks/useAgentBootstrap.js +0 -110
- package/dist/host/builder-door.d.ts +0 -61
- package/dist/host/builder-door.js +0 -25
- package/dist/next/lazy/CreatorRunPanel.d.ts +0 -1
- package/dist/next/lazy/CreatorRunPanel.js +0 -11
- package/dist/ui/composer/composerSubmit.d.ts +0 -50
- package/dist/ui/composer/composerSubmit.js +0 -32
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
useState,
|
|
5
|
-
useCallback
|
|
6
|
-
} from "react";
|
|
7
|
-
import { RotateCcw, AppWindow, SlidersHorizontal, Brain } from "lucide-react";
|
|
8
|
-
import { useAppSelector, useAppDispatch } from "../../../store/hooks.js";
|
|
9
|
-
import { CHAT_WINDOWS, openOverlay } from "../../../host/windows.js";
|
|
10
|
-
import { useChatWindows, useHasChatManagedWindow } from "../../../host/windows-react.js";
|
|
11
|
-
import {
|
|
12
|
-
selectIsMemoryEnabledForConversation,
|
|
13
|
-
selectMemoryCounters,
|
|
14
|
-
selectMemoryDegraded
|
|
15
|
-
} from "../../redux/execution-system/observational-memory/observational-memory.selectors.js";
|
|
16
|
-
import { Switch } from "../../../ui/switch.js";
|
|
17
|
-
import { Label } from "@ai-matrx/design-system";
|
|
18
|
-
import { startNewConversation } from "../../redux/execution-system/thunks/create-instance.thunk.js";
|
|
19
|
-
import { setBuilderAdvancedSettings } from "../../redux/execution-system/instance-ui-state/instance-ui-state.slice.js";
|
|
20
|
-
import { selectUseStructuredSystemInstruction } from "../../redux/execution-system/instance-ui-state/instance-ui-state.selectors.js";
|
|
21
|
-
import { RunSettingsEditor } from "./RunSettingsEditor.js";
|
|
22
|
-
import { ContextPoliciesTab } from "./ContextPoliciesTab.js";
|
|
23
|
-
import { PayloadTab } from "./PayloadTab.js";
|
|
24
|
-
import { SystemInstructionEditor } from "../../../host/ui-slots.js";
|
|
25
|
-
import { WindowPanel } from "../../../host/ui-slots.js";
|
|
26
|
-
import { StreamDebugPanel } from "../debug/StreamDebugPanel.js";
|
|
27
|
-
import { AgentWidgetInvokerTester } from "./AgentWidgetInvokerTester.js";
|
|
28
|
-
import { RequestStatsPanel } from "./panels/RequestStatsPanel.js";
|
|
29
|
-
import { SessionStatsPanel } from "./panels/SessionStatsPanel.js";
|
|
30
|
-
import { ClientMetricsPanel } from "./panels/ClientMetricsPanel.js";
|
|
31
|
-
import { BackendTargetPanel } from "./panels/BackendTargetPanel.js";
|
|
32
|
-
import { ModelContextPanel } from "./panels/ModelContextPanel.js";
|
|
33
|
-
import { cn } from "@ai-matrx/design-system";
|
|
34
|
-
import { selectIsSuperAdmin } from "../../../host/identity.js";
|
|
35
|
-
import { Button } from "@ai-matrx/design-system/controls";
|
|
36
|
-
const ALL_RUN_TABS = [
|
|
37
|
-
"actions",
|
|
38
|
-
"context",
|
|
39
|
-
"payload",
|
|
40
|
-
"widget_invoker",
|
|
41
|
-
"settings",
|
|
42
|
-
"sysprompt",
|
|
43
|
-
"last",
|
|
44
|
-
"model_context",
|
|
45
|
-
"session",
|
|
46
|
-
"client",
|
|
47
|
-
"backend"
|
|
48
|
-
];
|
|
49
|
-
const RUN_TAB_LABELS = {
|
|
50
|
-
actions: "Actions",
|
|
51
|
-
context: "Context",
|
|
52
|
-
payload: "Payload",
|
|
53
|
-
widget_invoker: "Widgets",
|
|
54
|
-
settings: "Run",
|
|
55
|
-
sysprompt: "System",
|
|
56
|
-
last: "Request",
|
|
57
|
-
model_context: "Model Context",
|
|
58
|
-
session: "Session",
|
|
59
|
-
client: "Client",
|
|
60
|
-
backend: "Backend"
|
|
61
|
-
};
|
|
62
|
-
function ActionButton({
|
|
63
|
-
onClick,
|
|
64
|
-
icon: Icon,
|
|
65
|
-
label,
|
|
66
|
-
iconClassName
|
|
67
|
-
}) {
|
|
68
|
-
return /* @__PURE__ */ jsx(Button, { variant: "outline", icon: /* @__PURE__ */ jsx(Icon, { className: cn("w-7 h-7", iconClassName) }), onClick, className: "shrink-0", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] text-center leading-tight font-medium px-1", children: label }) });
|
|
69
|
-
}
|
|
70
|
-
function ActionsTab({
|
|
71
|
-
conversationId,
|
|
72
|
-
surfaceKey,
|
|
73
|
-
onOpenStreamDebugWindow,
|
|
74
|
-
onOpenRunSettingsWindow
|
|
75
|
-
}) {
|
|
76
|
-
const dispatch = useAppDispatch();
|
|
77
|
-
const isAdmin = useAppSelector(selectIsSuperAdmin);
|
|
78
|
-
const isMemoryEnabled = useAppSelector(
|
|
79
|
-
selectIsMemoryEnabledForConversation(conversationId)
|
|
80
|
-
);
|
|
81
|
-
const memoryDegraded = useAppSelector(selectMemoryDegraded(conversationId));
|
|
82
|
-
const memoryCounters = useAppSelector(selectMemoryCounters(conversationId));
|
|
83
|
-
const handleReset = useCallback(() => {
|
|
84
|
-
dispatch(
|
|
85
|
-
startNewConversation({
|
|
86
|
-
currentConversationId: conversationId,
|
|
87
|
-
surfaceKey
|
|
88
|
-
})
|
|
89
|
-
).unwrap().catch((err) => console.error("Failed to reset test instance:", err));
|
|
90
|
-
}, [conversationId, surfaceKey, dispatch]);
|
|
91
|
-
const handleOpenMemoryInspector = useCallback(() => {
|
|
92
|
-
dispatch(
|
|
93
|
-
openOverlay({
|
|
94
|
-
overlayId: CHAT_WINDOWS.observationalMemoryWindow,
|
|
95
|
-
data: { initialSelectedConversationId: conversationId }
|
|
96
|
-
})
|
|
97
|
-
);
|
|
98
|
-
}, [dispatch, conversationId]);
|
|
99
|
-
return /* @__PURE__ */ jsxs("div", { className: "p-2 flex flex-wrap content-start gap-2 h-full overflow-y-auto", children: [
|
|
100
|
-
/* @__PURE__ */ jsx(
|
|
101
|
-
ActionButton,
|
|
102
|
-
{
|
|
103
|
-
onClick: handleReset,
|
|
104
|
-
icon: RotateCcw,
|
|
105
|
-
iconClassName: "text-amber-500",
|
|
106
|
-
label: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
107
|
-
"Reset",
|
|
108
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
109
|
-
"Conversation"
|
|
110
|
-
] })
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
/* @__PURE__ */ jsx(
|
|
114
|
-
ActionButton,
|
|
115
|
-
{
|
|
116
|
-
onClick: onOpenStreamDebugWindow,
|
|
117
|
-
icon: AppWindow,
|
|
118
|
-
iconClassName: "text-blue-500",
|
|
119
|
-
label: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
120
|
-
"Debug",
|
|
121
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
122
|
-
"Window"
|
|
123
|
-
] })
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
/* @__PURE__ */ jsx(
|
|
127
|
-
ActionButton,
|
|
128
|
-
{
|
|
129
|
-
onClick: onOpenRunSettingsWindow,
|
|
130
|
-
icon: SlidersHorizontal,
|
|
131
|
-
iconClassName: "text-green-500",
|
|
132
|
-
label: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133
|
-
"Run",
|
|
134
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
135
|
-
"Settings"
|
|
136
|
-
] })
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
isAdmin && /* @__PURE__ */ jsxs(
|
|
140
|
-
"button",
|
|
141
|
-
{
|
|
142
|
-
type: "button",
|
|
143
|
-
onClick: handleOpenMemoryInspector,
|
|
144
|
-
className: cn(
|
|
145
|
-
"relative flex flex-col items-center justify-center gap-1.5 w-[84px] h-[84px] text-muted-foreground hover:text-foreground bg-muted/10 hover:bg-muted/30 border border-transparent hover:border-border rounded-xl transition-all shrink-0",
|
|
146
|
-
isMemoryEnabled && "bg-purple-500/10 border-purple-500/30 text-foreground"
|
|
147
|
-
),
|
|
148
|
-
children: [
|
|
149
|
-
/* @__PURE__ */ jsx(
|
|
150
|
-
Brain,
|
|
151
|
-
{
|
|
152
|
-
className: cn(
|
|
153
|
-
"w-7 h-7",
|
|
154
|
-
isMemoryEnabled ? "text-purple-500" : "text-purple-500/60"
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
),
|
|
158
|
-
/* @__PURE__ */ jsxs("span", { className: "text-[10px] text-center leading-tight font-medium px-1", children: [
|
|
159
|
-
"Memory",
|
|
160
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
161
|
-
"Inspector"
|
|
162
|
-
] }),
|
|
163
|
-
isMemoryEnabled && memoryCounters != null && /* @__PURE__ */ jsxs("span", { className: "absolute top-1 right-1 flex items-center gap-0.5", children: [
|
|
164
|
-
/* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-purple-500 animate-pulse" }),
|
|
165
|
-
memoryCounters.totalEvents > 0 && /* @__PURE__ */ jsx("span", { className: "text-[9px] font-mono text-purple-500 leading-none", children: memoryCounters.totalEvents })
|
|
166
|
-
] }),
|
|
167
|
-
memoryDegraded && /* @__PURE__ */ jsx("span", { className: "absolute top-1 left-1 w-1.5 h-1.5 rounded-full bg-amber-500" })
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
)
|
|
171
|
-
] });
|
|
172
|
-
}
|
|
173
|
-
function SystemPromptTab({ conversationId }) {
|
|
174
|
-
const dispatch = useAppDispatch();
|
|
175
|
-
const isActive = useAppSelector(
|
|
176
|
-
selectUseStructuredSystemInstruction(conversationId)
|
|
177
|
-
);
|
|
178
|
-
return /* @__PURE__ */ jsxs("div", { className: "px-3 py-2", children: [
|
|
179
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pb-2 mb-2 border-b border-border", children: [
|
|
180
|
-
/* @__PURE__ */ jsx(
|
|
181
|
-
Label,
|
|
182
|
-
{
|
|
183
|
-
htmlFor: `sysprompt-active-${conversationId}`,
|
|
184
|
-
className: "text-xs text-muted-foreground cursor-pointer",
|
|
185
|
-
children: "Structured system prompt"
|
|
186
|
-
}
|
|
187
|
-
),
|
|
188
|
-
/* @__PURE__ */ jsx(
|
|
189
|
-
Switch,
|
|
190
|
-
{
|
|
191
|
-
id: `sysprompt-active-${conversationId}`,
|
|
192
|
-
checked: isActive,
|
|
193
|
-
onCheckedChange: (v) => dispatch(
|
|
194
|
-
setBuilderAdvancedSettings({
|
|
195
|
-
conversationId,
|
|
196
|
-
changes: { useStructuredSystemInstruction: v }
|
|
197
|
-
})
|
|
198
|
-
),
|
|
199
|
-
className: "origin-right"
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
] }),
|
|
203
|
-
isActive ? /* @__PURE__ */ jsx(SystemInstructionEditor, { conversationId }) : /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/60", children: "Enable to edit structured system instruction fields" })
|
|
204
|
-
] });
|
|
205
|
-
}
|
|
206
|
-
function useCreatorRunWindows({
|
|
207
|
-
conversationId,
|
|
208
|
-
displayId
|
|
209
|
-
}) {
|
|
210
|
-
const dispatch = useAppDispatch();
|
|
211
|
-
const [streamDebugWindowOpen, setStreamDebugWindowOpen] = useState(false);
|
|
212
|
-
const [runSettingsWindowOpen, setRunSettingsWindowOpen] = useState(false);
|
|
213
|
-
const [streamDebugId] = useState(() => `stream-debug-${displayId}`);
|
|
214
|
-
const [runSettingsId] = useState(() => `run-settings-${conversationId}`);
|
|
215
|
-
const windows = useChatWindows();
|
|
216
|
-
const streamDebugEntry = useHasChatManagedWindow(streamDebugId);
|
|
217
|
-
const runSettingsEntry = useHasChatManagedWindow(runSettingsId);
|
|
218
|
-
const openStreamDebugWindow = useCallback(() => {
|
|
219
|
-
if (streamDebugEntry) {
|
|
220
|
-
windows.bringToFront?.(streamDebugId);
|
|
221
|
-
} else {
|
|
222
|
-
setStreamDebugWindowOpen(true);
|
|
223
|
-
}
|
|
224
|
-
}, [windows, streamDebugEntry, streamDebugId]);
|
|
225
|
-
const openRunSettingsWindow = useCallback(() => {
|
|
226
|
-
if (runSettingsEntry) {
|
|
227
|
-
windows.bringToFront?.(runSettingsId);
|
|
228
|
-
} else {
|
|
229
|
-
setRunSettingsWindowOpen(true);
|
|
230
|
-
}
|
|
231
|
-
}, [windows, runSettingsEntry, runSettingsId]);
|
|
232
|
-
const windowPanels = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
233
|
-
streamDebugWindowOpen && /* @__PURE__ */ jsx(
|
|
234
|
-
WindowPanel,
|
|
235
|
-
{
|
|
236
|
-
id: streamDebugId,
|
|
237
|
-
title: "Stream Debug",
|
|
238
|
-
width: 680,
|
|
239
|
-
height: 720,
|
|
240
|
-
onClose: () => setStreamDebugWindowOpen(false),
|
|
241
|
-
urlSyncKey: "debug",
|
|
242
|
-
urlSyncId: displayId,
|
|
243
|
-
bodyClassName: "flex min-h-0 flex-col overflow-hidden p-0",
|
|
244
|
-
children: /* @__PURE__ */ jsx(StreamDebugPanel, { conversationId: displayId })
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
runSettingsWindowOpen && /* @__PURE__ */ jsx(
|
|
248
|
-
WindowPanel,
|
|
249
|
-
{
|
|
250
|
-
id: runSettingsId,
|
|
251
|
-
title: "Run Settings",
|
|
252
|
-
width: 420,
|
|
253
|
-
height: 480,
|
|
254
|
-
onClose: () => setRunSettingsWindowOpen(false),
|
|
255
|
-
urlSyncKey: "run_settings",
|
|
256
|
-
urlSyncId: conversationId,
|
|
257
|
-
children: /* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx(RunSettingsEditor, { conversationId }) })
|
|
258
|
-
}
|
|
259
|
-
)
|
|
260
|
-
] });
|
|
261
|
-
return { openStreamDebugWindow, openRunSettingsWindow, windowPanels };
|
|
262
|
-
}
|
|
263
|
-
function CreatorRunTabContent({
|
|
264
|
-
tabId,
|
|
265
|
-
conversationId,
|
|
266
|
-
displayConversationId,
|
|
267
|
-
surfaceKey,
|
|
268
|
-
onOpenStreamDebugWindow,
|
|
269
|
-
onOpenRunSettingsWindow
|
|
270
|
-
}) {
|
|
271
|
-
const displayId = displayConversationId ?? conversationId;
|
|
272
|
-
switch (tabId) {
|
|
273
|
-
case "actions":
|
|
274
|
-
return /* @__PURE__ */ jsx(
|
|
275
|
-
ActionsTab,
|
|
276
|
-
{
|
|
277
|
-
conversationId: displayId,
|
|
278
|
-
surfaceKey,
|
|
279
|
-
onOpenStreamDebugWindow,
|
|
280
|
-
onOpenRunSettingsWindow
|
|
281
|
-
}
|
|
282
|
-
);
|
|
283
|
-
case "context":
|
|
284
|
-
return /* @__PURE__ */ jsx(ContextPoliciesTab, { conversationId });
|
|
285
|
-
case "payload":
|
|
286
|
-
return /* @__PURE__ */ jsx(PayloadTab, { conversationId });
|
|
287
|
-
case "settings":
|
|
288
|
-
return /* @__PURE__ */ jsx("div", { className: "px-3 py-2", children: /* @__PURE__ */ jsx(RunSettingsEditor, { conversationId }) });
|
|
289
|
-
case "sysprompt":
|
|
290
|
-
return /* @__PURE__ */ jsx(SystemPromptTab, { conversationId });
|
|
291
|
-
case "last":
|
|
292
|
-
return /* @__PURE__ */ jsx(RequestStatsPanel, { conversationId: displayId });
|
|
293
|
-
case "model_context":
|
|
294
|
-
return /* @__PURE__ */ jsx(ModelContextPanel, { conversationId: displayId });
|
|
295
|
-
case "session":
|
|
296
|
-
return /* @__PURE__ */ jsx(SessionStatsPanel, { conversationId: displayId });
|
|
297
|
-
case "client":
|
|
298
|
-
return /* @__PURE__ */ jsx(ClientMetricsPanel, { conversationId: displayId });
|
|
299
|
-
case "widget_invoker":
|
|
300
|
-
return /* @__PURE__ */ jsx(
|
|
301
|
-
AgentWidgetInvokerTester,
|
|
302
|
-
{
|
|
303
|
-
conversationId,
|
|
304
|
-
sourceFeature: "agent-builder",
|
|
305
|
-
surfaceKey: `creator-widget-tester:${conversationId}`
|
|
306
|
-
}
|
|
307
|
-
);
|
|
308
|
-
case "backend":
|
|
309
|
-
return /* @__PURE__ */ jsx(BackendTargetPanel, { conversationId: displayId });
|
|
310
|
-
default:
|
|
311
|
-
return null;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
export {
|
|
315
|
-
ALL_RUN_TABS,
|
|
316
|
-
RUN_TAB_LABELS,
|
|
317
|
-
CreatorRunTabContent as default,
|
|
318
|
-
useCreatorRunWindows
|
|
319
|
-
};
|