local-operator-ui 0.9.0 → 0.9.1

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-CjPYgC0u.js","./fonts-Bx8fKQfu.js","./fonts-B9KBGB-g.css","./index-DV_bWqLw.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-DtFlp8rf.js","./fonts-Bx8fKQfu.js","./fonts-B9KBGB-g.css","./index-n_d5-ePx.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 useTheme$1, b as reactExports, R as React, d as useEnhancedEffect$1, e as clsx, f as useForkRef$1, g as extendSxProp, j as jsxRuntimeExports, h as handleBreakpoints, i as resolveBreakpointValues, k as createUnarySpacing, l as deepmerge, m as mergeBreakpointsInOrder, n as composeClasses$1, o as generateUtilityClass$1, p as createTheme$1, q as getValue, s as React$1, t as getDefaultExportFromCjs, v as requireReactDom, w as defaultTheme$2, T as THEME_ID, x as generateUtilityClasses$1, y as useDefaultProps, z as styled$1, A as capitalize$1, B as memoTheme, _ as _inheritsLoose, C as _objectWithoutPropertiesLoose$j, D as TransitionGroupContext, E as _extends$v, F as duration, G as useTheme$2, H as useTimeout$1, I as useId$1, J as ButtonBase, K as alpha$1, L as createSimplePaletteValueFilter, M as CircularProgress, P as Paper, N as darken, O as lighten, Q as useEventCallback$1, S as useRtl, U as globalCss, V as formatMuiErrorMessage$1, W as rootShouldForwardProp, X as Typography, Y as css$1, Z as keyframes, $ as getPath$2, a0 as isFocusVisible, a1 as typographyClasses, a2 as slotShouldForwardProp, a3 as clamp, a4 as emphasize, a5 as Timeout$1, a6 as createLucideIcon, a7 as Button, a8 as Box, a9 as FontAwesomeIcon, aa as faExclamationTriangle, ab as DEFAULT_THEME, ac as faChevronLeft, ad as faChevronRight, ae as faRobot, af as faCheck, ag as faTimes, ah as faEraser, ai as faPen, aj as faFileImport, ak as faUpload, al as requireReact, am as faComment, an as faSave, ao as faEdit, ap as faTrashAlt, aq as faComments, ar as faInfoCircle, as as faGear, at as faPlus, au as faServer, av as faStar, aw as faTag, ax as faIdCard, ay as faCalendarAlt, az as faCodeBranch, aA as faShieldAlt, aB as faArrowLeft, aC as faClock, aD as faHome, aE as faDownload, aF as faFileAlt, aG as faDesktop, aH as faImage, aI as faMusic, aJ as faVideo, aK as faLaptop, aL as faUsers, aM as faDatabase, aN as faBoxOpen, aO as faBook, aP as faHdd, aQ as faBox, aR as faArchive, aS as faNetworkWired, aT as faFolder, aU as faFolderOpen, aV as faFolderTree, aW as faChevronDown, aX as faTools, aY as faSliders, aZ as faTrash, a_ as faArrowDown, a$ as faPaperclip, b0 as faStop, b1 as faPaperPlane, b2 as faChevronUp, b3 as faQuestion, b4 as faFile, b5 as faExclamationCircle, b6 as faLightbulb, b7 as faCode, b8 as faCommentDots, b9 as faShare, ba as faPencilAlt, bb as faUser, bc as faCopy, bd as isDevelopmentMode, be as faCommentSlash, bf as faArrowRight, bg as faBrain, bh as faWandMagicSparkles, bi as faExternalLinkAlt, bj as faKey, bk as radientTheme, bl as faGlobe, bm as faSearch, bn as PropTypes, bo as shouldForwardProp, bp as TransitionGroup, bq as commonjsGlobal, br as faLock, bs as faPuzzlePiece, bt as HardDrive, bu as faSignOut, bv as themes, bw as faMoon, bx as faSun, by as faHexagonNodes, bz as faSkull, bA as faLeaf, bB as faMountain, bC as faFire, bD as faIcicles, bE as faBolt, bF as faAdjust, bG as faWaveSquare, bH as faEnvelope, bI as faHistory, bJ as faListAlt, bK as faCreditCard, bL as faPlusCircle, bM as faChartLine, bN as faShield, bO as library$1, bP as icons$1, bQ as CssBaseline, bR as ThemeProvider$1, bS as getTheme, bT as ReactDOM$1, bU as ErrorBoundary } from "./fonts-Bx8fKQfu.js";
3
3
  const styled = createStyled();
