local-operator-ui 0.7.2 → 0.7.3

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.
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CkAsfYTs.js","./fonts-BAmz1ETd.js","./fonts-B9KBGB-g.css","./index-BkZEKoZT.js","./pug-By0kVCfm.js","./javascript-C3MnDRiU.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CUWbsc3s.js","./fonts-BAmz1ETd.js","./fonts-B9KBGB-g.css","./index-DlgVvD7O.js","./pug-By0kVCfm.js","./javascript-C3MnDRiU.js"])))=>i.map(i=>d[i]);
2
2
  import { c as createStyled, r as resolveProps, u as useTheme, a as reactExports, b as clsx, d as useForkRef, e as extendSxProp, j as jsxRuntimeExports, h as handleBreakpoints, f as resolveBreakpointValues, g as createUnarySpacing, i as deepmerge, m as mergeBreakpointsInOrder, k as composeClasses, l as generateUtilityClass, n as createTheme$1, o as getValue, R as React, p as getDefaultExportFromCjs, q as requireReactDom, s as React$1, t as generateUtilityClasses, v as useDefaultProps, w as styled$1, x as capitalize, y as memoTheme, _ as _inheritsLoose, z as _objectWithoutPropertiesLoose$i, T as TransitionGroupContext, A as duration, B as useTheme$1, C as useTimeout, D as useId, E as ButtonBase, F as alpha$1, G as createSimplePaletteValueFilter, H as CircularProgress, P as Paper, I as darken, J as lighten, K as useEventCallback, L as useEnhancedEffect, M as useRtl, N as globalCss, O as formatMuiErrorMessage, Q as rootShouldForwardProp, S as Typography, U as getPath$2, V as isFocusVisible, W as typographyClasses, X as slotShouldForwardProp, Y as css$1, Z as keyframes, $ as clamp, a0 as emphasize, a1 as Timeout, a2 as Button, a3 as Box, a4 as FontAwesomeIcon, a5 as faExclamationTriangle, a6 as DEFAULT_THEME, a7 as faChevronLeft, a8 as faChevronRight, a9 as faRobot, aa as faCheck, ab as faTimes, ac as faEraser, ad as faPen, ae as faFileImport, af as faUpload, ag as requireReact, ah as LinearProgress, ai as faComment, aj as faSave, ak as faEdit, al as faTrashAlt, am as faComments, an as faInfoCircle, ao as faGear, ap as faPlus, aq as faServer, ar as faStar, as as faTag, at as faIdCard, au as faCalendarAlt, av as faCodeBranch, aw as faShieldAlt, ax as faArrowLeft, ay as faClock, az as faHome, aA as faDownload, aB as faFileAlt, aC as faDesktop, aD as faImage, aE as faMusic, aF as faVideo, aG as faLaptop, aH as faUsers, aI as faDatabase, aJ as faBoxOpen, aK as faBook, aL as faHdd, aM as faBox, aN as faArchive, aO as faNetworkWired, aP as faFolder, aQ as faFolderOpen, aR as faFolderTree, aS as faChevronDown, aT as faTools, aU as _extends$u, aV as faSliders, aW as faTrash, aX as faArrowDown, aY as faPaperclip, aZ as faStop, a_ as faPaperPlane, a$ as faChevronUp, b0 as faQuestion, b1 as faFile, b2 as faExclamationCircle, b3 as faLightbulb, b4 as faCode, b5 as faCommentDots, b6 as faShare, b7 as faPencilAlt, b8 as faUser, b9 as faCopy, ba as isDevelopmentMode, bb as faCommentSlash, bc as faArrowRight, bd as faBrain, be as faWandMagicSparkles, bf as faExternalLinkAlt, bg as faKey, bh as radientTheme, bi as faGlobe, bj as faSearch, bk as commonjsGlobal, bl as PropTypes, bm as faLock, bn as faSignOut, bo as themes, bp as faMoon, bq as faSun, br as faHexagonNodes, bs as faSkull, bt as faLeaf, bu as faMountain, bv as faFire, bw as faIcicles, bx as faEnvelope, by as faHistory, bz as faListAlt, bA as faAdjust, bB as faCreditCard, bC as faPlusCircle, bD as faChartLine, bE as faShield, bF as library$1, bG as icons$1, bH as CssBaseline, bI as ThemeProvider$1, bJ as getTheme, bK as ReactDOM$1, bL as ErrorBoundary } from "./fonts-BAmz1ETd.js";
3
3
  const styled = createStyled();
