local-operator-ui 0.4.2 → 0.4.4
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/README.md +1 -1
- package/out/main/index.jsc +0 -0
- package/out/preload/index.jsc +0 -0
- package/out/renderer/assets/{error-boundary-HK_94N6W.js → error-boundary-BSN19Qr4.js} +207 -147
- package/out/renderer/assets/{index-DHvoVezG.js → index-ChdP-bmN.js} +538 -271
- package/out/renderer/assets/{installer-XvyKuNSZ.js → installer-BKPh1hoG.js} +1 -1
- package/out/renderer/index.html +2 -2
- package/out/renderer/installer.html +2 -2
- package/package.json +24 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createStyled, r as resolveProps, u as useTheme, a as reactExports, b as clsx, d as useForkRef, j as jsxRuntimeExports, e as capitalize, f as composeClasses, g as createTheme, h as generateUtilityClass, i as getDefaultExportFromCjs, k as requireReactDom, R as React, l as generateUtilityClasses, m as useDefaultProps, s as styled$1, n as memoTheme, _ as _inheritsLoose, o as _objectWithoutPropertiesLoose
|
|
1
|
+
import { c as createStyled, r as resolveProps, u as useTheme, a as reactExports, b as clsx, d as useForkRef, j as jsxRuntimeExports, e as capitalize, f as composeClasses, g as createTheme, h as generateUtilityClass, i as getDefaultExportFromCjs, k as requireReactDom, R as React, l as generateUtilityClasses, m as useDefaultProps, s as styled$1, n as memoTheme, _ as _inheritsLoose, o as _objectWithoutPropertiesLoose, p as React$1, T as TransitionGroupContext, q as duration, t as useTheme$1, v as useTimeout, w as useId, B as ButtonBase, x as alpha, y as createSimplePaletteValueFilter, C as CircularProgress, P as Paper, z as darken, A as lighten, D as useEventCallback, E as useEnhancedEffect, F as useRtl, G as globalCss, H as formatMuiErrorMessage, I as rootShouldForwardProp, J as Typography, K as deepmerge, L as extendSxProp, M as resolveBreakpointValues, N as handleBreakpoints, O as getPath, Q as isFocusVisible, S as typographyClasses, U as slotShouldForwardProp, V as clamp, W as emphasize, X as Timeout, Y as requireReact, Z as LinearProgress, $ as Button, a0 as Box, a1 as FontAwesomeIcon, a2 as faRobot, a3 as faSliders, a4 as faExclamationTriangle, a5 as faCheck, a6 as faTimes, a7 as faEraser, a8 as faPen, a9 as faInfoCircle, aa as faGear, ab as faServer, ac as faStar, ad as faTrash, ae as faHome, af as faDownload, ag as faFileAlt, ah as faDesktop, ai as faImage, aj as faMusic, ak as faVideo, al as faLaptop, am as faUsers, an as faDatabase, ao as faBoxOpen, ap as faBook, aq as faHdd, ar as faBox, as as faArchive, at as faNetworkWired, au as faFolder, av as faFolderOpen, aw as faClock, ax as faChevronDown, ay as faTools, az as faArrowDown, aA as faPaperclip, aB as faStop, aC as faPaperPlane, aD as _extends$2, aE as keyframes, aF as faChevronUp, aG as faQuestion, aH as faFile, aI as faLightbulb, aJ as faCode, aK as faCommentDots, aL as faEdit, aM as faPencilAlt, aN as faChevronRight, aO as faUser, aP as faCopy, aQ as isDevelopmentMode, aR as faEllipsisVertical, aS as faComment, aT as faFileExport, aU as faChevronLeft, aV as faFileImport, aW as faUpload, aX as faPlus, aY as faSearch, aZ as faCommentSlash, a_ as faArrowRight, a$ as faComments, b0 as faTag, b1 as faIdCard, b2 as faCalendarAlt, b3 as faCodeBranch, b4 as faShieldAlt, b5 as faArrowLeft, b6 as faShield, b7 as faSignOut, b8 as darkTheme, b9 as lightTheme, ba as draculaTheme, bb as sageTheme, bc as monokaiTheme, bd as tokyoNightTheme, be as duneTheme, bf as icebergTheme, bg as faMagicWandSparkles, bh as faBrain, bi as faWandMagicSparkles, bj as faExternalLinkAlt, bk as faKey, bl as faGlobe, bm as faLock, bn as faAdjust, bo as faSave, bp as faMoon, bq as faSun, br as faSkull, bs as faLeaf, bt as faMountain, bu as faFire, bv as faIcicles, bw as faEnvelope, bx as faCloudUploadAlt, by as faHistory, bz as faListAlt, bA as library$1, bB as icons$1, bC as CssBaseline, bD as ThemeProvider$1, bE as ReactDOM$1, bF as ErrorBoundary } from "./error-boundary-BSN19Qr4.js";
|
|
2
2
|
const styled = createStyled();
|
|
3
3
|
function getThemeProps(params) {
|
|
4
4
|
const {
|
|
@@ -68,6 +68,13 @@ function ownerWindow(node2) {
|
|
|
68
68
|
const doc = ownerDocument(node2);
|
|
69
69
|
return doc.defaultView || window;
|
|
70
70
|
}
|
|
71
|
+
function setRef(ref, value) {
|
|
72
|
+
if (typeof ref === "function") {
|
|
73
|
+
ref(value);
|
|
74
|
+
} else if (ref) {
|
|
75
|
+
ref.current = value;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
71
78
|
function useControlled({
|
|
72
79
|
controlled,
|
|
73
80
|
default: defaultProp,
|
|
@@ -480,7 +487,7 @@ function partialMatchKey(a, b2) {
|
|
|
480
487
|
return false;
|
|
481
488
|
}
|
|
482
489
|
if (a && b2 && typeof a === "object" && typeof b2 === "object") {
|
|
483
|
-
return
|
|
490
|
+
return Object.keys(b2).every((key) => partialMatchKey(a[key], b2[key]));
|
|
484
491
|
}
|
|
485
492
|
return false;
|
|
486
493
|
}
|
|
@@ -844,6 +851,7 @@ function createRetryer(config2) {
|
|
|
844
851
|
}
|
|
845
852
|
};
|
|
846
853
|
}
|
|
854
|
+
var defaultScheduler = (cb) => setTimeout(cb, 0);
|
|
847
855
|
function createNotifyManager() {
|
|
848
856
|
let queue = [];
|
|
849
857
|
let transactions = 0;
|
|
@@ -853,7 +861,7 @@ function createNotifyManager() {
|
|
|
853
861
|
let batchNotifyFn = (callback) => {
|
|
854
862
|
callback();
|
|
855
863
|
};
|
|
856
|
-
let scheduleFn =
|
|
864
|
+
let scheduleFn = defaultScheduler;
|
|
857
865
|
const schedule = (callback) => {
|
|
858
866
|
if (transactions) {
|
|
859
867
|
queue.push(callback);
|
|
@@ -1839,13 +1847,11 @@ function getPreviousPageParam(options, { pages, pageParams }) {
|
|
|
1839
1847
|
return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
|
|
1840
1848
|
}
|
|
1841
1849
|
function hasNextPage(options, data) {
|
|
1842
|
-
if (!data)
|
|
1843
|
-
return false;
|
|
1850
|
+
if (!data) return false;
|
|
1844
1851
|
return getNextPageParam(options, data) != null;
|
|
1845
1852
|
}
|
|
1846
1853
|
function hasPreviousPage(options, data) {
|
|
1847
|
-
if (!data || !options.getPreviousPageParam)
|
|
1848
|
-
return false;
|
|
1854
|
+
if (!data || !options.getPreviousPageParam) return false;
|
|
1849
1855
|
return getPreviousPageParam(options, data) != null;
|
|
1850
1856
|
}
|
|
1851
1857
|
var QueryClient = class {
|
|
@@ -1867,8 +1873,7 @@ var QueryClient = class {
|
|
|
1867
1873
|
}
|
|
1868
1874
|
mount() {
|
|
1869
1875
|
this.#mountCount++;
|
|
1870
|
-
if (this.#mountCount !== 1)
|
|
1871
|
-
return;
|
|
1876
|
+
if (this.#mountCount !== 1) return;
|
|
1872
1877
|
this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {
|
|
1873
1878
|
if (focused) {
|
|
1874
1879
|
await this.resumePausedMutations();
|
|
@@ -1884,8 +1889,7 @@ var QueryClient = class {
|
|
|
1884
1889
|
}
|
|
1885
1890
|
unmount() {
|
|
1886
1891
|
this.#mountCount--;
|
|
1887
|
-
if (this.#mountCount !== 0)
|
|
1888
|
-
return;
|
|
1892
|
+
if (this.#mountCount !== 0) return;
|
|
1889
1893
|
this.#unsubscribeFocus?.();
|
|
1890
1894
|
this.#unsubscribeFocus = void 0;
|
|
1891
1895
|
this.#unsubscribeOnline?.();
|
|
@@ -1897,6 +1901,13 @@ var QueryClient = class {
|
|
|
1897
1901
|
isMutating(filters) {
|
|
1898
1902
|
return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
|
|
1899
1903
|
}
|
|
1904
|
+
/**
|
|
1905
|
+
* Imperative (non-reactive) way to retrieve data for a QueryKey.
|
|
1906
|
+
* Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
|
|
1907
|
+
*
|
|
1908
|
+
* Hint: Do not use this function inside a component, because it won't receive updates.
|
|
1909
|
+
* Use `useQuery` to create a `QueryObserver` that subscribes to changes.
|
|
1910
|
+
*/
|
|
1900
1911
|
getQueryData(queryKey) {
|
|
1901
1912
|
const options = this.defaultQueryOptions({ queryKey });
|
|
1902
1913
|
return this.#queryCache.get(options.queryHash)?.state.data;
|
|
@@ -2199,7 +2210,7 @@ var QueryObserver = class extends Subscribable {
|
|
|
2199
2210
|
this.#clearRefetchInterval();
|
|
2200
2211
|
this.#currentQuery.removeObserver(this);
|
|
2201
2212
|
}
|
|
2202
|
-
setOptions(options
|
|
2213
|
+
setOptions(options) {
|
|
2203
2214
|
const prevOptions = this.options;
|
|
2204
2215
|
const prevQuery = this.#currentQuery;
|
|
2205
2216
|
this.options = this.#client.defaultQueryOptions(options);
|
|
@@ -2226,7 +2237,7 @@ var QueryObserver = class extends Subscribable {
|
|
|
2226
2237
|
)) {
|
|
2227
2238
|
this.#executeFetch();
|
|
2228
2239
|
}
|
|
2229
|
-
this.updateResult(
|
|
2240
|
+
this.updateResult();
|
|
2230
2241
|
if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {
|
|
2231
2242
|
this.#updateStaleTimeout();
|
|
2232
2243
|
}
|
|
@@ -2491,7 +2502,7 @@ var QueryObserver = class extends Subscribable {
|
|
|
2491
2502
|
}
|
|
2492
2503
|
return nextResult;
|
|
2493
2504
|
}
|
|
2494
|
-
updateResult(
|
|
2505
|
+
updateResult() {
|
|
2495
2506
|
const prevResult = this.#currentResult;
|
|
2496
2507
|
const nextResult = this.createResult(this.#currentQuery, this.options);
|
|
2497
2508
|
this.#currentResultState = this.#currentQuery.state;
|
|
@@ -2503,7 +2514,6 @@ var QueryObserver = class extends Subscribable {
|
|
|
2503
2514
|
return;
|
|
2504
2515
|
}
|
|
2505
2516
|
this.#currentResult = nextResult;
|
|
2506
|
-
const defaultNotifyOptions = {};
|
|
2507
2517
|
const shouldNotifyListeners = () => {
|
|
2508
2518
|
if (!prevResult) {
|
|
2509
2519
|
return true;
|
|
@@ -2525,10 +2535,7 @@ var QueryObserver = class extends Subscribable {
|
|
|
2525
2535
|
return changed && includedProps.has(typedKey);
|
|
2526
2536
|
});
|
|
2527
2537
|
};
|
|
2528
|
-
|
|
2529
|
-
defaultNotifyOptions.listeners = true;
|
|
2530
|
-
}
|
|
2531
|
-
this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
|
|
2538
|
+
this.#notify({ listeners: shouldNotifyListeners() });
|
|
2532
2539
|
}
|
|
2533
2540
|
#updateQuery() {
|
|
2534
2541
|
const query = this.#client.getQueryCache().build(this.#client, this.options);
|
|
@@ -2597,14 +2604,11 @@ var InfiniteQueryObserver = class extends QueryObserver {
|
|
|
2597
2604
|
this.fetchNextPage = this.fetchNextPage.bind(this);
|
|
2598
2605
|
this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
|
|
2599
2606
|
}
|
|
2600
|
-
setOptions(options
|
|
2601
|
-
super.setOptions(
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
},
|
|
2606
|
-
notifyOptions
|
|
2607
|
-
);
|
|
2607
|
+
setOptions(options) {
|
|
2608
|
+
super.setOptions({
|
|
2609
|
+
...options,
|
|
2610
|
+
behavior: infiniteQueryBehavior()
|
|
2611
|
+
});
|
|
2608
2612
|
}
|
|
2609
2613
|
getOptimisticResult(options) {
|
|
2610
2614
|
options.behavior = infiniteQueryBehavior();
|
|
@@ -2862,7 +2866,7 @@ function useBaseQuery(options, Observer, queryClient2) {
|
|
|
2862
2866
|
() => observer.getCurrentResult()
|
|
2863
2867
|
);
|
|
2864
2868
|
reactExports.useEffect(() => {
|
|
2865
|
-
observer.setOptions(defaultedOptions
|
|
2869
|
+
observer.setOptions(defaultedOptions);
|
|
2866
2870
|
}, [defaultedOptions, observer]);
|
|
2867
2871
|
if (shouldSuspend(defaultedOptions, result)) {
|
|
2868
2872
|
throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
|
|
@@ -2945,8 +2949,8 @@ const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(reactDomExports);
|
|
|
2945
2949
|
*
|
|
2946
2950
|
* @license MIT
|
|
2947
2951
|
*/
|
|
2948
|
-
function _extends$
|
|
2949
|
-
_extends$
|
|
2952
|
+
function _extends$1() {
|
|
2953
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
2950
2954
|
for (var i = 1; i < arguments.length; i++) {
|
|
2951
2955
|
var source = arguments[i];
|
|
2952
2956
|
for (var key in source) {
|
|
@@ -2957,7 +2961,7 @@ function _extends$2() {
|
|
|
2957
2961
|
}
|
|
2958
2962
|
return target;
|
|
2959
2963
|
};
|
|
2960
|
-
return _extends$
|
|
2964
|
+
return _extends$1.apply(this, arguments);
|
|
2961
2965
|
}
|
|
2962
2966
|
var Action;
|
|
2963
2967
|
(function(Action2) {
|
|
@@ -3034,7 +3038,7 @@ function createLocation(current, to, state, key) {
|
|
|
3034
3038
|
if (state === void 0) {
|
|
3035
3039
|
state = null;
|
|
3036
3040
|
}
|
|
3037
|
-
let location = _extends$
|
|
3041
|
+
let location = _extends$1({
|
|
3038
3042
|
pathname: typeof current === "string" ? current : current.pathname,
|
|
3039
3043
|
search: "",
|
|
3040
3044
|
hash: ""
|
|
@@ -3091,7 +3095,7 @@ function getUrlBasedHistory(getLocation, createHref, validateLocation, options)
|
|
|
3091
3095
|
let index2 = getIndex();
|
|
3092
3096
|
if (index2 == null) {
|
|
3093
3097
|
index2 = 0;
|
|
3094
|
-
globalHistory.replaceState(_extends$
|
|
3098
|
+
globalHistory.replaceState(_extends$1({}, globalHistory.state, {
|
|
3095
3099
|
idx: index2
|
|
3096
3100
|
}), "");
|
|
3097
3101
|
}
|
|
@@ -3501,7 +3505,7 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
|
|
|
3501
3505
|
if (typeof toArg === "string") {
|
|
3502
3506
|
to = parsePath(toArg);
|
|
3503
3507
|
} else {
|
|
3504
|
-
to = _extends$
|
|
3508
|
+
to = _extends$1({}, toArg);
|
|
3505
3509
|
invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
|
|
3506
3510
|
invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
|
|
3507
3511
|
invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
|
|
@@ -3552,8 +3556,8 @@ new Set(validRequestMethodsArr);
|
|
|
3552
3556
|
*
|
|
3553
3557
|
* @license MIT
|
|
3554
3558
|
*/
|
|
3555
|
-
function _extends
|
|
3556
|
-
_extends
|
|
3559
|
+
function _extends() {
|
|
3560
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
3557
3561
|
for (var i = 1; i < arguments.length; i++) {
|
|
3558
3562
|
var source = arguments[i];
|
|
3559
3563
|
for (var key in source) {
|
|
@@ -3564,7 +3568,7 @@ function _extends$1() {
|
|
|
3564
3568
|
}
|
|
3565
3569
|
return target;
|
|
3566
3570
|
};
|
|
3567
|
-
return _extends
|
|
3571
|
+
return _extends.apply(this, arguments);
|
|
3568
3572
|
}
|
|
3569
3573
|
const DataRouterContext = /* @__PURE__ */ reactExports.createContext(null);
|
|
3570
3574
|
const DataRouterStateContext = /* @__PURE__ */ reactExports.createContext(null);
|
|
@@ -3691,7 +3695,7 @@ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
|
|
|
3691
3695
|
if (locationArg && renderedMatches) {
|
|
3692
3696
|
return /* @__PURE__ */ reactExports.createElement(LocationContext.Provider, {
|
|
3693
3697
|
value: {
|
|
3694
|
-
location: _extends
|
|
3698
|
+
location: _extends({
|
|
3695
3699
|
pathname: "/",
|
|
3696
3700
|
search: "",
|
|
3697
3701
|
hash: "",
|
|
@@ -3958,7 +3962,7 @@ function useNavigateStable() {
|
|
|
3958
3962
|
if (typeof to === "number") {
|
|
3959
3963
|
router.navigate(to);
|
|
3960
3964
|
} else {
|
|
3961
|
-
router.navigate(to, _extends
|
|
3965
|
+
router.navigate(to, _extends({
|
|
3962
3966
|
fromRouteId: id
|
|
3963
3967
|
}, options));
|
|
3964
3968
|
}
|
|
@@ -4022,7 +4026,7 @@ function Router(_ref5) {
|
|
|
4022
4026
|
basename: basename2,
|
|
4023
4027
|
navigator: navigator2,
|
|
4024
4028
|
static: staticProp,
|
|
4025
|
-
future: _extends
|
|
4029
|
+
future: _extends({
|
|
4026
4030
|
v7_relativeSplatPath: false
|
|
4027
4031
|
}, future)
|
|
4028
4032
|
}), [basename2, future, navigator2, staticProp]);
|
|
@@ -4666,7 +4670,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
4666
4670
|
_this$props.onExiting;
|
|
4667
4671
|
_this$props.onExited;
|
|
4668
4672
|
_this$props.nodeRef;
|
|
4669
|
-
var childProps = _objectWithoutPropertiesLoose
|
|
4673
|
+
var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
4670
4674
|
return (
|
|
4671
4675
|
// allows for nested Transitions
|
|
4672
4676
|
/* @__PURE__ */ React$1.createElement(TransitionGroupContext.Provider, {
|
|
@@ -5630,7 +5634,7 @@ function useAutocomplete(props) {
|
|
|
5630
5634
|
const [focusedTag, setFocusedTag] = reactExports.useState(-1);
|
|
5631
5635
|
const defaultHighlighted = autoHighlight ? 0 : -1;
|
|
5632
5636
|
const highlightedIndexRef = reactExports.useRef(defaultHighlighted);
|
|
5633
|
-
const initialInputValue = reactExports.useRef(getInputValue(defaultValue, multiple, getOptionLabel)).current;
|
|
5637
|
+
const initialInputValue = reactExports.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
|
|
5634
5638
|
const [value, setValueState] = useControlled({
|
|
5635
5639
|
controlled: valueProp,
|
|
5636
5640
|
default: defaultValue,
|
|
@@ -5733,7 +5737,7 @@ function useAutocomplete(props) {
|
|
|
5733
5737
|
const setHighlightedIndex = useEventCallback(({
|
|
5734
5738
|
event,
|
|
5735
5739
|
index: index2,
|
|
5736
|
-
reason
|
|
5740
|
+
reason
|
|
5737
5741
|
}) => {
|
|
5738
5742
|
highlightedIndexRef.current = index2;
|
|
5739
5743
|
if (index2 === -1) {
|
|
@@ -5741,7 +5745,7 @@ function useAutocomplete(props) {
|
|
|
5741
5745
|
} else {
|
|
5742
5746
|
inputRef.current.setAttribute("aria-activedescendant", `${id}-option-${index2}`);
|
|
5743
5747
|
}
|
|
5744
|
-
if (onHighlightChange) {
|
|
5748
|
+
if (onHighlightChange && ["mouse", "keyboard", "touch"].includes(reason)) {
|
|
5745
5749
|
onHighlightChange(event, index2 === -1 ? null : filteredOptions[index2], reason);
|
|
5746
5750
|
}
|
|
5747
5751
|
if (!listboxRef.current) {
|
|
@@ -5786,7 +5790,7 @@ function useAutocomplete(props) {
|
|
|
5786
5790
|
event,
|
|
5787
5791
|
diff,
|
|
5788
5792
|
direction = "next",
|
|
5789
|
-
reason
|
|
5793
|
+
reason
|
|
5790
5794
|
}) => {
|
|
5791
5795
|
if (!popupOpen) {
|
|
5792
5796
|
return;
|
|
@@ -8678,6 +8682,15 @@ const TextareaAutosize = /* @__PURE__ */ reactExports.forwardRef(function Textar
|
|
|
8678
8682
|
overflowing
|
|
8679
8683
|
};
|
|
8680
8684
|
}, [maxRows, minRows, props.placeholder]);
|
|
8685
|
+
const didHeightChange = useEventCallback(() => {
|
|
8686
|
+
const textarea = textareaRef.current;
|
|
8687
|
+
const textareaStyles = calculateTextareaStyles();
|
|
8688
|
+
if (!textarea || !textareaStyles || isEmpty$1(textareaStyles)) {
|
|
8689
|
+
return false;
|
|
8690
|
+
}
|
|
8691
|
+
const outerHeightStyle = textareaStyles.outerHeightStyle;
|
|
8692
|
+
return heightRef.current != null && heightRef.current !== outerHeightStyle;
|
|
8693
|
+
});
|
|
8681
8694
|
const syncHeight = reactExports.useCallback(() => {
|
|
8682
8695
|
const textarea = textareaRef.current;
|
|
8683
8696
|
const textareaStyles = calculateTextareaStyles();
|
|
@@ -8693,34 +8706,36 @@ const TextareaAutosize = /* @__PURE__ */ reactExports.forwardRef(function Textar
|
|
|
8693
8706
|
}, [calculateTextareaStyles]);
|
|
8694
8707
|
const frameRef = reactExports.useRef(-1);
|
|
8695
8708
|
useEnhancedEffect(() => {
|
|
8696
|
-
const
|
|
8709
|
+
const debouncedHandleResize = debounce$1(syncHeight);
|
|
8697
8710
|
const textarea = textareaRef?.current;
|
|
8698
8711
|
if (!textarea) {
|
|
8699
8712
|
return void 0;
|
|
8700
8713
|
}
|
|
8701
8714
|
const containerWindow = ownerWindow(textarea);
|
|
8702
|
-
containerWindow.addEventListener("resize",
|
|
8715
|
+
containerWindow.addEventListener("resize", debouncedHandleResize);
|
|
8703
8716
|
let resizeObserver;
|
|
8704
8717
|
if (typeof ResizeObserver !== "undefined") {
|
|
8705
8718
|
resizeObserver = new ResizeObserver(() => {
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8719
|
+
if (didHeightChange()) {
|
|
8720
|
+
resizeObserver.unobserve(textarea);
|
|
8721
|
+
cancelAnimationFrame(frameRef.current);
|
|
8722
|
+
syncHeight();
|
|
8723
|
+
frameRef.current = requestAnimationFrame(() => {
|
|
8724
|
+
resizeObserver.observe(textarea);
|
|
8725
|
+
});
|
|
8726
|
+
}
|
|
8712
8727
|
});
|
|
8713
8728
|
resizeObserver.observe(textarea);
|
|
8714
8729
|
}
|
|
8715
8730
|
return () => {
|
|
8716
|
-
|
|
8731
|
+
debouncedHandleResize.clear();
|
|
8717
8732
|
cancelAnimationFrame(frameRef.current);
|
|
8718
|
-
containerWindow.removeEventListener("resize",
|
|
8733
|
+
containerWindow.removeEventListener("resize", debouncedHandleResize);
|
|
8719
8734
|
if (resizeObserver) {
|
|
8720
8735
|
resizeObserver.disconnect();
|
|
8721
8736
|
}
|
|
8722
8737
|
};
|
|
8723
|
-
}, [calculateTextareaStyles, syncHeight]);
|
|
8738
|
+
}, [calculateTextareaStyles, syncHeight, didHeightChange]);
|
|
8724
8739
|
useEnhancedEffect(() => {
|
|
8725
8740
|
syncHeight();
|
|
8726
8741
|
});
|
|
@@ -15642,6 +15657,16 @@ const ListItemText = /* @__PURE__ */ reactExports.forwardRef(function ListItemTe
|
|
|
15642
15657
|
...slotProps
|
|
15643
15658
|
}
|
|
15644
15659
|
};
|
|
15660
|
+
const [RootSlot, rootSlotProps] = useSlot("root", {
|
|
15661
|
+
className: clsx(classes.root, className),
|
|
15662
|
+
elementType: ListItemTextRoot,
|
|
15663
|
+
externalForwardedProps: {
|
|
15664
|
+
...externalForwardedProps,
|
|
15665
|
+
...other
|
|
15666
|
+
},
|
|
15667
|
+
ownerState,
|
|
15668
|
+
ref
|
|
15669
|
+
});
|
|
15645
15670
|
const [PrimarySlot, primarySlotProps] = useSlot("primary", {
|
|
15646
15671
|
className: classes.primary,
|
|
15647
15672
|
elementType: Typography,
|
|
@@ -15670,11 +15695,8 @@ const ListItemText = /* @__PURE__ */ reactExports.forwardRef(function ListItemTe
|
|
|
15670
15695
|
children: secondary
|
|
15671
15696
|
});
|
|
15672
15697
|
}
|
|
15673
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
15674
|
-
|
|
15675
|
-
ownerState,
|
|
15676
|
-
ref,
|
|
15677
|
-
...other,
|
|
15698
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, {
|
|
15699
|
+
...rootSlotProps,
|
|
15678
15700
|
children: [primary, secondary]
|
|
15679
15701
|
});
|
|
15680
15702
|
});
|
|
@@ -16092,7 +16114,7 @@ const Popover = /* @__PURE__ */ reactExports.forwardRef(function Popover2(inProp
|
|
|
16092
16114
|
const handleResize = debounce$1(() => {
|
|
16093
16115
|
setPositioningStyles();
|
|
16094
16116
|
});
|
|
16095
|
-
const containerWindow = ownerWindow(anchorEl);
|
|
16117
|
+
const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));
|
|
16096
16118
|
containerWindow.addEventListener("resize", handleResize);
|
|
16097
16119
|
return () => {
|
|
16098
16120
|
handleResize.clear();
|
|
@@ -19532,7 +19554,10 @@ const Snackbar = /* @__PURE__ */ reactExports.forwardRef(function Snackbar2(inPr
|
|
|
19532
19554
|
},
|
|
19533
19555
|
ownerState
|
|
19534
19556
|
});
|
|
19535
|
-
const [ClickAwaySlot,
|
|
19557
|
+
const [ClickAwaySlot, {
|
|
19558
|
+
ownerState: clickAwayOwnerStateProp,
|
|
19559
|
+
...clickAwayListenerProps
|
|
19560
|
+
}] = useSlot("clickAwayListener", {
|
|
19536
19561
|
elementType: ClickAwayListener,
|
|
19537
19562
|
externalForwardedProps,
|
|
19538
19563
|
getSlotProps: (handlers2) => ({
|
|
@@ -19579,6 +19604,9 @@ const Snackbar = /* @__PURE__ */ reactExports.forwardRef(function Snackbar2(inPr
|
|
|
19579
19604
|
}
|
|
19580
19605
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ClickAwaySlot, {
|
|
19581
19606
|
...clickAwayListenerProps,
|
|
19607
|
+
...slots.clickAwayListener && {
|
|
19608
|
+
ownerState: clickAwayOwnerStateProp
|
|
19609
|
+
},
|
|
19582
19610
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Root, {
|
|
19583
19611
|
...rootProps,
|
|
19584
19612
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionSlot, {
|
|
@@ -20422,6 +20450,8 @@ const Switch = /* @__PURE__ */ reactExports.forwardRef(function Switch2(inProps,
|
|
|
20422
20450
|
edge = false,
|
|
20423
20451
|
size = "medium",
|
|
20424
20452
|
sx,
|
|
20453
|
+
slots = {},
|
|
20454
|
+
slotProps = {},
|
|
20425
20455
|
...other
|
|
20426
20456
|
} = props;
|
|
20427
20457
|
const ownerState = {
|
|
@@ -20431,14 +20461,36 @@ const Switch = /* @__PURE__ */ reactExports.forwardRef(function Switch2(inProps,
|
|
|
20431
20461
|
size
|
|
20432
20462
|
};
|
|
20433
20463
|
const classes = useUtilityClasses$4(ownerState);
|
|
20434
|
-
const
|
|
20464
|
+
const externalForwardedProps = {
|
|
20465
|
+
slots,
|
|
20466
|
+
slotProps
|
|
20467
|
+
};
|
|
20468
|
+
const [RootSlot, rootSlotProps] = useSlot("root", {
|
|
20469
|
+
className: clsx(classes.root, className),
|
|
20470
|
+
elementType: SwitchRoot,
|
|
20471
|
+
externalForwardedProps,
|
|
20472
|
+
ownerState,
|
|
20473
|
+
additionalProps: {
|
|
20474
|
+
sx
|
|
20475
|
+
}
|
|
20476
|
+
});
|
|
20477
|
+
const [ThumbSlot, thumbSlotProps] = useSlot("thumb", {
|
|
20435
20478
|
className: classes.thumb,
|
|
20479
|
+
elementType: SwitchThumb,
|
|
20480
|
+
externalForwardedProps,
|
|
20436
20481
|
ownerState
|
|
20437
20482
|
});
|
|
20438
|
-
|
|
20439
|
-
|
|
20440
|
-
|
|
20441
|
-
|
|
20483
|
+
const icon = /* @__PURE__ */ jsxRuntimeExports.jsx(ThumbSlot, {
|
|
20484
|
+
...thumbSlotProps
|
|
20485
|
+
});
|
|
20486
|
+
const [TrackSlot, trackSlotProps] = useSlot("track", {
|
|
20487
|
+
className: classes.track,
|
|
20488
|
+
elementType: SwitchTrack,
|
|
20489
|
+
externalForwardedProps,
|
|
20490
|
+
ownerState
|
|
20491
|
+
});
|
|
20492
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, {
|
|
20493
|
+
...rootSlotProps,
|
|
20442
20494
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SwitchSwitchBase, {
|
|
20443
20495
|
type: "checkbox",
|
|
20444
20496
|
icon,
|
|
@@ -20449,10 +20501,25 @@ const Switch = /* @__PURE__ */ reactExports.forwardRef(function Switch2(inProps,
|
|
|
20449
20501
|
classes: {
|
|
20450
20502
|
...classes,
|
|
20451
20503
|
root: classes.switchBase
|
|
20504
|
+
},
|
|
20505
|
+
slots: {
|
|
20506
|
+
...slots.switchBase && {
|
|
20507
|
+
root: slots.switchBase
|
|
20508
|
+
},
|
|
20509
|
+
...slots.input && {
|
|
20510
|
+
input: slots.input
|
|
20511
|
+
}
|
|
20512
|
+
},
|
|
20513
|
+
slotProps: {
|
|
20514
|
+
...slotProps.switchBase && {
|
|
20515
|
+
root: typeof slotProps.switchBase === "function" ? slotProps.switchBase(ownerState) : slotProps.switchBase
|
|
20516
|
+
},
|
|
20517
|
+
...slotProps.input && {
|
|
20518
|
+
input: typeof slotProps.input === "function" ? slotProps.input(ownerState) : slotProps.input
|
|
20519
|
+
}
|
|
20452
20520
|
}
|
|
20453
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
20454
|
-
|
|
20455
|
-
ownerState
|
|
20521
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(TrackSlot, {
|
|
20522
|
+
...trackSlotProps
|
|
20456
20523
|
})]
|
|
20457
20524
|
});
|
|
20458
20525
|
});
|
|
@@ -21524,6 +21591,9 @@ const Tabs = /* @__PURE__ */ reactExports.forwardRef(function Tabs2(inProps, ref
|
|
|
21524
21591
|
});
|
|
21525
21592
|
});
|
|
21526
21593
|
const handleKeyDown = (event) => {
|
|
21594
|
+
if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {
|
|
21595
|
+
return;
|
|
21596
|
+
}
|
|
21527
21597
|
const list2 = tabListRef.current;
|
|
21528
21598
|
const currentFocus = ownerDocument(list2).activeElement;
|
|
21529
21599
|
const role = currentFocus.getAttribute("role");
|
|
@@ -21716,6 +21786,25 @@ const TextField = /* @__PURE__ */ reactExports.forwardRef(function TextField2(in
|
|
|
21716
21786
|
}
|
|
21717
21787
|
inputAdditionalProps["aria-describedby"] = void 0;
|
|
21718
21788
|
}
|
|
21789
|
+
const [RootSlot, rootProps] = useSlot("root", {
|
|
21790
|
+
elementType: TextFieldRoot,
|
|
21791
|
+
shouldForwardComponentProp: true,
|
|
21792
|
+
externalForwardedProps: {
|
|
21793
|
+
...externalForwardedProps,
|
|
21794
|
+
...other
|
|
21795
|
+
},
|
|
21796
|
+
ownerState,
|
|
21797
|
+
className: clsx(classes.root, className),
|
|
21798
|
+
ref,
|
|
21799
|
+
additionalProps: {
|
|
21800
|
+
disabled,
|
|
21801
|
+
error,
|
|
21802
|
+
fullWidth,
|
|
21803
|
+
required,
|
|
21804
|
+
color: color2,
|
|
21805
|
+
variant
|
|
21806
|
+
}
|
|
21807
|
+
});
|
|
21719
21808
|
const [InputSlot, inputProps] = useSlot("input", {
|
|
21720
21809
|
elementType: InputComponent,
|
|
21721
21810
|
externalForwardedProps,
|
|
@@ -21767,17 +21856,8 @@ const TextField = /* @__PURE__ */ reactExports.forwardRef(function TextField2(in
|
|
|
21767
21856
|
},
|
|
21768
21857
|
...inputProps
|
|
21769
21858
|
});
|
|
21770
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
21771
|
-
|
|
21772
|
-
disabled,
|
|
21773
|
-
error,
|
|
21774
|
-
fullWidth,
|
|
21775
|
-
ref,
|
|
21776
|
-
required,
|
|
21777
|
-
color: color2,
|
|
21778
|
-
variant,
|
|
21779
|
-
ownerState,
|
|
21780
|
-
...other,
|
|
21859
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, {
|
|
21860
|
+
...rootProps,
|
|
21781
21861
|
children: [label != null && label !== "" && /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabelSlot, {
|
|
21782
21862
|
htmlFor: id,
|
|
21783
21863
|
id: inputLabelId,
|
|
@@ -35074,7 +35154,7 @@ const ContentContainer$4 = styled$1(Box)({
|
|
|
35074
35154
|
height: "100%",
|
|
35075
35155
|
overflow: "hidden"
|
|
35076
35156
|
});
|
|
35077
|
-
|
|
35157
|
+
styled$1(Divider)(({ theme }) => ({
|
|
35078
35158
|
opacity: theme.palette.mode === "dark" ? 0.1 : 0.2,
|
|
35079
35159
|
backgroundColor: theme.palette.divider
|
|
35080
35160
|
}));
|
|
@@ -35517,7 +35597,7 @@ const DangerButton = styled$1(DialogButton)(({ theme }) => ({
|
|
|
35517
35597
|
},
|
|
35518
35598
|
transition: "all 0.2s ease-in-out"
|
|
35519
35599
|
}));
|
|
35520
|
-
const FormContainer$
|
|
35600
|
+
const FormContainer$1 = styled$1(Box)({
|
|
35521
35601
|
display: "flex",
|
|
35522
35602
|
flexDirection: "column",
|
|
35523
35603
|
gap: 20
|
|
@@ -47670,9 +47750,7 @@ const AttachmentsContainer = styled$1(Box)(({ theme }) => ({
|
|
|
47670
47750
|
display: "flex",
|
|
47671
47751
|
flexWrap: "wrap",
|
|
47672
47752
|
gap: theme.spacing(1.5),
|
|
47673
|
-
padding: theme.spacing(
|
|
47674
|
-
borderTop: `1px solid ${alpha(theme.palette.divider, 0.1)}`,
|
|
47675
|
-
backgroundColor: alpha(theme.palette.background.paper, 0.4)
|
|
47753
|
+
padding: theme.spacing(1)
|
|
47676
47754
|
}));
|
|
47677
47755
|
const AttachmentItem = styled$1(Paper)(({ theme }) => ({
|
|
47678
47756
|
position: "relative",
|
|
@@ -47887,7 +47965,7 @@ const AttachmentsPreview = ({
|
|
|
47887
47965
|
};
|
|
47888
47966
|
const ButtonContainer$1 = styled$1(Box)(() => ({
|
|
47889
47967
|
position: "absolute",
|
|
47890
|
-
|
|
47968
|
+
bottom: 80,
|
|
47891
47969
|
// Position above the message input
|
|
47892
47970
|
right: 20,
|
|
47893
47971
|
zIndex: 1e3,
|
|
@@ -48067,98 +48145,203 @@ const useMessageInput = ({
|
|
|
48067
48145
|
textareaRef
|
|
48068
48146
|
};
|
|
48069
48147
|
};
|
|
48070
|
-
const
|
|
48071
|
-
|
|
48148
|
+
const InputOuterContainer = styled$1(Box)(({ theme }) => ({
|
|
48149
|
+
width: "100%",
|
|
48150
|
+
flexGrow: 1,
|
|
48151
|
+
flexShrink: 0,
|
|
48152
|
+
minHeight: 0,
|
|
48072
48153
|
display: "flex",
|
|
48154
|
+
flexDirection: "column",
|
|
48073
48155
|
alignItems: "center",
|
|
48074
|
-
|
|
48075
|
-
|
|
48076
|
-
|
|
48077
|
-
|
|
48078
|
-
position: "relative"
|
|
48079
|
-
// Add position relative for the scroll button
|
|
48156
|
+
justifyContent: "center",
|
|
48157
|
+
padding: theme.spacing(1),
|
|
48158
|
+
paddingBottom: theme.spacing(2),
|
|
48159
|
+
backgroundColor: theme.palette.messagesView.background
|
|
48080
48160
|
}));
|
|
48081
|
-
const
|
|
48082
|
-
|
|
48083
|
-
|
|
48084
|
-
|
|
48085
|
-
height: 52,
|
|
48086
|
-
borderRadius: theme.shape.borderRadius * 1.5,
|
|
48087
|
-
marginRight: theme.spacing(1),
|
|
48088
|
-
transition: "all 0.2s ease-in-out",
|
|
48161
|
+
const InputInnerContainer = styled$1(Box)(({ theme }) => ({
|
|
48162
|
+
width: "100%",
|
|
48163
|
+
maxWidth: "900px",
|
|
48164
|
+
margin: "0 auto",
|
|
48089
48165
|
display: "flex",
|
|
48090
|
-
|
|
48091
|
-
|
|
48092
|
-
"
|
|
48093
|
-
|
|
48094
|
-
|
|
48095
|
-
|
|
48166
|
+
flexDirection: "column",
|
|
48167
|
+
gap: theme.spacing(1.5),
|
|
48168
|
+
outline: "none",
|
|
48169
|
+
borderRadius: theme.shape.borderRadius * 4,
|
|
48170
|
+
border: `1px solid ${alpha(theme.palette.divider, theme.palette.mode === "light" ? 0.3 : 0.1)}`,
|
|
48171
|
+
backgroundColor: theme.palette.mode === "light" ? alpha(theme.palette.background.paper, 0.9) : alpha(theme.palette.background.paper, 0.6),
|
|
48172
|
+
padding: theme.spacing(2),
|
|
48173
|
+
transition: "box-shadow 0.2s ease-in-out, outline 0.2s ease-in-out",
|
|
48174
|
+
boxSizing: "border-box",
|
|
48175
|
+
[theme.breakpoints.down("sm")]: {
|
|
48176
|
+
maxWidth: "100%"
|
|
48096
48177
|
},
|
|
48097
|
-
"
|
|
48098
|
-
|
|
48099
|
-
boxShadow: "none"
|
|
48178
|
+
[theme.breakpoints.between("sm", "md")]: {
|
|
48179
|
+
maxWidth: "90%"
|
|
48100
48180
|
},
|
|
48101
|
-
"
|
|
48102
|
-
|
|
48103
|
-
|
|
48181
|
+
[theme.breakpoints.up("md")]: {
|
|
48182
|
+
maxWidth: "900px"
|
|
48183
|
+
},
|
|
48184
|
+
// When the input inside is focused, add an outline instead of increasing border thickness
|
|
48185
|
+
"&:has(.MuiOutlinedInput-root.Mui-focused)": {
|
|
48186
|
+
outline: `2px solid ${theme.palette.primary.main}`,
|
|
48187
|
+
outlineOffset: "0px",
|
|
48188
|
+
boxShadow: `0 0 0 2px ${alpha(theme.palette.primary.main, 0.2)}`
|
|
48189
|
+
}
|
|
48190
|
+
}));
|
|
48191
|
+
const SuggestionsContainer = styled$1(Box)(({ theme }) => ({
|
|
48192
|
+
width: "100%",
|
|
48193
|
+
maxWidth: "900px",
|
|
48194
|
+
margin: "0 auto",
|
|
48195
|
+
marginTop: theme.spacing(4),
|
|
48196
|
+
[theme.breakpoints.down("sm")]: {
|
|
48197
|
+
maxWidth: "100%"
|
|
48198
|
+
},
|
|
48199
|
+
[theme.breakpoints.between("sm", "md")]: {
|
|
48200
|
+
maxWidth: "90%"
|
|
48201
|
+
},
|
|
48202
|
+
[theme.breakpoints.up("md")]: {
|
|
48203
|
+
maxWidth: "900px"
|
|
48204
|
+
}
|
|
48205
|
+
}));
|
|
48206
|
+
const SuggestionChip = styled$1(Button)(({ theme }) => ({
|
|
48207
|
+
borderRadius: 999,
|
|
48208
|
+
textTransform: "none",
|
|
48209
|
+
fontSize: "0.85rem",
|
|
48210
|
+
paddingLeft: theme.spacing(1.5),
|
|
48211
|
+
paddingRight: theme.spacing(1.5),
|
|
48212
|
+
paddingTop: theme.spacing(0.5),
|
|
48213
|
+
paddingBottom: theme.spacing(0.5),
|
|
48214
|
+
whiteSpace: "normal",
|
|
48215
|
+
// allow wrapping instead of nowrap
|
|
48216
|
+
wordBreak: "break-word",
|
|
48217
|
+
// break long words if needed
|
|
48218
|
+
variant: "outlined",
|
|
48219
|
+
size: "small",
|
|
48220
|
+
maxWidth: "100%",
|
|
48221
|
+
// ensure chip doesn't overflow container
|
|
48222
|
+
...theme.palette.mode === "light" && {
|
|
48223
|
+
backgroundColor: alpha(theme.palette.primary.main, 0.15),
|
|
48224
|
+
color: darken(theme.palette.primary.main, 0.4),
|
|
48225
|
+
borderColor: alpha(theme.palette.primary.main, 0.5),
|
|
48226
|
+
"&:hover": {
|
|
48227
|
+
backgroundColor: alpha(theme.palette.primary.main, 0.25),
|
|
48228
|
+
borderColor: alpha(theme.palette.primary.main, 0.7)
|
|
48229
|
+
}
|
|
48104
48230
|
}
|
|
48105
48231
|
}));
|
|
48106
48232
|
const StyledTextField$2 = styled$1(TextField)(({ theme }) => ({
|
|
48107
48233
|
flex: 1,
|
|
48108
48234
|
"& .MuiOutlinedInput-root": {
|
|
48109
|
-
|
|
48110
|
-
|
|
48111
|
-
|
|
48112
|
-
|
|
48113
|
-
|
|
48114
|
-
|
|
48115
|
-
|
|
48235
|
+
backgroundColor: "transparent",
|
|
48236
|
+
padding: "6px 8px",
|
|
48237
|
+
fontSize: "1rem",
|
|
48238
|
+
display: "flex",
|
|
48239
|
+
alignItems: "center",
|
|
48240
|
+
"& fieldset": {
|
|
48241
|
+
border: "none"
|
|
48242
|
+
},
|
|
48243
|
+
"&:hover fieldset": {
|
|
48244
|
+
border: "none"
|
|
48245
|
+
},
|
|
48246
|
+
"&.Mui-focused fieldset": {
|
|
48247
|
+
border: "none"
|
|
48248
|
+
},
|
|
48116
48249
|
"&.Mui-focused": {
|
|
48117
|
-
backgroundColor:
|
|
48118
|
-
boxShadow:
|
|
48119
|
-
borderColor: alpha(theme.palette.primary.main, 0.5)
|
|
48250
|
+
backgroundColor: "transparent",
|
|
48251
|
+
boxShadow: "none"
|
|
48120
48252
|
},
|
|
48121
48253
|
"&:hover": {
|
|
48122
|
-
backgroundColor:
|
|
48123
|
-
|
|
48124
|
-
},
|
|
48125
|
-
padding: "14px 18px",
|
|
48126
|
-
fontSize: "1rem",
|
|
48127
|
-
minHeight: 48,
|
|
48128
|
-
display: "flex",
|
|
48129
|
-
alignItems: "center"
|
|
48254
|
+
backgroundColor: "transparent"
|
|
48255
|
+
}
|
|
48130
48256
|
},
|
|
48131
48257
|
"& .MuiInputBase-input": {
|
|
48132
|
-
color: theme.palette.text.primary
|
|
48258
|
+
color: theme.palette.text.primary,
|
|
48259
|
+
overflowY: "auto",
|
|
48260
|
+
scrollbarWidth: "thin",
|
|
48261
|
+
scrollbarColor: `${alpha(theme.palette.text.primary, 0.5)} transparent`,
|
|
48262
|
+
/* Firefox */
|
|
48263
|
+
"&::-webkit-scrollbar": {
|
|
48264
|
+
width: "8px",
|
|
48265
|
+
height: "8px"
|
|
48266
|
+
},
|
|
48267
|
+
"&::-webkit-scrollbar-track": {
|
|
48268
|
+
background: "transparent"
|
|
48269
|
+
},
|
|
48270
|
+
"&::-webkit-scrollbar-thumb": {
|
|
48271
|
+
backgroundColor: alpha(theme.palette.text.primary, 0.5),
|
|
48272
|
+
borderRadius: "4px"
|
|
48273
|
+
},
|
|
48274
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
48275
|
+
backgroundColor: alpha(theme.palette.text.primary, 0.7)
|
|
48276
|
+
}
|
|
48133
48277
|
},
|
|
48134
48278
|
"& .MuiInputBase-input::placeholder": {
|
|
48135
48279
|
color: theme.palette.mode === "light" ? alpha(theme.palette.text.secondary, 0.7) : alpha(theme.palette.text.secondary, 0.5),
|
|
48136
48280
|
opacity: 1
|
|
48137
48281
|
}
|
|
48138
48282
|
}));
|
|
48283
|
+
const ButtonsRow = styled$1(Box)(({ theme }) => ({
|
|
48284
|
+
display: "flex",
|
|
48285
|
+
alignItems: "center",
|
|
48286
|
+
justifyContent: "space-between",
|
|
48287
|
+
gap: theme.spacing(1)
|
|
48288
|
+
}));
|
|
48289
|
+
const AttachmentButton = styled$1(IconButton)(({ theme }) => ({
|
|
48290
|
+
backgroundColor: theme.palette.mode === "light" ? alpha(theme.palette.primary.main, 0.1) : alpha(theme.palette.primary.main, 0.15),
|
|
48291
|
+
color: theme.palette.primary.main,
|
|
48292
|
+
width: 40,
|
|
48293
|
+
height: 40,
|
|
48294
|
+
borderRadius: "100%",
|
|
48295
|
+
transition: "all 0.2s ease-in-out",
|
|
48296
|
+
"&:hover": {
|
|
48297
|
+
backgroundColor: theme.palette.mode === "light" ? alpha(theme.palette.primary.main, 0.2) : alpha(theme.palette.primary.main, 0.25),
|
|
48298
|
+
transform: "scale(1.1)"
|
|
48299
|
+
},
|
|
48300
|
+
"&:active": {
|
|
48301
|
+
transform: "scale(1)"
|
|
48302
|
+
},
|
|
48303
|
+
"&.Mui-disabled": {
|
|
48304
|
+
backgroundColor: alpha(theme.palette.action.disabled, 0.1),
|
|
48305
|
+
color: theme.palette.action.disabled
|
|
48306
|
+
}
|
|
48307
|
+
}));
|
|
48139
48308
|
const SendButton = styled$1(Button)(({ theme }) => ({
|
|
48140
|
-
|
|
48141
|
-
|
|
48142
|
-
|
|
48143
|
-
height: 48,
|
|
48309
|
+
minWidth: 40,
|
|
48310
|
+
height: 40,
|
|
48311
|
+
borderRadius: "100%",
|
|
48144
48312
|
padding: 0,
|
|
48145
|
-
marginLeft: theme.spacing(1),
|
|
48146
|
-
boxShadow: theme.palette.mode === "light" ? theme.shadows[3] : theme.shadows[2],
|
|
48147
|
-
transition: "all 0.2s ease-in-out",
|
|
48148
48313
|
display: "flex",
|
|
48149
48314
|
alignItems: "center",
|
|
48150
48315
|
justifyContent: "center",
|
|
48151
|
-
|
|
48152
|
-
|
|
48153
|
-
|
|
48316
|
+
transition: "all 0.2s ease-in-out",
|
|
48317
|
+
"&:hover": {
|
|
48318
|
+
transform: "scale(1.1)"
|
|
48154
48319
|
},
|
|
48155
|
-
"&:
|
|
48156
|
-
transform: "
|
|
48157
|
-
boxShadow: theme.shadows[1]
|
|
48320
|
+
"&:active": {
|
|
48321
|
+
transform: "scale(1)"
|
|
48158
48322
|
},
|
|
48159
48323
|
"&.Mui-disabled": {
|
|
48160
|
-
backgroundColor:
|
|
48161
|
-
color:
|
|
48324
|
+
backgroundColor: alpha(theme.palette.action.disabled, 0.1),
|
|
48325
|
+
color: alpha(theme.palette.common.white, 0.5)
|
|
48326
|
+
}
|
|
48327
|
+
}));
|
|
48328
|
+
const EmptyStateContainer$4 = styled$1(Box)(({ theme }) => ({
|
|
48329
|
+
display: "flex",
|
|
48330
|
+
flexDirection: "column",
|
|
48331
|
+
alignItems: "center",
|
|
48332
|
+
justifyContent: "center",
|
|
48333
|
+
padding: theme.spacing(4),
|
|
48334
|
+
gap: theme.spacing(2)
|
|
48335
|
+
}));
|
|
48336
|
+
const EmptyStateTitle = styled$1(Typography)(({ theme }) => ({
|
|
48337
|
+
fontSize: "1.25rem",
|
|
48338
|
+
fontWeight: 500,
|
|
48339
|
+
color: theme.palette.text.secondary,
|
|
48340
|
+
textAlign: "center",
|
|
48341
|
+
marginBottom: theme.spacing(1),
|
|
48342
|
+
[theme.breakpoints.up("sm")]: {
|
|
48343
|
+
fontSize: "1.5rem",
|
|
48344
|
+
marginBottom: theme.spacing(2)
|
|
48162
48345
|
}
|
|
48163
48346
|
}));
|
|
48164
48347
|
const MessageInput = ({
|
|
@@ -48170,10 +48353,20 @@ const MessageInput = ({
|
|
|
48170
48353
|
onCancelJob,
|
|
48171
48354
|
isFarFromBottom = false,
|
|
48172
48355
|
scrollToBottom = () => {
|
|
48173
|
-
}
|
|
48356
|
+
},
|
|
48357
|
+
initialSuggestions
|
|
48174
48358
|
}) => {
|
|
48175
48359
|
const [attachments, setAttachments] = reactExports.useState([]);
|
|
48176
48360
|
const fileInputRef = reactExports.useRef(null);
|
|
48361
|
+
const MAX_SUGGESTIONS = 7;
|
|
48362
|
+
const suggestions = reactExports.useMemo(() => {
|
|
48363
|
+
if (!initialSuggestions || initialSuggestions.length === 0) return [];
|
|
48364
|
+
if (initialSuggestions.length <= MAX_SUGGESTIONS) {
|
|
48365
|
+
return initialSuggestions;
|
|
48366
|
+
}
|
|
48367
|
+
const shuffled = [...initialSuggestions].sort(() => Math.random() - 0.5);
|
|
48368
|
+
return shuffled.slice(0, MAX_SUGGESTIONS);
|
|
48369
|
+
}, [initialSuggestions]);
|
|
48177
48370
|
const {
|
|
48178
48371
|
inputValue: newMessage,
|
|
48179
48372
|
setInputValue: setNewMessage,
|
|
@@ -48189,7 +48382,6 @@ const MessageInput = ({
|
|
|
48189
48382
|
},
|
|
48190
48383
|
scrollToBottom,
|
|
48191
48384
|
forceScrollToBottom: scrollToBottom
|
|
48192
|
-
// Use the scrollToBottom function for both regular and forced scrolling
|
|
48193
48385
|
});
|
|
48194
48386
|
const handleSubmit = (e) => {
|
|
48195
48387
|
e.preventDefault();
|
|
@@ -48225,42 +48417,27 @@ const MessageInput = ({
|
|
|
48225
48417
|
fileInputRef.current?.click();
|
|
48226
48418
|
};
|
|
48227
48419
|
const isInputDisabled = Boolean(isLoading && currentJobId);
|
|
48228
|
-
|
|
48229
|
-
|
|
48230
|
-
|
|
48231
|
-
|
|
48232
|
-
|
|
48233
|
-
|
|
48234
|
-
|
|
48235
|
-
|
|
48236
|
-
|
|
48237
|
-
|
|
48238
|
-
|
|
48239
|
-
|
|
48240
|
-
|
|
48241
|
-
|
|
48242
|
-
onChange: handleFileSelect,
|
|
48243
|
-
style: { display: "none" },
|
|
48244
|
-
disabled: isInputDisabled,
|
|
48245
|
-
multiple: true
|
|
48420
|
+
const handleSuggestionClick = (suggestion) => {
|
|
48421
|
+
if (isInputDisabled) return;
|
|
48422
|
+
onSendMessage(suggestion, attachments);
|
|
48423
|
+
setAttachments([]);
|
|
48424
|
+
setNewMessage("");
|
|
48425
|
+
};
|
|
48426
|
+
const inputContent = /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, style: { width: "100%" }, children: [
|
|
48427
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(InputInnerContainer, { children: [
|
|
48428
|
+
attachments.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48429
|
+
AttachmentsPreview,
|
|
48430
|
+
{
|
|
48431
|
+
attachments,
|
|
48432
|
+
onRemoveAttachment: handleRemoveAttachment,
|
|
48433
|
+
disabled: isInputDisabled
|
|
48246
48434
|
}
|
|
48247
48435
|
),
|
|
48248
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Attach file", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48249
|
-
AttachmentButton,
|
|
48250
|
-
{
|
|
48251
|
-
onClick: triggerFileInput,
|
|
48252
|
-
color: "primary",
|
|
48253
|
-
size: "medium",
|
|
48254
|
-
"aria-label": "Attach file",
|
|
48255
|
-
disabled: isInputDisabled,
|
|
48256
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faPaperclip })
|
|
48257
|
-
}
|
|
48258
|
-
) }) }),
|
|
48259
48436
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48260
48437
|
StyledTextField$2,
|
|
48261
48438
|
{
|
|
48262
48439
|
fullWidth: true,
|
|
48263
|
-
placeholder: isInputDisabled ? "⌛ Agent is busy
|
|
48440
|
+
placeholder: isInputDisabled ? "⌛ Agent is busy" : "Ask me for help",
|
|
48264
48441
|
value: newMessage,
|
|
48265
48442
|
onChange: (e) => setNewMessage(e.target.value),
|
|
48266
48443
|
onKeyDown: handleKeyDown,
|
|
@@ -48271,34 +48448,94 @@ const MessageInput = ({
|
|
|
48271
48448
|
disabled: isInputDisabled
|
|
48272
48449
|
}
|
|
48273
48450
|
),
|
|
48274
|
-
|
|
48275
|
-
|
|
48276
|
-
|
|
48277
|
-
|
|
48278
|
-
|
|
48279
|
-
|
|
48280
|
-
|
|
48281
|
-
|
|
48282
|
-
|
|
48283
|
-
|
|
48284
|
-
|
|
48285
|
-
|
|
48286
|
-
|
|
48287
|
-
|
|
48288
|
-
|
|
48289
|
-
|
|
48290
|
-
|
|
48291
|
-
|
|
48292
|
-
|
|
48293
|
-
|
|
48294
|
-
|
|
48451
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonsRow, { children: [
|
|
48452
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
48453
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48454
|
+
"input",
|
|
48455
|
+
{
|
|
48456
|
+
type: "file",
|
|
48457
|
+
ref: fileInputRef,
|
|
48458
|
+
onChange: handleFileSelect,
|
|
48459
|
+
style: { display: "none" },
|
|
48460
|
+
disabled: isInputDisabled,
|
|
48461
|
+
multiple: true
|
|
48462
|
+
}
|
|
48463
|
+
),
|
|
48464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Attach file", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48465
|
+
AttachmentButton,
|
|
48466
|
+
{
|
|
48467
|
+
onClick: triggerFileInput,
|
|
48468
|
+
color: "primary",
|
|
48469
|
+
size: "small",
|
|
48470
|
+
"aria-label": "Attach file",
|
|
48471
|
+
disabled: isInputDisabled,
|
|
48472
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faPaperclip })
|
|
48473
|
+
}
|
|
48474
|
+
) }) })
|
|
48475
|
+
] }),
|
|
48476
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Box, { display: "flex", alignItems: "center", gap: 1, children: isLoading && currentJobId ? (
|
|
48477
|
+
// @ts-ignore Tooltip type issue
|
|
48478
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Stop agent", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48479
|
+
SendButton,
|
|
48480
|
+
{
|
|
48481
|
+
type: "button",
|
|
48482
|
+
variant: "contained",
|
|
48483
|
+
color: "error",
|
|
48484
|
+
onClick: () => onCancelJob?.(currentJobId),
|
|
48485
|
+
"aria-label": "Stop agent",
|
|
48486
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faStop })
|
|
48487
|
+
}
|
|
48488
|
+
) }) })
|
|
48489
|
+
) : (
|
|
48490
|
+
// @ts-ignore Tooltip type issue
|
|
48491
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Send message", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48492
|
+
SendButton,
|
|
48493
|
+
{
|
|
48494
|
+
type: "submit",
|
|
48495
|
+
variant: "contained",
|
|
48496
|
+
color: "primary",
|
|
48497
|
+
disabled: isLoading || !newMessage.trim() && attachments.length === 0,
|
|
48498
|
+
"aria-label": "Send message",
|
|
48499
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faPaperPlane })
|
|
48500
|
+
}
|
|
48501
|
+
) }) })
|
|
48502
|
+
) })
|
|
48503
|
+
] })
|
|
48295
48504
|
] }),
|
|
48296
|
-
|
|
48297
|
-
|
|
48505
|
+
messages.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(SuggestionsContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48506
|
+
Box,
|
|
48298
48507
|
{
|
|
48299
|
-
|
|
48300
|
-
|
|
48301
|
-
|
|
48508
|
+
sx: {
|
|
48509
|
+
display: "flex",
|
|
48510
|
+
flexWrap: "wrap",
|
|
48511
|
+
gap: 1,
|
|
48512
|
+
marginTop: 1.5,
|
|
48513
|
+
justifyContent: "center"
|
|
48514
|
+
},
|
|
48515
|
+
children: suggestions.map((suggestion) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48516
|
+
SuggestionChip,
|
|
48517
|
+
{
|
|
48518
|
+
variant: "outlined",
|
|
48519
|
+
size: "small",
|
|
48520
|
+
onClick: () => handleSuggestionClick(suggestion),
|
|
48521
|
+
disabled: isInputDisabled,
|
|
48522
|
+
children: suggestion
|
|
48523
|
+
},
|
|
48524
|
+
suggestion
|
|
48525
|
+
))
|
|
48526
|
+
}
|
|
48527
|
+
) })
|
|
48528
|
+
] });
|
|
48529
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
48530
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(InputOuterContainer, { children: messages.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(EmptyStateContainer$4, { children: [
|
|
48531
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(EmptyStateTitle, { variant: "h6", children: "What can I help you with today?" }),
|
|
48532
|
+
inputContent
|
|
48533
|
+
] }) : inputContent }),
|
|
48534
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
48535
|
+
ScrollToBottomButton,
|
|
48536
|
+
{
|
|
48537
|
+
visible: isFarFromBottom,
|
|
48538
|
+
onClick: scrollToBottom
|
|
48302
48539
|
}
|
|
48303
48540
|
)
|
|
48304
48541
|
] });
|
|
@@ -48352,15 +48589,6 @@ const useStreamingMessagesStore = create$1(
|
|
|
48352
48589
|
}
|
|
48353
48590
|
})
|
|
48354
48591
|
);
|
|
48355
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
48356
|
-
if (null == r) return {};
|
|
48357
|
-
var t = {};
|
|
48358
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
48359
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
48360
|
-
t[n] = r[n];
|
|
48361
|
-
}
|
|
48362
|
-
return t;
|
|
48363
|
-
}
|
|
48364
48592
|
function _objectWithoutProperties(e, t) {
|
|
48365
48593
|
if (null == e) return {};
|
|
48366
48594
|
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
|
@@ -48424,15 +48652,6 @@ function _defineProperty(e, r, t) {
|
|
|
48424
48652
|
writable: true
|
|
48425
48653
|
}) : e[r] = t, e;
|
|
48426
48654
|
}
|
|
48427
|
-
function _extends() {
|
|
48428
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
48429
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
48430
|
-
var t = arguments[e];
|
|
48431
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
48432
|
-
}
|
|
48433
|
-
return n;
|
|
48434
|
-
}, _extends.apply(null, arguments);
|
|
48435
|
-
}
|
|
48436
48655
|
function ownKeys$1(e, r) {
|
|
48437
48656
|
var t = Object.keys(e);
|
|
48438
48657
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -48533,7 +48752,7 @@ function createElement(_ref) {
|
|
|
48533
48752
|
});
|
|
48534
48753
|
}
|
|
48535
48754
|
var children = childrenCreator(node2.children);
|
|
48536
|
-
return /* @__PURE__ */ React$1.createElement(TagName, _extends({
|
|
48755
|
+
return /* @__PURE__ */ React$1.createElement(TagName, _extends$2({
|
|
48537
48756
|
key
|
|
48538
48757
|
}, props), children);
|
|
48539
48758
|
}
|
|
@@ -85181,7 +85400,7 @@ var unitlessKeys = {
|
|
|
85181
85400
|
strokeWidth: 1
|
|
85182
85401
|
};
|
|
85183
85402
|
var define_process_env_default = {};
|
|
85184
|
-
var f = "undefined" != typeof process && void 0 !== define_process_env_default && (define_process_env_default.REACT_APP_SC_ATTR || define_process_env_default.SC_ATTR) || "data-styled", m = "active", y = "data-styled-version", v = "6.1.
|
|
85403
|
+
var f = "undefined" != typeof process && void 0 !== define_process_env_default && (define_process_env_default.REACT_APP_SC_ATTR || define_process_env_default.SC_ATTR) || "data-styled", m = "active", y = "data-styled-version", v = "6.1.17", g = "/*!sc*/\n", S$1 = "undefined" != typeof window && "HTMLElement" in window, w = Boolean("boolean" == typeof SC_DISABLE_SPEEDY ? SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== define_process_env_default && void 0 !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY && "" !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY ? "false" !== define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY && define_process_env_default.REACT_APP_SC_DISABLE_SPEEDY : "undefined" != typeof process && void 0 !== define_process_env_default && void 0 !== define_process_env_default.SC_DISABLE_SPEEDY && "" !== define_process_env_default.SC_DISABLE_SPEEDY ? "false" !== define_process_env_default.SC_DISABLE_SPEEDY && define_process_env_default.SC_DISABLE_SPEEDY : false), b = {}, _ = Object.freeze([]), C = Object.freeze({});
|
|
85185
85404
|
function I(e2, t2, n2) {
|
|
85186
85405
|
return void 0 === n2 && (n2 = C), e2.theme !== n2.theme && e2.theme || t2 || n2.theme;
|
|
85187
85406
|
}
|
|
@@ -108710,16 +108929,18 @@ const MessageItem = reactExports.memo(
|
|
|
108710
108929
|
return prevProps.message.id === nextProps.message.id && prevProps.message.message === nextProps.message.message && prevProps.message.status === nextProps.message.status && prevProps.message.is_complete === nextProps.message.is_complete && prevProps.message.is_streamable === nextProps.message.is_streamable;
|
|
108711
108930
|
}
|
|
108712
108931
|
);
|
|
108713
|
-
const MessagesContainer = styled$1(Box
|
|
108714
|
-
|
|
108715
|
-
|
|
108716
|
-
|
|
108932
|
+
const MessagesContainer = styled$1(Box, {
|
|
108933
|
+
shouldForwardProp: (prop) => prop !== "collapsed"
|
|
108934
|
+
})(({ theme, collapsed }) => ({
|
|
108935
|
+
flexGrow: collapsed ? 0 : 1,
|
|
108936
|
+
height: collapsed ? 0 : "100%",
|
|
108937
|
+
overflow: collapsed ? "hidden" : "auto",
|
|
108938
|
+
padding: collapsed ? 0 : 16,
|
|
108717
108939
|
display: "flex",
|
|
108718
108940
|
flexDirection: "column",
|
|
108719
108941
|
gap: 16,
|
|
108720
108942
|
backgroundColor: theme.palette.messagesView.background,
|
|
108721
108943
|
position: "relative",
|
|
108722
|
-
// Add position relative for absolute positioning of children
|
|
108723
108944
|
"&::-webkit-scrollbar": {
|
|
108724
108945
|
width: "8px"
|
|
108725
108946
|
},
|
|
@@ -108727,7 +108948,6 @@ const MessagesContainer = styled$1(Box)(({ theme }) => ({
|
|
|
108727
108948
|
backgroundColor: theme.palette.mode === "dark" ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.2)",
|
|
108728
108949
|
borderRadius: "4px"
|
|
108729
108950
|
},
|
|
108730
|
-
// Improve GPU acceleration for smoother scrolling
|
|
108731
108951
|
transform: "translateZ(0)",
|
|
108732
108952
|
willChange: "scroll-position"
|
|
108733
108953
|
}));
|
|
@@ -108760,22 +108980,14 @@ const LoadingBox = styled$1(Box)({
|
|
|
108760
108980
|
justifyContent: "center",
|
|
108761
108981
|
padding: 32
|
|
108762
108982
|
});
|
|
108763
|
-
const
|
|
108764
|
-
textAlign: "center",
|
|
108765
|
-
color: theme.palette.text.secondary,
|
|
108766
|
-
padding: 32,
|
|
108767
|
-
fontSize: "0.9rem",
|
|
108983
|
+
const FullScreenCenteredContainer = styled$1(Box)({
|
|
108768
108984
|
display: "flex",
|
|
108769
|
-
|
|
108985
|
+
justifyContent: "center",
|
|
108770
108986
|
alignItems: "center",
|
|
108771
|
-
|
|
108772
|
-
|
|
108773
|
-
|
|
108774
|
-
|
|
108775
|
-
opacity: 0.5,
|
|
108776
|
-
marginBottom: "1rem",
|
|
108777
|
-
color: theme.palette.text.secondary
|
|
108778
|
-
}));
|
|
108987
|
+
flexGrow: 1,
|
|
108988
|
+
height: "100%",
|
|
108989
|
+
width: "100%"
|
|
108990
|
+
});
|
|
108779
108991
|
const MessagesView = ({
|
|
108780
108992
|
messages,
|
|
108781
108993
|
isLoading,
|
|
@@ -108790,7 +109002,8 @@ const MessagesView = ({
|
|
|
108790
109002
|
refetch,
|
|
108791
109003
|
conversationId
|
|
108792
109004
|
}) => {
|
|
108793
|
-
|
|
109005
|
+
const collapsed = messages.length === 0 && !isLoadingMessages && !isFetchingMore;
|
|
109006
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(MessagesContainer, { ref: messagesContainerRef, collapsed, children: [
|
|
108794
109007
|
isFetchingMore && /* @__PURE__ */ jsxRuntimeExports.jsxs(LoadingMoreIndicator, { children: [
|
|
108795
109008
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { size: 20, sx: { mr: 1 } }),
|
|
108796
109009
|
"Loading more messages..."
|
|
@@ -108826,22 +109039,16 @@ const MessagesView = ({
|
|
|
108826
109039
|
}
|
|
108827
109040
|
)
|
|
108828
109041
|
] })
|
|
108829
|
-
) : /* @__PURE__ */ jsxRuntimeExports.
|
|
108830
|
-
|
|
108831
|
-
|
|
108832
|
-
|
|
108833
|
-
|
|
108834
|
-
|
|
108835
|
-
|
|
108836
|
-
|
|
108837
|
-
|
|
108838
|
-
|
|
108839
|
-
currentExecution,
|
|
108840
|
-
scrollToBottom,
|
|
108841
|
-
conversationId
|
|
108842
|
-
}
|
|
108843
|
-
) })
|
|
108844
|
-
] }),
|
|
109042
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: isLoadingMessages && /* @__PURE__ */ jsxRuntimeExports.jsx(FullScreenCenteredContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109043
|
+
LoadingIndicator,
|
|
109044
|
+
{
|
|
109045
|
+
status: jobStatus,
|
|
109046
|
+
agentName,
|
|
109047
|
+
currentExecution,
|
|
109048
|
+
scrollToBottom,
|
|
109049
|
+
conversationId
|
|
109050
|
+
}
|
|
109051
|
+
) }) }),
|
|
108845
109052
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: messagesEndRef })
|
|
108846
109053
|
] })
|
|
108847
109054
|
] });
|
|
@@ -108867,6 +109074,29 @@ styled$1(Box)({
|
|
|
108867
109074
|
whiteSpace: "pre-wrap",
|
|
108868
109075
|
overflow: "auto"
|
|
108869
109076
|
});
|
|
109077
|
+
const DEFAULT_MESSAGE_SUGGESTIONS = [
|
|
109078
|
+
"Go to my documents folder",
|
|
109079
|
+
"What's the latest news?",
|
|
109080
|
+
"Make me a research report on the latest trends in AI",
|
|
109081
|
+
"Make me a space invaders game",
|
|
109082
|
+
"Organize my desktop",
|
|
109083
|
+
"Create a presentation outline on climate change",
|
|
109084
|
+
"Train a classifier on the MPG dataset",
|
|
109085
|
+
"Search for quantum computing papers and download interesting ones to read later",
|
|
109086
|
+
"Download some recent papers on fusion energy",
|
|
109087
|
+
"Download some recent papers on cancer research",
|
|
109088
|
+
"Make me a brick breaker game",
|
|
109089
|
+
"Remove downloads that are more than a year old",
|
|
109090
|
+
"Put together a competitive analysis report on the agentic AI space",
|
|
109091
|
+
"Find me a royalty free gif of a cute cat",
|
|
109092
|
+
"Go to my downloads folder",
|
|
109093
|
+
"Organize my documents folder",
|
|
109094
|
+
"Make me a GDPR compliant privacy policy",
|
|
109095
|
+
"Look up trending stocks and put together an investment report",
|
|
109096
|
+
"Fetch the MNIST dataset and train a good classifier",
|
|
109097
|
+
"Look up interest rate trends and make a projection for the next 5 years",
|
|
109098
|
+
"Make a presentation with a dependency graph of genetic factors for Alzheimer's disease"
|
|
109099
|
+
];
|
|
108870
109100
|
const ChatContainer = styled$1(Paper)(({ theme }) => ({
|
|
108871
109101
|
display: "flex",
|
|
108872
109102
|
flexDirection: "column",
|
|
@@ -108937,11 +109167,11 @@ const ChatContent = ({
|
|
|
108937
109167
|
conversationId: agentId
|
|
108938
109168
|
}
|
|
108939
109169
|
),
|
|
108940
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
108941
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109170
|
+
!(isLoadingMessages && messages.length === 0) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
108942
109171
|
MessageInput,
|
|
108943
109172
|
{
|
|
108944
109173
|
onSendMessage,
|
|
109174
|
+
initialSuggestions: DEFAULT_MESSAGE_SUGGESTIONS,
|
|
108945
109175
|
isLoading,
|
|
108946
109176
|
conversationId: agentId,
|
|
108947
109177
|
messages,
|
|
@@ -109102,10 +109332,12 @@ const AgentOptionsMenu = ({
|
|
|
109102
109332
|
isAgentsPage = false,
|
|
109103
109333
|
onViewAgentSettings,
|
|
109104
109334
|
onChatWithAgent,
|
|
109105
|
-
onExportAgent
|
|
109335
|
+
onExportAgent,
|
|
109336
|
+
onClearConversation
|
|
109106
109337
|
}) => {
|
|
109107
109338
|
const [menuAnchorEl, setMenuAnchorEl] = reactExports.useState(null);
|
|
109108
109339
|
const [isDeleteModalOpen, setIsDeleteModalOpen] = reactExports.useState(false);
|
|
109340
|
+
const [isClearModalOpen, setIsClearModalOpen] = reactExports.useState(false);
|
|
109109
109341
|
const isMenuOpen = Boolean(menuAnchorEl);
|
|
109110
109342
|
const deleteAgentMutation = useDeleteAgent();
|
|
109111
109343
|
const handleOpenMenu = (e) => {
|
|
@@ -109122,6 +109354,13 @@ const AgentOptionsMenu = ({
|
|
|
109122
109354
|
const handleCloseDeleteConfirmation = () => {
|
|
109123
109355
|
setIsDeleteModalOpen(false);
|
|
109124
109356
|
};
|
|
109357
|
+
const handleOpenClearConfirmation = () => {
|
|
109358
|
+
setIsClearModalOpen(true);
|
|
109359
|
+
handleCloseMenu();
|
|
109360
|
+
};
|
|
109361
|
+
const handleCloseClearConfirmation = () => {
|
|
109362
|
+
setIsClearModalOpen(false);
|
|
109363
|
+
};
|
|
109125
109364
|
const { clearAgentFromAllPages } = useAgentSelectionStore();
|
|
109126
109365
|
const handleConfirmDelete = async () => {
|
|
109127
109366
|
try {
|
|
@@ -109202,6 +109441,10 @@ const AgentOptionsMenu = ({
|
|
|
109202
109441
|
]
|
|
109203
109442
|
}
|
|
109204
109443
|
),
|
|
109444
|
+
onClearConversation && /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledMenuItem, { onClick: handleOpenClearConfirmation, children: [
|
|
109445
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(MenuItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faTrash, size: "sm" }) }),
|
|
109446
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", children: "Clear Conversation" })
|
|
109447
|
+
] }),
|
|
109205
109448
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(DeleteMenuItem, { onClick: handleOpenDeleteConfirmation, children: [
|
|
109206
109449
|
/* @__PURE__ */ jsxRuntimeExports.jsx(MenuItemIcon, { color: "error", children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faTrash, size: "sm" }) }),
|
|
109207
109450
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", children: "Delete Agent" })
|
|
@@ -109228,6 +109471,24 @@ const AgentOptionsMenu = ({
|
|
|
109228
109471
|
onConfirm: handleConfirmDelete,
|
|
109229
109472
|
onCancel: handleCloseDeleteConfirmation
|
|
109230
109473
|
}
|
|
109474
|
+
),
|
|
109475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109476
|
+
ConfirmationModal,
|
|
109477
|
+
{
|
|
109478
|
+
open: isClearModalOpen,
|
|
109479
|
+
title: "Clear Conversation",
|
|
109480
|
+
message: "Are you sure you want to clear this conversation? This action cannot be undone and all messages will be permanently deleted.",
|
|
109481
|
+
confirmText: "Clear",
|
|
109482
|
+
cancelText: "Cancel",
|
|
109483
|
+
isDangerous: true,
|
|
109484
|
+
onConfirm: () => {
|
|
109485
|
+
if (onClearConversation) {
|
|
109486
|
+
onClearConversation();
|
|
109487
|
+
}
|
|
109488
|
+
handleCloseClearConfirmation();
|
|
109489
|
+
},
|
|
109490
|
+
onCancel: handleCloseClearConfirmation
|
|
109491
|
+
}
|
|
109231
109492
|
)
|
|
109232
109493
|
] });
|
|
109233
109494
|
};
|
|
@@ -109418,7 +109679,7 @@ const CreateAgentDialog = ({
|
|
|
109418
109679
|
maxWidth: "sm",
|
|
109419
109680
|
children: [
|
|
109420
109681
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Subtitle$1, { children: "Configure your new AI assistant with a name and optional description" }),
|
|
109421
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("form", { id: "create-agent-form", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer$
|
|
109682
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("form", { id: "create-agent-form", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer$1, { children: [
|
|
109422
109683
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109423
109684
|
NameField,
|
|
109424
109685
|
{
|
|
@@ -109614,7 +109875,7 @@ const ImportAgentDialog = ({
|
|
|
109614
109875
|
maxWidth: "sm",
|
|
109615
109876
|
children: [
|
|
109616
109877
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Subtitle, { children: "Import an agent from a ZIP file exported from Local Operator. The file should contain an agent.yml file." }),
|
|
109617
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer$
|
|
109878
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer$1, { children: [
|
|
109618
109879
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
109619
109880
|
FileInput,
|
|
109620
109881
|
{
|
|
@@ -109940,6 +110201,7 @@ const ChatSidebar = ({
|
|
|
109940
110201
|
const [isImportDialogOpen, setIsImportDialogOpen] = reactExports.useState(false);
|
|
109941
110202
|
const perPage = 50;
|
|
109942
110203
|
const exportAgentMutation = useExportAgent();
|
|
110204
|
+
const clearConversationMutation = useClearAgentConversation();
|
|
109943
110205
|
const { page, setPage } = usePaginationParams();
|
|
109944
110206
|
const {
|
|
109945
110207
|
data: agents = [],
|
|
@@ -110097,6 +110359,11 @@ const ChatSidebar = ({
|
|
|
110097
110359
|
isAgentsPage: false,
|
|
110098
110360
|
onViewAgentSettings: onNavigateToAgentSettings ? () => onNavigateToAgentSettings(agent.id) : void 0,
|
|
110099
110361
|
onExportAgent: () => handleExportAgent(agent.id),
|
|
110362
|
+
onClearConversation: () => {
|
|
110363
|
+
clearConversationMutation.mutate({
|
|
110364
|
+
agentId: agent.id
|
|
110365
|
+
});
|
|
110366
|
+
},
|
|
110100
110367
|
onAgentDeleted: (deletedAgentId) => {
|
|
110101
110368
|
if (selectedConversation === deletedAgentId) {
|
|
110102
110369
|
onSelectConversation("");
|
|
@@ -115339,7 +115606,7 @@ const CredentialDialog = ({
|
|
|
115339
115606
|
actions: dialogActions,
|
|
115340
115607
|
maxWidth: "sm",
|
|
115341
115608
|
fullWidth: true,
|
|
115342
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer$
|
|
115609
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormContainer$1, { children: [
|
|
115343
115610
|
!initialKey && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
115344
115611
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { fullWidth: true, children: [
|
|
115345
115612
|
/* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel, { id: "credential-key-label", children: "Credential Type" }),
|