4
4
  function getThemeProps(params) {
@@ -85661,7 +85661,7 @@ const languages = [
85661
85661
  name: "Go",
85662
85662
  extensions: ["go"],
85663
85663
  load() {
85664
- return __vitePreload(() => import("./index-CjPYgC0u.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
85664
+ return __vitePreload(() => import("./index-DtFlp8rf.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
85665
85665
  }
85666
85666
  }),
85667
85667
  /* @__PURE__ */ LanguageDescription.of({
@@ -85838,7 +85838,7 @@ const languages = [
85838
85838
  alias: ["yml"],
85839
85839
  extensions: ["yaml", "yml"],
85840
85840
  load() {
85841
- return __vitePreload(() => import("./index-DV_bWqLw.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
85841
+ return __vitePreload(() => import("./index-n_d5-ePx.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
85842
85842
  }
85843
85843
  }),
85844
85844
  // Legacy modes ported from CodeMirror 5
@@ -185481,6 +185481,25 @@ const MessagesContainer = styled$1(Box, {
185481
185481
  overflowAnchor: "auto"
185482
185482
  // Ensures browser maintains scroll position when content changes
185483
185483
  }));
185484
+ const InfoMessageDivider = styled$1(Box)(({ theme: theme2 }) => ({
185485
+ display: "flex",
185486
+ alignItems: "center",
185487
+ textAlign: "center",
185488
+ margin: theme2.spacing(2, 0),
185489
+ "&::before, &::after": {
185490
+ content: '""',
185491
+ flex: 1,
185492
+ borderBottom: `1px solid ${theme2.palette.divider}`
185493
+ },
185494
+ "& > .MuiTypography-root": {
185495
+ // Target Typography directly for specificity
185496
+ padding: theme2.spacing(0, 2),
185497
+ // Increased padding for better spacing around text
185498
+ color: theme2.palette.text.secondary,
185499
+ fontSize: "0.875rem",
185500
+ maxWidth: "720px"
185501
+ }
185502
+ }));
185484
185503
  const CenteredMessagesContainer = styled$1(Box)(({ theme: theme2 }) => ({
185485
185504
  width: "100%",
185486
185505
  maxWidth: "900px",
@@ -185561,24 +185580,26 @@ const MessagesView = ({
185561
185580
  }
185562
185581
  ),
185563
185582
  messages.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(CenteredMessagesContainer, { children: [
185564
- messages.map((message2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
185565
- MessageItem,
185566
- {
185567
- message: {
185568
- ...message2,
185569
- conversation_id: conversationId
185570
- // Add conversation ID to message
185571
- },
185572
- conversationId,
185573
- isLastMessage: index2 === messages.length - 1,
185574
- onMessageComplete: () => {
185575
- if (refetch) {
185576
- refetch();
185583
+ messages.map(
185584
+ (message2, index2) => message2.execution_type === "info" ? /* @__PURE__ */ jsxRuntimeExports.jsx(InfoMessageDivider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { children: message2.message }) }, message2.id) : /* @__PURE__ */ jsxRuntimeExports.jsx(
185585
+ MessageItem,
185586
+ {
185587
+ message: {
185588
+ ...message2,
185589
+ conversation_id: conversationId
185590
+ // Add conversation ID to message
185591
+ },
185592
+ conversationId,
185593
+ isLastMessage: index2 === messages.length - 1,
185594
+ onMessageComplete: () => {
185595
+ if (refetch) {
185596
+ refetch();
185597
+ }
185577
185598
  }
185578
- }
185579
- },
185580
- message2.id
185581
- )),
185599
+ },
185600
+ message2.id
185601
+ )
185602
+ ),
185582
185603
  isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(
185583
185604
  LoadingIndicator,
185584
185605
  {
@@ -187885,7 +187906,7 @@ const ModelCredentialStep = () => {
187885
187906
  ] })
187886
187907
  ] });
187887
187908
  };
187888
- const radientIcon = "" + new URL("radient-icon-1024x1024-D_JJedvo.png", import.meta.url).href;
187909
+ const RadientIcon = "" + new URL("radient-icon-1024x1024-D_JJedvo.png", import.meta.url).href;
187889
187910
  const ChoiceCard = styled$1(Box)(({ theme: theme2 }) => ({
187890
187911
  display: "flex",
187891
187912
  flexDirection: "column",
@@ -188044,7 +188065,7 @@ const RadientChoiceStep = ({
188044
188065
  /* @__PURE__ */ jsxRuntimeExports.jsx(CardIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
188045
188066
  "img",
188046
188067
  {
188047
- src: radientIcon,
188068
+ src: RadientIcon,
188048
188069
  alt: "Radient Logo",
188049
188070
  style: {
188050
188071
  width: "100%",
@@ -228066,7 +228087,7 @@ const SidebarItemIcon = styled$1(ListItemIcon, {
228066
228087
  transform: "scale(1.1)"
228067
228088
  }
228068
228089
  }));
228069
- const IconImage$1 = styled$1("img")(() => ({
228090
+ const IconImage$2 = styled$1("img")(() => ({
228070
228091
  width: 30,
228071
228092
  height: 30,
228072
228093
  marginLeft: -4,
@@ -228085,7 +228106,7 @@ const SettingsSidebar = ({
228085
228106
  isActive: activeSection === section.id,
228086
228107
  onClick: () => onSelectSection(section.id),
228087
228108
  children: [
228088
- /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarItemIcon, { isActive: activeSection === section.id, children: section.isImage ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconImage$1, { src: section.icon, alt: section.label }) : section.isFontAwesome ? /* @__PURE__ */ jsxRuntimeExports.jsx(
228109
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarItemIcon, { isActive: activeSection === section.id, children: section.isImage ? /* @__PURE__ */ jsxRuntimeExports.jsx(IconImage$2, { src: section.icon, alt: section.label }) : section.isFontAwesome ? /* @__PURE__ */ jsxRuntimeExports.jsx(
228089
228110
  FontAwesomeIcon,
228090
228111
  {
228091
228112
  icon: section.icon,
@@ -228120,7 +228141,7 @@ const DEFAULT_SETTINGS_SECTIONS = [
228120
228141
  {
228121
228142
  id: "radient",
228122
228143
  label: "Radient Account",
228123
- icon: radientIcon,
228144
+ icon: RadientIcon,
228124
228145
  isImage: true
228125
228146
  },
228126
228147
  {
@@ -229414,7 +229435,7 @@ const ErrorContainer = styled$1(Box)(({ theme: theme2 }) => ({
229414
229435
  const MainContentWrapper = styled$1(Box)(({ theme: theme2 }) => ({
229415
229436
  paddingTop: theme2.spacing(1)
229416
229437
  }));
229417
- const IconImage = styled$1("img")({
229438
+ const IconImage$1 = styled$1("img")({
229418
229439
  width: 32,
229419
229440
  // Slightly smaller icon
229420
229441
  height: 32,
@@ -229439,7 +229460,7 @@ const RadientSectionTitle = () => /* @__PURE__ */ jsxRuntimeExports.jsxs(
229439
229460
  gap: 1.5,
229440
229461
  mb: 0.5,
229441
229462
  children: [
229442
- /* @__PURE__ */ jsxRuntimeExports.jsx(IconImage, { src: radientIcon, alt: "Radient Icon" }),
229463
+ /* @__PURE__ */ jsxRuntimeExports.jsx(IconImage$1, { src: RadientIcon, alt: "Radient Icon" }),
229443
229464
  "Radient Account"
229444
229465
  ]
229445
229466
  }
@@ -229836,6 +229857,196 @@ const SettingsPage = () => {
229836
229857
  ] })
229837
229858
  ] });
229838
229859
  };
229860
+ const useLowCreditsStore = create$1()(
229861
+ persist(
229862
+ (set) => ({
229863
+ hasBeenNotified: false,
229864
+ setHasBeenNotified: (notified) => {
229865
+ set({
229866
+ hasBeenNotified: notified
229867
+ });
229868
+ }
229869
+ }),
229870
+ {
229871
+ name: "low-credits-storage"
229872
+ }
229873
+ )
229874
+ );
229875
+ const IconImage = styled$1("img")({
229876
+ width: 80,
229877
+ height: 80,
229878
+ marginBottom: "16px"
229879
+ });
229880
+ const DialogContentWrapper = styled$1(Box)(({ theme: theme2 }) => ({
229881
+ display: "flex",
229882
+ flexDirection: "column",
229883
+ alignItems: "center",
229884
+ textAlign: "center",
229885
+ padding: theme2.spacing(2, 0)
229886
+ // Add some vertical padding
229887
+ }));
229888
+ const MarketingText = styled$1(Typography)(({ theme: theme2 }) => ({
229889
+ marginBottom: theme2.spacing(2),
229890
+ color: theme2.palette.text.secondary,
229891
+ fontSize: "0.9rem",
229892
+ maxWidth: "90%"
229893
+ // Ensure text doesn't get too wide
229894
+ }));
229895
+ const HighlightText = styled$1("span")(({ theme: theme2 }) => ({
229896
+ color: theme2.palette.primary.main,
229897
+ fontWeight: "bold"
229898
+ }));
229899
+ const CTAButton = styled$1(PrimaryButton$1)(({ theme: theme2 }) => ({
229900
+ marginBottom: theme2.spacing(1.5),
229901
+ minWidth: 220,
229902
+ // Make button wider
229903
+ boxShadow: `0 6px 16px ${alpha$1(theme2.palette.primary.main, 0.3)}`
229904
+ // Add more prominent shadow
229905
+ }));
229906
+ const SettingsLinkText = styled$1(Typography)(({ theme: theme2 }) => ({
229907
+ fontSize: "0.8rem",
229908
+ color: theme2.palette.text.disabled
229909
+ }));
229910
+ const LowCreditsDialog = ({
229911
+ open: open2,
229912
+ onClose,
229913
+ onGoToConsole
229914
+ }) => {
229915
+ const { setHasBeenNotified } = useLowCreditsStore();
229916
+ const theme2 = useTheme$2();
229917
+ const {
229918
+ prices,
229919
+ isLoading: isLoadingPrices,
229920
+ error: pricesError
229921
+ } = useRadientPricesQuery();
229922
+ const formatCurrency = (amount) => {
229923
+ if (typeof amount !== "number") return "$...";
229924
+ return `$${amount.toFixed(2)} USD`;
229925
+ };
229926
+ const handleClose2 = () => {
229927
+ setHasBeenNotified(true);
229928
+ onClose();
229929
+ };
229930
+ const handleGoToConsole = () => {
229931
+ setHasBeenNotified(true);
229932
+ onGoToConsole();
229933
+ };
229934
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
229935
+ BaseDialog,
229936
+ {
229937
+ open: open2,
229938
+ onClose: handleClose2,
229939
+ title: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", gap: 1.5, children: [
229940
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
229941
+ "img",
229942
+ {
229943
+ src: RadientIcon,
229944
+ alt: "Radient Icon",
229945
+ style: { width: 28, height: 28 }
229946
+ }
229947
+ ),
229948
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h6", fontWeight: 600, children: "Running Low on Radient Credits?" })
229949
+ ] }),
229950
+ maxWidth: "sm",
229951
+ fullWidth: false,
229952
+ actions: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
229953
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SecondaryButton$1, { onClick: handleClose2, children: "Maybe Later" }),
229954
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
229955
+ CTAButton,
229956
+ {
229957
+ onClick: handleGoToConsole,
229958
+ startIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { size: 18 }),
229959
+ sx: {
229960
+ marginBottom: 0
229961
+ },
229962
+ children: "Get More Credits"
229963
+ }
229964
+ )
229965
+ ] }),
229966
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogContentWrapper, { children: [
229967
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
229968
+ IconImage,
229969
+ {
229970
+ src: RadientIcon,
229971
+ alt: "Radient Logo",
229972
+ sx: {
229973
+ width: 120,
229974
+ height: 120
229975
+ }
229976
+ }
229977
+ ),
229978
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(MarketingText, { variant: "body1", sx: { mb: 1 }, children: [
229979
+ "Unlock the full power of Local Operator with",
229980
+ " ",
229981
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HighlightText, { children: "Radient Pass" }),
229982
+ "!"
229983
+ ] }),
229984
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(MarketingText, { variant: "body2", children: [
229985
+ "Using Local Operator with",
229986
+ " ",
229987
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HighlightText, { children: "Radient Automatic" }),
229988
+ " is often",
229989
+ " ",
229990
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HighlightText, { children: "cheaper" }),
229991
+ " than bringing your own key. Radient's smart model routing picks the most cost-effective and powerful model for each step of your agentic workflows."
229992
+ ] }),
229993
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(MarketingText, { variant: "body2", sx: { mt: 1 }, children: [
229994
+ "It's ",
229995
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HighlightText, { children: "pay-as-you-go" }),
229996
+ " with no commitments. Load up what you need, starting small for maximum flexibility."
229997
+ ] }),
229998
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(MarketingText, { variant: "body2", sx: { mt: 2, mb: 2 }, children: [
229999
+ "Plus, get",
230000
+ " ",
230001
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
230002
+ Typography,
230003
+ {
230004
+ component: "span",
230005
+ fontWeight: "medium",
230006
+ color: theme2.palette.primary.main,
230007
+ sx: { fontSize: "inherit" },
230008
+ children: isLoadingPrices ? /* @__PURE__ */ jsxRuntimeExports.jsx(
230009
+ CircularProgress,
230010
+ {
230011
+ size: 14,
230012
+ sx: { mr: 0.5, verticalAlign: "middle" }
230013
+ }
230014
+ ) : formatCurrency(prices?.default_registration_credits)
230015
+ }
230016
+ ),
230017
+ " ",
230018
+ "in bonus credits with your first purchase!",
230019
+ pricesError && /* @__PURE__ */ jsxRuntimeExports.jsx(
230020
+ Typography,
230021
+ {
230022
+ color: "error",
230023
+ variant: "caption",
230024
+ display: "block",
230025
+ mt: 0.5,
230026
+ children: "Could not load bonus credit information."
230027
+ }
230028
+ )
230029
+ ] }),
230030
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { mt: 3, mb: 1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
230031
+ Link$1,
230032
+ {
230033
+ href: "https://console.radienthq.com",
230034
+ target: "_blank",
230035
+ rel: "noopener noreferrer",
230036
+ sx: { textDecoration: "none" },
230037
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(CTAButton, { startIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ExternalLink, { size: 18 }), children: "Visit Radient Console" })
230038
+ }
230039
+ ) }),
230040
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(SettingsLinkText, { children: [
230041
+ "You can also access the Radient Console from the",
230042
+ " ",
230043
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HighlightText, { children: "Settings" }),
230044
+ " page anytime."
230045
+ ] })
230046
+ ] })
230047
+ }
230048
+ );
230049
+ };
229839
230050
  const localOperatorIcon = "" + new URL("icon-tV2fhamD.png", import.meta.url).href;
229840
230051
  const pulse = keyframes`
229841
230052
  0% {
@@ -230344,6 +230555,85 @@ const SidebarNavigation = () => {
230344
230555
  ] })
230345
230556
  ] });
230346
230557
  };
230558
+ const LOW_CREDITS_THRESHOLD = 1;
230559
+ const useLowCreditsDialog = () => {
230560
+ const { isAuthenticated, user, sessionToken } = useRadientAuth();
230561
+ const { hasBeenNotified, setHasBeenNotified } = useLowCreditsStore();
230562
+ const [isDialogOpen, setIsDialogOpen] = reactExports.useState(false);
230563
+ const [currentCredits, setCurrentCredits] = reactExports.useState(null);
230564
+ const fetchCredits = reactExports.useCallback(async () => {
230565
+ if (!isAuthenticated || !user?.radientUser?.account?.tenant_id || !sessionToken) {
230566
+ return;
230567
+ }
230568
+ try {
230569
+ const radientClient2 = createRadientClient(
230570
+ apiConfig.radientBaseUrl,
230571
+ // Use apiConfig
230572
+ apiConfig.radientClientId
230573
+ // Use apiConfig
230574
+ );
230575
+ const response = await radientClient2.billing.getCreditBalance(
230576
+ user.radientUser.account.tenant_id,
230577
+ sessionToken
230578
+ );
230579
+ if (!response || typeof response.result?.balance !== "number") {
230580
+ throw new Error("Invalid credit balance response format");
230581
+ }
230582
+ const creditBalance = response.result;
230583
+ setCurrentCredits(creditBalance.balance);
230584
+ } catch (error) {
230585
+ console.error("Failed to fetch Radient credits:", error);
230586
+ setCurrentCredits(null);
230587
+ }
230588
+ }, [isAuthenticated, user?.radientUser?.account?.tenant_id, sessionToken]);
230589
+ reactExports.useEffect(() => {
230590
+ if (isAuthenticated) {
230591
+ fetchCredits();
230592
+ }
230593
+ }, [isAuthenticated, fetchCredits]);
230594
+ reactExports.useEffect(() => {
230595
+ if (isAuthenticated && currentCredits !== null) {
230596
+ if (currentCredits < LOW_CREDITS_THRESHOLD) {
230597
+ if (!hasBeenNotified) {
230598
+ setIsDialogOpen(true);
230599
+ }
230600
+ } else {
230601
+ setIsDialogOpen(false);
230602
+ if (hasBeenNotified) {
230603
+ setHasBeenNotified(false);
230604
+ }
230605
+ }
230606
+ } else {
230607
+ setIsDialogOpen(false);
230608
+ }
230609
+ }, [isAuthenticated, hasBeenNotified, currentCredits, setHasBeenNotified]);
230610
+ const openRadientConsole = () => {
230611
+ if (window.api?.openExternal) {
230612
+ window.api.openExternal("https://console.radienthq.com");
230613
+ } else {
230614
+ window.open("https://console.radienthq.com", "_blank");
230615
+ }
230616
+ setHasBeenNotified(true);
230617
+ setIsDialogOpen(false);
230618
+ };
230619
+ const closeDialog = () => {
230620
+ setIsDialogOpen(false);
230621
+ };
230622
+ const onDialogClose = () => {
230623
+ setHasBeenNotified(true);
230624
+ setIsDialogOpen(false);
230625
+ };
230626
+ return {
230627
+ isLowCreditsDialogOpen: isDialogOpen,
230628
+ openRadientConsole,
230629
+ closeLowCreditsDialog: closeDialog,
230630
+ // Renamed for clarity
230631
+ onLowCreditsDialogClose: onDialogClose,
230632
+ // For the dialog's own close handler
230633
+ currentCredits
230634
+ // Expose current credits if needed elsewhere
230635
+ };
230636
+ };
230347
230637
  library$1.add(icons$1, icons);
230348
230638
  const AppContainer = styled$1(Box)(() => ({
230349
230639
  display: "flex",
@@ -230358,12 +230648,25 @@ const MainContent = styled$1(Box)(() => ({
230358
230648
  }));
230359
230649
  const App = () => {
230360
230650
  const { isOnboardingActive } = useCheckFirstTimeUser();
230651
+ const {
230652
+ isLowCreditsDialogOpen,
230653
+ openRadientConsole,
230654
+ onLowCreditsDialogClose
230655
+ } = useLowCreditsDialog();
230361
230656
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(AppContainer, { children: [
230362
230657
  /* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
230363
230658
  /* @__PURE__ */ jsxRuntimeExports.jsx(ModelsInitializer, {}),
230364
230659
  /* @__PURE__ */ jsxRuntimeExports.jsx(OnboardingModal, { open: isOnboardingActive }),
230365
230660
  /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectivityBanner, {}),
230366
230661
  /* @__PURE__ */ jsxRuntimeExports.jsx(UpdateNotification, {}),
230662
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
230663
+ LowCreditsDialog,
230664
+ {
230665
+ open: isLowCreditsDialogOpen,
230666
+ onClose: onLowCreditsDialogClose,
230667
+ onGoToConsole: openRadientConsole
230668
+ }
230669
+ ),
230367
230670
  /* @__PURE__ */ jsxRuntimeExports.jsx(SidebarNavigation, {}),
230368
230671
  /* @__PURE__ */ jsxRuntimeExports.jsx(MainContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Routes, { children: [
230369
230672
  /* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/", element: /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: "/chat", replace: true }) }),
@@ -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-orOxUDAd.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-Cf8ixUbJ.js";
2
2
  import "./fonts-Bx8fKQfu.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-orOxUDAd.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-Cf8ixUbJ.js";
2
2
  import "./fonts-Bx8fKQfu.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-orOxUDAd.js"></script>
12
+ <script type="module" crossorigin src="./assets/index-Cf8ixUbJ.js"></script>
13
13
  <link rel="modulepreload" crossorigin href="./assets/fonts-Bx8fKQfu.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.9.0",
3
+ "version": "0.9.1",
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",