local-operator-ui 0.7.5 → 0.8.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.
- package/out/main/index.jsc +0 -0
- package/out/preload/index.jsc +0 -0
- package/out/renderer/assets/{index-QzSTnyjL.js → index-DXy1JHQs.js} +1419 -120
- package/out/renderer/assets/{index-Dp4J_UIV.js → index-Dhzp7zi8.js} +1 -1
- package/out/renderer/assets/{index-DV8SteiB.js → index-MXm2Cr-I.js} +1 -1
- package/out/renderer/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-MXm2Cr-I.js","./fonts-DnoCbbVd.js","./fonts-B9KBGB-g.css","./index-Dhzp7zi8.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 css$1, V as keyframes, W as getPath$2, X as isFocusVisible, Y as typographyClasses, Z as slotShouldForwardProp, $ as clamp, a0 as emphasize, a1 as Timeout, a2 as createLucideIcon, a3 as Button, a4 as Box, a5 as FontAwesomeIcon, a6 as faExclamationTriangle, a7 as DEFAULT_THEME, a8 as faChevronLeft, a9 as faChevronRight, aa as faRobot, ab as faCheck, ac as faTimes, ad as faEraser, ae as faPen, af as faFileImport, ag as faUpload, ah as requireReact, 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-DnoCbbVd.js";
|
|
3
3
|
const styled = createStyled();
|
|
4
4
|
function getThemeProps(params) {
|
|
@@ -28605,6 +28605,155 @@ const ModelsApi = {
|
|
|
28605
28605
|
listProviders,
|
|
28606
28606
|
listModels
|
|
28607
28607
|
};
|
|
28608
|
+
const SchedulesApi = {
|
|
28609
|
+
/**
|
|
28610
|
+
* List all schedules
|
|
28611
|
+
* Retrieve a paginated list of all schedules across all agents.
|
|
28612
|
+
*
|
|
28613
|
+
* @param baseUrl - The base URL of the Local Operator API
|
|
28614
|
+
* @param page - Page number (default: 1)
|
|
28615
|
+
* @param perPage - Number of schedules per page (default: 10)
|
|
28616
|
+
* @returns Promise resolving to the schedules list response
|
|
28617
|
+
*/
|
|
28618
|
+
async listAllSchedules(baseUrl, page = 1, perPage = 10) {
|
|
28619
|
+
const url = new URL(`${baseUrl}/v1/schedules`);
|
|
28620
|
+
url.searchParams.append("page", page.toString());
|
|
28621
|
+
url.searchParams.append("per_page", perPage.toString());
|
|
28622
|
+
const response = await fetch(url.toString(), {
|
|
28623
|
+
method: "GET",
|
|
28624
|
+
headers: {
|
|
28625
|
+
Accept: "application/json"
|
|
28626
|
+
}
|
|
28627
|
+
});
|
|
28628
|
+
if (!response.ok) {
|
|
28629
|
+
throw new Error(
|
|
28630
|
+
`List all schedules request failed: ${response.status} ${response.statusText}`
|
|
28631
|
+
);
|
|
28632
|
+
}
|
|
28633
|
+
return response.json();
|
|
28634
|
+
},
|
|
28635
|
+
/**
|
|
28636
|
+
* Create a new schedule for an agent
|
|
28637
|
+
* Create a new schedule for a specific agent.
|
|
28638
|
+
*
|
|
28639
|
+
* @param baseUrl - The base URL of the Local Operator API
|
|
28640
|
+
* @param agentId - ID of the agent to create the schedule for
|
|
28641
|
+
* @param scheduleData - The schedule details to create
|
|
28642
|
+
* @returns Promise resolving to the created schedule response
|
|
28643
|
+
*/
|
|
28644
|
+
async createScheduleForAgent(baseUrl, agentId, scheduleData) {
|
|
28645
|
+
const response = await fetch(`${baseUrl}/v1/agents/${agentId}/schedules`, {
|
|
28646
|
+
method: "POST",
|
|
28647
|
+
headers: {
|
|
28648
|
+
"Content-Type": "application/json",
|
|
28649
|
+
Accept: "application/json"
|
|
28650
|
+
},
|
|
28651
|
+
body: JSON.stringify(scheduleData)
|
|
28652
|
+
});
|
|
28653
|
+
if (!response.ok) {
|
|
28654
|
+
throw new Error(
|
|
28655
|
+
`Create schedule for agent request failed: ${response.status} ${response.statusText}`
|
|
28656
|
+
);
|
|
28657
|
+
}
|
|
28658
|
+
return response.json();
|
|
28659
|
+
},
|
|
28660
|
+
/**
|
|
28661
|
+
* List schedules for a specific agent
|
|
28662
|
+
* Retrieve a paginated list of schedules for a specific agent.
|
|
28663
|
+
*
|
|
28664
|
+
* @param baseUrl - The base URL of the Local Operator API
|
|
28665
|
+
* @param agentId - ID of the agent to list schedules for
|
|
28666
|
+
* @param page - Page number (default: 1)
|
|
28667
|
+
* @param perPage - Number of schedules per page (default: 10)
|
|
28668
|
+
* @returns Promise resolving to the schedules list response
|
|
28669
|
+
*/
|
|
28670
|
+
async listSchedulesForAgent(baseUrl, agentId, page = 1, perPage = 10) {
|
|
28671
|
+
const url = new URL(`${baseUrl}/v1/agents/${agentId}/schedules`);
|
|
28672
|
+
url.searchParams.append("page", page.toString());
|
|
28673
|
+
url.searchParams.append("per_page", perPage.toString());
|
|
28674
|
+
const response = await fetch(url.toString(), {
|
|
28675
|
+
method: "GET",
|
|
28676
|
+
headers: {
|
|
28677
|
+
Accept: "application/json"
|
|
28678
|
+
}
|
|
28679
|
+
});
|
|
28680
|
+
if (!response.ok) {
|
|
28681
|
+
throw new Error(
|
|
28682
|
+
`List schedules for agent request failed: ${response.status} ${response.statusText}`
|
|
28683
|
+
);
|
|
28684
|
+
}
|
|
28685
|
+
return response.json();
|
|
28686
|
+
},
|
|
28687
|
+
/**
|
|
28688
|
+
* Get a single schedule by ID
|
|
28689
|
+
* Retrieve a single schedule by its ID.
|
|
28690
|
+
*
|
|
28691
|
+
* @param baseUrl - The base URL of the Local Operator API
|
|
28692
|
+
* @param scheduleId - ID of the schedule to retrieve
|
|
28693
|
+
* @returns Promise resolving to the schedule details response
|
|
28694
|
+
*/
|
|
28695
|
+
async getScheduleById(baseUrl, scheduleId) {
|
|
28696
|
+
const response = await fetch(`${baseUrl}/v1/schedules/${scheduleId}`, {
|
|
28697
|
+
method: "GET",
|
|
28698
|
+
headers: {
|
|
28699
|
+
Accept: "application/json"
|
|
28700
|
+
}
|
|
28701
|
+
});
|
|
28702
|
+
if (!response.ok) {
|
|
28703
|
+
throw new Error(
|
|
28704
|
+
`Get schedule by ID request failed: ${response.status} ${response.statusText}`
|
|
28705
|
+
);
|
|
28706
|
+
}
|
|
28707
|
+
return response.json();
|
|
28708
|
+
},
|
|
28709
|
+
/**
|
|
28710
|
+
* Edit an existing schedule
|
|
28711
|
+
* Edit an existing schedule by its ID.
|
|
28712
|
+
*
|
|
28713
|
+
* @param baseUrl - The base URL of the Local Operator API
|
|
28714
|
+
* @param scheduleId - ID of the schedule to update
|
|
28715
|
+
* @param scheduleData - The schedule details to update
|
|
28716
|
+
* @returns Promise resolving to the updated schedule response
|
|
28717
|
+
*/
|
|
28718
|
+
async editSchedule(baseUrl, scheduleId, scheduleData) {
|
|
28719
|
+
const response = await fetch(`${baseUrl}/v1/schedules/${scheduleId}`, {
|
|
28720
|
+
method: "PATCH",
|
|
28721
|
+
headers: {
|
|
28722
|
+
"Content-Type": "application/json",
|
|
28723
|
+
Accept: "application/json"
|
|
28724
|
+
},
|
|
28725
|
+
body: JSON.stringify(scheduleData)
|
|
28726
|
+
});
|
|
28727
|
+
if (!response.ok) {
|
|
28728
|
+
throw new Error(
|
|
28729
|
+
`Edit schedule request failed: ${response.status} ${response.statusText}`
|
|
28730
|
+
);
|
|
28731
|
+
}
|
|
28732
|
+
return response.json();
|
|
28733
|
+
},
|
|
28734
|
+
/**
|
|
28735
|
+
* Remove a schedule by ID
|
|
28736
|
+
* Remove a schedule by its ID.
|
|
28737
|
+
*
|
|
28738
|
+
* @param baseUrl - The base URL of the Local Operator API
|
|
28739
|
+
* @param scheduleId - ID of the schedule to delete
|
|
28740
|
+
* @returns Promise resolving to the deletion response
|
|
28741
|
+
*/
|
|
28742
|
+
async removeSchedule(baseUrl, scheduleId) {
|
|
28743
|
+
const response = await fetch(`${baseUrl}/v1/schedules/${scheduleId}`, {
|
|
28744
|
+
method: "DELETE",
|
|
28745
|
+
headers: {
|
|
28746
|
+
Accept: "application/json"
|
|
28747
|
+
}
|
|
28748
|
+
});
|
|
28749
|
+
if (!response.ok) {
|
|
28750
|
+
throw new Error(
|
|
28751
|
+
`Remove schedule request failed: ${response.status} ${response.statusText}`
|
|
28752
|
+
);
|
|
28753
|
+
}
|
|
28754
|
+
return response.json();
|
|
28755
|
+
}
|
|
28756
|
+
};
|
|
28608
28757
|
const getImageUrl = (baseUrl, imagePath) => {
|
|
28609
28758
|
const normalizedBaseUrl = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
|
|
28610
28759
|
let normalizedPath = imagePath;
|
|
@@ -29204,6 +29353,12 @@ class LocalOperatorClient {
|
|
|
29204
29353
|
get static() {
|
|
29205
29354
|
return this.bindBaseUrlToApi(StaticApi);
|
|
29206
29355
|
}
|
|
29356
|
+
/**
|
|
29357
|
+
* Get the Schedules API client with methods bound to the base URL
|
|
29358
|
+
*/
|
|
29359
|
+
get schedules() {
|
|
29360
|
+
return this.bindBaseUrlToApi(SchedulesApi);
|
|
29361
|
+
}
|
|
29207
29362
|
/**
|
|
29208
29363
|
* Bind the base URL to all methods of an API client
|
|
29209
29364
|
*
|
|
@@ -34462,18 +34617,18 @@ const useAgentSelectionStore = create$1()(
|
|
|
34462
34617
|
* This source code is licensed under the ISC license.
|
|
34463
34618
|
* See the LICENSE file in the root directory of this source tree.
|
|
34464
34619
|
*/
|
|
34465
|
-
const __iconNode$
|
|
34620
|
+
const __iconNode$L = [
|
|
34466
34621
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
34467
34622
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
34468
34623
|
];
|
|
34469
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
34624
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$L);
|
|
34470
34625
|
/**
|
|
34471
34626
|
* @license lucide-react v0.507.0 - ISC
|
|
34472
34627
|
*
|
|
34473
34628
|
* This source code is licensed under the ISC license.
|
|
34474
34629
|
* See the LICENSE file in the root directory of this source tree.
|
|
34475
34630
|
*/
|
|
34476
|
-
const __iconNode$
|
|
34631
|
+
const __iconNode$K = [
|
|
34477
34632
|
["path", { d: "M12 8V4H8", key: "hb8ula" }],
|
|
34478
34633
|
["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
|
|
34479
34634
|
["path", { d: "M2 14h2", key: "vft8re" }],
|
|
@@ -34481,77 +34636,108 @@ const __iconNode$F = [
|
|
|
34481
34636
|
["path", { d: "M15 13v2", key: "1xurst" }],
|
|
34482
34637
|
["path", { d: "M9 13v2", key: "rq6x2g" }]
|
|
34483
34638
|
];
|
|
34484
|
-
const Bot = createLucideIcon("bot", __iconNode$
|
|
34639
|
+
const Bot = createLucideIcon("bot", __iconNode$K);
|
|
34485
34640
|
/**
|
|
34486
34641
|
* @license lucide-react v0.507.0 - ISC
|
|
34487
34642
|
*
|
|
34488
34643
|
* This source code is licensed under the ISC license.
|
|
34489
34644
|
* See the LICENSE file in the root directory of this source tree.
|
|
34490
34645
|
*/
|
|
34491
|
-
const __iconNode$
|
|
34646
|
+
const __iconNode$J = [
|
|
34492
34647
|
["path", { d: "M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16", key: "jecpp" }],
|
|
34493
34648
|
["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2", key: "i6l2r4" }]
|
|
34494
34649
|
];
|
|
34495
|
-
const Briefcase = createLucideIcon("briefcase", __iconNode$
|
|
34650
|
+
const Briefcase = createLucideIcon("briefcase", __iconNode$J);
|
|
34496
34651
|
/**
|
|
34497
34652
|
* @license lucide-react v0.507.0 - ISC
|
|
34498
34653
|
*
|
|
34499
34654
|
* This source code is licensed under the ISC license.
|
|
34500
34655
|
* See the LICENSE file in the root directory of this source tree.
|
|
34501
34656
|
*/
|
|
34502
|
-
const __iconNode$
|
|
34657
|
+
const __iconNode$I = [
|
|
34658
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
34659
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
34660
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
34661
|
+
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
34662
|
+
["path", { d: "M8 14h.01", key: "6423bh" }],
|
|
34663
|
+
["path", { d: "M12 14h.01", key: "1etili" }],
|
|
34664
|
+
["path", { d: "M16 14h.01", key: "1gbofw" }],
|
|
34665
|
+
["path", { d: "M8 18h.01", key: "lrp35t" }],
|
|
34666
|
+
["path", { d: "M12 18h.01", key: "mhygvu" }],
|
|
34667
|
+
["path", { d: "M16 18h.01", key: "kzsmim" }]
|
|
34668
|
+
];
|
|
34669
|
+
const CalendarDays = createLucideIcon("calendar-days", __iconNode$I);
|
|
34670
|
+
/**
|
|
34671
|
+
* @license lucide-react v0.507.0 - ISC
|
|
34672
|
+
*
|
|
34673
|
+
* This source code is licensed under the ISC license.
|
|
34674
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34675
|
+
*/
|
|
34676
|
+
const __iconNode$H = [
|
|
34503
34677
|
["line", { x1: "18", x2: "18", y1: "20", y2: "10", key: "1xfpm4" }],
|
|
34504
34678
|
["line", { x1: "12", x2: "12", y1: "20", y2: "4", key: "be30l9" }],
|
|
34505
34679
|
["line", { x1: "6", x2: "6", y1: "20", y2: "14", key: "1r4le6" }]
|
|
34506
34680
|
];
|
|
34507
|
-
const ChartNoAxesColumn = createLucideIcon("chart-no-axes-column", __iconNode$
|
|
34681
|
+
const ChartNoAxesColumn = createLucideIcon("chart-no-axes-column", __iconNode$H);
|
|
34508
34682
|
/**
|
|
34509
34683
|
* @license lucide-react v0.507.0 - ISC
|
|
34510
34684
|
*
|
|
34511
34685
|
* This source code is licensed under the ISC license.
|
|
34512
34686
|
* See the LICENSE file in the root directory of this source tree.
|
|
34513
34687
|
*/
|
|
34514
|
-
const __iconNode$
|
|
34515
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$
|
|
34688
|
+
const __iconNode$G = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
34689
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$G);
|
|
34516
34690
|
/**
|
|
34517
34691
|
* @license lucide-react v0.507.0 - ISC
|
|
34518
34692
|
*
|
|
34519
34693
|
* This source code is licensed under the ISC license.
|
|
34520
34694
|
* See the LICENSE file in the root directory of this source tree.
|
|
34521
34695
|
*/
|
|
34522
|
-
const __iconNode$
|
|
34523
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
34696
|
+
const __iconNode$F = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
34697
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$F);
|
|
34524
34698
|
/**
|
|
34525
34699
|
* @license lucide-react v0.507.0 - ISC
|
|
34526
34700
|
*
|
|
34527
34701
|
* This source code is licensed under the ISC license.
|
|
34528
34702
|
* See the LICENSE file in the root directory of this source tree.
|
|
34529
34703
|
*/
|
|
34530
|
-
const __iconNode$
|
|
34704
|
+
const __iconNode$E = [
|
|
34531
34705
|
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
34532
34706
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
34533
34707
|
];
|
|
34534
|
-
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$
|
|
34708
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$E);
|
|
34535
34709
|
/**
|
|
34536
34710
|
* @license lucide-react v0.507.0 - ISC
|
|
34537
34711
|
*
|
|
34538
34712
|
* This source code is licensed under the ISC license.
|
|
34539
34713
|
* See the LICENSE file in the root directory of this source tree.
|
|
34540
34714
|
*/
|
|
34541
|
-
const __iconNode$
|
|
34715
|
+
const __iconNode$D = [
|
|
34542
34716
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
34543
34717
|
["path", { d: "M17 12h.01", key: "1m0b6t" }],
|
|
34544
34718
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
34545
34719
|
["path", { d: "M7 12h.01", key: "eqddd0" }]
|
|
34546
34720
|
];
|
|
34547
|
-
const CircleEllipsis = createLucideIcon("circle-ellipsis", __iconNode$
|
|
34721
|
+
const CircleEllipsis = createLucideIcon("circle-ellipsis", __iconNode$D);
|
|
34548
34722
|
/**
|
|
34549
34723
|
* @license lucide-react v0.507.0 - ISC
|
|
34550
34724
|
*
|
|
34551
34725
|
* This source code is licensed under the ISC license.
|
|
34552
34726
|
* See the LICENSE file in the root directory of this source tree.
|
|
34553
34727
|
*/
|
|
34554
|
-
const __iconNode$
|
|
34728
|
+
const __iconNode$C = [
|
|
34729
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
34730
|
+
["path", { d: "M8 12h8", key: "1wcyev" }],
|
|
34731
|
+
["path", { d: "M12 8v8", key: "napkw2" }]
|
|
34732
|
+
];
|
|
34733
|
+
const CirclePlus = createLucideIcon("circle-plus", __iconNode$C);
|
|
34734
|
+
/**
|
|
34735
|
+
* @license lucide-react v0.507.0 - ISC
|
|
34736
|
+
*
|
|
34737
|
+
* This source code is licensed under the ISC license.
|
|
34738
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
34739
|
+
*/
|
|
34740
|
+
const __iconNode$B = [
|
|
34555
34741
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
34556
34742
|
[
|
|
34557
34743
|
"path",
|
|
@@ -34565,50 +34751,50 @@ const __iconNode$y = [
|
|
|
34565
34751
|
["path", { d: "M8 11h.01", key: "1dfujw" }],
|
|
34566
34752
|
["path", { d: "M8 16h.01", key: "18s6g9" }]
|
|
34567
34753
|
];
|
|
34568
|
-
const ClipboardList = createLucideIcon("clipboard-list", __iconNode$
|
|
34754
|
+
const ClipboardList = createLucideIcon("clipboard-list", __iconNode$B);
|
|
34569
34755
|
/**
|
|
34570
34756
|
* @license lucide-react v0.507.0 - ISC
|
|
34571
34757
|
*
|
|
34572
34758
|
* This source code is licensed under the ISC license.
|
|
34573
34759
|
* See the LICENSE file in the root directory of this source tree.
|
|
34574
34760
|
*/
|
|
34575
|
-
const __iconNode$
|
|
34761
|
+
const __iconNode$A = [
|
|
34576
34762
|
["path", { d: "M12 13v8", key: "1l5pq0" }],
|
|
34577
34763
|
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
|
|
34578
34764
|
["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
|
|
34579
34765
|
];
|
|
34580
|
-
const CloudUpload = createLucideIcon("cloud-upload", __iconNode$
|
|
34766
|
+
const CloudUpload = createLucideIcon("cloud-upload", __iconNode$A);
|
|
34581
34767
|
/**
|
|
34582
34768
|
* @license lucide-react v0.507.0 - ISC
|
|
34583
34769
|
*
|
|
34584
34770
|
* This source code is licensed under the ISC license.
|
|
34585
34771
|
* See the LICENSE file in the root directory of this source tree.
|
|
34586
34772
|
*/
|
|
34587
|
-
const __iconNode$
|
|
34773
|
+
const __iconNode$z = [
|
|
34588
34774
|
["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
|
|
34589
34775
|
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
|
|
34590
34776
|
["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
|
|
34591
34777
|
];
|
|
34592
|
-
const CodeXml = createLucideIcon("code-xml", __iconNode$
|
|
34778
|
+
const CodeXml = createLucideIcon("code-xml", __iconNode$z);
|
|
34593
34779
|
/**
|
|
34594
34780
|
* @license lucide-react v0.507.0 - ISC
|
|
34595
34781
|
*
|
|
34596
34782
|
* This source code is licensed under the ISC license.
|
|
34597
34783
|
* See the LICENSE file in the root directory of this source tree.
|
|
34598
34784
|
*/
|
|
34599
|
-
const __iconNode$
|
|
34785
|
+
const __iconNode$y = [
|
|
34600
34786
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
34601
34787
|
["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
|
|
34602
34788
|
["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
|
|
34603
34789
|
];
|
|
34604
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
34790
|
+
const Download = createLucideIcon("download", __iconNode$y);
|
|
34605
34791
|
/**
|
|
34606
34792
|
* @license lucide-react v0.507.0 - ISC
|
|
34607
34793
|
*
|
|
34608
34794
|
* This source code is licensed under the ISC license.
|
|
34609
34795
|
* See the LICENSE file in the root directory of this source tree.
|
|
34610
34796
|
*/
|
|
34611
|
-
const __iconNode$
|
|
34797
|
+
const __iconNode$x = [
|
|
34612
34798
|
["path", { d: "M21.54 15H17a2 2 0 0 0-2 2v4.54", key: "1djwo0" }],
|
|
34613
34799
|
[
|
|
34614
34800
|
"path",
|
|
@@ -34620,26 +34806,26 @@ const __iconNode$u = [
|
|
|
34620
34806
|
["path", { d: "M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05", key: "14pb5j" }],
|
|
34621
34807
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
34622
34808
|
];
|
|
34623
|
-
const Earth = createLucideIcon("earth", __iconNode$
|
|
34809
|
+
const Earth = createLucideIcon("earth", __iconNode$x);
|
|
34624
34810
|
/**
|
|
34625
34811
|
* @license lucide-react v0.507.0 - ISC
|
|
34626
34812
|
*
|
|
34627
34813
|
* This source code is licensed under the ISC license.
|
|
34628
34814
|
* See the LICENSE file in the root directory of this source tree.
|
|
34629
34815
|
*/
|
|
34630
|
-
const __iconNode$
|
|
34816
|
+
const __iconNode$w = [
|
|
34631
34817
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
34632
34818
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
34633
34819
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
34634
34820
|
];
|
|
34635
|
-
const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$
|
|
34821
|
+
const EllipsisVertical = createLucideIcon("ellipsis-vertical", __iconNode$w);
|
|
34636
34822
|
/**
|
|
34637
34823
|
* @license lucide-react v0.507.0 - ISC
|
|
34638
34824
|
*
|
|
34639
34825
|
* This source code is licensed under the ISC license.
|
|
34640
34826
|
* See the LICENSE file in the root directory of this source tree.
|
|
34641
34827
|
*/
|
|
34642
|
-
const __iconNode$
|
|
34828
|
+
const __iconNode$v = [
|
|
34643
34829
|
[
|
|
34644
34830
|
"path",
|
|
34645
34831
|
{
|
|
@@ -34650,79 +34836,79 @@ const __iconNode$s = [
|
|
|
34650
34836
|
["path", { d: "M22 21H7", key: "t4ddhn" }],
|
|
34651
34837
|
["path", { d: "m5 11 9 9", key: "1mo9qw" }]
|
|
34652
34838
|
];
|
|
34653
|
-
const Eraser = createLucideIcon("eraser", __iconNode$
|
|
34839
|
+
const Eraser = createLucideIcon("eraser", __iconNode$v);
|
|
34654
34840
|
/**
|
|
34655
34841
|
* @license lucide-react v0.507.0 - ISC
|
|
34656
34842
|
*
|
|
34657
34843
|
* This source code is licensed under the ISC license.
|
|
34658
34844
|
* See the LICENSE file in the root directory of this source tree.
|
|
34659
34845
|
*/
|
|
34660
|
-
const __iconNode$
|
|
34846
|
+
const __iconNode$u = [
|
|
34661
34847
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
34662
34848
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
34663
34849
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
34664
34850
|
];
|
|
34665
|
-
const ExternalLink = createLucideIcon("external-link", __iconNode$
|
|
34851
|
+
const ExternalLink = createLucideIcon("external-link", __iconNode$u);
|
|
34666
34852
|
/**
|
|
34667
34853
|
* @license lucide-react v0.507.0 - ISC
|
|
34668
34854
|
*
|
|
34669
34855
|
* This source code is licensed under the ISC license.
|
|
34670
34856
|
* See the LICENSE file in the root directory of this source tree.
|
|
34671
34857
|
*/
|
|
34672
|
-
const __iconNode$
|
|
34858
|
+
const __iconNode$t = [
|
|
34673
34859
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
34674
34860
|
["path", { d: "M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2", key: "1vk7w2" }],
|
|
34675
34861
|
["path", { d: "M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6", key: "1jink5" }],
|
|
34676
34862
|
["path", { d: "m5 11-3 3", key: "1dgrs4" }],
|
|
34677
34863
|
["path", { d: "m5 17-3-3h10", key: "1mvvaf" }]
|
|
34678
34864
|
];
|
|
34679
|
-
const FileOutput = createLucideIcon("file-output", __iconNode$
|
|
34865
|
+
const FileOutput = createLucideIcon("file-output", __iconNode$t);
|
|
34680
34866
|
/**
|
|
34681
34867
|
* @license lucide-react v0.507.0 - ISC
|
|
34682
34868
|
*
|
|
34683
34869
|
* This source code is licensed under the ISC license.
|
|
34684
34870
|
* See the LICENSE file in the root directory of this source tree.
|
|
34685
34871
|
*/
|
|
34686
|
-
const __iconNode$
|
|
34872
|
+
const __iconNode$s = [
|
|
34687
34873
|
["path", { d: "M12 17h.01", key: "p32p05" }],
|
|
34688
34874
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }],
|
|
34689
34875
|
["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
|
|
34690
34876
|
];
|
|
34691
|
-
const FileQuestion = createLucideIcon("file-question", __iconNode$
|
|
34877
|
+
const FileQuestion = createLucideIcon("file-question", __iconNode$s);
|
|
34692
34878
|
/**
|
|
34693
34879
|
* @license lucide-react v0.507.0 - ISC
|
|
34694
34880
|
*
|
|
34695
34881
|
* This source code is licensed under the ISC license.
|
|
34696
34882
|
* See the LICENSE file in the root directory of this source tree.
|
|
34697
34883
|
*/
|
|
34698
|
-
const __iconNode$
|
|
34884
|
+
const __iconNode$r = [
|
|
34699
34885
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
34700
34886
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
34701
34887
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
34702
34888
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
34703
34889
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
34704
34890
|
];
|
|
34705
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
34891
|
+
const FileText = createLucideIcon("file-text", __iconNode$r);
|
|
34706
34892
|
/**
|
|
34707
34893
|
* @license lucide-react v0.507.0 - ISC
|
|
34708
34894
|
*
|
|
34709
34895
|
* This source code is licensed under the ISC license.
|
|
34710
34896
|
* See the LICENSE file in the root directory of this source tree.
|
|
34711
34897
|
*/
|
|
34712
|
-
const __iconNode$
|
|
34898
|
+
const __iconNode$q = [
|
|
34713
34899
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
34714
34900
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
34715
34901
|
["path", { d: "M12 12v6", key: "3ahymv" }],
|
|
34716
34902
|
["path", { d: "m15 15-3-3-3 3", key: "15xj92" }]
|
|
34717
34903
|
];
|
|
34718
|
-
const FileUp = createLucideIcon("file-up", __iconNode$
|
|
34904
|
+
const FileUp = createLucideIcon("file-up", __iconNode$q);
|
|
34719
34905
|
/**
|
|
34720
34906
|
* @license lucide-react v0.507.0 - ISC
|
|
34721
34907
|
*
|
|
34722
34908
|
* This source code is licensed under the ISC license.
|
|
34723
34909
|
* See the LICENSE file in the root directory of this source tree.
|
|
34724
34910
|
*/
|
|
34725
|
-
const __iconNode$
|
|
34911
|
+
const __iconNode$p = [
|
|
34726
34912
|
[
|
|
34727
34913
|
"path",
|
|
34728
34914
|
{
|
|
@@ -34733,14 +34919,14 @@ const __iconNode$m = [
|
|
|
34733
34919
|
["path", { d: "M6.453 15h11.094", key: "3shlmq" }],
|
|
34734
34920
|
["path", { d: "M8.5 2h7", key: "csnxdl" }]
|
|
34735
34921
|
];
|
|
34736
|
-
const FlaskConical = createLucideIcon("flask-conical", __iconNode$
|
|
34922
|
+
const FlaskConical = createLucideIcon("flask-conical", __iconNode$p);
|
|
34737
34923
|
/**
|
|
34738
34924
|
* @license lucide-react v0.507.0 - ISC
|
|
34739
34925
|
*
|
|
34740
34926
|
* This source code is licensed under the ISC license.
|
|
34741
34927
|
* See the LICENSE file in the root directory of this source tree.
|
|
34742
34928
|
*/
|
|
34743
|
-
const __iconNode$
|
|
34929
|
+
const __iconNode$o = [
|
|
34744
34930
|
[
|
|
34745
34931
|
"path",
|
|
34746
34932
|
{
|
|
@@ -34751,14 +34937,14 @@ const __iconNode$l = [
|
|
|
34751
34937
|
["path", { d: "M22 10v6", key: "1lu8f3" }],
|
|
34752
34938
|
["path", { d: "M6 12.5V16a6 3 0 0 0 12 0v-3.5", key: "1r8lef" }]
|
|
34753
34939
|
];
|
|
34754
|
-
const GraduationCap = createLucideIcon("graduation-cap", __iconNode$
|
|
34940
|
+
const GraduationCap = createLucideIcon("graduation-cap", __iconNode$o);
|
|
34755
34941
|
/**
|
|
34756
34942
|
* @license lucide-react v0.507.0 - ISC
|
|
34757
34943
|
*
|
|
34758
34944
|
* This source code is licensed under the ISC license.
|
|
34759
34945
|
* See the LICENSE file in the root directory of this source tree.
|
|
34760
34946
|
*/
|
|
34761
|
-
const __iconNode$
|
|
34947
|
+
const __iconNode$n = [
|
|
34762
34948
|
[
|
|
34763
34949
|
"path",
|
|
34764
34950
|
{
|
|
@@ -34768,14 +34954,14 @@ const __iconNode$k = [
|
|
|
34768
34954
|
],
|
|
34769
34955
|
["path", { d: "M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27", key: "1uw2ng" }]
|
|
34770
34956
|
];
|
|
34771
|
-
const HeartPulse = createLucideIcon("heart-pulse", __iconNode$
|
|
34957
|
+
const HeartPulse = createLucideIcon("heart-pulse", __iconNode$n);
|
|
34772
34958
|
/**
|
|
34773
34959
|
* @license lucide-react v0.507.0 - ISC
|
|
34774
34960
|
*
|
|
34775
34961
|
* This source code is licensed under the ISC license.
|
|
34776
34962
|
* See the LICENSE file in the root directory of this source tree.
|
|
34777
34963
|
*/
|
|
34778
|
-
const __iconNode$
|
|
34964
|
+
const __iconNode$m = [
|
|
34779
34965
|
[
|
|
34780
34966
|
"path",
|
|
34781
34967
|
{
|
|
@@ -34784,14 +34970,14 @@ const __iconNode$j = [
|
|
|
34784
34970
|
}
|
|
34785
34971
|
]
|
|
34786
34972
|
];
|
|
34787
|
-
const Heart = createLucideIcon("heart", __iconNode$
|
|
34973
|
+
const Heart = createLucideIcon("heart", __iconNode$m);
|
|
34788
34974
|
/**
|
|
34789
34975
|
* @license lucide-react v0.507.0 - ISC
|
|
34790
34976
|
*
|
|
34791
34977
|
* This source code is licensed under the ISC license.
|
|
34792
34978
|
* See the LICENSE file in the root directory of this source tree.
|
|
34793
34979
|
*/
|
|
34794
|
-
const __iconNode$
|
|
34980
|
+
const __iconNode$l = [
|
|
34795
34981
|
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
34796
34982
|
["path", { d: "m8 11 4 4 4-4", key: "1dohi6" }],
|
|
34797
34983
|
[
|
|
@@ -34802,38 +34988,38 @@ const __iconNode$i = [
|
|
|
34802
34988
|
}
|
|
34803
34989
|
]
|
|
34804
34990
|
];
|
|
34805
|
-
const Import = createLucideIcon("import", __iconNode$
|
|
34991
|
+
const Import = createLucideIcon("import", __iconNode$l);
|
|
34806
34992
|
/**
|
|
34807
34993
|
* @license lucide-react v0.507.0 - ISC
|
|
34808
34994
|
*
|
|
34809
34995
|
* This source code is licensed under the ISC license.
|
|
34810
34996
|
* See the LICENSE file in the root directory of this source tree.
|
|
34811
34997
|
*/
|
|
34812
|
-
const __iconNode$
|
|
34998
|
+
const __iconNode$k = [
|
|
34813
34999
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
34814
35000
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
34815
35001
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
34816
35002
|
];
|
|
34817
|
-
const Info$1 = createLucideIcon("info", __iconNode$
|
|
35003
|
+
const Info$1 = createLucideIcon("info", __iconNode$k);
|
|
34818
35004
|
/**
|
|
34819
35005
|
* @license lucide-react v0.507.0 - ISC
|
|
34820
35006
|
*
|
|
34821
35007
|
* This source code is licensed under the ISC license.
|
|
34822
35008
|
* See the LICENSE file in the root directory of this source tree.
|
|
34823
35009
|
*/
|
|
34824
|
-
const __iconNode$
|
|
35010
|
+
const __iconNode$j = [
|
|
34825
35011
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
34826
35012
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
34827
35013
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
34828
35014
|
];
|
|
34829
|
-
const Key = createLucideIcon("key", __iconNode$
|
|
35015
|
+
const Key = createLucideIcon("key", __iconNode$j);
|
|
34830
35016
|
/**
|
|
34831
35017
|
* @license lucide-react v0.507.0 - ISC
|
|
34832
35018
|
*
|
|
34833
35019
|
* This source code is licensed under the ISC license.
|
|
34834
35020
|
* See the LICENSE file in the root directory of this source tree.
|
|
34835
35021
|
*/
|
|
34836
|
-
const __iconNode$
|
|
35022
|
+
const __iconNode$i = [
|
|
34837
35023
|
[
|
|
34838
35024
|
"path",
|
|
34839
35025
|
{
|
|
@@ -34856,35 +35042,35 @@ const __iconNode$f = [
|
|
|
34856
35042
|
}
|
|
34857
35043
|
]
|
|
34858
35044
|
];
|
|
34859
|
-
const Layers = createLucideIcon("layers", __iconNode$
|
|
35045
|
+
const Layers = createLucideIcon("layers", __iconNode$i);
|
|
34860
35046
|
/**
|
|
34861
35047
|
* @license lucide-react v0.507.0 - ISC
|
|
34862
35048
|
*
|
|
34863
35049
|
* This source code is licensed under the ISC license.
|
|
34864
35050
|
* See the LICENSE file in the root directory of this source tree.
|
|
34865
35051
|
*/
|
|
34866
|
-
const __iconNode$
|
|
35052
|
+
const __iconNode$h = [
|
|
34867
35053
|
["path", { d: "m3 11 18-5v12L3 14v-3z", key: "n962bs" }],
|
|
34868
35054
|
["path", { d: "M11.6 16.8a3 3 0 1 1-5.8-1.6", key: "1yl0tm" }]
|
|
34869
35055
|
];
|
|
34870
|
-
const Megaphone = createLucideIcon("megaphone", __iconNode$
|
|
35056
|
+
const Megaphone = createLucideIcon("megaphone", __iconNode$h);
|
|
34871
35057
|
/**
|
|
34872
35058
|
* @license lucide-react v0.507.0 - ISC
|
|
34873
35059
|
*
|
|
34874
35060
|
* This source code is licensed under the ISC license.
|
|
34875
35061
|
* See the LICENSE file in the root directory of this source tree.
|
|
34876
35062
|
*/
|
|
34877
|
-
const __iconNode$
|
|
35063
|
+
const __iconNode$g = [
|
|
34878
35064
|
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
|
|
34879
35065
|
];
|
|
34880
|
-
const MessageCircle = createLucideIcon("message-circle", __iconNode$
|
|
35066
|
+
const MessageCircle = createLucideIcon("message-circle", __iconNode$g);
|
|
34881
35067
|
/**
|
|
34882
35068
|
* @license lucide-react v0.507.0 - ISC
|
|
34883
35069
|
*
|
|
34884
35070
|
* This source code is licensed under the ISC license.
|
|
34885
35071
|
* See the LICENSE file in the root directory of this source tree.
|
|
34886
35072
|
*/
|
|
34887
|
-
const __iconNode$
|
|
35073
|
+
const __iconNode$f = [
|
|
34888
35074
|
["path", { d: "m14.622 17.897-10.68-2.913", key: "vj2p1u" }],
|
|
34889
35075
|
[
|
|
34890
35076
|
"path",
|
|
@@ -34901,50 +35087,68 @@ const __iconNode$c = [
|
|
|
34901
35087
|
}
|
|
34902
35088
|
]
|
|
34903
35089
|
];
|
|
34904
|
-
const Paintbrush = createLucideIcon("paintbrush", __iconNode$
|
|
35090
|
+
const Paintbrush = createLucideIcon("paintbrush", __iconNode$f);
|
|
34905
35091
|
/**
|
|
34906
35092
|
* @license lucide-react v0.507.0 - ISC
|
|
34907
35093
|
*
|
|
34908
35094
|
* This source code is licensed under the ISC license.
|
|
34909
35095
|
* See the LICENSE file in the root directory of this source tree.
|
|
34910
35096
|
*/
|
|
34911
|
-
const __iconNode$
|
|
35097
|
+
const __iconNode$e = [
|
|
34912
35098
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
34913
35099
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
34914
35100
|
];
|
|
34915
|
-
const Plus$1 = createLucideIcon("plus", __iconNode$
|
|
35101
|
+
const Plus$1 = createLucideIcon("plus", __iconNode$e);
|
|
34916
35102
|
/**
|
|
34917
35103
|
* @license lucide-react v0.507.0 - ISC
|
|
34918
35104
|
*
|
|
34919
35105
|
* This source code is licensed under the ISC license.
|
|
34920
35106
|
* See the LICENSE file in the root directory of this source tree.
|
|
34921
35107
|
*/
|
|
34922
|
-
const __iconNode$
|
|
35108
|
+
const __iconNode$d = [
|
|
35109
|
+
[
|
|
35110
|
+
"path",
|
|
35111
|
+
{
|
|
35112
|
+
d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
|
|
35113
|
+
key: "1c8476"
|
|
35114
|
+
}
|
|
35115
|
+
],
|
|
35116
|
+
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
35117
|
+
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
35118
|
+
];
|
|
35119
|
+
const Save = createLucideIcon("save", __iconNode$d);
|
|
35120
|
+
/**
|
|
35121
|
+
* @license lucide-react v0.507.0 - ISC
|
|
35122
|
+
*
|
|
35123
|
+
* This source code is licensed under the ISC license.
|
|
35124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35125
|
+
*/
|
|
35126
|
+
const __iconNode$c = [
|
|
34923
35127
|
["path", { d: "m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "7g6ntu" }],
|
|
34924
35128
|
["path", { d: "m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z", key: "ijws7r" }],
|
|
34925
35129
|
["path", { d: "M7 21h10", key: "1b0cd5" }],
|
|
34926
35130
|
["path", { d: "M12 3v18", key: "108xh3" }],
|
|
34927
35131
|
["path", { d: "M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2", key: "3gwbw2" }]
|
|
34928
35132
|
];
|
|
34929
|
-
const Scale = createLucideIcon("scale", __iconNode$
|
|
35133
|
+
const Scale = createLucideIcon("scale", __iconNode$c);
|
|
34930
35134
|
/**
|
|
34931
35135
|
* @license lucide-react v0.507.0 - ISC
|
|
34932
35136
|
*
|
|
34933
35137
|
* This source code is licensed under the ISC license.
|
|
34934
35138
|
* See the LICENSE file in the root directory of this source tree.
|
|
34935
35139
|
*/
|
|
34936
|
-
const __iconNode$
|
|
35140
|
+
const __iconNode$b = [
|
|
34937
35141
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
34938
35142
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
34939
35143
|
];
|
|
34940
|
-
const Search = createLucideIcon("search", __iconNode$
|
|
35144
|
+
const Search = createLucideIcon("search", __iconNode$b);
|
|
34941
35145
|
/**
|
|
34942
35146
|
* @license lucide-react v0.507.0 - ISC
|
|
34943
35147
|
*
|
|
34944
35148
|
* This source code is licensed under the ISC license.
|
|
34945
35149
|
* See the LICENSE file in the root directory of this source tree.
|
|
34946
35150
|
*/
|
|
34947
|
-
const __iconNode$
|
|
35151
|
+
const __iconNode$a = [
|
|
34948
35152
|
[
|
|
34949
35153
|
"path",
|
|
34950
35154
|
{
|
|
@@ -34954,14 +35158,14 @@ const __iconNode$8 = [
|
|
|
34954
35158
|
],
|
|
34955
35159
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
34956
35160
|
];
|
|
34957
|
-
const Settings$1 = createLucideIcon("settings", __iconNode$
|
|
35161
|
+
const Settings$1 = createLucideIcon("settings", __iconNode$a);
|
|
34958
35162
|
/**
|
|
34959
35163
|
* @license lucide-react v0.507.0 - ISC
|
|
34960
35164
|
*
|
|
34961
35165
|
* This source code is licensed under the ISC license.
|
|
34962
35166
|
* See the LICENSE file in the root directory of this source tree.
|
|
34963
35167
|
*/
|
|
34964
|
-
const __iconNode$
|
|
35168
|
+
const __iconNode$9 = [
|
|
34965
35169
|
[
|
|
34966
35170
|
"path",
|
|
34967
35171
|
{
|
|
@@ -34970,14 +35174,14 @@ const __iconNode$7 = [
|
|
|
34970
35174
|
}
|
|
34971
35175
|
]
|
|
34972
35176
|
];
|
|
34973
|
-
const Shield = createLucideIcon("shield", __iconNode$
|
|
35177
|
+
const Shield = createLucideIcon("shield", __iconNode$9);
|
|
34974
35178
|
/**
|
|
34975
35179
|
* @license lucide-react v0.507.0 - ISC
|
|
34976
35180
|
*
|
|
34977
35181
|
* This source code is licensed under the ISC license.
|
|
34978
35182
|
* See the LICENSE file in the root directory of this source tree.
|
|
34979
35183
|
*/
|
|
34980
|
-
const __iconNode$
|
|
35184
|
+
const __iconNode$8 = [
|
|
34981
35185
|
["circle", { cx: "8", cy: "21", r: "1", key: "jimo8o" }],
|
|
34982
35186
|
["circle", { cx: "19", cy: "21", r: "1", key: "13723u" }],
|
|
34983
35187
|
[
|
|
@@ -34988,7 +35192,36 @@ const __iconNode$6 = [
|
|
|
34988
35192
|
}
|
|
34989
35193
|
]
|
|
34990
35194
|
];
|
|
34991
|
-
const ShoppingCart = createLucideIcon("shopping-cart", __iconNode$
|
|
35195
|
+
const ShoppingCart = createLucideIcon("shopping-cart", __iconNode$8);
|
|
35196
|
+
/**
|
|
35197
|
+
* @license lucide-react v0.507.0 - ISC
|
|
35198
|
+
*
|
|
35199
|
+
* This source code is licensed under the ISC license.
|
|
35200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35201
|
+
*/
|
|
35202
|
+
const __iconNode$7 = [
|
|
35203
|
+
["path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7", key: "1m0v6g" }],
|
|
35204
|
+
[
|
|
35205
|
+
"path",
|
|
35206
|
+
{
|
|
35207
|
+
d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",
|
|
35208
|
+
key: "ohrbg2"
|
|
35209
|
+
}
|
|
35210
|
+
]
|
|
35211
|
+
];
|
|
35212
|
+
const SquarePen = createLucideIcon("square-pen", __iconNode$7);
|
|
35213
|
+
/**
|
|
35214
|
+
* @license lucide-react v0.507.0 - ISC
|
|
35215
|
+
*
|
|
35216
|
+
* This source code is licensed under the ISC license.
|
|
35217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35218
|
+
*/
|
|
35219
|
+
const __iconNode$6 = [
|
|
35220
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
35221
|
+
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
35222
|
+
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
35223
|
+
];
|
|
35224
|
+
const SquareX = createLucideIcon("square-x", __iconNode$6);
|
|
34992
35225
|
/**
|
|
34993
35226
|
* @license lucide-react v0.507.0 - ISC
|
|
34994
35227
|
*
|
|
@@ -35266,7 +35499,7 @@ const OptionsMenu = styled$1(Menu)(({ theme: theme2 }) => ({
|
|
|
35266
35499
|
background: theme2.palette.background.paper
|
|
35267
35500
|
}
|
|
35268
35501
|
}));
|
|
35269
|
-
const StyledMenuItem = styled$1(MenuItem)(({ theme: theme2 }) => ({
|
|
35502
|
+
const StyledMenuItem$1 = styled$1(MenuItem)(({ theme: theme2 }) => ({
|
|
35270
35503
|
borderRadius: "0.375rem",
|
|
35271
35504
|
// rounded-md
|
|
35272
35505
|
padding: "0.5rem 0.75rem",
|
|
@@ -35408,7 +35641,7 @@ const AgentOptionsMenu = ({
|
|
|
35408
35641
|
},
|
|
35409
35642
|
children: [
|
|
35410
35643
|
isAgentsPage && onChatWithAgent && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35411
|
-
StyledMenuItem,
|
|
35644
|
+
StyledMenuItem$1,
|
|
35412
35645
|
{
|
|
35413
35646
|
onClick: () => {
|
|
35414
35647
|
onChatWithAgent();
|
|
@@ -35421,7 +35654,7 @@ const AgentOptionsMenu = ({
|
|
|
35421
35654
|
}
|
|
35422
35655
|
),
|
|
35423
35656
|
!isAgentsPage && onViewAgentSettings && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35424
|
-
StyledMenuItem,
|
|
35657
|
+
StyledMenuItem$1,
|
|
35425
35658
|
{
|
|
35426
35659
|
onClick: () => {
|
|
35427
35660
|
onViewAgentSettings();
|
|
@@ -35434,7 +35667,7 @@ const AgentOptionsMenu = ({
|
|
|
35434
35667
|
}
|
|
35435
35668
|
),
|
|
35436
35669
|
onExportAgent && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35437
|
-
StyledMenuItem,
|
|
35670
|
+
StyledMenuItem$1,
|
|
35438
35671
|
{
|
|
35439
35672
|
onClick: () => {
|
|
35440
35673
|
onExportAgent();
|
|
@@ -35447,7 +35680,7 @@ const AgentOptionsMenu = ({
|
|
|
35447
35680
|
}
|
|
35448
35681
|
),
|
|
35449
35682
|
onUploadAgentToHub && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
35450
|
-
StyledMenuItem,
|
|
35683
|
+
StyledMenuItem$1,
|
|
35451
35684
|
{
|
|
35452
35685
|
onClick: () => {
|
|
35453
35686
|
onUploadAgentToHub();
|
|
@@ -35929,10 +36162,17 @@ const CheckForUpdatesButton = () => {
|
|
|
35929
36162
|
setSnackbarSeverity("success");
|
|
35930
36163
|
setSnackbarOpen(true);
|
|
35931
36164
|
});
|
|
36165
|
+
const removeBackendUpdateDevModeListener = window.api.updater.onBackendUpdateDevMode((message2) => {
|
|
36166
|
+
if (!manualCheckRef.current) return;
|
|
36167
|
+
setSnackbarMessage(message2);
|
|
36168
|
+
setSnackbarSeverity("info");
|
|
36169
|
+
setSnackbarOpen(true);
|
|
36170
|
+
});
|
|
35932
36171
|
return () => {
|
|
35933
36172
|
removeUpdateErrorListener();
|
|
35934
36173
|
removeUpdateNotAvailableListener();
|
|
35935
36174
|
removeBackendUpdateNotAvailableListener();
|
|
36175
|
+
removeBackendUpdateDevModeListener();
|
|
35936
36176
|
};
|
|
35937
36177
|
}, []);
|
|
35938
36178
|
const checkForUpdates = async () => {
|
|
@@ -39178,6 +39418,9 @@ const useCurrentView = () => {
|
|
|
39178
39418
|
if (pathIncludes(currentPath, "/agent-hub")) {
|
|
39179
39419
|
return "agent-hub";
|
|
39180
39420
|
}
|
|
39421
|
+
if (pathIncludes(currentPath, "/schedules")) {
|
|
39422
|
+
return "schedules";
|
|
39423
|
+
}
|
|
39181
39424
|
return "chat";
|
|
39182
39425
|
};
|
|
39183
39426
|
const useScrollToBottom = (buttonThreshold = 50, externalContainerRef) => {
|
|
@@ -40290,7 +40533,7 @@ const FieldContainer$5 = styled$1(Box)({
|
|
|
40290
40533
|
marginBottom: 16
|
|
40291
40534
|
// Reduced margin
|
|
40292
40535
|
});
|
|
40293
|
-
const FieldLabel$
|
|
40536
|
+
const FieldLabel$7 = styled$1("label")(({ theme: theme2 }) => ({
|
|
40294
40537
|
display: "flex",
|
|
40295
40538
|
alignItems: "center",
|
|
40296
40539
|
marginBottom: 6,
|
|
@@ -40601,7 +40844,7 @@ const EditableField = ({
|
|
|
40601
40844
|
const hasChanged = editValue !== originalValue;
|
|
40602
40845
|
const showClearButton = !isSaving && originalValue !== "";
|
|
40603
40846
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldContainer$5, { children: [
|
|
40604
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
40847
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$7, { children: [
|
|
40605
40848
|
icon && /* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$7, { children: icon }),
|
|
40606
40849
|
label
|
|
40607
40850
|
] }),
|
|
@@ -43966,13 +44209,14 @@ const UpdateNotification = ({
|
|
|
43966
44209
|
const [backendUpdateCompleted, setBackendUpdateCompleted] = reactExports.useState(false);
|
|
43967
44210
|
const [manualUpdateRequired, setManualUpdateRequired] = reactExports.useState(false);
|
|
43968
44211
|
const [manualUpdateInfo, setManualUpdateInfo] = reactExports.useState(null);
|
|
43969
|
-
const { shouldShowUpdate, deferUpdate
|
|
44212
|
+
const { shouldShowUpdate, deferUpdate } = useDeferredUpdatesStore();
|
|
44213
|
+
const backendUpdateInfoRef = reactExports.useRef(null);
|
|
44214
|
+
reactExports.useEffect(() => {
|
|
44215
|
+
backendUpdateInfoRef.current = backendUpdateInfo;
|
|
44216
|
+
}, [backendUpdateInfo]);
|
|
43970
44217
|
reactExports.useEffect(() => {
|
|
43971
44218
|
window.api.systemInfo.getAppVersion().then((version2) => setAppVersion(version2)).catch(() => setAppVersion("unknown"));
|
|
43972
44219
|
}, []);
|
|
43973
|
-
if (!hydrated) {
|
|
43974
|
-
return null;
|
|
43975
|
-
}
|
|
43976
44220
|
const checkForUpdates = reactExports.useCallback(async () => {
|
|
43977
44221
|
try {
|
|
43978
44222
|
setChecking(true);
|
|
@@ -44089,9 +44333,15 @@ const UpdateNotification = ({
|
|
|
44089
44333
|
setSnackbarOpen(true);
|
|
44090
44334
|
}
|
|
44091
44335
|
});
|
|
44092
|
-
const removeBackendUpdateNotAvailableListener = window.api.updater.onBackendUpdateNotAvailable(() => {
|
|
44093
|
-
|
|
44094
|
-
|
|
44336
|
+
const removeBackendUpdateNotAvailableListener = window.api.updater.onBackendUpdateNotAvailable((info) => {
|
|
44337
|
+
const currentInfo = backendUpdateInfoRef.current;
|
|
44338
|
+
setBackendUpdateAvailable((prev2) => {
|
|
44339
|
+
if (currentInfo && currentInfo.latestVersion === info.version) {
|
|
44340
|
+
setBackendUpdateInfo(null);
|
|
44341
|
+
return false;
|
|
44342
|
+
}
|
|
44343
|
+
return prev2;
|
|
44344
|
+
});
|
|
44095
44345
|
});
|
|
44096
44346
|
const removeBackendUpdateCompletedListener = window.api.updater.onBackendUpdateCompleted(() => {
|
|
44097
44347
|
setBackendUpdateAvailable(false);
|
|
@@ -51936,7 +52186,7 @@ const CATEGORY_LABELS = Object.fromEntries(
|
|
|
51936
52186
|
const FieldContainer$4 = styled$1(Box)({
|
|
51937
52187
|
marginBottom: 16
|
|
51938
52188
|
});
|
|
51939
|
-
const FieldLabel$
|
|
52189
|
+
const FieldLabel$6 = styled$1("label")(({ theme: theme2 }) => ({
|
|
51940
52190
|
display: "flex",
|
|
51941
52191
|
alignItems: "center",
|
|
51942
52192
|
marginBottom: 6,
|
|
@@ -51992,7 +52242,7 @@ const CategoriesInputChips = ({
|
|
|
51992
52242
|
onChange(value.filter((c2) => c2 !== cat));
|
|
51993
52243
|
};
|
|
51994
52244
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldContainer$4, { children: [
|
|
51995
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
52245
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$6, { children: [
|
|
51996
52246
|
icon && /* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$5, { children: icon }),
|
|
51997
52247
|
label
|
|
51998
52248
|
] }),
|
|
@@ -52149,7 +52399,7 @@ const CategoriesInputChips = ({
|
|
|
52149
52399
|
const FieldContainer$3 = styled$1(Box)({
|
|
52150
52400
|
marginBottom: 16
|
|
52151
52401
|
});
|
|
52152
|
-
const FieldLabel$
|
|
52402
|
+
const FieldLabel$5 = styled$1("label")(({ theme: theme2 }) => ({
|
|
52153
52403
|
display: "flex",
|
|
52154
52404
|
alignItems: "center",
|
|
52155
52405
|
marginBottom: 6,
|
|
@@ -52229,7 +52479,7 @@ const TagsInputChips = ({
|
|
|
52229
52479
|
onChange(value.filter((t2) => t2 !== tag));
|
|
52230
52480
|
};
|
|
52231
52481
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldContainer$3, { children: [
|
|
52232
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
52482
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$5, { children: [
|
|
52233
52483
|
icon && /* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$4, { children: icon }),
|
|
52234
52484
|
label
|
|
52235
52485
|
] }),
|
|
@@ -52379,7 +52629,7 @@ const FieldContainer$2 = styled$1(Box)({
|
|
|
52379
52629
|
// Reduced margin
|
|
52380
52630
|
position: "relative"
|
|
52381
52631
|
});
|
|
52382
|
-
const FieldLabel$
|
|
52632
|
+
const FieldLabel$4 = styled$1(Typography)(({ theme: theme2 }) => ({
|
|
52383
52633
|
marginBottom: 6,
|
|
52384
52634
|
// Reduced margin
|
|
52385
52635
|
display: "flex",
|
|
@@ -52397,7 +52647,7 @@ const LabelIcon$3 = styled$1(Box)({
|
|
|
52397
52647
|
display: "flex",
|
|
52398
52648
|
alignItems: "center"
|
|
52399
52649
|
});
|
|
52400
|
-
const StyledAutocomplete$
|
|
52650
|
+
const StyledAutocomplete$2 = styled$1(Autocomplete)(({ theme: theme2 }) => ({
|
|
52401
52651
|
"& .MuiOutlinedInput-root": {
|
|
52402
52652
|
// Target the root for border, background, height
|
|
52403
52653
|
borderRadius: 6,
|
|
@@ -52663,12 +52913,12 @@ const HostingSelect = ({
|
|
|
52663
52913
|
}
|
|
52664
52914
|
};
|
|
52665
52915
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldContainer$2, { children: [
|
|
52666
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
52916
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$4, { variant: "subtitle2", children: [
|
|
52667
52917
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$3, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faServer }) }),
|
|
52668
52918
|
"Hosting Provider"
|
|
52669
52919
|
] }),
|
|
52670
52920
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52671
|
-
StyledAutocomplete$
|
|
52921
|
+
StyledAutocomplete$2,
|
|
52672
52922
|
{
|
|
52673
52923
|
value: selectedOption,
|
|
52674
52924
|
inputValue,
|
|
@@ -62150,7 +62400,7 @@ const FieldContainer$1 = styled$1(Box)({
|
|
|
62150
62400
|
marginBottom: 16,
|
|
62151
62401
|
position: "relative"
|
|
62152
62402
|
});
|
|
62153
|
-
const FieldLabel$
|
|
62403
|
+
const FieldLabel$3 = styled$1(Typography)(({ theme: theme2 }) => ({
|
|
62154
62404
|
marginBottom: 6,
|
|
62155
62405
|
display: "flex",
|
|
62156
62406
|
alignItems: "center",
|
|
@@ -62164,7 +62414,7 @@ const LabelIcon$2 = styled$1(Box)({
|
|
|
62164
62414
|
display: "flex",
|
|
62165
62415
|
alignItems: "center"
|
|
62166
62416
|
});
|
|
62167
|
-
const StyledAutocomplete = styled$1(Autocomplete)(({ theme: theme2 }) => ({
|
|
62417
|
+
const StyledAutocomplete$1 = styled$1(Autocomplete)(({ theme: theme2 }) => ({
|
|
62168
62418
|
"& .MuiOutlinedInput-root": {
|
|
62169
62419
|
borderRadius: 6,
|
|
62170
62420
|
backgroundColor: theme2.palette.background.paper,
|
|
@@ -62420,12 +62670,12 @@ const ModelSelect = ({
|
|
|
62420
62670
|
return "";
|
|
62421
62671
|
};
|
|
62422
62672
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldContainer$1, { children: [
|
|
62423
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
62673
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$3, { variant: "subtitle2", children: [
|
|
62424
62674
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faRobot }) }),
|
|
62425
62675
|
"Model"
|
|
62426
62676
|
] }),
|
|
62427
62677
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
62428
|
-
StyledAutocomplete,
|
|
62678
|
+
StyledAutocomplete$1,
|
|
62429
62679
|
{
|
|
62430
62680
|
value: selectedOption,
|
|
62431
62681
|
inputValue,
|
|
@@ -62525,7 +62775,7 @@ const FieldContainer = styled$1(Box)({
|
|
|
62525
62775
|
position: "relative",
|
|
62526
62776
|
marginBottom: 16
|
|
62527
62777
|
});
|
|
62528
|
-
const FieldLabel$
|
|
62778
|
+
const FieldLabel$2 = styled$1("div")(({ theme: theme2 }) => ({
|
|
62529
62779
|
fontFamily: theme2.typography.fontFamily,
|
|
62530
62780
|
fontSize: "0.875rem",
|
|
62531
62781
|
// Small text size
|
|
@@ -62721,7 +62971,7 @@ const GeneralSettings = ({
|
|
|
62721
62971
|
},
|
|
62722
62972
|
`model-select-${currentHosting}`
|
|
62723
62973
|
) : /* @__PURE__ */ jsxRuntimeExports.jsxs(FieldContainer, { children: [
|
|
62724
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
62974
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$2, { children: [
|
|
62725
62975
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faRobot }) }),
|
|
62726
62976
|
"Model"
|
|
62727
62977
|
] }),
|
|
@@ -62823,14 +63073,14 @@ const GeneralSettings = ({
|
|
|
62823
63073
|
),
|
|
62824
63074
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { container: true, spacing: 3, children: [
|
|
62825
63075
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 12, sm: 6, children: [
|
|
62826
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
63076
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$2, { children: [
|
|
62827
63077
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faIdCard, size: "xs" }) }),
|
|
62828
63078
|
"ID"
|
|
62829
63079
|
] }),
|
|
62830
63080
|
/* @__PURE__ */ jsxRuntimeExports.jsx(InfoCard, { title: selectedAgent.id, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MonospaceValueText, { children: selectedAgent.id }) })
|
|
62831
63081
|
] }),
|
|
62832
63082
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 12, sm: 6, children: [
|
|
62833
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
63083
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$2, { children: [
|
|
62834
63084
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCalendarAlt, size: "xs" }) }),
|
|
62835
63085
|
"Created"
|
|
62836
63086
|
] }),
|
|
@@ -62843,7 +63093,7 @@ const GeneralSettings = ({
|
|
|
62843
63093
|
)
|
|
62844
63094
|
] }),
|
|
62845
63095
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 12, sm: 6, children: [
|
|
62846
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$
|
|
63096
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$2, { children: [
|
|
62847
63097
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCodeBranch, size: "xs" }) }),
|
|
62848
63098
|
"Version"
|
|
62849
63099
|
] }),
|
|
@@ -63498,7 +63748,7 @@ const OptionsButtonContainer$1 = styled$1(Box)({
|
|
|
63498
63748
|
pointerEvents: "auto"
|
|
63499
63749
|
}
|
|
63500
63750
|
});
|
|
63501
|
-
const formatDate = (dateString) => {
|
|
63751
|
+
const formatDate$1 = (dateString) => {
|
|
63502
63752
|
if (!dateString) return "Unknown date";
|
|
63503
63753
|
const date2 = new Date(dateString);
|
|
63504
63754
|
return date2.toLocaleDateString(void 0, {
|
|
@@ -63729,14 +63979,14 @@ const AgentsSidebar = ({
|
|
|
63729
63979
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
63730
63980
|
Tooltip$1,
|
|
63731
63981
|
{
|
|
63732
|
-
title: `Created: ${formatDate(agent.created_date)}`,
|
|
63982
|
+
title: `Created: ${formatDate$1(agent.created_date)}`,
|
|
63733
63983
|
arrow: true,
|
|
63734
63984
|
placement: "bottom-start",
|
|
63735
63985
|
enterDelay: 1200,
|
|
63736
63986
|
enterNextDelay: 1200,
|
|
63737
63987
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CreationDateText, { children: [
|
|
63738
63988
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faClock, size: "xs" }),
|
|
63739
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: formatDate(agent.created_date) })
|
|
63989
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: formatDate$1(agent.created_date) })
|
|
63740
63990
|
] })
|
|
63741
63991
|
}
|
|
63742
63992
|
)
|
|
@@ -83160,7 +83410,7 @@ const languages = [
|
|
|
83160
83410
|
name: "Go",
|
|
83161
83411
|
extensions: ["go"],
|
|
83162
83412
|
load() {
|
|
83163
|
-
return __vitePreload(() => import("./index-
|
|
83413
|
+
return __vitePreload(() => import("./index-MXm2Cr-I.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
|
|
83164
83414
|
}
|
|
83165
83415
|
}),
|
|
83166
83416
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -83337,7 +83587,7 @@ const languages = [
|
|
|
83337
83587
|
alias: ["yml"],
|
|
83338
83588
|
extensions: ["yaml", "yml"],
|
|
83339
83589
|
load() {
|
|
83340
|
-
return __vitePreload(() => import("./index-
|
|
83590
|
+
return __vitePreload(() => import("./index-Dhzp7zi8.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
|
|
83341
83591
|
}
|
|
83342
83592
|
}),
|
|
83343
83593
|
// Legacy modes ported from CodeMirror 5
|
|
@@ -184396,7 +184646,7 @@ const SectionDescription$1 = styled$1(Box)(({ theme: theme2 }) => ({
|
|
|
184396
184646
|
// Consistent margin
|
|
184397
184647
|
lineHeight: 1.5
|
|
184398
184648
|
}));
|
|
184399
|
-
const FieldLabel = styled$1("label")(({ theme: theme2 }) => ({
|
|
184649
|
+
const FieldLabel$1 = styled$1("label")(({ theme: theme2 }) => ({
|
|
184400
184650
|
...theme2.typography.body2,
|
|
184401
184651
|
marginBottom: 6,
|
|
184402
184652
|
display: "flex",
|
|
@@ -184934,7 +185184,7 @@ const DefaultModelStep = () => {
|
|
|
184934
185184
|
) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
184935
185185
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
184936
185186
|
" ",
|
|
184937
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
185187
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
184938
185188
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faRobot, size: "sm" }) }),
|
|
184939
185189
|
"Model Provider"
|
|
184940
185190
|
] }),
|
|
@@ -184954,7 +185204,7 @@ const DefaultModelStep = () => {
|
|
|
184954
185204
|
] }),
|
|
184955
185205
|
selectedProvider && /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: { mt: 1.5 }, children: [
|
|
184956
185206
|
" ",
|
|
184957
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
185207
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
184958
185208
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faWandMagicSparkles, size: "sm" }) }),
|
|
184959
185209
|
"AI Model"
|
|
184960
185210
|
] }),
|
|
@@ -185257,7 +185507,7 @@ const ModelCredentialStep = () => {
|
|
|
185257
185507
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer, { children: [
|
|
185258
185508
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
185259
185509
|
" ",
|
|
185260
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
185510
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
185261
185511
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: "🤖" }),
|
|
185262
185512
|
"Model Provider"
|
|
185263
185513
|
] }),
|
|
@@ -185329,7 +185579,7 @@ const ModelCredentialStep = () => {
|
|
|
185329
185579
|
),
|
|
185330
185580
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
185331
185581
|
" ",
|
|
185332
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
185582
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
185333
185583
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faKey, size: "sm" }) }),
|
|
185334
185584
|
"API Key"
|
|
185335
185585
|
] }),
|
|
@@ -185849,7 +186099,7 @@ const SearchApiStep = () => {
|
|
|
185849
186099
|
),
|
|
185850
186100
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
185851
186101
|
" ",
|
|
185852
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
186102
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
185853
186103
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: "🔎" }),
|
|
185854
186104
|
"Search API Provider"
|
|
185855
186105
|
] }),
|
|
@@ -185932,7 +186182,7 @@ const SearchApiStep = () => {
|
|
|
185932
186182
|
),
|
|
185933
186183
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
185934
186184
|
" ",
|
|
185935
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
186185
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
185936
186186
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faKey, size: "sm" }) }),
|
|
185937
186187
|
"API Key (Optional)"
|
|
185938
186188
|
] }),
|
|
@@ -186054,7 +186304,7 @@ const UserProfileStep = () => {
|
|
|
186054
186304
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer, { children: [
|
|
186055
186305
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
186056
186306
|
" ",
|
|
186057
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
186307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
186058
186308
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: "😎" }),
|
|
186059
186309
|
" ",
|
|
186060
186310
|
"Your Name"
|
|
@@ -186076,7 +186326,7 @@ const UserProfileStep = () => {
|
|
|
186076
186326
|
] }),
|
|
186077
186327
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { children: [
|
|
186078
186328
|
" ",
|
|
186079
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { children: [
|
|
186329
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel$1, { children: [
|
|
186080
186330
|
/* @__PURE__ */ jsxRuntimeExports.jsx(LabelIcon, { children: "📧" }),
|
|
186081
186331
|
" ",
|
|
186082
186332
|
"Email Address (Optional)"
|
|
@@ -186403,6 +186653,1048 @@ const OnboardingModal = ({ open: open2 }) => {
|
|
|
186403
186653
|
}
|
|
186404
186654
|
);
|
|
186405
186655
|
};
|
|
186656
|
+
const SCHEDULE_QUERY_KEY = "schedules";
|
|
186657
|
+
const AGENT_SCHEDULE_QUERY_KEY = "agentSchedules";
|
|
186658
|
+
const useListAllSchedules = (page = 1, perPage = 10) => {
|
|
186659
|
+
const { baseUrl } = apiConfig;
|
|
186660
|
+
return useQuery({
|
|
186661
|
+
queryKey: [SCHEDULE_QUERY_KEY, "all", page, perPage],
|
|
186662
|
+
queryFn: () => SchedulesApi.listAllSchedules(baseUrl, page, perPage),
|
|
186663
|
+
enabled: !!baseUrl
|
|
186664
|
+
});
|
|
186665
|
+
};
|
|
186666
|
+
const useCreateScheduleForAgent = () => {
|
|
186667
|
+
const queryClient2 = useQueryClient();
|
|
186668
|
+
const { baseUrl } = apiConfig;
|
|
186669
|
+
return useMutation({
|
|
186670
|
+
mutationFn: ({ agentId, scheduleData }) => SchedulesApi.createScheduleForAgent(baseUrl, agentId, scheduleData),
|
|
186671
|
+
onSuccess: (_2, variables) => {
|
|
186672
|
+
queryClient2.invalidateQueries({ queryKey: [SCHEDULE_QUERY_KEY, "all"] });
|
|
186673
|
+
queryClient2.invalidateQueries({
|
|
186674
|
+
queryKey: [AGENT_SCHEDULE_QUERY_KEY, variables.agentId]
|
|
186675
|
+
});
|
|
186676
|
+
}
|
|
186677
|
+
});
|
|
186678
|
+
};
|
|
186679
|
+
const useEditSchedule = () => {
|
|
186680
|
+
const queryClient2 = useQueryClient();
|
|
186681
|
+
const { baseUrl } = apiConfig;
|
|
186682
|
+
return useMutation({
|
|
186683
|
+
mutationFn: ({ scheduleId, scheduleData }) => SchedulesApi.editSchedule(baseUrl, scheduleId, scheduleData),
|
|
186684
|
+
onSuccess: (data2) => {
|
|
186685
|
+
const agentId = data2.result?.agent_id;
|
|
186686
|
+
queryClient2.invalidateQueries({ queryKey: [SCHEDULE_QUERY_KEY, "all"] });
|
|
186687
|
+
queryClient2.invalidateQueries({
|
|
186688
|
+
queryKey: [SCHEDULE_QUERY_KEY, data2.result?.id]
|
|
186689
|
+
});
|
|
186690
|
+
if (agentId) {
|
|
186691
|
+
queryClient2.invalidateQueries({
|
|
186692
|
+
queryKey: [AGENT_SCHEDULE_QUERY_KEY, agentId]
|
|
186693
|
+
});
|
|
186694
|
+
}
|
|
186695
|
+
}
|
|
186696
|
+
});
|
|
186697
|
+
};
|
|
186698
|
+
const useRemoveSchedule = () => {
|
|
186699
|
+
const queryClient2 = useQueryClient();
|
|
186700
|
+
const { baseUrl } = apiConfig;
|
|
186701
|
+
return useMutation({
|
|
186702
|
+
mutationFn: ({ scheduleId }) => SchedulesApi.removeSchedule(baseUrl, scheduleId),
|
|
186703
|
+
onSuccess: (_2, variables) => {
|
|
186704
|
+
queryClient2.invalidateQueries({ queryKey: [SCHEDULE_QUERY_KEY, "all"] });
|
|
186705
|
+
queryClient2.invalidateQueries({
|
|
186706
|
+
queryKey: [SCHEDULE_QUERY_KEY, variables.scheduleId]
|
|
186707
|
+
});
|
|
186708
|
+
if (variables.agentId) {
|
|
186709
|
+
queryClient2.invalidateQueries({
|
|
186710
|
+
queryKey: [AGENT_SCHEDULE_QUERY_KEY, variables.agentId]
|
|
186711
|
+
});
|
|
186712
|
+
}
|
|
186713
|
+
}
|
|
186714
|
+
});
|
|
186715
|
+
};
|
|
186716
|
+
const StyledFormGrid = styled$1(Grid)(({ theme: theme2 }) => ({
|
|
186717
|
+
paddingTop: theme2.spacing(1)
|
|
186718
|
+
}));
|
|
186719
|
+
const FieldLabel = styled$1("label")(({ theme: theme2 }) => ({
|
|
186720
|
+
display: "block",
|
|
186721
|
+
marginBottom: theme2.spacing(0.75),
|
|
186722
|
+
color: theme2.palette.text.secondary,
|
|
186723
|
+
fontWeight: 500,
|
|
186724
|
+
fontSize: "0.875rem",
|
|
186725
|
+
lineHeight: 1.5
|
|
186726
|
+
}));
|
|
186727
|
+
const FullWidthTextField = styled$1(TextField)(({ theme: theme2 }) => ({
|
|
186728
|
+
width: "100%",
|
|
186729
|
+
"& .MuiOutlinedInput-root": {
|
|
186730
|
+
borderRadius: 6,
|
|
186731
|
+
border: `1px solid ${theme2.palette.divider}`,
|
|
186732
|
+
backgroundColor: theme2.palette.background.paper,
|
|
186733
|
+
minHeight: "36px",
|
|
186734
|
+
height: "36px",
|
|
186735
|
+
padding: 0,
|
|
186736
|
+
transition: "border-color 0.2s ease, box-shadow 0.2s ease",
|
|
186737
|
+
"&:hover": {
|
|
186738
|
+
borderColor: theme2.palette.text.secondary
|
|
186739
|
+
},
|
|
186740
|
+
"&.Mui-focused": {
|
|
186741
|
+
borderColor: theme2.palette.primary.main,
|
|
186742
|
+
boxShadow: `0 0 0 2px ${alpha$1(theme2.palette.primary.main, 0.2)}`
|
|
186743
|
+
},
|
|
186744
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
186745
|
+
border: "none"
|
|
186746
|
+
},
|
|
186747
|
+
"&:not(.MuiInputBase-multiline) .MuiInputBase-input": {
|
|
186748
|
+
height: "calc(36px - 16px)",
|
|
186749
|
+
padding: "8px 12px"
|
|
186750
|
+
},
|
|
186751
|
+
"&.MuiInputBase-multiline": {
|
|
186752
|
+
minHeight: "36px",
|
|
186753
|
+
height: "auto",
|
|
186754
|
+
padding: "8px 12px"
|
|
186755
|
+
}
|
|
186756
|
+
},
|
|
186757
|
+
"& .MuiInputBase-input": {
|
|
186758
|
+
fontSize: "0.875rem",
|
|
186759
|
+
lineHeight: 1.5,
|
|
186760
|
+
boxSizing: "border-box",
|
|
186761
|
+
"&.MuiInputBase-inputMultiline": {
|
|
186762
|
+
padding: "0px",
|
|
186763
|
+
height: "auto"
|
|
186764
|
+
}
|
|
186765
|
+
}
|
|
186766
|
+
}));
|
|
186767
|
+
const FullWidthFormControl = styled$1(FormControl)(({ theme: theme2 }) => ({
|
|
186768
|
+
width: "100%",
|
|
186769
|
+
"& .MuiOutlinedInput-root": {
|
|
186770
|
+
borderRadius: 6,
|
|
186771
|
+
border: `1px solid ${theme2.palette.divider}`,
|
|
186772
|
+
backgroundColor: theme2.palette.background.paper,
|
|
186773
|
+
minHeight: "36px",
|
|
186774
|
+
height: "36px",
|
|
186775
|
+
padding: "0 !important",
|
|
186776
|
+
transition: "border-color 0.2s ease, box-shadow 0.2s ease",
|
|
186777
|
+
"&:hover": {
|
|
186778
|
+
borderColor: theme2.palette.text.secondary
|
|
186779
|
+
},
|
|
186780
|
+
"&.Mui-focused": {
|
|
186781
|
+
borderColor: theme2.palette.primary.main,
|
|
186782
|
+
boxShadow: `0 0 0 2px ${alpha$1(theme2.palette.primary.main, 0.2)}`
|
|
186783
|
+
},
|
|
186784
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
186785
|
+
border: "none"
|
|
186786
|
+
}
|
|
186787
|
+
},
|
|
186788
|
+
"& .MuiSelect-select": {
|
|
186789
|
+
padding: "8px 12px !important",
|
|
186790
|
+
fontSize: "0.875rem",
|
|
186791
|
+
lineHeight: 1.5,
|
|
186792
|
+
height: "calc(36px - 16px) !important",
|
|
186793
|
+
boxSizing: "border-box",
|
|
186794
|
+
display: "flex",
|
|
186795
|
+
alignItems: "center"
|
|
186796
|
+
}
|
|
186797
|
+
}));
|
|
186798
|
+
const StyledAutocomplete = styled$1(
|
|
186799
|
+
Autocomplete
|
|
186800
|
+
)(({ theme: theme2 }) => ({
|
|
186801
|
+
"& .MuiOutlinedInput-root": {
|
|
186802
|
+
borderRadius: 6,
|
|
186803
|
+
border: `1px solid ${theme2.palette.divider}`,
|
|
186804
|
+
backgroundColor: theme2.palette.background.paper,
|
|
186805
|
+
minHeight: "36px",
|
|
186806
|
+
height: "36px",
|
|
186807
|
+
padding: "0 !important",
|
|
186808
|
+
transition: "border-color 0.2s ease, box-shadow 0.2s ease",
|
|
186809
|
+
"&:hover": {
|
|
186810
|
+
borderColor: theme2.palette.text.secondary
|
|
186811
|
+
},
|
|
186812
|
+
"&.Mui-focused": {
|
|
186813
|
+
borderColor: theme2.palette.primary.main,
|
|
186814
|
+
boxShadow: `0 0 0 2px ${alpha$1(theme2.palette.primary.main, 0.2)}`
|
|
186815
|
+
},
|
|
186816
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
186817
|
+
border: "none"
|
|
186818
|
+
},
|
|
186819
|
+
"& .MuiInputBase-input": {
|
|
186820
|
+
padding: "8px 12px !important",
|
|
186821
|
+
fontSize: "0.875rem",
|
|
186822
|
+
lineHeight: 1.5,
|
|
186823
|
+
height: "calc(36px - 16px)",
|
|
186824
|
+
boxSizing: "border-box"
|
|
186825
|
+
}
|
|
186826
|
+
},
|
|
186827
|
+
"& .MuiAutocomplete-endAdornment": {
|
|
186828
|
+
right: "8px",
|
|
186829
|
+
top: "50%",
|
|
186830
|
+
transform: "translateY(-50%)"
|
|
186831
|
+
},
|
|
186832
|
+
"& .MuiAutocomplete-clearIndicator, & .MuiAutocomplete-popupIndicator": {
|
|
186833
|
+
color: theme2.palette.text.secondary,
|
|
186834
|
+
"&:hover": {
|
|
186835
|
+
color: theme2.palette.text.primary,
|
|
186836
|
+
backgroundColor: alpha$1(theme2.palette.action.active, 0.04)
|
|
186837
|
+
}
|
|
186838
|
+
}
|
|
186839
|
+
}));
|
|
186840
|
+
const StyledFormHelperText = styled$1(Typography, {
|
|
186841
|
+
shouldForwardProp: (prop) => prop !== "error"
|
|
186842
|
+
})(({ theme: theme2, error }) => ({
|
|
186843
|
+
fontSize: "0.75rem",
|
|
186844
|
+
marginTop: theme2.spacing(0.5),
|
|
186845
|
+
marginLeft: theme2.spacing(0.25),
|
|
186846
|
+
color: error ? theme2.palette.error.main : theme2.palette.text.secondary
|
|
186847
|
+
}));
|
|
186848
|
+
const StyledSwitch = styled$1(Switch)(({ theme: theme2 }) => ({
|
|
186849
|
+
width: 42,
|
|
186850
|
+
height: 26,
|
|
186851
|
+
padding: 0,
|
|
186852
|
+
"& .MuiSwitch-switchBase": {
|
|
186853
|
+
padding: 0,
|
|
186854
|
+
margin: 2,
|
|
186855
|
+
transitionDuration: "300ms",
|
|
186856
|
+
"&.Mui-checked": {
|
|
186857
|
+
transform: "translateX(16px)",
|
|
186858
|
+
color: "#fff",
|
|
186859
|
+
"& + .MuiSwitch-track": {
|
|
186860
|
+
backgroundColor: theme2.palette.primary.main,
|
|
186861
|
+
opacity: 1,
|
|
186862
|
+
border: 0
|
|
186863
|
+
},
|
|
186864
|
+
"&.Mui-disabled + .MuiSwitch-track": {
|
|
186865
|
+
opacity: 0.5
|
|
186866
|
+
}
|
|
186867
|
+
},
|
|
186868
|
+
"&.Mui-focusVisible .MuiSwitch-thumb": {
|
|
186869
|
+
color: theme2.palette.primary.main,
|
|
186870
|
+
border: "6px solid #fff"
|
|
186871
|
+
},
|
|
186872
|
+
"&.Mui-disabled .MuiSwitch-thumb": {
|
|
186873
|
+
color: theme2.palette.mode === "light" ? theme2.palette.grey[100] : theme2.palette.grey[600]
|
|
186874
|
+
},
|
|
186875
|
+
"&.Mui-disabled + .MuiSwitch-track": {
|
|
186876
|
+
opacity: theme2.palette.mode === "light" ? 0.7 : 0.3
|
|
186877
|
+
}
|
|
186878
|
+
},
|
|
186879
|
+
"& .MuiSwitch-thumb": {
|
|
186880
|
+
boxSizing: "border-box",
|
|
186881
|
+
width: 22,
|
|
186882
|
+
height: 22,
|
|
186883
|
+
boxShadow: "none"
|
|
186884
|
+
},
|
|
186885
|
+
"& .MuiSwitch-track": {
|
|
186886
|
+
borderRadius: 26 / 2,
|
|
186887
|
+
backgroundColor: theme2.palette.mode === "light" ? "#E9E9EA" : theme2.palette.grey[700],
|
|
186888
|
+
opacity: 1,
|
|
186889
|
+
transition: theme2.transitions.create(["background-color"], {
|
|
186890
|
+
duration: 500
|
|
186891
|
+
})
|
|
186892
|
+
}
|
|
186893
|
+
}));
|
|
186894
|
+
const StyledFormControlLabel = styled$1(FormControlLabel)(({ theme: theme2 }) => ({
|
|
186895
|
+
marginLeft: 0,
|
|
186896
|
+
marginRight: theme2.spacing(1),
|
|
186897
|
+
"& .MuiTypography-root": {
|
|
186898
|
+
fontSize: "0.875rem",
|
|
186899
|
+
color: theme2.palette.text.primary,
|
|
186900
|
+
paddingLeft: theme2.spacing(1)
|
|
186901
|
+
}
|
|
186902
|
+
}));
|
|
186903
|
+
const StyledMenuItem = styled$1(MenuItem)(({ theme: theme2 }) => ({
|
|
186904
|
+
fontSize: "0.875rem",
|
|
186905
|
+
paddingTop: theme2.spacing(1),
|
|
186906
|
+
paddingBottom: theme2.spacing(1),
|
|
186907
|
+
"&:hover": {
|
|
186908
|
+
backgroundColor: alpha$1(theme2.palette.action.hover, 0.08)
|
|
186909
|
+
},
|
|
186910
|
+
"&.Mui-selected": {
|
|
186911
|
+
backgroundColor: alpha$1(theme2.palette.primary.main, 0.12),
|
|
186912
|
+
"&:hover": {
|
|
186913
|
+
backgroundColor: alpha$1(theme2.palette.primary.main, 0.16)
|
|
186914
|
+
}
|
|
186915
|
+
}
|
|
186916
|
+
}));
|
|
186917
|
+
const defaultFormState = {
|
|
186918
|
+
selectedAgentId: null,
|
|
186919
|
+
// Initialize selectedAgentId
|
|
186920
|
+
prompt: "",
|
|
186921
|
+
interval: 1,
|
|
186922
|
+
unit: "hours",
|
|
186923
|
+
is_active: true,
|
|
186924
|
+
one_time: false,
|
|
186925
|
+
start_time_utc: null,
|
|
186926
|
+
end_time_utc: null
|
|
186927
|
+
};
|
|
186928
|
+
const ScheduleFormDialog = ({
|
|
186929
|
+
open: open2,
|
|
186930
|
+
onClose,
|
|
186931
|
+
onSubmit,
|
|
186932
|
+
initialData
|
|
186933
|
+
// agentId prop removed
|
|
186934
|
+
}) => {
|
|
186935
|
+
const [formData, setFormData] = reactExports.useState(defaultFormState);
|
|
186936
|
+
const [isSubmitting, setIsSubmitting] = reactExports.useState(false);
|
|
186937
|
+
const [agentSearchQuery, setAgentSearchQuery] = reactExports.useState("");
|
|
186938
|
+
const [selectedAgentForForm, setSelectedAgentForForm] = reactExports.useState(null);
|
|
186939
|
+
const isEditMode = !!initialData;
|
|
186940
|
+
const {
|
|
186941
|
+
data: agentsListResult,
|
|
186942
|
+
isLoading: isLoadingAgents,
|
|
186943
|
+
isError: isAgentsError
|
|
186944
|
+
} = useAgents(1, 50, 0, agentSearchQuery || void 0);
|
|
186945
|
+
const agentOptions = reactExports.useMemo(
|
|
186946
|
+
() => agentsListResult?.agents || [],
|
|
186947
|
+
[agentsListResult]
|
|
186948
|
+
);
|
|
186949
|
+
reactExports.useEffect(() => {
|
|
186950
|
+
if (open2) {
|
|
186951
|
+
if (initialData) {
|
|
186952
|
+
setFormData({
|
|
186953
|
+
selectedAgentId: initialData.agent_id,
|
|
186954
|
+
// Pre-fill agent if editing
|
|
186955
|
+
prompt: initialData.prompt,
|
|
186956
|
+
interval: initialData.interval,
|
|
186957
|
+
unit: initialData.unit,
|
|
186958
|
+
is_active: initialData.is_active,
|
|
186959
|
+
one_time: initialData.one_time,
|
|
186960
|
+
start_time_utc: initialData.start_time_utc ? new Date(initialData.start_time_utc).toISOString().slice(0, 16) : null,
|
|
186961
|
+
end_time_utc: initialData.end_time_utc ? new Date(initialData.end_time_utc).toISOString().slice(0, 16) : null
|
|
186962
|
+
});
|
|
186963
|
+
const currentAgent = agentOptions.find(
|
|
186964
|
+
(agent) => agent.id === initialData.agent_id
|
|
186965
|
+
);
|
|
186966
|
+
if (currentAgent) {
|
|
186967
|
+
setSelectedAgentForForm(currentAgent);
|
|
186968
|
+
} else if (initialData.agent_id && !isLoadingAgents && agentOptions.length > 0) ;
|
|
186969
|
+
} else {
|
|
186970
|
+
setFormData(defaultFormState);
|
|
186971
|
+
setSelectedAgentForForm(null);
|
|
186972
|
+
setAgentSearchQuery("");
|
|
186973
|
+
}
|
|
186974
|
+
}
|
|
186975
|
+
}, [open2, initialData, agentOptions, isLoadingAgents]);
|
|
186976
|
+
const handleChange = (event) => {
|
|
186977
|
+
const { name: name2, value } = event.target;
|
|
186978
|
+
let processedValue = value;
|
|
186979
|
+
if ("type" in event.target) {
|
|
186980
|
+
const targetType = event.target.type;
|
|
186981
|
+
if (targetType === "number" && name2 === "interval") {
|
|
186982
|
+
processedValue = value === "" ? "" : Number.parseInt(value, 10);
|
|
186983
|
+
}
|
|
186984
|
+
}
|
|
186985
|
+
setFormData((prev2) => ({
|
|
186986
|
+
...prev2,
|
|
186987
|
+
[name2]: processedValue
|
|
186988
|
+
}));
|
|
186989
|
+
};
|
|
186990
|
+
const handleSwitchChange = (event) => {
|
|
186991
|
+
setFormData((prev2) => ({
|
|
186992
|
+
...prev2,
|
|
186993
|
+
[event.target.name]: event.target.checked
|
|
186994
|
+
}));
|
|
186995
|
+
};
|
|
186996
|
+
const handleDateTimeChange = (event) => {
|
|
186997
|
+
const { name: name2, value } = event.target;
|
|
186998
|
+
setFormData((prev2) => ({
|
|
186999
|
+
...prev2,
|
|
187000
|
+
[name2]: value ? new Date(value).toISOString() : null
|
|
187001
|
+
}));
|
|
187002
|
+
};
|
|
187003
|
+
const handleSubmit = async () => {
|
|
187004
|
+
setIsSubmitting(true);
|
|
187005
|
+
try {
|
|
187006
|
+
if (!isEditMode && !formData.selectedAgentId) {
|
|
187007
|
+
console.error("Agent ID is required to create a schedule.");
|
|
187008
|
+
setIsSubmitting(false);
|
|
187009
|
+
return;
|
|
187010
|
+
}
|
|
187011
|
+
const scheduleData = {
|
|
187012
|
+
prompt: formData.prompt,
|
|
187013
|
+
interval: Number(formData.interval),
|
|
187014
|
+
unit: formData.unit,
|
|
187015
|
+
is_active: formData.is_active,
|
|
187016
|
+
one_time: formData.one_time,
|
|
187017
|
+
start_time_utc: formData.start_time_utc || null,
|
|
187018
|
+
end_time_utc: formData.end_time_utc || null
|
|
187019
|
+
};
|
|
187020
|
+
if (scheduleData.start_time_utc === "")
|
|
187021
|
+
scheduleData.start_time_utc = null;
|
|
187022
|
+
if (scheduleData.end_time_utc === "") scheduleData.end_time_utc = null;
|
|
187023
|
+
const agentForSubmit = isEditMode ? initialData.agent_id : formData.selectedAgentId;
|
|
187024
|
+
if (!agentForSubmit) {
|
|
187025
|
+
console.error("Agent ID is missing for submission.");
|
|
187026
|
+
setIsSubmitting(false);
|
|
187027
|
+
return;
|
|
187028
|
+
}
|
|
187029
|
+
await onSubmit(scheduleData, agentForSubmit);
|
|
187030
|
+
onClose();
|
|
187031
|
+
} catch (error) {
|
|
187032
|
+
console.error("Failed to submit schedule:", error);
|
|
187033
|
+
y$2.error(
|
|
187034
|
+
`Failed to save schedule: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
187035
|
+
);
|
|
187036
|
+
} finally {
|
|
187037
|
+
setIsSubmitting(false);
|
|
187038
|
+
}
|
|
187039
|
+
};
|
|
187040
|
+
const dialogTitle = isEditMode ? "Edit Schedule" : "Create New Schedule";
|
|
187041
|
+
const dialogActions = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
187042
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187043
|
+
SecondaryButton$1,
|
|
187044
|
+
{
|
|
187045
|
+
onClick: onClose,
|
|
187046
|
+
disabled: isSubmitting,
|
|
187047
|
+
startIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(SquareX, { size: 18 }),
|
|
187048
|
+
children: "Cancel"
|
|
187049
|
+
}
|
|
187050
|
+
),
|
|
187051
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187052
|
+
PrimaryButton$1,
|
|
187053
|
+
{
|
|
187054
|
+
onClick: handleSubmit,
|
|
187055
|
+
disabled: isSubmitting || !formData.prompt || formData.interval != null && formData.interval < 1 || !isEditMode && !formData.selectedAgentId,
|
|
187056
|
+
startIcon: isSubmitting ? /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { size: 18, color: "inherit" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Save, { size: 18 }),
|
|
187057
|
+
children: isSubmitting ? "Saving..." : isEditMode ? "Save Changes" : "Create Schedule"
|
|
187058
|
+
}
|
|
187059
|
+
)
|
|
187060
|
+
] });
|
|
187061
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187062
|
+
BaseDialog,
|
|
187063
|
+
{
|
|
187064
|
+
open: open2,
|
|
187065
|
+
onClose,
|
|
187066
|
+
title: dialogTitle,
|
|
187067
|
+
actions: dialogActions,
|
|
187068
|
+
maxWidth: "sm",
|
|
187069
|
+
fullWidth: true,
|
|
187070
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledFormGrid, { container: true, spacing: 2, children: [
|
|
187071
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", mb: 1, children: [
|
|
187072
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { size: "small", sx: { mr: 1, color: "info.main" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Info$1, { size: 16 }) }),
|
|
187073
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187074
|
+
Typography,
|
|
187075
|
+
{
|
|
187076
|
+
variant: "body2",
|
|
187077
|
+
color: "text.secondary",
|
|
187078
|
+
fontSize: "0.875rem",
|
|
187079
|
+
children: 'Tip: It is often easier to ask an agent through chat to do something for you on a regular basis, like "Send me an email with the latest news at 8am every day".'
|
|
187080
|
+
}
|
|
187081
|
+
)
|
|
187082
|
+
] }) }),
|
|
187083
|
+
!isEditMode && /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 12, children: [
|
|
187084
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { htmlFor: "agent-select-for-schedule", children: [
|
|
187085
|
+
"Select Agent",
|
|
187086
|
+
" ",
|
|
187087
|
+
isEditMode ? "" : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187088
|
+
Typography,
|
|
187089
|
+
{
|
|
187090
|
+
component: "span",
|
|
187091
|
+
color: "error.main",
|
|
187092
|
+
sx: { ml: 0.5 },
|
|
187093
|
+
children: "*"
|
|
187094
|
+
}
|
|
187095
|
+
)
|
|
187096
|
+
] }),
|
|
187097
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187098
|
+
StyledAutocomplete,
|
|
187099
|
+
{
|
|
187100
|
+
id: "agent-select-for-schedule",
|
|
187101
|
+
options: agentOptions,
|
|
187102
|
+
value: selectedAgentForForm,
|
|
187103
|
+
getOptionLabel: (option2) => option2.name || `Agent ID: ${option2.id.substring(0, 8)}...`,
|
|
187104
|
+
isOptionEqualToValue: (option2, value) => option2.id === value.id,
|
|
187105
|
+
onChange: (_event, newValue) => {
|
|
187106
|
+
setSelectedAgentForForm(newValue);
|
|
187107
|
+
setFormData((prev2) => ({
|
|
187108
|
+
...prev2,
|
|
187109
|
+
selectedAgentId: newValue ? newValue.id : null
|
|
187110
|
+
}));
|
|
187111
|
+
},
|
|
187112
|
+
onInputChange: (_event, newInputValue) => {
|
|
187113
|
+
const timer = setTimeout(() => {
|
|
187114
|
+
setAgentSearchQuery(newInputValue);
|
|
187115
|
+
}, 300);
|
|
187116
|
+
return () => clearTimeout(timer);
|
|
187117
|
+
},
|
|
187118
|
+
loading: isLoadingAgents,
|
|
187119
|
+
disabled: isSubmitting || isEditMode,
|
|
187120
|
+
renderInput: (params) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187121
|
+
TextField,
|
|
187122
|
+
{
|
|
187123
|
+
...params,
|
|
187124
|
+
placeholder: "Search or select an agent...",
|
|
187125
|
+
error: isAgentsError || !isEditMode && !formData.selectedAgentId && isSubmitting,
|
|
187126
|
+
InputProps: {
|
|
187127
|
+
...params.InputProps,
|
|
187128
|
+
endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
187129
|
+
isLoadingAgents ? /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { color: "inherit", size: 20 }) : null,
|
|
187130
|
+
params.InputProps.endAdornment
|
|
187131
|
+
] })
|
|
187132
|
+
}
|
|
187133
|
+
}
|
|
187134
|
+
),
|
|
187135
|
+
renderOption: (props2, option2) => /* @__PURE__ */ reactExports.createElement(
|
|
187136
|
+
Box,
|
|
187137
|
+
{
|
|
187138
|
+
component: "li",
|
|
187139
|
+
...props2,
|
|
187140
|
+
key: option2.id,
|
|
187141
|
+
sx: (theme2) => ({
|
|
187142
|
+
display: "flex",
|
|
187143
|
+
justifyContent: "left",
|
|
187144
|
+
alignItems: "flex-start",
|
|
187145
|
+
"&:hover": {
|
|
187146
|
+
backgroundColor: alpha$1(theme2.palette.action.hover, 0.08)
|
|
187147
|
+
},
|
|
187148
|
+
'&[aria-selected="true"]': {
|
|
187149
|
+
backgroundColor: alpha$1(theme2.palette.primary.main, 0.12)
|
|
187150
|
+
}
|
|
187151
|
+
})
|
|
187152
|
+
},
|
|
187153
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187154
|
+
Typography,
|
|
187155
|
+
{
|
|
187156
|
+
variant: "body2",
|
|
187157
|
+
component: "span",
|
|
187158
|
+
sx: { fontWeight: 500 },
|
|
187159
|
+
children: option2.name || "Unnamed Agent"
|
|
187160
|
+
}
|
|
187161
|
+
)
|
|
187162
|
+
)
|
|
187163
|
+
}
|
|
187164
|
+
),
|
|
187165
|
+
(isAgentsError || !isEditMode && !formData.selectedAgentId && isSubmitting) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187166
|
+
StyledFormHelperText,
|
|
187167
|
+
{
|
|
187168
|
+
error: !!isAgentsError || !isEditMode && !formData.selectedAgentId && !!isSubmitting,
|
|
187169
|
+
children: isAgentsError ? "Failed to load agents." : "Agent selection is required."
|
|
187170
|
+
}
|
|
187171
|
+
)
|
|
187172
|
+
] }),
|
|
187173
|
+
isEditMode && initialData && /* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { variant: "body2", color: "text.secondary", sx: { mt: 1 }, children: [
|
|
187174
|
+
"Editing schedule for Agent:",
|
|
187175
|
+
" ",
|
|
187176
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { component: "span", sx: { fontWeight: 500 }, children: selectedAgentForForm?.name || `${initialData.agent_id.substring(0, 8)}...` }),
|
|
187177
|
+
" ",
|
|
187178
|
+
"(Agent cannot be changed)"
|
|
187179
|
+
] }) }),
|
|
187180
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
187181
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { htmlFor: "prompt", children: [
|
|
187182
|
+
"Prompt",
|
|
187183
|
+
" ",
|
|
187184
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { component: "span", color: "error.main", sx: { ml: 0.5 }, children: "*" }),
|
|
187185
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187186
|
+
Tooltip$1,
|
|
187187
|
+
{
|
|
187188
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
187189
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "caption", display: "block", gutterBottom: true, children: "This is the message that will be sent to the agent on the schedule." }),
|
|
187190
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "caption", display: "block", children: 'Example: "Send me an email with a detailed world news breakdown with key events"' })
|
|
187191
|
+
] }),
|
|
187192
|
+
placement: "top-start",
|
|
187193
|
+
arrow: true,
|
|
187194
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { size: "small", sx: { color: "info.main" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Info$1, { size: 14 }) })
|
|
187195
|
+
}
|
|
187196
|
+
)
|
|
187197
|
+
] }),
|
|
187198
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187199
|
+
FullWidthTextField,
|
|
187200
|
+
{
|
|
187201
|
+
id: "prompt",
|
|
187202
|
+
name: "prompt",
|
|
187203
|
+
value: formData.prompt,
|
|
187204
|
+
onChange: handleChange,
|
|
187205
|
+
required: true,
|
|
187206
|
+
multiline: true,
|
|
187207
|
+
rows: 3,
|
|
187208
|
+
disabled: isSubmitting,
|
|
187209
|
+
placeholder: "e.g., Send me an email with a detailed world news breakdown..."
|
|
187210
|
+
}
|
|
187211
|
+
)
|
|
187212
|
+
] }) }),
|
|
187213
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 6, children: [
|
|
187214
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { htmlFor: "interval", children: [
|
|
187215
|
+
"Interval",
|
|
187216
|
+
" ",
|
|
187217
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { component: "span", color: "error.main", sx: { ml: 0.5 }, children: "*" })
|
|
187218
|
+
] }),
|
|
187219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187220
|
+
FullWidthTextField,
|
|
187221
|
+
{
|
|
187222
|
+
id: "interval",
|
|
187223
|
+
name: "interval",
|
|
187224
|
+
type: "number",
|
|
187225
|
+
value: formData.interval === null ? "" : formData.interval,
|
|
187226
|
+
onChange: handleChange,
|
|
187227
|
+
required: true,
|
|
187228
|
+
disabled: isSubmitting,
|
|
187229
|
+
InputProps: { inputProps: { min: 1 } },
|
|
187230
|
+
placeholder: "e.g., 1"
|
|
187231
|
+
}
|
|
187232
|
+
)
|
|
187233
|
+
] }),
|
|
187234
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 6, children: [
|
|
187235
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldLabel, { htmlFor: "unit-select", children: [
|
|
187236
|
+
"Unit",
|
|
187237
|
+
" ",
|
|
187238
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { component: "span", color: "error.main", sx: { ml: 0.5 }, children: "*" })
|
|
187239
|
+
] }),
|
|
187240
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187241
|
+
FullWidthFormControl,
|
|
187242
|
+
{
|
|
187243
|
+
required: true,
|
|
187244
|
+
disabled: isSubmitting,
|
|
187245
|
+
id: "unit-select-formcontrol",
|
|
187246
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
187247
|
+
Select,
|
|
187248
|
+
{
|
|
187249
|
+
id: "unit-select",
|
|
187250
|
+
name: "unit",
|
|
187251
|
+
value: formData.unit || "hours",
|
|
187252
|
+
onChange: handleChange,
|
|
187253
|
+
displayEmpty: true,
|
|
187254
|
+
children: [
|
|
187255
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StyledMenuItem, { value: "minutes", children: "Minutes" }),
|
|
187256
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StyledMenuItem, { value: "hours", children: "Hours" }),
|
|
187257
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StyledMenuItem, { value: "days", children: "Days" })
|
|
187258
|
+
]
|
|
187259
|
+
}
|
|
187260
|
+
)
|
|
187261
|
+
}
|
|
187262
|
+
)
|
|
187263
|
+
] }),
|
|
187264
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 12, sm: 6, children: [
|
|
187265
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "start_time_utc", children: "Start Time (UTC, Optional)" }),
|
|
187266
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187267
|
+
FullWidthTextField,
|
|
187268
|
+
{
|
|
187269
|
+
id: "start_time_utc",
|
|
187270
|
+
name: "start_time_utc",
|
|
187271
|
+
type: "datetime-local",
|
|
187272
|
+
value: formData.start_time_utc ? formData.start_time_utc.slice(0, 16) : "",
|
|
187273
|
+
onChange: handleDateTimeChange,
|
|
187274
|
+
disabled: isSubmitting
|
|
187275
|
+
}
|
|
187276
|
+
),
|
|
187277
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StyledFormHelperText, { children: "If not set, starts immediately or on next interval." })
|
|
187278
|
+
] }),
|
|
187279
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { item: true, xs: 12, sm: 6, children: [
|
|
187280
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel, { htmlFor: "end_time_utc", children: "End Time (UTC, Optional)" }),
|
|
187281
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187282
|
+
FullWidthTextField,
|
|
187283
|
+
{
|
|
187284
|
+
id: "end_time_utc",
|
|
187285
|
+
name: "end_time_utc",
|
|
187286
|
+
type: "datetime-local",
|
|
187287
|
+
value: formData.end_time_utc ? formData.end_time_utc.slice(0, 16) : "",
|
|
187288
|
+
onChange: handleDateTimeChange,
|
|
187289
|
+
disabled: isSubmitting
|
|
187290
|
+
}
|
|
187291
|
+
),
|
|
187292
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(StyledFormHelperText, { children: "If not set, schedule runs indefinitely." })
|
|
187293
|
+
] }),
|
|
187294
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center", mt: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187295
|
+
StyledFormControlLabel,
|
|
187296
|
+
{
|
|
187297
|
+
control: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187298
|
+
StyledSwitch,
|
|
187299
|
+
{
|
|
187300
|
+
checked: formData.is_active || false,
|
|
187301
|
+
onChange: handleSwitchChange,
|
|
187302
|
+
name: "is_active",
|
|
187303
|
+
disabled: isSubmitting
|
|
187304
|
+
}
|
|
187305
|
+
),
|
|
187306
|
+
label: "Active"
|
|
187307
|
+
}
|
|
187308
|
+
) }),
|
|
187309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, xs: 6, sx: { display: "flex", alignItems: "center", mt: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187310
|
+
StyledFormControlLabel,
|
|
187311
|
+
{
|
|
187312
|
+
control: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187313
|
+
StyledSwitch,
|
|
187314
|
+
{
|
|
187315
|
+
checked: formData.one_time || false,
|
|
187316
|
+
onChange: handleSwitchChange,
|
|
187317
|
+
name: "one_time",
|
|
187318
|
+
disabled: isSubmitting
|
|
187319
|
+
}
|
|
187320
|
+
),
|
|
187321
|
+
label: "One-time"
|
|
187322
|
+
}
|
|
187323
|
+
) })
|
|
187324
|
+
] })
|
|
187325
|
+
}
|
|
187326
|
+
);
|
|
187327
|
+
};
|
|
187328
|
+
const formatTime = (date2) => {
|
|
187329
|
+
return date2.toLocaleTimeString(navigator.language, {
|
|
187330
|
+
hour: "numeric",
|
|
187331
|
+
minute: "2-digit"
|
|
187332
|
+
});
|
|
187333
|
+
};
|
|
187334
|
+
const formatDate = (date2, includeYear) => {
|
|
187335
|
+
const options = {
|
|
187336
|
+
weekday: "long",
|
|
187337
|
+
month: "long",
|
|
187338
|
+
day: "numeric"
|
|
187339
|
+
};
|
|
187340
|
+
if (includeYear) {
|
|
187341
|
+
options.year = "numeric";
|
|
187342
|
+
}
|
|
187343
|
+
return date2.toLocaleDateString(navigator.language, options);
|
|
187344
|
+
};
|
|
187345
|
+
const createScheduleDisplayString = (schedule) => {
|
|
187346
|
+
let intervalString;
|
|
187347
|
+
if (schedule.interval === 1) {
|
|
187348
|
+
intervalString = `Every ${schedule.unit.slice(0, -1)}`;
|
|
187349
|
+
} else {
|
|
187350
|
+
intervalString = `Every ${schedule.interval} ${schedule.unit}`;
|
|
187351
|
+
}
|
|
187352
|
+
let displayString = intervalString;
|
|
187353
|
+
const now = /* @__PURE__ */ new Date();
|
|
187354
|
+
const currentYear = now.getFullYear();
|
|
187355
|
+
if (schedule.start_time_utc) {
|
|
187356
|
+
const startTime = new Date(schedule.start_time_utc);
|
|
187357
|
+
displayString += ` @ ${formatTime(startTime)}`;
|
|
187358
|
+
if (schedule.one_time) {
|
|
187359
|
+
const startYear = startTime.getFullYear();
|
|
187360
|
+
displayString += ` on ${formatDate(startTime, startYear !== currentYear)}`;
|
|
187361
|
+
}
|
|
187362
|
+
}
|
|
187363
|
+
if (schedule.end_time_utc) {
|
|
187364
|
+
const endTime = new Date(schedule.end_time_utc);
|
|
187365
|
+
if (schedule.start_time_utc) {
|
|
187366
|
+
displayString += ` to ${formatTime(endTime)}`;
|
|
187367
|
+
if (schedule.one_time) {
|
|
187368
|
+
const startTime = schedule.start_time_utc ? new Date(schedule.start_time_utc) : null;
|
|
187369
|
+
if (!startTime || startTime.toDateString() !== endTime.toDateString()) {
|
|
187370
|
+
const endYear = endTime.getFullYear();
|
|
187371
|
+
displayString += ` on ${formatDate(endTime, endYear !== currentYear)}`;
|
|
187372
|
+
}
|
|
187373
|
+
}
|
|
187374
|
+
} else {
|
|
187375
|
+
displayString += ` ending @ ${formatTime(endTime)}`;
|
|
187376
|
+
if (schedule.one_time) {
|
|
187377
|
+
const endYear = endTime.getFullYear();
|
|
187378
|
+
displayString += ` on ${formatDate(endTime, endYear !== currentYear)}`;
|
|
187379
|
+
}
|
|
187380
|
+
}
|
|
187381
|
+
}
|
|
187382
|
+
if (schedule.one_time && !schedule.start_time_utc && !schedule.end_time_utc) {
|
|
187383
|
+
displayString += " (One-time)";
|
|
187384
|
+
}
|
|
187385
|
+
return displayString;
|
|
187386
|
+
};
|
|
187387
|
+
const ListItemPaper = styled$1(Paper)(({ theme: theme2 }) => ({
|
|
187388
|
+
padding: theme2.spacing(2),
|
|
187389
|
+
marginBottom: theme2.spacing(2),
|
|
187390
|
+
display: "grid",
|
|
187391
|
+
gridTemplateAreas: `
|
|
187392
|
+
"prompt prompt actions"
|
|
187393
|
+
"info info info"
|
|
187394
|
+
"footer footer footer"
|
|
187395
|
+
`,
|
|
187396
|
+
gridTemplateColumns: "1fr auto auto",
|
|
187397
|
+
gap: theme2.spacing(1),
|
|
187398
|
+
backgroundImage: "none",
|
|
187399
|
+
border: `1px solid ${alpha$1(theme2.palette.divider, 0.1)}`,
|
|
187400
|
+
borderRadius: theme2.shape.borderRadius,
|
|
187401
|
+
transition: "border-color 0.2s ease",
|
|
187402
|
+
"&:hover": {
|
|
187403
|
+
borderColor: alpha$1(theme2.palette.divider, 0.4)
|
|
187404
|
+
}
|
|
187405
|
+
}));
|
|
187406
|
+
const PromptSection = styled$1(Box)({
|
|
187407
|
+
gridArea: "prompt",
|
|
187408
|
+
wordBreak: "break-word"
|
|
187409
|
+
});
|
|
187410
|
+
const InfoSection = styled$1(Box)(({ theme: theme2 }) => ({
|
|
187411
|
+
gridArea: "info",
|
|
187412
|
+
display: "flex",
|
|
187413
|
+
flexDirection: "column",
|
|
187414
|
+
gap: theme2.spacing(0.5)
|
|
187415
|
+
}));
|
|
187416
|
+
const ActionsSection = styled$1(Box)(({ theme: theme2 }) => ({
|
|
187417
|
+
gridArea: "actions",
|
|
187418
|
+
display: "flex",
|
|
187419
|
+
gap: theme2.spacing(1),
|
|
187420
|
+
alignSelf: "start"
|
|
187421
|
+
}));
|
|
187422
|
+
const FooterSection = styled$1(Box)({
|
|
187423
|
+
gridArea: "footer",
|
|
187424
|
+
display: "flex",
|
|
187425
|
+
justifyContent: "flex-end",
|
|
187426
|
+
alignItems: "center"
|
|
187427
|
+
});
|
|
187428
|
+
const useAgentName = (agentId) => {
|
|
187429
|
+
const baseUrl = apiConfig.baseUrl;
|
|
187430
|
+
return useQuery({
|
|
187431
|
+
queryKey: ["agent-name", agentId, baseUrl],
|
|
187432
|
+
queryFn: async () => {
|
|
187433
|
+
if (!baseUrl) {
|
|
187434
|
+
console.warn("Base URL for Local Operator API is not configured.");
|
|
187435
|
+
return "Agent ID";
|
|
187436
|
+
}
|
|
187437
|
+
const response = await AgentsApi.getAgent(baseUrl, agentId);
|
|
187438
|
+
return response.result?.name || "Unknown Agent";
|
|
187439
|
+
},
|
|
187440
|
+
enabled: !!agentId && !!baseUrl,
|
|
187441
|
+
staleTime: 1e3 * 60 * 5
|
|
187442
|
+
});
|
|
187443
|
+
};
|
|
187444
|
+
const ScheduleListItem = ({
|
|
187445
|
+
schedule,
|
|
187446
|
+
onEdit,
|
|
187447
|
+
onDelete
|
|
187448
|
+
}) => {
|
|
187449
|
+
const { data: agentName, isLoading: isLoadingAgentName } = useAgentName(
|
|
187450
|
+
schedule.agent_id
|
|
187451
|
+
);
|
|
187452
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemPaper, { elevation: 0, children: [
|
|
187453
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(PromptSection, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187454
|
+
Typography,
|
|
187455
|
+
{
|
|
187456
|
+
variant: "body2",
|
|
187457
|
+
color: "text.secondary",
|
|
187458
|
+
fontSize: "0.875rem",
|
|
187459
|
+
sx: { mt: 0.5 },
|
|
187460
|
+
children: schedule.prompt
|
|
187461
|
+
}
|
|
187462
|
+
) }),
|
|
187463
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ActionsSection, { children: [
|
|
187464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187465
|
+
IconButton,
|
|
187466
|
+
{
|
|
187467
|
+
onClick: () => onEdit(schedule),
|
|
187468
|
+
size: "small",
|
|
187469
|
+
title: "Edit Schedule",
|
|
187470
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(SquarePen, { size: 20 })
|
|
187471
|
+
}
|
|
187472
|
+
),
|
|
187473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187474
|
+
IconButton,
|
|
187475
|
+
{
|
|
187476
|
+
onClick: () => onDelete(schedule.id),
|
|
187477
|
+
size: "small",
|
|
187478
|
+
title: "Delete Schedule",
|
|
187479
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { size: 20 })
|
|
187480
|
+
}
|
|
187481
|
+
)
|
|
187482
|
+
] }),
|
|
187483
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(InfoSection, { children: [
|
|
187484
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Box, { sx: { display: "flex", alignItems: "center", minHeight: 28 }, children: isLoadingAgentName ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187485
|
+
Skeleton,
|
|
187486
|
+
{
|
|
187487
|
+
width: 80,
|
|
187488
|
+
height: 28,
|
|
187489
|
+
variant: "rectangular",
|
|
187490
|
+
sx: { borderRadius: 1 }
|
|
187491
|
+
}
|
|
187492
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187493
|
+
Chip,
|
|
187494
|
+
{
|
|
187495
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(User, { size: 12, style: { marginLeft: 2 } }),
|
|
187496
|
+
label: agentName || schedule.agent_id.substring(0, 8),
|
|
187497
|
+
variant: "outlined",
|
|
187498
|
+
color: "primary",
|
|
187499
|
+
size: "small",
|
|
187500
|
+
sx: {
|
|
187501
|
+
fontSize: "0.75rem",
|
|
187502
|
+
height: 24,
|
|
187503
|
+
maxWidth: 180,
|
|
187504
|
+
overflow: "hidden",
|
|
187505
|
+
textOverflow: "ellipsis",
|
|
187506
|
+
pl: 1,
|
|
187507
|
+
pr: 0.5
|
|
187508
|
+
},
|
|
187509
|
+
"aria-label": "Agent Name"
|
|
187510
|
+
}
|
|
187511
|
+
) }),
|
|
187512
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "caption", color: "text.secondary", children: createScheduleDisplayString(schedule) }),
|
|
187513
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
187514
|
+
Typography,
|
|
187515
|
+
{
|
|
187516
|
+
variant: "caption",
|
|
187517
|
+
display: "block",
|
|
187518
|
+
color: schedule.is_active ? "success.main" : "error.main",
|
|
187519
|
+
children: [
|
|
187520
|
+
"Status: ",
|
|
187521
|
+
schedule.is_active ? "Active" : "Inactive"
|
|
187522
|
+
]
|
|
187523
|
+
}
|
|
187524
|
+
)
|
|
187525
|
+
] }),
|
|
187526
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FooterSection, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
187527
|
+
Typography,
|
|
187528
|
+
{
|
|
187529
|
+
variant: "caption",
|
|
187530
|
+
color: "text.secondary",
|
|
187531
|
+
fontSize: "0.75rem",
|
|
187532
|
+
sx: { opacity: 0.6 },
|
|
187533
|
+
children: [
|
|
187534
|
+
"ID: ",
|
|
187535
|
+
schedule.id
|
|
187536
|
+
]
|
|
187537
|
+
}
|
|
187538
|
+
) })
|
|
187539
|
+
] });
|
|
187540
|
+
};
|
|
187541
|
+
const SchedulesContainer = styled$1(Paper)(({ theme: theme2 }) => ({
|
|
187542
|
+
padding: theme2.spacing(3),
|
|
187543
|
+
marginTop: theme2.spacing(2),
|
|
187544
|
+
backgroundImage: "none",
|
|
187545
|
+
border: `1px solid ${theme2.palette.divider}`,
|
|
187546
|
+
borderRadius: theme2.shape.borderRadius * 2
|
|
187547
|
+
}));
|
|
187548
|
+
const NoSchedulesMessage = styled$1(Typography)(({ theme: theme2 }) => ({
|
|
187549
|
+
textAlign: "center",
|
|
187550
|
+
color: theme2.palette.text.secondary,
|
|
187551
|
+
padding: theme2.spacing(4, 0)
|
|
187552
|
+
}));
|
|
187553
|
+
const SchedulesPage = () => {
|
|
187554
|
+
const theme2 = useTheme$1();
|
|
187555
|
+
const [isFormOpen, setIsFormOpen] = reactExports.useState(false);
|
|
187556
|
+
const [editingSchedule, setEditingSchedule] = reactExports.useState(null);
|
|
187557
|
+
const {
|
|
187558
|
+
data: schedulesResponse,
|
|
187559
|
+
isLoading,
|
|
187560
|
+
error,
|
|
187561
|
+
refetch: refetchSchedules
|
|
187562
|
+
} = useListAllSchedules();
|
|
187563
|
+
const createScheduleMutation = useCreateScheduleForAgent();
|
|
187564
|
+
const editScheduleMutation = useEditSchedule();
|
|
187565
|
+
const removeScheduleMutation = useRemoveSchedule();
|
|
187566
|
+
const handleOpenForm = (schedule) => {
|
|
187567
|
+
setEditingSchedule(schedule || null);
|
|
187568
|
+
setIsFormOpen(true);
|
|
187569
|
+
};
|
|
187570
|
+
const handleCloseForm = () => {
|
|
187571
|
+
setIsFormOpen(false);
|
|
187572
|
+
setEditingSchedule(null);
|
|
187573
|
+
};
|
|
187574
|
+
const handleSubmitForm = async (data2, agentId) => {
|
|
187575
|
+
try {
|
|
187576
|
+
if (editingSchedule) {
|
|
187577
|
+
await editScheduleMutation.mutateAsync({
|
|
187578
|
+
scheduleId: editingSchedule.id,
|
|
187579
|
+
scheduleData: data2
|
|
187580
|
+
});
|
|
187581
|
+
y$2.success("Schedule updated successfully!");
|
|
187582
|
+
} else {
|
|
187583
|
+
await createScheduleMutation.mutateAsync({
|
|
187584
|
+
agentId,
|
|
187585
|
+
// Use the agentId selected in the form
|
|
187586
|
+
scheduleData: data2
|
|
187587
|
+
});
|
|
187588
|
+
y$2.success("Schedule created successfully!");
|
|
187589
|
+
}
|
|
187590
|
+
refetchSchedules();
|
|
187591
|
+
} catch (err) {
|
|
187592
|
+
console.error("Failed to save schedule:", err);
|
|
187593
|
+
y$2.error(
|
|
187594
|
+
`Failed to save schedule: ${err instanceof Error ? err.message : "Unknown error"}`
|
|
187595
|
+
);
|
|
187596
|
+
}
|
|
187597
|
+
};
|
|
187598
|
+
const handleDeleteSchedule = async (scheduleId) => {
|
|
187599
|
+
const scheduleToDelete = schedulesResponse?.result?.schedules.find(
|
|
187600
|
+
(s2) => s2.id === scheduleId
|
|
187601
|
+
);
|
|
187602
|
+
try {
|
|
187603
|
+
await removeScheduleMutation.mutateAsync({
|
|
187604
|
+
scheduleId,
|
|
187605
|
+
agentId: scheduleToDelete?.agent_id
|
|
187606
|
+
});
|
|
187607
|
+
y$2.success("Schedule removed successfully!");
|
|
187608
|
+
refetchSchedules();
|
|
187609
|
+
} catch (err) {
|
|
187610
|
+
console.error("Failed to delete schedule:", err);
|
|
187611
|
+
y$2.error(
|
|
187612
|
+
`Failed to remove schedule: ${err instanceof Error ? err.message : "Unknown error"}`
|
|
187613
|
+
);
|
|
187614
|
+
}
|
|
187615
|
+
};
|
|
187616
|
+
const handleToggleActive = async (schedule) => {
|
|
187617
|
+
try {
|
|
187618
|
+
await editScheduleMutation.mutateAsync({
|
|
187619
|
+
scheduleId: schedule.id,
|
|
187620
|
+
scheduleData: { is_active: !schedule.is_active }
|
|
187621
|
+
});
|
|
187622
|
+
y$2.success(
|
|
187623
|
+
`Schedule ${schedule.is_active ? "deactivated" : "activated"} successfully!`
|
|
187624
|
+
);
|
|
187625
|
+
refetchSchedules();
|
|
187626
|
+
} catch (err) {
|
|
187627
|
+
console.error("Failed to toggle schedule active state:", err);
|
|
187628
|
+
y$2.error(
|
|
187629
|
+
`Failed to toggle schedule: ${err instanceof Error ? err.message : "Unknown error"}`
|
|
187630
|
+
);
|
|
187631
|
+
}
|
|
187632
|
+
};
|
|
187633
|
+
const schedules = schedulesResponse?.result?.schedules || [];
|
|
187634
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
187635
|
+
Box,
|
|
187636
|
+
{
|
|
187637
|
+
sx: { p: 3, height: "100%", display: "flex", flexDirection: "column" },
|
|
187638
|
+
children: [
|
|
187639
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187640
|
+
PageHeader,
|
|
187641
|
+
{
|
|
187642
|
+
title: "Schedules",
|
|
187643
|
+
icon: CalendarDays,
|
|
187644
|
+
subtitle: "View and manage scheduled tasks for your AI team.",
|
|
187645
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187646
|
+
Button,
|
|
187647
|
+
{
|
|
187648
|
+
variant: "outlined",
|
|
187649
|
+
color: "primary",
|
|
187650
|
+
startIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(CirclePlus, { size: 18 }),
|
|
187651
|
+
onClick: () => handleOpenForm(),
|
|
187652
|
+
sx: {
|
|
187653
|
+
textTransform: "none",
|
|
187654
|
+
fontSize: "0.8125rem",
|
|
187655
|
+
padding: theme2.spacing(0.75, 1.75),
|
|
187656
|
+
borderRadius: theme2.shape.borderRadius * 0.75,
|
|
187657
|
+
fontWeight: 500,
|
|
187658
|
+
"&:hover": {
|
|
187659
|
+
backgroundColor: theme2.palette.primary.dark
|
|
187660
|
+
}
|
|
187661
|
+
},
|
|
187662
|
+
children: "Create Schedule"
|
|
187663
|
+
}
|
|
187664
|
+
)
|
|
187665
|
+
}
|
|
187666
|
+
),
|
|
187667
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(SchedulesContainer, { elevation: 0, sx: { flexGrow: 1, overflowY: "auto" }, children: [
|
|
187668
|
+
isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { sx: { display: "block", margin: "auto", mt: 4 } }),
|
|
187669
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsxs(Alert, { severity: "error", sx: { mt: 2 }, children: [
|
|
187670
|
+
"Error fetching schedules: ",
|
|
187671
|
+
error.message
|
|
187672
|
+
] }),
|
|
187673
|
+
!isLoading && !error && schedules.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(NoSchedulesMessage, { children: "No schedules found. Simply ask an agent to do a daily/weekly task for you, or to handle something in the future and that task will appear here." }),
|
|
187674
|
+
!isLoading && !error && schedules.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { sx: { mt: 2 }, children: schedules.map((schedule) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187675
|
+
ScheduleListItem,
|
|
187676
|
+
{
|
|
187677
|
+
schedule,
|
|
187678
|
+
onEdit: () => handleOpenForm(schedule),
|
|
187679
|
+
onDelete: handleDeleteSchedule,
|
|
187680
|
+
onToggleActive: handleToggleActive
|
|
187681
|
+
},
|
|
187682
|
+
schedule.id
|
|
187683
|
+
)) })
|
|
187684
|
+
] }),
|
|
187685
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
187686
|
+
ScheduleFormDialog,
|
|
187687
|
+
{
|
|
187688
|
+
open: isFormOpen,
|
|
187689
|
+
onClose: handleCloseForm,
|
|
187690
|
+
onSubmit: handleSubmitForm,
|
|
187691
|
+
initialData: editingSchedule
|
|
187692
|
+
}
|
|
187693
|
+
)
|
|
187694
|
+
]
|
|
187695
|
+
}
|
|
187696
|
+
);
|
|
187697
|
+
};
|
|
186406
187698
|
const SectionTitle = ({
|
|
186407
187699
|
title,
|
|
186408
187700
|
icon,
|
|
@@ -212619,6 +213911,12 @@ const SidebarNavigation = () => {
|
|
|
212619
213911
|
path: "/agent-hub",
|
|
212620
213912
|
isActive: currentView === "agent-hub"
|
|
212621
213913
|
},
|
|
213914
|
+
{
|
|
213915
|
+
icon: CalendarDays,
|
|
213916
|
+
label: "Schedules",
|
|
213917
|
+
path: "/schedules",
|
|
213918
|
+
isActive: currentView === "schedules"
|
|
213919
|
+
},
|
|
212622
213920
|
{
|
|
212623
213921
|
icon: Settings$1,
|
|
212624
213922
|
label: "Settings",
|
|
@@ -212732,6 +214030,7 @@ const App = () => {
|
|
|
212732
214030
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/settings", element: /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsPage, {}) }),
|
|
212733
214031
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/agent-hub", element: /* @__PURE__ */ jsxRuntimeExports.jsx(AgentHubPage, {}) }),
|
|
212734
214032
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/agent-hub/:agentId", element: /* @__PURE__ */ jsxRuntimeExports.jsx(AgentDetailsPage, {}) }),
|
|
214033
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "/schedules", element: /* @__PURE__ */ jsxRuntimeExports.jsx(SchedulesPage, {}) }),
|
|
212735
214034
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Route, { path: "*", element: /* @__PURE__ */ jsxRuntimeExports.jsx(Navigate, { to: "/chat", replace: true }) })
|
|
212736
214035
|
] }) })
|
|
212737
214036
|
] });
|