4
4
  function getThemeProps(params) {
@@ -37009,33 +37009,233 @@ const useJobPolling = ({
37009
37009
  currentExecution
37010
37010
  };
37011
37011
  };
37012
+ const useConversationInputStore = create$1()(
37013
+ persist(
37014
+ (set, get2) => ({
37015
+ inputByConversation: {},
37016
+ setCurrentInput: (conversationId, value) => {
37017
+ const existing = get2().inputByConversation[conversationId] || {
37018
+ currentInput: "",
37019
+ submittedMessages: [],
37020
+ currentHistoryIndex: null
37021
+ };
37022
+ set({
37023
+ inputByConversation: {
37024
+ ...get2().inputByConversation,
37025
+ [conversationId]: {
37026
+ ...existing,
37027
+ currentInput: value
37028
+ }
37029
+ }
37030
+ });
37031
+ },
37032
+ getCurrentInput: (conversationId) => {
37033
+ return get2().inputByConversation[conversationId]?.currentInput || "";
37034
+ },
37035
+ addSubmittedMessage: (conversationId, message2) => {
37036
+ const existing = get2().inputByConversation[conversationId] || {
37037
+ currentInput: "",
37038
+ submittedMessages: [],
37039
+ currentHistoryIndex: null
37040
+ };
37041
+ const last2 = existing.submittedMessages[existing.submittedMessages.length - 1];
37042
+ const newMessages = message2 && message2 !== last2 ? [
37043
+ ...existing.submittedMessages.slice(
37044
+ -20 + 1
37045
+ ),
37046
+ message2
37047
+ ] : existing.submittedMessages;
37048
+ set({
37049
+ inputByConversation: {
37050
+ ...get2().inputByConversation,
37051
+ [conversationId]: {
37052
+ ...existing,
37053
+ submittedMessages: newMessages
37054
+ }
37055
+ }
37056
+ });
37057
+ },
37058
+ getSubmittedMessages: (conversationId) => {
37059
+ return get2().inputByConversation[conversationId]?.submittedMessages || [];
37060
+ },
37061
+ clearSubmittedMessages: (conversationId) => {
37062
+ const existing = get2().inputByConversation[conversationId];
37063
+ if (!existing) return;
37064
+ set({
37065
+ inputByConversation: {
37066
+ ...get2().inputByConversation,
37067
+ [conversationId]: {
37068
+ ...existing,
37069
+ submittedMessages: []
37070
+ }
37071
+ }
37072
+ });
37073
+ },
37074
+ getCurrentHistoryIndex: (conversationId) => {
37075
+ return get2().inputByConversation[conversationId]?.currentHistoryIndex ?? null;
37076
+ },
37077
+ /**
37078
+ * Set the current history navigation index for a conversation, clamped to valid range.
37079
+ * @param conversationId - The ID of the conversation
37080
+ * @param index - The index to set (null = not navigating)
37081
+ */
37082
+ setCurrentHistoryIndex: (conversationId, index2) => {
37083
+ const existing = get2().inputByConversation[conversationId] || {
37084
+ currentInput: "",
37085
+ submittedMessages: [],
37086
+ currentHistoryIndex: null
37087
+ };
37088
+ const messages = existing.submittedMessages;
37089
+ let clampedIndex = null;
37090
+ if (typeof index2 === "number" && messages.length > 0) {
37091
+ clampedIndex = Math.max(0, Math.min(index2, messages.length - 1));
37092
+ }
37093
+ set({
37094
+ inputByConversation: {
37095
+ ...get2().inputByConversation,
37096
+ [conversationId]: {
37097
+ ...existing,
37098
+ currentHistoryIndex: clampedIndex
37099
+ }
37100
+ }
37101
+ });
37102
+ },
37103
+ resetCurrentHistoryIndex: (conversationId) => {
37104
+ const existing = get2().inputByConversation[conversationId];
37105
+ if (!existing) return;
37106
+ set({
37107
+ inputByConversation: {
37108
+ ...get2().inputByConversation,
37109
+ [conversationId]: {
37110
+ ...existing,
37111
+ currentHistoryIndex: null
37112
+ }
37113
+ }
37114
+ });
37115
+ },
37116
+ clearAll: (conversationId) => {
37117
+ const { [conversationId]: _2, ...rest } = get2().inputByConversation;
37118
+ set({
37119
+ inputByConversation: rest
37120
+ });
37121
+ }
37122
+ }),
37123
+ {
37124
+ name: "conversation-input-store",
37125
+ partialize: (state) => ({
37126
+ inputByConversation: state.inputByConversation
37127
+ })
37128
+ }
37129
+ )
37130
+ );
37012
37131
  const useMessageInput = ({
37013
37132
  conversationId,
37014
- messages,
37015
37133
  onSubmit,
37016
37134
  scrollToBottom
37017
37135
  }) => {
37136
+ const getCurrentInput = useConversationInputStore((s2) => s2.getCurrentInput);
37137
+ const setCurrentInput = useConversationInputStore((s2) => s2.setCurrentInput);
37138
+ const addSubmittedMessage = useConversationInputStore(
37139
+ (s2) => s2.addSubmittedMessage
37140
+ );
37141
+ const getSubmittedMessages = useConversationInputStore(
37142
+ (s2) => s2.getSubmittedMessages
37143
+ );
37144
+ const getCurrentHistoryIndex = useConversationInputStore(
37145
+ (s2) => s2.getCurrentHistoryIndex
37146
+ );
37147
+ const setCurrentHistoryIndex = useConversationInputStore(
37148
+ (s2) => s2.setCurrentHistoryIndex
37149
+ );
37150
+ const resetCurrentHistoryIndex = useConversationInputStore(
37151
+ (s2) => s2.resetCurrentHistoryIndex
37152
+ );
37153
+ const [hydrated, setHydrated] = reactExports.useState(
37154
+ useConversationInputStore.persist.hasHydrated?.() ?? false
37155
+ );
37156
+ const initializedRef = reactExports.useRef(void 0);
37018
37157
  const [inputValue, setInputValue] = reactExports.useState("");
37158
+ reactExports.useEffect(() => {
37159
+ const persist2 = useConversationInputStore.persist;
37160
+ let unsubHydrate;
37161
+ let unsubFinish;
37162
+ if (persist2 && typeof persist2.onHydrate === "function" && typeof persist2.onFinishHydration === "function") {
37163
+ unsubHydrate = persist2.onHydrate(() => setHydrated(false));
37164
+ unsubFinish = persist2.onFinishHydration(() => setHydrated(true));
37165
+ setHydrated(persist2.hasHydrated());
37166
+ } else {
37167
+ setHydrated(true);
37168
+ }
37169
+ return () => {
37170
+ unsubHydrate?.();
37171
+ unsubFinish?.();
37172
+ };
37173
+ }, []);
37019
37174
  const textareaRef = reactExports.useRef(null);
37020
- const [historyIndex, setHistoryIndex] = reactExports.useState(null);
37021
37175
  const draftMessageRef = reactExports.useRef("");
37022
- const userMessages = messages.filter((msg) => msg.role === "user");
37023
- const handleChange = reactExports.useCallback((value) => {
37024
- setInputValue(value);
37025
- setHistoryIndex(null);
37026
- }, []);
37176
+ const submittedMessages = conversationId ? getSubmittedMessages(conversationId) : [];
37177
+ const historyIndex = conversationId ? getCurrentHistoryIndex(conversationId) : null;
37178
+ reactExports.useEffect(() => {
37179
+ if (!hydrated) return;
37180
+ if (conversationId) {
37181
+ const draft = getCurrentInput(conversationId);
37182
+ if (historyIndex !== null && submittedMessages.length > 0) {
37183
+ setInputValue(submittedMessages[historyIndex] || "");
37184
+ } else {
37185
+ setInputValue(draft);
37186
+ }
37187
+ initializedRef.current = conversationId;
37188
+ draftMessageRef.current = "";
37189
+ } else {
37190
+ setInputValue("");
37191
+ initializedRef.current = void 0;
37192
+ draftMessageRef.current = "";
37193
+ }
37194
+ }, [
37195
+ conversationId,
37196
+ hydrated,
37197
+ getCurrentInput,
37198
+ historyIndex,
37199
+ submittedMessages
37200
+ ]);
37201
+ reactExports.useEffect(() => {
37202
+ if (!hydrated) return;
37203
+ if (!conversationId) return;
37204
+ if (initializedRef.current === conversationId) return;
37205
+ setCurrentInput(conversationId, inputValue);
37206
+ }, [conversationId, inputValue, setCurrentInput, hydrated]);
37207
+ const handleChange = reactExports.useCallback(
37208
+ (value) => {
37209
+ setInputValue(value);
37210
+ if (conversationId) {
37211
+ setCurrentInput(conversationId, value);
37212
+ resetCurrentHistoryIndex(conversationId);
37213
+ }
37214
+ },
37215
+ [conversationId, setCurrentInput, resetCurrentHistoryIndex]
37216
+ );
37027
37217
  const handleSubmit = reactExports.useCallback(() => {
37028
- if (!inputValue.trim()) return;
37218
+ if (!inputValue.trim() || !conversationId) return;
37029
37219
  onSubmit?.(inputValue);
37220
+ addSubmittedMessage(conversationId, inputValue);
37030
37221
  setInputValue("");
37031
- setHistoryIndex(null);
37222
+ setCurrentInput(conversationId, "");
37223
+ resetCurrentHistoryIndex(conversationId);
37032
37224
  draftMessageRef.current = "";
37033
37225
  if (scrollToBottom) {
37034
37226
  setTimeout(() => {
37035
37227
  scrollToBottom();
37036
37228
  }, 150);
37037
37229
  }
37038
- }, [inputValue, onSubmit, scrollToBottom]);
37230
+ }, [
37231
+ inputValue,
37232
+ conversationId,
37233
+ onSubmit,
37234
+ addSubmittedMessage,
37235
+ setCurrentInput,
37236
+ resetCurrentHistoryIndex,
37237
+ scrollToBottom
37238
+ ]);
37039
37239
  const getCursorPosition = reactExports.useCallback(() => {
37040
37240
  const textarea = textareaRef.current;
37041
37241
  if (!textarea) return { line: 0, totalLines: 1 };
@@ -37046,34 +37246,33 @@ const useMessageInput = ({
37046
37246
  const totalLines = (text4.match(/\n/g) || []).length + 1;
37047
37247
  return { line: linesUpToCursor, totalLines };
37048
37248
  }, []);
37049
- const isCursorAtFirstLine = reactExports.useCallback(() => {
37050
- const { line: line2 } = getCursorPosition();
37051
- return line2 === 1;
37052
- }, [getCursorPosition]);
37249
+ const isCursorAtFirstLine = reactExports.useCallback(
37250
+ () => getCursorPosition().line === 1,
37251
+ [getCursorPosition]
37252
+ );
37053
37253
  const isCursorAtLastLine = reactExports.useCallback(() => {
37054
37254
  const { line: line2, totalLines } = getCursorPosition();
37055
37255
  return line2 === totalLines;
37056
37256
  }, [getCursorPosition]);
37057
37257
  const handleKeyDown = reactExports.useCallback(
37058
37258
  (e3) => {
37259
+ if (!conversationId) return;
37059
37260
  if (e3.key === "Enter" && !e3.shiftKey) {
37060
37261
  e3.preventDefault();
37061
37262
  handleSubmit();
37062
37263
  return;
37063
37264
  }
37064
- if (userMessages.length === 0) {
37065
- return;
37066
- }
37265
+ if (!submittedMessages.length) return;
37067
37266
  if (e3.key === "ArrowUp" && isCursorAtFirstLine()) {
37068
37267
  e3.preventDefault();
37069
37268
  if (historyIndex === null) {
37070
37269
  draftMessageRef.current = inputValue;
37071
- setHistoryIndex(userMessages.length - 1);
37072
- setInputValue(userMessages[userMessages.length - 1].message || "");
37270
+ setCurrentHistoryIndex(conversationId, submittedMessages.length - 1);
37271
+ setInputValue(submittedMessages[submittedMessages.length - 1] || "");
37073
37272
  } else if (historyIndex > 0) {
37074
37273
  const newIndex = historyIndex - 1;
37075
- setHistoryIndex(newIndex);
37076
- setInputValue(userMessages[newIndex].message || "");
37274
+ setCurrentHistoryIndex(conversationId, newIndex);
37275
+ setInputValue(submittedMessages[newIndex] || "");
37077
37276
  }
37078
37277
  setTimeout(() => {
37079
37278
  if (textareaRef.current) {
@@ -37086,12 +37285,12 @@ const useMessageInput = ({
37086
37285
  if (e3.key === "ArrowDown" && isCursorAtLastLine()) {
37087
37286
  e3.preventDefault();
37088
37287
  if (historyIndex !== null) {
37089
- if (historyIndex < userMessages.length - 1) {
37288
+ if (historyIndex < submittedMessages.length - 1) {
37090
37289
  const newIndex = historyIndex + 1;
37091
- setHistoryIndex(newIndex);
37092
- setInputValue(userMessages[newIndex].message || "");
37290
+ setCurrentHistoryIndex(conversationId, newIndex);
37291
+ setInputValue(submittedMessages[newIndex] || "");
37093
37292
  } else {
37094
- setHistoryIndex(null);
37293
+ resetCurrentHistoryIndex(conversationId);
37095
37294
  setInputValue(draftMessageRef.current);
37096
37295
  draftMessageRef.current = "";
37097
37296
  }
@@ -37111,14 +37310,12 @@ const useMessageInput = ({
37111
37310
  isCursorAtLastLine,
37112
37311
  historyIndex,
37113
37312
  inputValue,
37114
- userMessages
37313
+ submittedMessages,
37314
+ conversationId,
37315
+ setCurrentHistoryIndex,
37316
+ resetCurrentHistoryIndex
37115
37317
  ]
37116
37318
  );
37117
- reactExports.useEffect(() => {
37118
- setInputValue("");
37119
- setHistoryIndex(null);
37120
- draftMessageRef.current = "";
37121
- }, [conversationId]);
37122
37319
  return {
37123
37320
  inputValue,
37124
37321
  setInputValue: handleChange,
@@ -37409,19 +37606,18 @@ async function createAgentComment(baseUrl, agentId, accessToken, data2) {
37409
37606
  }
37410
37607
  return response.json();
37411
37608
  }
37412
- async function listAgentComments(baseUrl, agentId, accessToken, page = 1, perPage = 20) {
37609
+ async function listAgentComments(baseUrl, agentId, page = 1, perPage = 20) {
37413
37610
  const url = new URL(
37414
37611
  joinUrl$2(baseUrl, `/v1/agents/${encodeURIComponent(agentId)}/comments`)
37415
37612
  );
37416
37613
  url.searchParams.set("page", String(page));
37417
37614
  url.searchParams.set("per_page", String(perPage));
37615
+ const headers = {};
37418
37616
  let response;
37419
37617
  try {
37420
37618
  response = await fetch(url.toString(), {
37421
37619
  method: "GET",
37422
- headers: {
37423
- Authorization: `Bearer ${accessToken}`
37424
- },
37620
+ headers,
37425
37621
  credentials: "same-origin"
37426
37622
  });
37427
37623
  } catch (err) {
@@ -48816,25 +49012,19 @@ const useAgentCommentsQuery = ({
48816
49012
  agentId,
48817
49013
  enabled = true
48818
49014
  }) => {
48819
- const { isAuthenticated, sessionToken } = useRadientAuth();
48820
- const query = useQuery({
48821
- // Ensure queryKey is valid even if agentId is temporarily undefined/empty
49015
+ return useQuery({
48822
49016
  queryKey: agentCommentsKeys.list(agentId || "invalid"),
48823
49017
  queryFn: async () => {
48824
49018
  if (!agentId) {
48825
49019
  throw new Error("Agent ID is required to fetch comments.");
48826
49020
  }
48827
- if (!sessionToken) {
48828
- throw new Error("Authentication token is required to fetch comments.");
48829
- }
48830
49021
  const response = await listAgentComments(
48831
49022
  apiConfig.radientBaseUrl,
48832
- agentId,
48833
- sessionToken
49023
+ agentId
48834
49024
  );
48835
49025
  return response.result;
48836
49026
  },
48837
- enabled: !!agentId && isAuthenticated && !!sessionToken && enabled,
49027
+ enabled: !!agentId && enabled,
48838
49028
  staleTime: 2 * 60 * 1e3,
48839
49029
  // 2 minutes
48840
49030
  gcTime: 5 * 60 * 1e3,
@@ -48842,7 +49032,6 @@ const useAgentCommentsQuery = ({
48842
49032
  refetchOnWindowFocus: true
48843
49033
  // Refetch comments if window regains focus
48844
49034
  });
48845
- return query;
48846
49035
  };
48847
49036
  const useCreateAgentCommentMutation = () => {
48848
49037
  const queryClient2 = useQueryClient();
@@ -49026,7 +49215,7 @@ const CommentsSection = ({
49026
49215
  // Renamed from 'comments'
49027
49216
  isLoading,
49028
49217
  error
49029
- } = useAgentCommentsQuery({ agentId, enabled: isAuthenticated });
49218
+ } = useAgentCommentsQuery({ agentId });
49030
49219
  const comments2 = commentsResponse?.records ?? [];
49031
49220
  const createCommentMutation = useCreateAgentCommentMutation();
49032
49221
  const updateCommentMutation = useUpdateAgentCommentMutation();
@@ -49121,12 +49310,9 @@ const CommentsSection = ({
49121
49310
  ]
49122
49311
  }
49123
49312
  )
49124
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { variant: "body2", color: "textSecondary", sx: { mt: 3, mb: 2 }, children: [
49125
- " ",
49126
- "Sign in to view and leave comments."
49127
- ] }),
49313
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "textSecondary", sx: { mt: 3, mb: 2 }, children: "Sign in to leave comments." }),
49128
49314
  /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { sx: { my: 3 } }),
49129
- isLoading && isAuthenticated && // Skeleton Loading State
49315
+ isLoading && // Skeleton Loading State
49130
49316
  /* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { children: [...Array(3)].map((_2, index2) => (
49131
49317
  // biome-ignore lint/suspicious/noArrayIndexKey: Static list for skeleton, index is acceptable here
49132
49318
  /* @__PURE__ */ jsxRuntimeExports.jsxs(CommentItem, { divider: true, children: [
@@ -49141,11 +49327,11 @@ const CommentsSection = ({
49141
49327
  ] })
49142
49328
  ] }, `skeleton-${index2}`)
49143
49329
  )) }),
49144
- error && isAuthenticated && /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { color: "error", sx: { my: 3 }, children: [
49330
+ error && /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { color: "error", sx: { my: 3 }, children: [
49145
49331
  "Failed to load comments: ",
49146
49332
  error.message
49147
49333
  ] }),
49148
- !isLoading && !error && isAuthenticated && /* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { children: comments2.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "textSecondary", children: "No comments yet. Be the first to comment!" }) : (
49334
+ !isLoading && !error && /* @__PURE__ */ jsxRuntimeExports.jsx(List$1, { children: comments2.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "textSecondary", children: "No comments yet. Be the first to comment!" }) : (
49149
49335
  // Use the extracted comments array
49150
49336
  comments2.map(
49151
49337
  (comment2) => editingCommentId === comment2.id ? (
@@ -50091,11 +50277,11 @@ const AgentCard = ({
50091
50277
  onLikeToggle,
50092
50278
  onFavouriteToggle,
50093
50279
  isLikeActionLoading = false,
50094
- isFavouriteActionLoading = false,
50095
- showActions = false
50280
+ isFavouriteActionLoading = false
50096
50281
  }) => {
50097
50282
  const navigate = useNavigate();
50098
50283
  const downloadMutation = useDownloadAgentMutation();
50284
+ const { isAuthenticated } = useRadientAuth();
50099
50285
  const { data: likeCount, isLoading: isLoadingLikes } = useAgentLikeCountQuery(
50100
50286
  {
50101
50287
  agentId: agent.id
@@ -50126,6 +50312,9 @@ const AgentCard = ({
50126
50312
  };
50127
50313
  const description = agent.description ?? "";
50128
50314
  const truncatedDescription = truncateWithEllipsis(description, 140);
50315
+ const likeTooltip = isAuthenticated ? isLiked ? "Unlike agent" : "Like agent" : "Log in to Radient to like agents";
50316
+ const favouriteTooltip = isAuthenticated ? isFavourited ? "Unfavourite agent" : "Favourite agent" : "Log in to Radient to favourite agents";
50317
+ const downloadTooltip = "Download agent to your computer";
50129
50318
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledCard$1, { onClick: handleCardClick, children: [
50130
50319
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
50131
50320
  Box,
@@ -50231,12 +50420,12 @@ const AgentCard = ({
50231
50420
  ] })
50232
50421
  ] }),
50233
50422
  /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledCardActions, { children: [
50234
- showActions ? /* @__PURE__ */ jsxRuntimeExports.jsxs(ActionButtonGroup, { children: [
50235
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
50423
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(ActionButtonGroup, { children: [
50424
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: likeTooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
50236
50425
  LikeFavouriteButton,
50237
50426
  {
50238
- onClick: (e3) => handleActionClick(e3, onLikeToggle),
50239
- disabled: isLikeActionLoading,
50427
+ onClick: isAuthenticated ? (e3) => handleActionClick(e3, onLikeToggle) : void 0,
50428
+ disabled: isLikeActionLoading || !isAuthenticated,
50240
50429
  color: isLiked ? "error" : void 0,
50241
50430
  "aria-label": isLiked ? "Unlike agent" : "Like agent",
50242
50431
  focusRipple: true,
@@ -50257,12 +50446,12 @@ const AgentCard = ({
50257
50446
  /* @__PURE__ */ jsxRuntimeExports.jsx(CountDisplay, { children: isLoadingLikes ? /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { variant: "text", width: 20 }) : likeCount ?? 0 })
50258
50447
  ]
50259
50448
  }
50260
- ),
50261
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
50449
+ ) }) }),
50450
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: favouriteTooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
50262
50451
  LikeFavouriteButton,
50263
50452
  {
50264
- onClick: (e3) => handleActionClick(e3, onFavouriteToggle),
50265
- disabled: isFavouriteActionLoading,
50453
+ onClick: isAuthenticated ? (e3) => handleActionClick(e3, onFavouriteToggle) : void 0,
50454
+ disabled: isFavouriteActionLoading || !isAuthenticated,
50266
50455
  color: isFavourited ? "warning" : void 0,
50267
50456
  "aria-label": isFavourited ? "Unfavourite agent" : "Favourite agent",
50268
50457
  focusRipple: true,
@@ -50283,10 +50472,10 @@ const AgentCard = ({
50283
50472
  /* @__PURE__ */ jsxRuntimeExports.jsx(CountDisplay, { children: isLoadingFavourites ? /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { variant: "text", width: 20 }) : favouriteCount ?? 0 })
50284
50473
  ]
50285
50474
  }
50286
- )
50287
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Box, {}),
50475
+ ) }) })
50476
+ ] }),
50288
50477
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ActionButtonGroup, { children: [
50289
- /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Download agent to your computer", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
50478
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: downloadTooltip, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
50290
50479
  IconButton,
50291
50480
  {
50292
50481
  size: "small",
@@ -50303,7 +50492,7 @@ const AgentCard = ({
50303
50492
  }
50304
50493
  )
50305
50494
  }
50306
- ) }),
50495
+ ) }) }),
50307
50496
  isLoadingDownloads || downloadMutation.isPending ? /* @__PURE__ */ jsxRuntimeExports.jsx(
50308
50497
  Skeleton,
50309
50498
  {
@@ -82606,7 +82795,7 @@ const languages = [
82606
82795
  name: "Go",
82607
82796
  extensions: ["go"],
82608
82797
  load() {
82609
- return __vitePreload(() => import("./index-CkAsfYTs.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
82798
+ return __vitePreload(() => import("./index-CUWbsc3s.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
82610
82799
  }
82611
82800
  }),
82612
82801
  /* @__PURE__ */ LanguageDescription.of({
@@ -82783,7 +82972,7 @@ const languages = [
82783
82972
  alias: ["yml"],
82784
82973
  extensions: ["yaml", "yml"],
82785
82974
  load() {
82786
- return __vitePreload(() => import("./index-BkZEKoZT.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
82975
+ return __vitePreload(() => import("./index-DlgVvD7O.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
82787
82976
  }
82788
82977
  }),
82789
82978
  // Legacy modes ported from CodeMirror 5
@@ -142643,7 +142832,6 @@ const MessageInput = ({
142643
142832
  textareaRef
142644
142833
  } = useMessageInput({
142645
142834
  conversationId,
142646
- messages,
142647
142835
  onSubmit,
142648
142836
  scrollToBottom
142649
142837
  });
@@ -180108,6 +180296,153 @@ function ft(n2) {
180108
180296
  }
180109
180297
  return React.memo(l2);
180110
180298
  }
180299
+ const CodeContainer$4 = styled$1(Box)({
180300
+ marginBottom: 16,
180301
+ width: "100%"
180302
+ });
180303
+ const SectionLabel$4 = styled$1(Typography)(({ theme: theme2 }) => ({
180304
+ display: "block",
180305
+ marginBottom: 4,
180306
+ color: theme2.palette.error.light
180307
+ }));
180308
+ const ErrorContainer$2 = styled$1(Box, {
180309
+ shouldForwardProp: (prop) => prop !== "isUser"
180310
+ })(({ isUser, theme: theme2 }) => ({
180311
+ fontFamily: '"Roboto Mono", monospace',
180312
+ fontSize: "0.85rem",
180313
+ backgroundColor: alpha$1(
180314
+ theme2.palette.error.main,
180315
+ theme2.palette.mode === "dark" ? 0.1 : 0.05
180316
+ ),
180317
+ borderRadius: "8px",
180318
+ padding: 12,
180319
+ maxHeight: "200px",
180320
+ overflow: "auto",
180321
+ display: "flex",
180322
+ flexDirection: "column-reverse",
180323
+ whiteSpace: "pre-wrap",
180324
+ color: isUser ? theme2.palette.error.main : theme2.palette.error.light,
180325
+ width: "100%",
180326
+ boxShadow: `0 2px 6px ${alpha$1(theme2.palette.common.black, theme2.palette.mode === "dark" ? 0.15 : 0.1)}`,
180327
+ "&::-webkit-scrollbar": {
180328
+ width: "6px"
180329
+ },
180330
+ "&::-webkit-scrollbar-thumb": {
180331
+ backgroundColor: alpha$1(
180332
+ theme2.palette.mode === "dark" ? theme2.palette.common.white : theme2.palette.common.black,
180333
+ 0.1
180334
+ ),
180335
+ borderRadius: "3px"
180336
+ }
180337
+ }));
180338
+ const ErrorBlock = ({ error, isUser }) => {
180339
+ if (!error || error === "[No error output]") return null;
180340
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer$4, { children: [
180341
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$4, { variant: "caption", children: "Error" }),
180342
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContainer$2, { isUser, children: error })
180343
+ ] });
180344
+ };
180345
+ const CodeContainer$3 = styled$1(Box)({
180346
+ marginBottom: 16,
180347
+ width: "100%"
180348
+ });
180349
+ const SectionLabel$3 = styled$1(Typography)(({ theme: theme2 }) => ({
180350
+ display: "block",
180351
+ marginBottom: 4,
180352
+ color: theme2.palette.text.secondary
180353
+ }));
180354
+ const LogContainer = styled$1(Box, {
180355
+ shouldForwardProp: (prop) => prop !== "isUser"
180356
+ })(({ isUser, theme: theme2 }) => ({
180357
+ fontFamily: '"Roboto Mono", monospace',
180358
+ fontSize: "0.85rem",
180359
+ backgroundColor: alpha$1(
180360
+ theme2.palette.mode === "dark" ? theme2.palette.common.black : theme2.palette.grey[200],
180361
+ theme2.palette.mode === "dark" ? 0.3 : 0.5
180362
+ ),
180363
+ borderRadius: "8px",
180364
+ padding: 12,
180365
+ maxHeight: "200px",
180366
+ overflow: "auto",
180367
+ display: "flex",
180368
+ flexDirection: "column-reverse",
180369
+ whiteSpace: "pre-wrap",
180370
+ color: isUser ? theme2.palette.info.main : theme2.palette.info.light,
180371
+ width: "100%",
180372
+ boxShadow: `0 2px 6px ${alpha$1(theme2.palette.common.black, theme2.palette.mode === "dark" ? 0.15 : 0.1)}`,
180373
+ "&::-webkit-scrollbar": {
180374
+ width: "6px"
180375
+ },
180376
+ "&::-webkit-scrollbar-thumb": {
180377
+ backgroundColor: alpha$1(
180378
+ theme2.palette.mode === "dark" ? theme2.palette.common.white : theme2.palette.common.black,
180379
+ 0.1
180380
+ ),
180381
+ borderRadius: "3px"
180382
+ }
180383
+ }));
180384
+ const LogBlock = ({ log: log2, isUser }) => {
180385
+ if (!log2 || log2 === "[No logger output]") return null;
180386
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer$3, { children: [
180387
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$3, { variant: "caption", children: "Logs" }),
180388
+ /* @__PURE__ */ jsxRuntimeExports.jsx(LogContainer, { isUser, children: log2 })
180389
+ ] });
180390
+ };
180391
+ const CodeContainer$2 = styled$1(Box)({
180392
+ marginBottom: 16,
180393
+ width: "100%"
180394
+ });
180395
+ const SectionLabel$2 = styled$1(Typography)(({ theme: theme2 }) => ({
180396
+ display: "block",
180397
+ marginBottom: 4,
180398
+ color: theme2.palette.text.secondary
180399
+ }));
180400
+ const OutputContainer = styled$1(Box)(({ theme: theme2 }) => ({
180401
+ fontFamily: '"Roboto Mono", monospace',
180402
+ fontSize: "0.85rem",
180403
+ backgroundColor: alpha$1(
180404
+ theme2.palette.mode === "dark" ? theme2.palette.common.black : theme2.palette.grey[200],
180405
+ theme2.palette.mode === "dark" ? 0.3 : 0.5
180406
+ ),
180407
+ borderRadius: "8px",
180408
+ padding: 12,
180409
+ maxHeight: "300px",
180410
+ overflow: "auto",
180411
+ whiteSpace: "pre",
180412
+ width: "100%",
180413
+ boxShadow: `0 2px 6px ${alpha$1(
180414
+ theme2.palette.common.black,
180415
+ theme2.palette.mode === "dark" ? 0.15 : 0.1
180416
+ )}`,
180417
+ color: theme2.palette.text.primary,
180418
+ overflowX: "auto",
180419
+ display: "flex",
180420
+ flexDirection: "column-reverse",
180421
+ "&::-webkit-scrollbar": {
180422
+ width: "6px",
180423
+ height: "6px"
180424
+ },
180425
+ "&::-webkit-scrollbar-thumb": {
180426
+ backgroundColor: alpha$1(
180427
+ theme2.palette.mode === "dark" ? theme2.palette.common.white : theme2.palette.common.black,
180428
+ 0.1
180429
+ ),
180430
+ borderRadius: "3px"
180431
+ },
180432
+ "&::-webkit-scrollbar-corner": {
180433
+ backgroundColor: alpha$1(
180434
+ theme2.palette.mode === "dark" ? theme2.palette.common.black : theme2.palette.grey[200],
180435
+ theme2.palette.mode === "dark" ? 0.3 : 0.5
180436
+ )
180437
+ }
180438
+ }));
180439
+ const OutputBlock = ({ output }) => {
180440
+ if (!output) return null;
180441
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer$2, { children: [
180442
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$2, { variant: "caption", children: "Output" }),
180443
+ /* @__PURE__ */ jsxRuntimeExports.jsx(OutputContainer, { children: output })
180444
+ ] });
180445
+ };
180111
180446
  const SyntaxHighlighterStyles$1 = ft`
180112
180447
  .loading-syntax-highlighter * {
180113
180448
  font-family: 'Roboto Mono', monospace !important;
@@ -180201,62 +180536,80 @@ const CodeToggleButton = styled$1(Button)(({ theme: theme2 }) => ({
180201
180536
  marginLeft: 0
180202
180537
  }
180203
180538
  }));
180204
- const CodeContainer$4 = styled$1(Box)(() => ({
180539
+ const CodeContainer$1 = styled$1(Box)(() => ({
180205
180540
  maxWidth: "100%",
180206
180541
  marginLeft: 16,
180207
180542
  marginTop: 8
180208
180543
  }));
180209
- const LoadingCodeBlock = ({ code: code2 }) => {
180544
+ const LoadingCodeBlock = ({ code: code2, label, language: language2 = "python" }) => {
180210
180545
  if (!code2) return null;
180211
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
180212
- Box,
180213
- {
180214
- sx: {
180215
- width: "100%",
180216
- maxHeight: "300px",
180217
- overflow: "auto",
180218
- "&::-webkit-scrollbar": {
180219
- width: "6px",
180220
- height: "6px"
180221
- },
180222
- "&::-webkit-scrollbar-thumb": {
180223
- backgroundColor: "rgba(255, 255, 255, 0.1)",
180224
- borderRadius: "3px"
180225
- },
180226
- "&::-webkit-scrollbar-corner": {
180227
- backgroundColor: "rgba(0, 0, 0, 0.3)"
180546
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: { width: "100%", marginBottom: 2 }, children: [
180547
+ label && /* @__PURE__ */ jsxRuntimeExports.jsx(
180548
+ Typography,
180549
+ {
180550
+ variant: "caption",
180551
+ sx: {
180552
+ color: (theme2) => theme2.palette.text.secondary,
180553
+ fontWeight: 600,
180554
+ marginLeft: 0.5,
180555
+ marginBottom: 0.5,
180556
+ letterSpacing: 0.5,
180557
+ textTransform: "uppercase",
180558
+ opacity: 0.7
180228
180559
  },
180229
- borderRadius: "8px"
180230
- },
180231
- children: [
180232
- /* @__PURE__ */ jsxRuntimeExports.jsx(SyntaxHighlighterStyles$1, {}),
180233
- /* @__PURE__ */ jsxRuntimeExports.jsx(
180234
- highlighter,
180235
- {
180236
- language: "python",
180237
- style: atomOneDark,
180238
- customStyle: {
180239
- fontSize: "0.85rem",
180240
- width: "100%",
180241
- boxShadow: "0 2px 6px rgba(0, 0, 0, 0.2)",
180242
- padding: "0.75rem",
180243
- margin: 0
180244
- // Remove margin to make it more compact
180245
- },
180246
- codeTagProps: {
180247
- style: {
180248
- fontFamily: '"Roboto Mono", monospace !important'
180249
- }
180250
- },
180251
- className: "loading-syntax-highlighter",
180252
- wrapLines: true,
180253
- wrapLongLines: true,
180254
- children: code2
180560
+ children: label
180561
+ }
180562
+ ),
180563
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
180564
+ Box,
180565
+ {
180566
+ sx: {
180567
+ width: "100%",
180568
+ maxHeight: "300px",
180569
+ overflow: "auto",
180570
+ display: "flex",
180571
+ borderRadius: "8px",
180572
+ "&::-webkit-scrollbar": {
180573
+ width: "6px",
180574
+ height: "6px"
180575
+ },
180576
+ "&::-webkit-scrollbar-thumb": {
180577
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
180578
+ borderRadius: "3px"
180579
+ },
180580
+ "&::-webkit-scrollbar-corner": {
180581
+ backgroundColor: "rgba(0, 0, 0, 0.3)"
180255
180582
  }
180256
- )
180257
- ]
180258
- }
180259
- );
180583
+ },
180584
+ children: [
180585
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SyntaxHighlighterStyles$1, {}),
180586
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
180587
+ highlighter,
180588
+ {
180589
+ language: language2,
180590
+ style: atomOneDark,
180591
+ customStyle: {
180592
+ fontSize: "0.85rem",
180593
+ width: "100%",
180594
+ boxShadow: "0 2px 6px rgba(0, 0, 0, 0.2)",
180595
+ padding: "0.75rem",
180596
+ margin: 0
180597
+ },
180598
+ codeTagProps: {
180599
+ style: {
180600
+ fontFamily: '"Roboto Mono", monospace !important'
180601
+ }
180602
+ },
180603
+ className: "loading-syntax-highlighter",
180604
+ wrapLines: true,
180605
+ wrapLongLines: true,
180606
+ children: code2
180607
+ }
180608
+ )
180609
+ ]
180610
+ }
180611
+ )
180612
+ ] });
180260
180613
  };
180261
180614
  const getStatusText = (status) => {
180262
180615
  switch (status) {
@@ -180321,6 +180674,9 @@ const LoadingIndicator = ({ status, currentExecution, scrollToBottom }) => {
180321
180674
  const streamingMessage = getStreamingMessage(currentExecution?.id || "");
180322
180675
  const isStreaming = !!streamingMessage && !streamingMessage.isComplete;
180323
180676
  const codeSnippet = currentExecution?.code || null;
180677
+ const stdout = currentExecution?.stdout || "";
180678
+ const stderr = currentExecution?.stderr || "";
180679
+ const logging = currentExecution?.logging || "";
180324
180680
  const message2 = currentExecution?.message || null;
180325
180681
  const statusText = currentExecution ? getDetailedStatusText(status, currentExecution) : status ? getStatusText(status) : "Thinking";
180326
180682
  const {
@@ -180364,7 +180720,7 @@ const LoadingIndicator = ({ status, currentExecution, scrollToBottom }) => {
180364
180720
  /* @__PURE__ */ jsxRuntimeExports.jsx(Dot$1, { delay: 0.2 }),
180365
180721
  /* @__PURE__ */ jsxRuntimeExports.jsx(Dot$1, { delay: 0.4 })
180366
180722
  ] }),
180367
- codeSnippet && /* @__PURE__ */ jsxRuntimeExports.jsx(
180723
+ (codeSnippet || stdout || stderr || logging) && /* @__PURE__ */ jsxRuntimeExports.jsx(
180368
180724
  CodeToggleButton,
180369
180725
  {
180370
180726
  onClick: toggleCodeExpansion,
@@ -180383,7 +180739,19 @@ const LoadingIndicator = ({ status, currentExecution, scrollToBottom }) => {
180383
180739
  )
180384
180740
  ] })
180385
180741
  ] }) }),
180386
- codeSnippet && isCodeExpanded && /* @__PURE__ */ jsxRuntimeExports.jsx(CodeContainer$4, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingCodeBlock, { code: codeSnippet }) })
180742
+ isCodeExpanded && (codeSnippet || stdout || stderr || logging) && /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer$1, { children: [
180743
+ codeSnippet && /* @__PURE__ */ jsxRuntimeExports.jsx(
180744
+ LoadingCodeBlock,
180745
+ {
180746
+ code: codeSnippet,
180747
+ label: "Code",
180748
+ language: "python"
180749
+ }
180750
+ ),
180751
+ stdout && /* @__PURE__ */ jsxRuntimeExports.jsx(OutputBlock, { output: stdout, isUser: false }),
180752
+ stderr && /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBlock, { error: stderr, isUser: false }),
180753
+ logging && /* @__PURE__ */ jsxRuntimeExports.jsx(LogBlock, { log: logging, isUser: false })
180754
+ ] })
180387
180755
  ] })
180388
180756
  ] });
180389
180757
  };
@@ -180438,11 +180806,11 @@ const ActionHighlight = ({
180438
180806
  children
180439
180807
  ] });
180440
180808
  };
180441
- const CodeContainer$3 = styled$1(Box)({
180809
+ const CodeContainer = styled$1(Box)({
180442
180810
  marginBottom: 16,
180443
180811
  width: "100%"
180444
180812
  });
180445
- const SectionLabel$4 = styled$1(Typography)(({ theme: theme2 }) => ({
180813
+ const SectionLabel$1 = styled$1(Typography)(({ theme: theme2 }) => ({
180446
180814
  display: "block",
180447
180815
  marginBottom: 4,
180448
180816
  color: theme2.palette.text.secondary
@@ -180454,8 +180822,8 @@ const SyntaxHighlighterStyles = ft`
180454
180822
  `;
180455
180823
  const CodeBlock = ({ code: code2 }) => {
180456
180824
  if (!code2) return null;
180457
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer$3, { children: [
180458
- /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$4, { variant: "caption", children: "Code" }),
180825
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer, { children: [
180826
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$1, { variant: "caption", children: "Code" }),
180459
180827
  /* @__PURE__ */ jsxRuntimeExports.jsx(SyntaxHighlighterStyles, {}),
180460
180828
  /* @__PURE__ */ jsxRuntimeExports.jsx(
180461
180829
  highlighter,
@@ -180482,50 +180850,6 @@ const CodeBlock = ({ code: code2 }) => {
180482
180850
  )
180483
180851
  ] });
180484
180852
  };
180485
- const CodeContainer$2 = styled$1(Box)({
180486
- marginBottom: 16,
180487
- width: "100%"
180488
- });
180489
- const SectionLabel$3 = styled$1(Typography)(({ theme: theme2 }) => ({
180490
- display: "block",
180491
- marginBottom: 4,
180492
- color: theme2.palette.error.light
180493
- }));
180494
- const ErrorContainer$2 = styled$1(Box, {
180495
- shouldForwardProp: (prop) => prop !== "isUser"
180496
- })(({ isUser, theme: theme2 }) => ({
180497
- fontFamily: '"Roboto Mono", monospace',
180498
- fontSize: "0.85rem",
180499
- backgroundColor: alpha$1(
180500
- theme2.palette.error.main,
180501
- theme2.palette.mode === "dark" ? 0.1 : 0.05
180502
- ),
180503
- borderRadius: "8px",
180504
- padding: 12,
180505
- maxHeight: "200px",
180506
- overflow: "auto",
180507
- whiteSpace: "pre-wrap",
180508
- color: isUser ? theme2.palette.error.main : theme2.palette.error.light,
180509
- width: "100%",
180510
- boxShadow: `0 2px 6px ${alpha$1(theme2.palette.common.black, theme2.palette.mode === "dark" ? 0.15 : 0.1)}`,
180511
- "&::-webkit-scrollbar": {
180512
- width: "6px"
180513
- },
180514
- "&::-webkit-scrollbar-thumb": {
180515
- backgroundColor: alpha$1(
180516
- theme2.palette.mode === "dark" ? theme2.palette.common.white : theme2.palette.common.black,
180517
- 0.1
180518
- ),
180519
- borderRadius: "3px"
180520
- }
180521
- }));
180522
- const ErrorBlock = ({ error, isUser }) => {
180523
- if (!error || error === "[No error output]") return null;
180524
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer$2, { children: [
180525
- /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$3, { variant: "caption", children: "Error" }),
180526
- /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContainer$2, { isUser, children: error })
180527
- ] });
180528
- };
180529
180853
  const canvasSupportedExtensions = /* @__PURE__ */ new Set([
180530
180854
  ...Object.keys(langs),
180531
180855
  ...Object.keys(languageOverrideMap)
@@ -180741,100 +181065,6 @@ const ImageAttachment = ({
180741
181065
  }
180742
181066
  );
180743
181067
  };
180744
- const CodeContainer$1 = styled$1(Box)({
180745
- marginBottom: 16,
180746
- width: "100%"
180747
- });
180748
- const SectionLabel$2 = styled$1(Typography)(({ theme: theme2 }) => ({
180749
- display: "block",
180750
- marginBottom: 4,
180751
- color: theme2.palette.text.secondary
180752
- }));
180753
- const LogContainer = styled$1(Box, {
180754
- shouldForwardProp: (prop) => prop !== "isUser"
180755
- })(({ isUser, theme: theme2 }) => ({
180756
- fontFamily: '"Roboto Mono", monospace',
180757
- fontSize: "0.85rem",
180758
- backgroundColor: alpha$1(
180759
- theme2.palette.mode === "dark" ? theme2.palette.common.black : theme2.palette.grey[200],
180760
- theme2.palette.mode === "dark" ? 0.3 : 0.5
180761
- ),
180762
- borderRadius: "8px",
180763
- padding: 12,
180764
- maxHeight: "200px",
180765
- overflow: "auto",
180766
- whiteSpace: "pre-wrap",
180767
- color: isUser ? theme2.palette.info.main : theme2.palette.info.light,
180768
- width: "100%",
180769
- boxShadow: `0 2px 6px ${alpha$1(theme2.palette.common.black, theme2.palette.mode === "dark" ? 0.15 : 0.1)}`,
180770
- "&::-webkit-scrollbar": {
180771
- width: "6px"
180772
- },
180773
- "&::-webkit-scrollbar-thumb": {
180774
- backgroundColor: alpha$1(
180775
- theme2.palette.mode === "dark" ? theme2.palette.common.white : theme2.palette.common.black,
180776
- 0.1
180777
- ),
180778
- borderRadius: "3px"
180779
- }
180780
- }));
180781
- const LogBlock = ({ log: log2, isUser }) => {
180782
- if (!log2 || log2 === "[No logger output]") return null;
180783
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer$1, { children: [
180784
- /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$2, { variant: "caption", children: "Logs" }),
180785
- /* @__PURE__ */ jsxRuntimeExports.jsx(LogContainer, { isUser, children: log2 })
180786
- ] });
180787
- };
180788
- const CodeContainer = styled$1(Box)({
180789
- marginBottom: 16,
180790
- width: "100%"
180791
- });
180792
- const SectionLabel$1 = styled$1(Typography)(({ theme: theme2 }) => ({
180793
- display: "block",
180794
- marginBottom: 4,
180795
- color: theme2.palette.text.secondary
180796
- }));
180797
- const OutputContainer = styled$1(Box)(({ theme: theme2 }) => ({
180798
- fontFamily: '"Roboto Mono", monospace',
180799
- fontSize: "0.85rem",
180800
- backgroundColor: alpha$1(
180801
- theme2.palette.mode === "dark" ? theme2.palette.common.black : theme2.palette.grey[200],
180802
- theme2.palette.mode === "dark" ? 0.3 : 0.5
180803
- ),
180804
- borderRadius: "8px",
180805
- padding: 12,
180806
- maxHeight: "300px",
180807
- overflow: "auto",
180808
- whiteSpace: "pre",
180809
- width: "100%",
180810
- boxShadow: `0 2px 6px ${alpha$1(theme2.palette.common.black, theme2.palette.mode === "dark" ? 0.15 : 0.1)}`,
180811
- color: theme2.palette.text.primary,
180812
- overflowX: "auto",
180813
- "&::-webkit-scrollbar": {
180814
- width: "6px",
180815
- height: "6px"
180816
- },
180817
- "&::-webkit-scrollbar-thumb": {
180818
- backgroundColor: alpha$1(
180819
- theme2.palette.mode === "dark" ? theme2.palette.common.white : theme2.palette.common.black,
180820
- 0.1
180821
- ),
180822
- borderRadius: "3px"
180823
- },
180824
- "&::-webkit-scrollbar-corner": {
180825
- backgroundColor: alpha$1(
180826
- theme2.palette.mode === "dark" ? theme2.palette.common.black : theme2.palette.grey[200],
180827
- theme2.palette.mode === "dark" ? 0.3 : 0.5
180828
- )
180829
- }
180830
- }));
180831
- const OutputBlock = ({ output }) => {
180832
- if (!output) return null;
180833
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(CodeContainer, { children: [
180834
- /* @__PURE__ */ jsxRuntimeExports.jsx(SectionLabel$1, { variant: "caption", children: "Output" }),
180835
- /* @__PURE__ */ jsxRuntimeExports.jsx(OutputContainer, { children: output })
180836
- ] });
180837
- };
180838
181068
  const AttachmentVideo = styled$1("video")(({ theme: theme2 }) => ({
180839
181069
  maxWidth: "100%",
180840
181070
  maxHeight: 300,
@@ -208830,6 +209060,7 @@ const StyledCard = styled$1(Card)(({ theme: theme2 }) => ({
208830
209060
  marginBottom: theme2.spacing(3),
208831
209061
  backgroundColor: theme2.palette.background.paper,
208832
209062
  borderRadius: 6,
209063
+ backgroundImage: "none",
208833
209064
  border: `1px solid ${theme2.palette.divider}`,
208834
209065
  boxShadow: "none",
208835
209066
  width: "100%"
@@ -1,4 +1,4 @@
1
- import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, s as styleTags, C as ContextTracker, t as tags, b as LRLanguage, c as snippetCompletion, d as LanguageSupport, i as ifNotIn, e as completeFromList, f as indentNodeProp, g as foldNodeProp, h as continuedIndent, j as delimitedIndent, k as flatIndent, l as foldInside, m as syntaxTree, N as NodeWeakMap, I as IterMode } from "./index-BWiyMPr1.js";
1
+ import { L as LRParser, E as ExternalTokenizer, a as LocalTokenGroup, s as styleTags, C as ContextTracker, t as tags, b as LRLanguage, c as snippetCompletion, d as LanguageSupport, i as ifNotIn, e as completeFromList, f as indentNodeProp, g as foldNodeProp, h as continuedIndent, j as delimitedIndent, k as flatIndent, l as foldInside, m as syntaxTree, N as NodeWeakMap, I as IterMode } from "./index-Bxd9cfRL.js";
2
2
  import "./fonts-BAmz1ETd.js";
3
3
  const insertedSemi = 177, space$1 = 179, identifier = 184, String = 12, closeParen$1 = 13, Number = 17, Rune = 20, closeBrace$1 = 25, closeBracket = 53, IncDecOp = 95, _return = 142, _break = 144, _continue = 145, fallthrough = 148;
4
4
  const newline = 10, carriageReturn = 13, space = 32, tab = 9, slash = 47, closeParen = 41, closeBrace = 125;
@@ -1,4 +1,4 @@
1
- import { L as LRParser, E as ExternalTokenizer, s as styleTags, C as ContextTracker, t as tags, b as LRLanguage, d as LanguageSupport, p as parseMixed, f as indentNodeProp, g as foldNodeProp, j as delimitedIndent, l as foldInside } from "./index-BWiyMPr1.js";
1
+ import { L as LRParser, E as ExternalTokenizer, s as styleTags, C as ContextTracker, t as tags, b as LRLanguage, d as LanguageSupport, p as parseMixed, f as indentNodeProp, g as foldNodeProp, j as delimitedIndent, l as foldInside } from "./index-Bxd9cfRL.js";
2
2
  import "./fonts-BAmz1ETd.js";
3
3
  const blockEnd = 63, eof = 64, DirectiveEnd = 1, DocEnd = 2, sequenceStartMark = 3, sequenceContinueMark = 4, explicitMapStartMark = 5, explicitMapContinueMark = 6, flowMapMark = 7, mapStartMark = 65, mapContinueMark = 66, Literal = 8, QuotedLiteral = 9, Anchor = 10, Alias = 11, Tag = 12, BlockLiteralContent = 13, BracketL = 19, FlowSequence = 20, Colon = 29, BraceL = 33, FlowMapping = 34, BlockLiteralHeader = 47;
4
4
  const type_Top = 0, type_Seq = 1, type_Map = 2, type_Flow = 3, type_Lit = 4;
@@ -9,7 +9,7 @@
9
9
  <meta http-equiv="Content-Security-Policy"
10
10
  content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 ws://localhost:1111 ws://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self'; frame-src 'self' https://accounts.google.com https://login.microsoftonline.com" />
11
11
  <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
12
- <script type="module" crossorigin src="./assets/index-BWiyMPr1.js"></script>
12
+ <script type="module" crossorigin src="./assets/index-Bxd9cfRL.js"></script>
13
13
  <link rel="modulepreload" crossorigin href="./assets/fonts-BAmz1ETd.js">
14
14
  <link rel="stylesheet" crossorigin href="./assets/fonts-B9KBGB-g.css">
15
15
  <link rel="stylesheet" crossorigin href="./assets/index-0vP6mKPB.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "productName": "Local Operator",
5
5
  "description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
6
6
  "main": "./out/main/index.js",