local-operator-ui 0.12.3 → 0.12.5
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/LICENSE +21 -619
- package/README.md +3 -2
- package/out/main/index.jsc +0 -0
- package/out/preload/index.jsc +0 -0
- package/out/renderer/assets/{_basePickBy-D_lB49Nw.js → _basePickBy-DBXIOr3H.js} +2 -2
- package/out/renderer/assets/{_baseUniq-DVHyzMWx.js → _baseUniq-oNXXu8rx.js} +1 -1
- package/out/renderer/assets/{arc-Cz0FYAxj.js → arc-dIUhH0vy.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-C4ktN37D.js → architectureDiagram-IEHRJDOE-CcEvEu2C.js} +7 -7
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-CU6r8dcw.js → blockDiagram-JOT3LUYC-D5O4-oIj.js} +5 -5
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-f9fZ76vg.js → c4Diagram-VJAJSXHY-BQMfKd4Q.js} +2 -2
- package/out/renderer/assets/{channel-DDua3gpf.js → channel-L1pqeWuA.js} +1 -1
- package/out/renderer/assets/chat-input-CU-CA7Se.png +0 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-BImCYdva.js → chunk-4BMEZGHF-tTF-v-04.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-Duouqy8R.js → chunk-A2AXSNBT-BQYMyLBf.js} +2 -2
- package/out/renderer/assets/{chunk-AEK57VVT-ug6WkgVp.js → chunk-AEK57VVT-SRljeQZu.js} +2 -2
- package/out/renderer/assets/{chunk-D6G4REZN-B4s3i2fv.js → chunk-D6G4REZN-BBcVBD5t.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-BtZxEqZj.js → chunk-RZ5BOZE2-DoaOrKfk.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-mUnOuu-C.js → chunk-XZIHB7SX-CH_ugfxe.js} +1 -1
- package/out/renderer/assets/{classDiagram-GIVACNV2-BSvSEfYr.js → classDiagram-GIVACNV2-BuM30Dyp.js} +3 -3
- package/out/renderer/assets/{classDiagram-v2-COTLJTTW-BSvSEfYr.js → classDiagram-v2-COTLJTTW-BuM30Dyp.js} +3 -3
- package/out/renderer/assets/{clone-DwRww_yE.js → clone-CXK5mu5e.js} +1 -1
- package/out/renderer/assets/{dagre-OKDRZEBW-BT5Skj91.js → dagre-OKDRZEBW-BThe-2D6.js} +6 -6
- package/out/renderer/assets/{diagram-SSKATNLV-CARCGGp8.js → diagram-SSKATNLV-YOJrQHY2.js} +6 -6
- package/out/renderer/assets/{diagram-VNBRO52H-DYNE5bP-.js → diagram-VNBRO52H-BXqgQ9w2.js} +6 -6
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-CbXbwJWU.js → erDiagram-Q7BY3M3F-IPUKaKH3.js} +3 -3
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-DCXlt-VL.js → flowDiagram-4HSFHLVR-B3925mvz.js} +3 -3
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-ByRCNFDO.js → ganttDiagram-APWFNJXF-CKJIfiAY.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-05jpnuDv.js → gitGraphDiagram-7IBYFJ6S-OlXFREtF.js} +7 -7
- package/out/renderer/assets/{graph-D872quDZ.js → graph-keTJV7XL.js} +2 -2
- package/out/renderer/assets/{index-Bz9i7Cd8.js → index-DNeKpvUS.js} +1 -1
- package/out/renderer/assets/{index-kCiyjU-8.js → index-DyaU6iOA.js} +1 -1
- package/out/renderer/assets/{index-gGvrtoJX.js → index-Dz6TzBEG.js} +447 -347
- package/out/renderer/assets/{infoDiagram-PH2N3AL5-BpYJVAYI.js → infoDiagram-PH2N3AL5-DWMqI59j.js} +5 -5
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-CX7f5NLJ.js → journeyDiagram-U35MCT3I-BcJ33bp0.js} +3 -3
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-b906EDwu.js → kanban-definition-NDS4AKOZ-vzPmig7Y.js} +1 -1
- package/out/renderer/assets/{layout-e8Y1M0Nl.js → layout-BFWSU6s_.js} +4 -4
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-BiKEPoOD.js → mindmap-definition-ALO5MXBD-O9uBlpHL.js} +1 -1
- package/out/renderer/assets/{pieDiagram-IB7DONF6-DaslafX0.js → pieDiagram-IB7DONF6-hEnot0FH.js} +7 -7
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-DSgptiHP.js → quadrantDiagram-7GDLP6J5-3Xr8RuV3.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-DDcxEZev.js → radar-MK3ICKWK-CZU5BhvW.js} +4 -4
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-DK6InPeo.js → requirementDiagram-KVF5MWMF-epT_iBII.js} +2 -2
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-DZTaN53O.js → sankeyDiagram-QLVOVGJD-DGEieYSJ.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-BDt_f_hQ.js → sequenceDiagram-X6HHIX6F-C-26csWS.js} +3 -3
- package/out/renderer/assets/{stateDiagram-DGXRK772-vXoCogWI.js → stateDiagram-DGXRK772-CeyZGI_q.js} +7 -7
- package/out/renderer/assets/{stateDiagram-v2-YXO3MK2T-OXX9BIpM.js → stateDiagram-v2-YXO3MK2T-Bcz2S6_5.js} +3 -3
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-Br6iVGoQ.js → timeline-definition-BDJGKUSR-Db8O4iZL.js} +2 -2
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-BpNk-8_j.js → xychartDiagram-VJFVF3MP-Dw2GxLel.js} +1 -1
- package/out/renderer/index.html +1 -1
- package/package.json +11 -38
|
@@ -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-DNeKpvUS.js","./fonts-DqkQ6BY5.js","./fonts-CM-VN_uu.css","./index-DyaU6iOA.js","./pug-By0kVCfm.js","./javascript-C3MnDRiU.js","./dagre-OKDRZEBW-BThe-2D6.js","./graph-keTJV7XL.js","./_baseUniq-oNXXu8rx.js","./layout-BFWSU6s_.js","./_basePickBy-DBXIOr3H.js","./clone-CXK5mu5e.js","./c4Diagram-VJAJSXHY-BQMfKd4Q.js","./chunk-D6G4REZN-BBcVBD5t.js","./flowDiagram-4HSFHLVR-B3925mvz.js","./chunk-RZ5BOZE2-DoaOrKfk.js","./channel-L1pqeWuA.js","./erDiagram-Q7BY3M3F-IPUKaKH3.js","./gitGraphDiagram-7IBYFJ6S-OlXFREtF.js","./chunk-4BMEZGHF-tTF-v-04.js","./chunk-XZIHB7SX-CH_ugfxe.js","./radar-MK3ICKWK-CZU5BhvW.js","./ganttDiagram-APWFNJXF-CKJIfiAY.js","./infoDiagram-PH2N3AL5-DWMqI59j.js","./pieDiagram-IB7DONF6-hEnot0FH.js","./arc-dIUhH0vy.js","./quadrantDiagram-7GDLP6J5-3Xr8RuV3.js","./xychartDiagram-VJFVF3MP-Dw2GxLel.js","./requirementDiagram-KVF5MWMF-epT_iBII.js","./sequenceDiagram-X6HHIX6F-C-26csWS.js","./classDiagram-GIVACNV2-BuM30Dyp.js","./chunk-A2AXSNBT-BQYMyLBf.js","./classDiagram-v2-COTLJTTW-BuM30Dyp.js","./stateDiagram-DGXRK772-CeyZGI_q.js","./chunk-AEK57VVT-SRljeQZu.js","./stateDiagram-v2-YXO3MK2T-Bcz2S6_5.js","./journeyDiagram-U35MCT3I-BcJ33bp0.js","./timeline-definition-BDJGKUSR-Db8O4iZL.js","./mindmap-definition-ALO5MXBD-O9uBlpHL.js","./cytoscape.esm-C0AOj4uS.js","./kanban-definition-NDS4AKOZ-vzPmig7Y.js","./sankeyDiagram-QLVOVGJD-DGEieYSJ.js","./diagram-VNBRO52H-BXqgQ9w2.js","./diagram-SSKATNLV-YOJrQHY2.js","./blockDiagram-JOT3LUYC-D5O4-oIj.js","./architectureDiagram-IEHRJDOE-CcEvEu2C.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import { i as createStyled, l as resolveProps, m as useTheme, n as useTheme$1, r as reactExports, o as React, p as useEnhancedEffect$1, q as clsx, t as useForkRef$1, v as extendSxProp, j as jsxRuntimeExports, w as handleBreakpoints, x as resolveBreakpointValues, y as createUnarySpacing, z as deepmerge, A as mergeBreakpointsInOrder, F as composeClasses$1, G as generateUtilityClass$1, I as createTheme$1, J as getValue$1, h as React$1, K as requireReactDom, g as getDefaultExportFromCjs, L as defaultTheme$2, M as THEME_ID, N as generateUtilityClasses$1, O as useDefaultProps, s as styled$1, P as capitalize$1, Q as memoTheme, _ as _inheritsLoose, S as _objectWithoutPropertiesLoose$k, U as TransitionGroupContext, V as _extends$w, W as duration, u as useTheme$2, X as useTimeout$1, Y as useId$1, Z as ButtonBase, b as alpha$1, $ as createSimplePaletteValueFilter, a0 as CircularProgress, a1 as Paper, a2 as darken$1, a3 as lighten$1, a4 as useEventCallback$1, a5 as useRtl, a6 as globalCss, a7 as formatMuiErrorMessage$1, a8 as rootShouldForwardProp, T as Typography, a9 as css$1, k as keyframes, aa as getPath$2, ab as isFocusVisible, ac as typographyClasses, ad as slotShouldForwardProp, ae as clamp$1, af as emphasize, ag as Timeout$1, c as createLucideIcon, a as Button, B as Box, ah as FontAwesomeIcon, ai as faExclamationTriangle, D as DEFAULT_THEME, aj as faChevronLeft, ak as faChevronRight, al as faRobot, am as faCheck, an as faTimes, ao as faEraser, ap as faPen, aq as faFileImport, ar as faUpload, as as GlobalStyles, at as requireReact, au as faComment, av as faSave, aw as faEdit, ax as faTrashAlt, ay as faInfoCircle, az as faGear, aA as faPlus, aB as faServer, aC as faStar, aD as faTag, aE as faIdCard, aF as faCalendarAlt, aG as faCodeBranch, aH as faShieldAlt, aI as faArrowLeft, aJ as faClock, C as Code, aK as faHome, aL as faDownload, aM as faFileAlt, aN as faDesktop, aO as faImage, aP as faMusic, aQ as faVideo, aR as faLaptop, aS as faUsers, aT as faDatabase, aU as faBoxOpen, aV as faBook, aW as faHdd, aX as faBox, aY as faArchive, aZ as faNetworkWired, a_ as faFolder, a$ as faFolderOpen, b0 as faFolderTree, b1 as faFile, b2 as faCode, b3 as faSliders, b4 as faTrash, b5 as faArrowDown, b6 as faPaperclip, b7 as faPaperPlane, b8 as faExclamationCircle, b9 as faChevronDown, 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 PropTypes, bl as shouldForwardProp, bm as TransitionGroup, bn as commonjsGlobal, bo as faLock, bp as faPuzzlePiece, H as HardDrive, bq as faSignOut, br as themes$1, bs as faMoon, bt as faSun, bu as faHexagonNodes, bv as faSkull, bw as faLeaf, bx as faMountain, by as faFire, bz as faIcicles, bA as faBolt, bB as faAdjust, bC as faWaveSquare, bD as faUser, bE as faEnvelope, bF as faHistory, bG as faListAlt, bH as faCreditCard, bI as faPlusCircle, bJ as faChartLine, bK as faShield, bL as library$1, bM as icons$1, f as CssBaseline, e as ThemeProvider$1, d as getTheme, R as ReactDOM$1, E as ErrorBoundary } from "./fonts-DqkQ6BY5.js";
|
|
3
3
|
const styled = createStyled();
|
|
4
4
|
function getThemeProps(params) {
|
|
@@ -40532,9 +40532,9 @@ const useMessageInput = ({
|
|
|
40532
40532
|
resetCurrentHistoryIndex(conversationId);
|
|
40533
40533
|
draftMessageRef.current = "";
|
|
40534
40534
|
if (scrollToBottom) {
|
|
40535
|
-
|
|
40535
|
+
requestAnimationFrame(() => {
|
|
40536
40536
|
scrollToBottom();
|
|
40537
|
-
}
|
|
40537
|
+
});
|
|
40538
40538
|
}
|
|
40539
40539
|
}, [
|
|
40540
40540
|
inputValue,
|
|
@@ -42221,8 +42221,10 @@ const useScrollToBottom = (buttonThreshold = 50, externalContainerRef, contentKe
|
|
|
42221
42221
|
const scrollToBottom = reactExports.useCallback(() => {
|
|
42222
42222
|
const container = containerRef.current;
|
|
42223
42223
|
if (!container) return;
|
|
42224
|
-
|
|
42225
|
-
|
|
42224
|
+
requestAnimationFrame(() => {
|
|
42225
|
+
container.scrollTo({ top: 0, behavior: "smooth" });
|
|
42226
|
+
requestAnimationFrame(updateScrollPosition);
|
|
42227
|
+
});
|
|
42226
42228
|
}, [containerRef, updateScrollPosition]);
|
|
42227
42229
|
const handleScroll = reactExports.useCallback(() => {
|
|
42228
42230
|
if (!containerRef.current || isHandlingScrollRef.current) return;
|
|
@@ -42547,6 +42549,22 @@ const useStreamingMessage = ({
|
|
|
42547
42549
|
(record) => record.id === messageId
|
|
42548
42550
|
);
|
|
42549
42551
|
if (!messageData) {
|
|
42552
|
+
if (registryEntry?.messageData && registryEntry.isComplete) {
|
|
42553
|
+
completeStreamingMessage(messageId, registryEntry.messageData);
|
|
42554
|
+
if (conversationId) {
|
|
42555
|
+
const messageForStore = convertToMessage(
|
|
42556
|
+
registryEntry.messageData,
|
|
42557
|
+
conversationId
|
|
42558
|
+
);
|
|
42559
|
+
const updated = updateMessage(conversationId, messageForStore);
|
|
42560
|
+
if (!updated) {
|
|
42561
|
+
addMessage(conversationId, messageForStore);
|
|
42562
|
+
}
|
|
42563
|
+
}
|
|
42564
|
+
if (onComplete && mountedRef.current) {
|
|
42565
|
+
onComplete(registryEntry.messageData);
|
|
42566
|
+
}
|
|
42567
|
+
}
|
|
42550
42568
|
return;
|
|
42551
42569
|
}
|
|
42552
42570
|
completeStreamingMessage(messageId, messageData);
|
|
@@ -42602,78 +42620,42 @@ const useStreamingMessage = ({
|
|
|
42602
42620
|
...registryEntry?.messageData,
|
|
42603
42621
|
...update
|
|
42604
42622
|
};
|
|
42605
|
-
|
|
42623
|
+
const currentRegistryEntry = globalConnectionRegistry.get(messageId);
|
|
42624
|
+
const alreadyCompleted = currentRegistryEntry?.isComplete;
|
|
42625
|
+
if (update.is_complete && !alreadyCompleted) {
|
|
42606
42626
|
completeStreamingMessage(messageId, messageData);
|
|
42607
|
-
if (
|
|
42627
|
+
if (currentRegistryEntry) {
|
|
42628
|
+
currentRegistryEntry.isComplete = true;
|
|
42629
|
+
}
|
|
42630
|
+
if (conversationId && messageData.id) {
|
|
42631
|
+
const messageForStore = convertToMessage(messageData, conversationId);
|
|
42632
|
+
const updated = updateMessage(conversationId, messageForStore);
|
|
42633
|
+
if (!updated) {
|
|
42634
|
+
addMessage(conversationId, messageForStore);
|
|
42635
|
+
}
|
|
42636
|
+
}
|
|
42637
|
+
if (refetchOnComplete && !isRefetching) {
|
|
42608
42638
|
setTimeout(() => {
|
|
42609
42639
|
if (mountedRef.current) {
|
|
42610
|
-
|
|
42611
|
-
|
|
42612
|
-
|
|
42613
|
-
setIsRefetching(true);
|
|
42614
|
-
const client2 = createLocalOperatorClient(baseUrl);
|
|
42615
|
-
const entry = globalConnectionRegistry.get(messageId);
|
|
42616
|
-
const agentId = entry?.conversationId || conversationId;
|
|
42617
|
-
if (!agentId) return;
|
|
42618
|
-
const response = await client2.agents.getAgentExecutionHistory(
|
|
42619
|
-
agentId,
|
|
42620
|
-
1,
|
|
42621
|
-
20
|
|
42622
|
-
);
|
|
42623
|
-
if (response.status >= 400 || !response.result) {
|
|
42624
|
-
throw new Error(
|
|
42625
|
-
response.message || "Failed to fetch message data"
|
|
42626
|
-
);
|
|
42627
|
-
}
|
|
42628
|
-
const msgData = response.result.history.find(
|
|
42629
|
-
(record) => record.id === messageId
|
|
42630
|
-
);
|
|
42631
|
-
if (!msgData) return;
|
|
42632
|
-
completeStreamingMessage(messageId, msgData);
|
|
42633
|
-
if (entry) {
|
|
42634
|
-
entry.messageData = msgData;
|
|
42635
|
-
entry.isComplete = true;
|
|
42636
|
-
entry.isStreamable = !!msgData.is_streamable;
|
|
42637
|
-
}
|
|
42638
|
-
if (conversationId) {
|
|
42639
|
-
const msgForStore = convertToMessage(
|
|
42640
|
-
msgData,
|
|
42641
|
-
conversationId
|
|
42642
|
-
);
|
|
42643
|
-
const updated = updateMessage(conversationId, msgForStore);
|
|
42644
|
-
if (!updated) {
|
|
42645
|
-
addMessage(conversationId, msgForStore);
|
|
42646
|
-
}
|
|
42647
|
-
}
|
|
42648
|
-
if (onComplete && mountedRef.current) {
|
|
42649
|
-
onComplete(msgData);
|
|
42650
|
-
}
|
|
42651
|
-
} catch (error2) {
|
|
42652
|
-
const errorMessage = error2 instanceof Error ? error2.message : String(error2);
|
|
42653
|
-
console.error(
|
|
42654
|
-
`Error auto-refetching message: ${errorMessage}`
|
|
42655
|
-
);
|
|
42656
|
-
} finally {
|
|
42657
|
-
setIsRefetching(false);
|
|
42658
|
-
}
|
|
42659
|
-
};
|
|
42660
|
-
doRefetch();
|
|
42640
|
+
refetchMessage().catch((error2) => {
|
|
42641
|
+
console.error("Error during refetch after completion:", error2);
|
|
42642
|
+
});
|
|
42661
42643
|
}
|
|
42662
|
-
},
|
|
42644
|
+
}, 150);
|
|
42663
42645
|
}
|
|
42664
|
-
} else {
|
|
42646
|
+
} else if (!update.is_complete) {
|
|
42665
42647
|
updateStreamingMessage(messageId, messageData);
|
|
42666
|
-
|
|
42667
|
-
|
|
42668
|
-
|
|
42669
|
-
|
|
42670
|
-
|
|
42671
|
-
|
|
42672
|
-
|
|
42673
|
-
|
|
42674
|
-
|
|
42675
|
-
|
|
42676
|
-
}
|
|
42648
|
+
if (conversationId && messageData.id) {
|
|
42649
|
+
const messageForStore = convertToMessage(messageData, conversationId);
|
|
42650
|
+
if (!updateChatStoreTimeoutRef.current) {
|
|
42651
|
+
updateChatStoreTimeoutRef.current = setTimeout(() => {
|
|
42652
|
+
const updated = updateMessage(conversationId, messageForStore);
|
|
42653
|
+
if (!updated) {
|
|
42654
|
+
addMessage(conversationId, messageForStore);
|
|
42655
|
+
}
|
|
42656
|
+
updateChatStoreTimeoutRef.current = null;
|
|
42657
|
+
}, 50);
|
|
42658
|
+
}
|
|
42677
42659
|
}
|
|
42678
42660
|
}
|
|
42679
42661
|
},
|
|
@@ -42681,14 +42663,13 @@ const useStreamingMessage = ({
|
|
|
42681
42663
|
messageId,
|
|
42682
42664
|
conversationId,
|
|
42683
42665
|
onUpdate,
|
|
42684
|
-
onComplete,
|
|
42685
42666
|
refetchOnComplete,
|
|
42686
42667
|
updateStreamingMessage,
|
|
42687
42668
|
completeStreamingMessage,
|
|
42688
42669
|
updateMessage,
|
|
42689
42670
|
addMessage,
|
|
42690
|
-
|
|
42691
|
-
|
|
42671
|
+
isRefetching,
|
|
42672
|
+
refetchMessage
|
|
42692
42673
|
]
|
|
42693
42674
|
);
|
|
42694
42675
|
const updateChatStoreTimeoutRef = reactExports.useRef(null);
|
|
@@ -42887,7 +42868,11 @@ const useStreamingMessage = ({
|
|
|
42887
42868
|
isCompletePrevRef.current = true;
|
|
42888
42869
|
completeStreamingMessage(messageId, message2);
|
|
42889
42870
|
if (onComplete) {
|
|
42890
|
-
|
|
42871
|
+
setTimeout(() => {
|
|
42872
|
+
if (mountedRef.current) {
|
|
42873
|
+
onComplete(message2);
|
|
42874
|
+
}
|
|
42875
|
+
}, 50);
|
|
42891
42876
|
}
|
|
42892
42877
|
if (!keepAlive) {
|
|
42893
42878
|
safeDisconnect();
|
|
@@ -42904,6 +42889,27 @@ const useStreamingMessage = ({
|
|
|
42904
42889
|
messageId,
|
|
42905
42890
|
completeStreamingMessage
|
|
42906
42891
|
]);
|
|
42892
|
+
reactExports.useEffect(() => {
|
|
42893
|
+
return () => {
|
|
42894
|
+
if (globalConnectionRegistry.has(messageId)) {
|
|
42895
|
+
const entry = globalConnectionRegistry.get(messageId);
|
|
42896
|
+
if (entry && entry.instanceCount > 0) {
|
|
42897
|
+
entry.instanceCount = Math.max(0, entry.instanceCount - 1);
|
|
42898
|
+
if (entry.instanceCount === 0 && !entry.keepAlive) {
|
|
42899
|
+
try {
|
|
42900
|
+
wsDisconnect();
|
|
42901
|
+
entry.connected = false;
|
|
42902
|
+
entry.connecting = false;
|
|
42903
|
+
entry.connectionPromise = null;
|
|
42904
|
+
entry.wsClient = null;
|
|
42905
|
+
} catch (error2) {
|
|
42906
|
+
console.warn("Error during cleanup:", error2);
|
|
42907
|
+
}
|
|
42908
|
+
}
|
|
42909
|
+
}
|
|
42910
|
+
}
|
|
42911
|
+
};
|
|
42912
|
+
}, [messageId, wsDisconnect]);
|
|
42907
42913
|
return {
|
|
42908
42914
|
message: message2,
|
|
42909
42915
|
isComplete,
|
|
@@ -89889,7 +89895,7 @@ const languages = [
|
|
|
89889
89895
|
name: "Go",
|
|
89890
89896
|
extensions: ["go"],
|
|
89891
89897
|
load() {
|
|
89892
|
-
return __vitePreload(() => import("./index-
|
|
89898
|
+
return __vitePreload(() => import("./index-DNeKpvUS.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m2) => m2.go());
|
|
89893
89899
|
}
|
|
89894
89900
|
}),
|
|
89895
89901
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -90066,7 +90072,7 @@ const languages = [
|
|
|
90066
90072
|
alias: ["yml"],
|
|
90067
90073
|
extensions: ["yaml", "yml"],
|
|
90068
90074
|
load() {
|
|
90069
|
-
return __vitePreload(() => import("./index-
|
|
90075
|
+
return __vitePreload(() => import("./index-DyaU6iOA.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m2) => m2.yaml());
|
|
90070
90076
|
}
|
|
90071
90077
|
}),
|
|
90072
90078
|
// Legacy modes ported from CodeMirror 5
|
|
@@ -129102,7 +129108,7 @@ const ReviewHeader = styled$1(Box)(({ theme: theme2 }) => ({
|
|
|
129102
129108
|
justifyContent: "space-between",
|
|
129103
129109
|
padding: theme2.spacing(0.5, 2, 1, 1),
|
|
129104
129110
|
gap: theme2.spacing(1),
|
|
129105
|
-
|
|
129111
|
+
minHeight: "64px"
|
|
129106
129112
|
}));
|
|
129107
129113
|
const ReviewPrompt = styled$1(Typography)(({ theme: theme2 }) => ({
|
|
129108
129114
|
flexGrow: 1,
|
|
@@ -129135,7 +129141,6 @@ const InlineEdit = ({
|
|
|
129135
129141
|
const mediaRecorderRef = reactExports.useRef(null);
|
|
129136
129142
|
const audioChunksRef = reactExports.useRef([]);
|
|
129137
129143
|
const [platform, setPlatform] = reactExports.useState("");
|
|
129138
|
-
const fileInputRef = reactExports.useRef(null);
|
|
129139
129144
|
const textareaRef = reactExports.useRef(null);
|
|
129140
129145
|
const isCancelledRef = reactExports.useRef(false);
|
|
129141
129146
|
const containerRef = reactExports.useRef(null);
|
|
@@ -129343,22 +129348,18 @@ const InlineEdit = ({
|
|
|
129343
129348
|
!isLoading && !isRecording && !isTranscribing && canEnableRecordingFeature
|
|
129344
129349
|
)
|
|
129345
129350
|
);
|
|
129346
|
-
const
|
|
129347
|
-
|
|
129348
|
-
|
|
129349
|
-
|
|
129350
|
-
|
|
129351
|
-
const newAttachments = Array.from(e3.target.files).map((file) => {
|
|
129352
|
-
const filePath2 = file.name;
|
|
129353
|
-
if (filePath2) {
|
|
129354
|
-
return normalizePath(filePath2);
|
|
129355
|
-
}
|
|
129356
|
-
return URL.createObjectURL(file);
|
|
129357
|
-
});
|
|
129358
|
-
setAttachments((prev2) => [...prev2, ...newAttachments]);
|
|
129359
|
-
if (fileInputRef.current) {
|
|
129360
|
-
fileInputRef.current.value = "";
|
|
129351
|
+
const handleAttachFile = async () => {
|
|
129352
|
+
const result = await window.electron.ipcRenderer.invoke(
|
|
129353
|
+
"show-open-dialog",
|
|
129354
|
+
{
|
|
129355
|
+
properties: ["openFile", "multiSelections"]
|
|
129361
129356
|
}
|
|
129357
|
+
);
|
|
129358
|
+
if (!result.canceled && result.filePaths.length > 0) {
|
|
129359
|
+
const newAttachments = result.filePaths.map(
|
|
129360
|
+
(path2) => normalizePath(path2)
|
|
129361
|
+
);
|
|
129362
|
+
setAttachments((prev2) => [...prev2, ...newAttachments]);
|
|
129362
129363
|
}
|
|
129363
129364
|
};
|
|
129364
129365
|
const handleRemoveAttachment = (index2) => {
|
|
@@ -129575,27 +129576,14 @@ const InlineEdit = ({
|
|
|
129575
129576
|
}
|
|
129576
129577
|
),
|
|
129577
129578
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonsRow$1, { children: [
|
|
129578
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
129579
|
-
|
|
129580
|
-
|
|
129581
|
-
|
|
129582
|
-
|
|
129583
|
-
|
|
129584
|
-
|
|
129585
|
-
|
|
129586
|
-
disabled: isLoading || isRecording || isTranscribing,
|
|
129587
|
-
multiple: true
|
|
129588
|
-
}
|
|
129589
|
-
),
|
|
129590
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Add attachments", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
129591
|
-
AttachmentButton$1,
|
|
129592
|
-
{
|
|
129593
|
-
onClick: triggerFileInput,
|
|
129594
|
-
disabled: isLoading || isRecording || isTranscribing || !!reviewState,
|
|
129595
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paperclip, { size: iconSize })
|
|
129596
|
-
}
|
|
129597
|
-
) })
|
|
129598
|
-
] }),
|
|
129579
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Box, { display: "flex", alignItems: "center", gap: 1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Add attachments", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
129580
|
+
AttachmentButton$1,
|
|
129581
|
+
{
|
|
129582
|
+
onClick: handleAttachFile,
|
|
129583
|
+
disabled: isLoading || isRecording || isTranscribing || !!reviewState,
|
|
129584
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paperclip, { size: iconSize })
|
|
129585
|
+
}
|
|
129586
|
+
) }) }),
|
|
129599
129587
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
129600
129588
|
!isRecording && !isTranscribing && !isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
129601
129589
|
Tooltip$1,
|
|
@@ -227631,7 +227619,7 @@ const InsertImageDialog = ({
|
|
|
227631
227619
|
onInsert
|
|
227632
227620
|
}) => {
|
|
227633
227621
|
const theme2 = useTheme$2();
|
|
227634
|
-
const [
|
|
227622
|
+
const [path2, setPath] = reactExports.useState("");
|
|
227635
227623
|
const handleFile = reactExports.useCallback(
|
|
227636
227624
|
(file) => {
|
|
227637
227625
|
const reader = new FileReader();
|
|
@@ -227666,18 +227654,18 @@ const InsertImageDialog = ({
|
|
|
227666
227654
|
handleFile(file);
|
|
227667
227655
|
}
|
|
227668
227656
|
};
|
|
227669
|
-
const
|
|
227670
|
-
if (
|
|
227671
|
-
onInsert(
|
|
227657
|
+
const handleInsertFromPath = () => {
|
|
227658
|
+
if (path2) {
|
|
227659
|
+
onInsert(path2);
|
|
227672
227660
|
onClose();
|
|
227673
|
-
|
|
227661
|
+
setPath("");
|
|
227674
227662
|
}
|
|
227675
227663
|
};
|
|
227676
227664
|
const handleKeyDown = (e3) => {
|
|
227677
227665
|
if (e3.key === "Enter") {
|
|
227678
227666
|
e3.preventDefault();
|
|
227679
|
-
if (
|
|
227680
|
-
|
|
227667
|
+
if (path2.trim()) {
|
|
227668
|
+
handleInsertFromPath();
|
|
227681
227669
|
}
|
|
227682
227670
|
}
|
|
227683
227671
|
};
|
|
@@ -227713,7 +227701,7 @@ const InsertImageDialog = ({
|
|
|
227713
227701
|
fullWidth: true,
|
|
227714
227702
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: { pt: 2 }, children: [
|
|
227715
227703
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(FieldContainer$1, { children: [
|
|
227716
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel$7, { children: "Image
|
|
227704
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FieldLabel$7, { children: "Image Path on Device" }),
|
|
227717
227705
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
|
|
227718
227706
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
227719
227707
|
StyledTextField$4,
|
|
@@ -227721,24 +227709,24 @@ const InsertImageDialog = ({
|
|
|
227721
227709
|
autoFocus: true,
|
|
227722
227710
|
fullWidth: true,
|
|
227723
227711
|
variant: "outlined",
|
|
227724
|
-
type: "
|
|
227725
|
-
placeholder: "
|
|
227726
|
-
value:
|
|
227727
|
-
onChange: (e3) =>
|
|
227712
|
+
type: "text",
|
|
227713
|
+
placeholder: "/Users/eren/Documents/image.png",
|
|
227714
|
+
value: path2,
|
|
227715
|
+
onChange: (e3) => setPath(e3.target.value),
|
|
227728
227716
|
onKeyDown: handleKeyDown,
|
|
227729
227717
|
InputProps: {
|
|
227730
|
-
startAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "start", sx: { paddingLeft: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
227718
|
+
startAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "start", sx: { paddingLeft: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(File$1, { size: 16 }) })
|
|
227731
227719
|
}
|
|
227732
227720
|
}
|
|
227733
227721
|
),
|
|
227734
227722
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
227735
227723
|
Button,
|
|
227736
227724
|
{
|
|
227737
|
-
onClick:
|
|
227725
|
+
onClick: handleInsertFromPath,
|
|
227738
227726
|
variant: "contained",
|
|
227739
227727
|
color: "primary",
|
|
227740
227728
|
size: "small",
|
|
227741
|
-
disabled: !
|
|
227729
|
+
disabled: !path2.trim(),
|
|
227742
227730
|
sx: {
|
|
227743
227731
|
textTransform: "none",
|
|
227744
227732
|
fontSize: "0.8125rem",
|
|
@@ -228251,7 +228239,8 @@ const EditorContainer = styled$1(Paper)(({ theme: theme2 }) => ({
|
|
|
228251
228239
|
width: "100%",
|
|
228252
228240
|
overflow: "hidden",
|
|
228253
228241
|
backgroundColor: theme2.palette.background.paper,
|
|
228254
|
-
|
|
228242
|
+
borderRadius: "0px",
|
|
228243
|
+
border: "none"
|
|
228255
228244
|
}));
|
|
228256
228245
|
const EditorToolbar = styled$1(Toolbar)(({ theme: theme2 }) => ({
|
|
228257
228246
|
minHeight: "48px !important",
|
|
@@ -228942,15 +228931,27 @@ const WysiwygMarkdownEditorComponent = ({
|
|
|
228942
228931
|
[executeCommand, handleContentChange]
|
|
228943
228932
|
);
|
|
228944
228933
|
const insertImage = reactExports.useCallback(() => {
|
|
228934
|
+
const selection2 = window.getSelection();
|
|
228935
|
+
if (selection2?.rangeCount) {
|
|
228936
|
+
selectionRef.current = selection2.getRangeAt(0).cloneRange();
|
|
228937
|
+
}
|
|
228945
228938
|
setIsImageDialogOpen(true);
|
|
228946
228939
|
}, []);
|
|
228947
228940
|
const handleInsertImage = reactExports.useCallback(
|
|
228948
228941
|
(url) => {
|
|
228942
|
+
editorRef.current?.focus();
|
|
228943
|
+
const selection2 = window.getSelection();
|
|
228944
|
+
if (!selection2) return;
|
|
228945
|
+
if (selectionRef.current) {
|
|
228946
|
+
selection2.removeAllRanges();
|
|
228947
|
+
selection2.addRange(selectionRef.current);
|
|
228948
|
+
}
|
|
228949
228949
|
if (url) {
|
|
228950
228950
|
executeCommand("insertImage", url);
|
|
228951
228951
|
}
|
|
228952
|
+
handleContentChange();
|
|
228952
228953
|
},
|
|
228953
|
-
[executeCommand]
|
|
228954
|
+
[executeCommand, handleContentChange]
|
|
228954
228955
|
);
|
|
228955
228956
|
const insertTable = reactExports.useCallback((event) => {
|
|
228956
228957
|
const selection2 = window.getSelection();
|
|
@@ -232387,6 +232388,8 @@ const ChatHeader = ({
|
|
|
232387
232388
|
}) => {
|
|
232388
232389
|
const setCanvasOpen = useUiPreferencesStore((s2) => s2.setCanvasOpen);
|
|
232389
232390
|
const isCanvasOpen = useUiPreferencesStore((s2) => s2.isCanvasOpen);
|
|
232391
|
+
const isMac = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
|
|
232392
|
+
const shortcut = isMac ? "⌘+Shift+C" : "Ctrl+Shift+C";
|
|
232390
232393
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
232391
232394
|
Box,
|
|
232392
232395
|
{
|
|
@@ -232445,7 +232448,7 @@ const ChatHeader = ({
|
|
|
232445
232448
|
}
|
|
232446
232449
|
)
|
|
232447
232450
|
] }),
|
|
232448
|
-
onOpenOptions && !isCanvasOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title:
|
|
232451
|
+
onOpenOptions && !isCanvasOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: `Open Canvas (${shortcut})`, arrow: true, placement: "top", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
232449
232452
|
OptionsButton,
|
|
232450
232453
|
{
|
|
232451
232454
|
onClick: () => setCanvasOpen(true),
|
|
@@ -233445,7 +233448,6 @@ const MessageInput = reactExports.forwardRef(
|
|
|
233445
233448
|
const mediaRecorderRef = reactExports.useRef(null);
|
|
233446
233449
|
const audioChunksRef = reactExports.useRef([]);
|
|
233447
233450
|
const [platform, setPlatform] = reactExports.useState("");
|
|
233448
|
-
const fileInputRef = reactExports.useRef(null);
|
|
233449
233451
|
const { data: credentialsData, isLoading: isLoadingCredentials } = useCredentials();
|
|
233450
233452
|
const isRadientApiKeyConfigured = reactExports.useMemo(
|
|
233451
233453
|
() => credentialsData?.keys?.includes("RADIENT_API_KEY"),
|
|
@@ -233647,32 +233649,28 @@ ${message2}`;
|
|
|
233647
233649
|
if (!newMessage.trim() && attachments.length === 0) return;
|
|
233648
233650
|
submitMessage();
|
|
233649
233651
|
};
|
|
233650
|
-
const handleFileSelect = (e3) => {
|
|
233651
|
-
if (e3.target.files && e3.target.files.length > 0) {
|
|
233652
|
-
const newAttachments = Array.from(e3.target.files).map((file) => {
|
|
233653
|
-
const filePath = file.name;
|
|
233654
|
-
if (filePath) {
|
|
233655
|
-
return normalizePath(filePath);
|
|
233656
|
-
}
|
|
233657
|
-
return URL.createObjectURL(file);
|
|
233658
|
-
});
|
|
233659
|
-
if (conversationId) {
|
|
233660
|
-
for (const path2 of newAttachments) {
|
|
233661
|
-
addAttachment(conversationId, { id: v4(), path: path2 });
|
|
233662
|
-
}
|
|
233663
|
-
}
|
|
233664
|
-
if (fileInputRef.current) {
|
|
233665
|
-
fileInputRef.current.value = "";
|
|
233666
|
-
}
|
|
233667
|
-
}
|
|
233668
|
-
};
|
|
233669
233652
|
const handleRemoveAttachment = (id27) => {
|
|
233670
233653
|
if (conversationId) {
|
|
233671
233654
|
removeAttachment(conversationId, id27);
|
|
233672
233655
|
}
|
|
233673
233656
|
};
|
|
233674
|
-
const
|
|
233675
|
-
|
|
233657
|
+
const handleAttachFile = async () => {
|
|
233658
|
+
const result = await window.electron.ipcRenderer.invoke(
|
|
233659
|
+
"show-open-dialog",
|
|
233660
|
+
{
|
|
233661
|
+
properties: ["openFile", "multiSelections"]
|
|
233662
|
+
}
|
|
233663
|
+
);
|
|
233664
|
+
if (!result.canceled && result.filePaths.length > 0) {
|
|
233665
|
+
if (conversationId) {
|
|
233666
|
+
for (const path2 of result.filePaths) {
|
|
233667
|
+
addAttachment(conversationId, {
|
|
233668
|
+
id: v4(),
|
|
233669
|
+
path: normalizePath(path2)
|
|
233670
|
+
});
|
|
233671
|
+
}
|
|
233672
|
+
}
|
|
233673
|
+
}
|
|
233676
233674
|
};
|
|
233677
233675
|
const handlePaste = (event) => {
|
|
233678
233676
|
const items = event.clipboardData?.items;
|
|
@@ -233720,157 +233718,150 @@ ${message2}`;
|
|
|
233720
233718
|
};
|
|
233721
233719
|
const iconSize = isSmallView ? 16 : 18;
|
|
233722
233720
|
const inputContent = /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { onSubmit: handleSubmit, style: { width: "100%" }, children: [
|
|
233723
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
233724
|
-
|
|
233725
|
-
|
|
233726
|
-
|
|
233727
|
-
|
|
233728
|
-
|
|
233729
|
-
|
|
233730
|
-
|
|
233731
|
-
|
|
233732
|
-
),
|
|
233733
|
-
isRecording ? /* @__PURE__ */ jsxRuntimeExports.jsx(AudioRecordingIndicator, { isRecording }) : isTranscribing ? /* @__PURE__ */ jsxRuntimeExports.jsxs(TranscriptionIndicator, { children: [
|
|
233734
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(TranscriptionText, { variant: "body2", children: "Processing audio" }),
|
|
233735
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(WaveformAnimation, {})
|
|
233736
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233737
|
-
StyledTextField$2,
|
|
233738
|
-
{
|
|
233739
|
-
fullWidth: true,
|
|
233740
|
-
placeholder: isInputDisabled ? "Agent is busy" : "Ask me for help",
|
|
233741
|
-
isSmallView,
|
|
233742
|
-
value: newMessage,
|
|
233743
|
-
onChange: (e3) => setNewMessage(e3.target.value),
|
|
233744
|
-
onKeyDown: handleKeyDown,
|
|
233745
|
-
onPaste: handlePaste,
|
|
233746
|
-
multiline: true,
|
|
233747
|
-
maxRows: 4,
|
|
233748
|
-
variant: "outlined",
|
|
233749
|
-
inputRef: textareaRef,
|
|
233750
|
-
disabled: isInputDisabled,
|
|
233751
|
-
inputProps: {
|
|
233752
|
-
"data-tour-tag": "chat-input-textarea"
|
|
233753
|
-
}
|
|
233754
|
-
}
|
|
233755
|
-
),
|
|
233756
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonsRow, { children: [
|
|
233757
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
233758
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233759
|
-
"input",
|
|
233721
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
233722
|
+
InputInnerContainer,
|
|
233723
|
+
{
|
|
233724
|
+
isSmallView,
|
|
233725
|
+
"data-tour-tag": "chat-input-textarea",
|
|
233726
|
+
children: [
|
|
233727
|
+
replies.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(ReplyPreview, { replies, onRemoveReply: handleRemoveReply }),
|
|
233728
|
+
attachments.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233729
|
+
AttachmentsPreview,
|
|
233760
233730
|
{
|
|
233761
|
-
|
|
233762
|
-
|
|
233763
|
-
|
|
233764
|
-
style: { display: "none" },
|
|
233765
|
-
disabled: isInputDisabled || isRecording || isTranscribing,
|
|
233766
|
-
multiple: true
|
|
233731
|
+
attachments: attachments.map((a2) => a2.path),
|
|
233732
|
+
onRemoveAttachment: (index2) => handleRemoveAttachment(attachments[index2].id),
|
|
233733
|
+
disabled: isInputDisabled || isRecording || isTranscribing
|
|
233767
233734
|
}
|
|
233768
233735
|
),
|
|
233769
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233770
|
-
|
|
233736
|
+
isRecording ? /* @__PURE__ */ jsxRuntimeExports.jsx(AudioRecordingIndicator, { isRecording }) : isTranscribing ? /* @__PURE__ */ jsxRuntimeExports.jsxs(TranscriptionIndicator, { children: [
|
|
233737
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TranscriptionText, { variant: "body2", children: "Processing audio" }),
|
|
233738
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(WaveformAnimation, {})
|
|
233739
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233740
|
+
StyledTextField$2,
|
|
233771
233741
|
{
|
|
233772
|
-
|
|
233773
|
-
|
|
233774
|
-
size: "small",
|
|
233775
|
-
"aria-label": "Attach file",
|
|
233776
|
-
"data-tour-tag": "chat-input-attach-file-button",
|
|
233777
|
-
disabled: isInputDisabled || isRecording || isTranscribing,
|
|
233742
|
+
fullWidth: true,
|
|
233743
|
+
placeholder: isInputDisabled ? "Agent is busy" : "Ask me for help",
|
|
233778
233744
|
isSmallView,
|
|
233779
|
-
|
|
233780
|
-
|
|
233781
|
-
|
|
233782
|
-
|
|
233783
|
-
|
|
233784
|
-
|
|
233785
|
-
|
|
233786
|
-
|
|
233745
|
+
value: newMessage,
|
|
233746
|
+
onChange: (e3) => setNewMessage(e3.target.value),
|
|
233747
|
+
onKeyDown: handleKeyDown,
|
|
233748
|
+
onPaste: handlePaste,
|
|
233749
|
+
multiline: true,
|
|
233750
|
+
maxRows: 4,
|
|
233751
|
+
variant: "outlined",
|
|
233752
|
+
inputRef: textareaRef,
|
|
233753
|
+
disabled: isInputDisabled
|
|
233787
233754
|
}
|
|
233788
|
-
)
|
|
233789
|
-
|
|
233790
|
-
|
|
233791
|
-
|
|
233792
|
-
|
|
233793
|
-
{
|
|
233794
|
-
title: !canEnableRecordingFeature ? "Sign in to Radient in the settings page to enable audio recording" : `Start recording (${shortcutText} or hold Space)`,
|
|
233795
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233796
|
-
IconButton,
|
|
233755
|
+
),
|
|
233756
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonsRow, { children: [
|
|
233757
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
233758
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Attach file", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233759
|
+
AttachmentButton,
|
|
233797
233760
|
{
|
|
233798
|
-
onClick:
|
|
233761
|
+
onClick: handleAttachFile,
|
|
233799
233762
|
color: "primary",
|
|
233800
233763
|
size: "small",
|
|
233801
|
-
"aria-label": "
|
|
233802
|
-
|
|
233803
|
-
|
|
233804
|
-
|
|
233764
|
+
"aria-label": "Attach file",
|
|
233765
|
+
"data-tour-tag": "chat-input-attach-file-button",
|
|
233766
|
+
disabled: isInputDisabled || isRecording || isTranscribing,
|
|
233767
|
+
isSmallView,
|
|
233768
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faPaperclip, fontSize: iconSize })
|
|
233769
|
+
}
|
|
233770
|
+
) }) }),
|
|
233771
|
+
conversationId && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233772
|
+
DirectoryIndicator,
|
|
233773
|
+
{
|
|
233774
|
+
agentId: conversationId,
|
|
233775
|
+
currentWorkingDirectory: agentData?.current_working_directory
|
|
233776
|
+
}
|
|
233777
|
+
)
|
|
233778
|
+
] }),
|
|
233779
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Box, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
233780
|
+
!isRecording && !isTranscribing && !(isLoading && currentJobId) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233781
|
+
Tooltip$1,
|
|
233782
|
+
{
|
|
233783
|
+
title: !canEnableRecordingFeature ? "Sign in to Radient in the settings page to enable audio recording" : `Start recording (${shortcutText} or hold Space)`,
|
|
233784
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233785
|
+
IconButton,
|
|
233805
233786
|
{
|
|
233806
|
-
|
|
233807
|
-
|
|
233808
|
-
|
|
233809
|
-
|
|
233810
|
-
|
|
233811
|
-
|
|
233787
|
+
onClick: handleStartRecording,
|
|
233788
|
+
color: "primary",
|
|
233789
|
+
size: "small",
|
|
233790
|
+
"aria-label": "Start recording",
|
|
233791
|
+
disabled: isLoading || !canEnableRecordingFeature,
|
|
233792
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233793
|
+
Mic,
|
|
233794
|
+
{
|
|
233795
|
+
size: iconSize * 1.1,
|
|
233796
|
+
style: {
|
|
233797
|
+
width: iconSize * 1.4,
|
|
233798
|
+
height: iconSize * 1.4,
|
|
233799
|
+
padding: "2px"
|
|
233800
|
+
}
|
|
233801
|
+
}
|
|
233802
|
+
)
|
|
233812
233803
|
}
|
|
233813
|
-
)
|
|
233804
|
+
) })
|
|
233814
233805
|
}
|
|
233815
|
-
)
|
|
233816
|
-
|
|
233817
|
-
|
|
233818
|
-
|
|
233819
|
-
|
|
233820
|
-
|
|
233821
|
-
|
|
233822
|
-
|
|
233823
|
-
|
|
233824
|
-
|
|
233825
|
-
|
|
233826
|
-
|
|
233827
|
-
|
|
233828
|
-
|
|
233829
|
-
|
|
233830
|
-
|
|
233831
|
-
|
|
233832
|
-
|
|
233833
|
-
|
|
233834
|
-
|
|
233835
|
-
|
|
233836
|
-
|
|
233837
|
-
|
|
233838
|
-
|
|
233839
|
-
}
|
|
233840
|
-
|
|
233841
|
-
|
|
233842
|
-
isLoading && currentJobId ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Stop agent", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233843
|
-
SendButton,
|
|
233844
|
-
{
|
|
233845
|
-
type: "button",
|
|
233846
|
-
variant: "contained",
|
|
233847
|
-
color: "error",
|
|
233848
|
-
onClick: () => onCancelJob?.(currentJobId),
|
|
233849
|
-
"aria-label": "Stop agent",
|
|
233850
|
-
isSmallView,
|
|
233851
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Square, { size: iconSize })
|
|
233852
|
-
}
|
|
233853
|
-
) }) }) : !isRecording && !isTranscribing && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Send message", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233854
|
-
SendButton,
|
|
233855
|
-
{
|
|
233856
|
-
type: "submit",
|
|
233857
|
-
variant: "contained",
|
|
233858
|
-
color: "primary",
|
|
233859
|
-
disabled: isLoading || !newMessage.trim() && attachments.length === 0,
|
|
233860
|
-
"aria-label": "Send message",
|
|
233861
|
-
isSmallView,
|
|
233862
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233863
|
-
FontAwesomeIcon,
|
|
233806
|
+
),
|
|
233807
|
+
isRecording && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
233808
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Confirm recording (Enter)", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233809
|
+
IconButton,
|
|
233810
|
+
{
|
|
233811
|
+
onClick: handleConfirmRecording,
|
|
233812
|
+
color: "success",
|
|
233813
|
+
size: "small",
|
|
233814
|
+
"aria-label": "Confirm recording",
|
|
233815
|
+
disabled: isLoading,
|
|
233816
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { size: iconSize })
|
|
233817
|
+
}
|
|
233818
|
+
) }) }),
|
|
233819
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Cancel recording (Esc)", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233820
|
+
IconButton,
|
|
233821
|
+
{
|
|
233822
|
+
onClick: handleCancelRecording,
|
|
233823
|
+
color: "error",
|
|
233824
|
+
size: "small",
|
|
233825
|
+
"aria-label": "Cancel recording",
|
|
233826
|
+
disabled: isLoading,
|
|
233827
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(X$2, { size: iconSize })
|
|
233828
|
+
}
|
|
233829
|
+
) }) })
|
|
233830
|
+
] }),
|
|
233831
|
+
isLoading && currentJobId ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Stop agent", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233832
|
+
SendButton,
|
|
233864
233833
|
{
|
|
233865
|
-
|
|
233866
|
-
|
|
233834
|
+
type: "button",
|
|
233835
|
+
variant: "contained",
|
|
233836
|
+
color: "error",
|
|
233837
|
+
onClick: () => onCancelJob?.(currentJobId),
|
|
233838
|
+
"aria-label": "Stop agent",
|
|
233839
|
+
isSmallView,
|
|
233840
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Square, { size: iconSize })
|
|
233867
233841
|
}
|
|
233868
|
-
)
|
|
233869
|
-
|
|
233870
|
-
|
|
233871
|
-
|
|
233872
|
-
|
|
233873
|
-
|
|
233842
|
+
) }) }) : !isRecording && !isTranscribing && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { title: "Send message", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233843
|
+
SendButton,
|
|
233844
|
+
{
|
|
233845
|
+
type: "submit",
|
|
233846
|
+
variant: "contained",
|
|
233847
|
+
color: "primary",
|
|
233848
|
+
disabled: isLoading || !newMessage.trim() && attachments.length === 0,
|
|
233849
|
+
"aria-label": "Send message",
|
|
233850
|
+
isSmallView,
|
|
233851
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233852
|
+
FontAwesomeIcon,
|
|
233853
|
+
{
|
|
233854
|
+
icon: faPaperPlane,
|
|
233855
|
+
fontSize: iconSize * 0.8
|
|
233856
|
+
}
|
|
233857
|
+
)
|
|
233858
|
+
}
|
|
233859
|
+
) }) })
|
|
233860
|
+
] })
|
|
233861
|
+
] })
|
|
233862
|
+
]
|
|
233863
|
+
}
|
|
233864
|
+
),
|
|
233874
233865
|
messages.length === 0 && !isSmallView && /* @__PURE__ */ jsxRuntimeExports.jsx(SuggestionsContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
233875
233866
|
Box,
|
|
233876
233867
|
{
|
|
@@ -273876,7 +273867,7 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
273876
273867
|
registerLayoutLoaders([
|
|
273877
273868
|
{
|
|
273878
273869
|
name: "dagre",
|
|
273879
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-OKDRZEBW-
|
|
273870
|
+
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-OKDRZEBW-BThe-2D6.js"), true ? __vite__mapDeps([6,7,8,9,10,11,1,2]) : void 0, import.meta.url), "loader")
|
|
273880
273871
|
}
|
|
273881
273872
|
]);
|
|
273882
273873
|
}, "registerDefaultLayoutLoaders");
|
|
@@ -274466,7 +274457,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
274466
274457
|
}, "detector");
|
|
274467
274458
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
274468
274459
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274469
|
-
const { diagram: diagram22 } = await import("./c4Diagram-VJAJSXHY-
|
|
274460
|
+
const { diagram: diagram22 } = await import("./c4Diagram-VJAJSXHY-BQMfKd4Q.js");
|
|
274470
274461
|
return { diagram: diagram22 };
|
|
274471
274462
|
}, true ? __vite__mapDeps([12,13,1,2]) : void 0, import.meta.url);
|
|
274472
274463
|
return { id, diagram: diagram2 };
|
|
@@ -274486,7 +274477,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
274486
274477
|
}, "detector");
|
|
274487
274478
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
274488
274479
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274489
|
-
const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-
|
|
274480
|
+
const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-B3925mvz.js");
|
|
274490
274481
|
return { diagram: diagram22 };
|
|
274491
274482
|
}, true ? __vite__mapDeps([14,15,16,1,2]) : void 0, import.meta.url);
|
|
274492
274483
|
return { id: id2, diagram: diagram2 };
|
|
@@ -274512,7 +274503,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
274512
274503
|
}, "detector");
|
|
274513
274504
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
274514
274505
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274515
|
-
const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-
|
|
274506
|
+
const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-B3925mvz.js");
|
|
274516
274507
|
return { diagram: diagram22 };
|
|
274517
274508
|
}, true ? __vite__mapDeps([14,15,16,1,2]) : void 0, import.meta.url);
|
|
274518
274509
|
return { id: id3, diagram: diagram2 };
|
|
@@ -274529,7 +274520,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
274529
274520
|
}, "detector");
|
|
274530
274521
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
274531
274522
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274532
|
-
const { diagram: diagram22 } = await import("./erDiagram-Q7BY3M3F-
|
|
274523
|
+
const { diagram: diagram22 } = await import("./erDiagram-Q7BY3M3F-IPUKaKH3.js");
|
|
274533
274524
|
return { diagram: diagram22 };
|
|
274534
274525
|
}, true ? __vite__mapDeps([17,15,16,1,2]) : void 0, import.meta.url);
|
|
274535
274526
|
return { id: id4, diagram: diagram2 };
|
|
@@ -274546,7 +274537,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
274546
274537
|
}, "detector");
|
|
274547
274538
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
274548
274539
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274549
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-7IBYFJ6S-
|
|
274540
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-7IBYFJ6S-OlXFREtF.js");
|
|
274550
274541
|
return { diagram: diagram22 };
|
|
274551
274542
|
}, true ? __vite__mapDeps([18,19,20,21,8,10,11,1,2]) : void 0, import.meta.url);
|
|
274552
274543
|
return { id: id5, diagram: diagram2 };
|
|
@@ -274563,7 +274554,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
274563
274554
|
}, "detector");
|
|
274564
274555
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
274565
274556
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274566
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-APWFNJXF-
|
|
274557
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-APWFNJXF-CKJIfiAY.js");
|
|
274567
274558
|
return { diagram: diagram22 };
|
|
274568
274559
|
}, true ? __vite__mapDeps([22,1,2]) : void 0, import.meta.url);
|
|
274569
274560
|
return { id: id6, diagram: diagram2 };
|
|
@@ -274580,7 +274571,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
274580
274571
|
}, "detector");
|
|
274581
274572
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
274582
274573
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274583
|
-
const { diagram: diagram22 } = await import("./infoDiagram-PH2N3AL5-
|
|
274574
|
+
const { diagram: diagram22 } = await import("./infoDiagram-PH2N3AL5-DWMqI59j.js");
|
|
274584
274575
|
return { diagram: diagram22 };
|
|
274585
274576
|
}, true ? __vite__mapDeps([23,21,8,10,11,1,2]) : void 0, import.meta.url);
|
|
274586
274577
|
return { id: id7, diagram: diagram2 };
|
|
@@ -274596,7 +274587,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
274596
274587
|
}, "detector");
|
|
274597
274588
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
274598
274589
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274599
|
-
const { diagram: diagram22 } = await import("./pieDiagram-IB7DONF6-
|
|
274590
|
+
const { diagram: diagram22 } = await import("./pieDiagram-IB7DONF6-hEnot0FH.js");
|
|
274600
274591
|
return { diagram: diagram22 };
|
|
274601
274592
|
}, true ? __vite__mapDeps([24,19,21,8,10,11,25,1,2]) : void 0, import.meta.url);
|
|
274602
274593
|
return { id: id8, diagram: diagram2 };
|
|
@@ -274612,7 +274603,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
274612
274603
|
}, "detector");
|
|
274613
274604
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
274614
274605
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274615
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-7GDLP6J5-
|
|
274606
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-7GDLP6J5-3Xr8RuV3.js");
|
|
274616
274607
|
return { diagram: diagram22 };
|
|
274617
274608
|
}, true ? __vite__mapDeps([26,1,2]) : void 0, import.meta.url);
|
|
274618
274609
|
return { id: id9, diagram: diagram2 };
|
|
@@ -274629,7 +274620,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
274629
274620
|
}, "detector");
|
|
274630
274621
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
274631
274622
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274632
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-VJFVF3MP-
|
|
274623
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-VJFVF3MP-Dw2GxLel.js");
|
|
274633
274624
|
return { diagram: diagram22 };
|
|
274634
274625
|
}, true ? __vite__mapDeps([27,1,2]) : void 0, import.meta.url);
|
|
274635
274626
|
return { id: id10, diagram: diagram2 };
|
|
@@ -274646,7 +274637,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
274646
274637
|
}, "detector");
|
|
274647
274638
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
274648
274639
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274649
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-KVF5MWMF-
|
|
274640
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-KVF5MWMF-epT_iBII.js");
|
|
274650
274641
|
return { diagram: diagram22 };
|
|
274651
274642
|
}, true ? __vite__mapDeps([28,15,1,2]) : void 0, import.meta.url);
|
|
274652
274643
|
return { id: id11, diagram: diagram2 };
|
|
@@ -274663,7 +274654,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
274663
274654
|
}, "detector");
|
|
274664
274655
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
274665
274656
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274666
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-X6HHIX6F-
|
|
274657
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-X6HHIX6F-C-26csWS.js");
|
|
274667
274658
|
return { diagram: diagram22 };
|
|
274668
274659
|
}, true ? __vite__mapDeps([29,13,20,1,2]) : void 0, import.meta.url);
|
|
274669
274660
|
return { id: id12, diagram: diagram2 };
|
|
@@ -274683,7 +274674,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
274683
274674
|
}, "detector");
|
|
274684
274675
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
274685
274676
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274686
|
-
const { diagram: diagram22 } = await import("./classDiagram-GIVACNV2-
|
|
274677
|
+
const { diagram: diagram22 } = await import("./classDiagram-GIVACNV2-BuM30Dyp.js");
|
|
274687
274678
|
return { diagram: diagram22 };
|
|
274688
274679
|
}, true ? __vite__mapDeps([30,31,15,1,2]) : void 0, import.meta.url);
|
|
274689
274680
|
return { id: id13, diagram: diagram2 };
|
|
@@ -274703,7 +274694,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
274703
274694
|
}, "detector");
|
|
274704
274695
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
274705
274696
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274706
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-COTLJTTW-
|
|
274697
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-COTLJTTW-BuM30Dyp.js");
|
|
274707
274698
|
return { diagram: diagram22 };
|
|
274708
274699
|
}, true ? __vite__mapDeps([32,31,15,1,2]) : void 0, import.meta.url);
|
|
274709
274700
|
return { id: id14, diagram: diagram2 };
|
|
@@ -274723,7 +274714,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
274723
274714
|
}, "detector");
|
|
274724
274715
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
274725
274716
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274726
|
-
const { diagram: diagram22 } = await import("./stateDiagram-DGXRK772-
|
|
274717
|
+
const { diagram: diagram22 } = await import("./stateDiagram-DGXRK772-CeyZGI_q.js");
|
|
274727
274718
|
return { diagram: diagram22 };
|
|
274728
274719
|
}, true ? __vite__mapDeps([33,34,15,7,8,9,10,1,2]) : void 0, import.meta.url);
|
|
274729
274720
|
return { id: id15, diagram: diagram2 };
|
|
@@ -274746,7 +274737,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
274746
274737
|
}, "detector");
|
|
274747
274738
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
274748
274739
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274749
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-YXO3MK2T-
|
|
274740
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-YXO3MK2T-Bcz2S6_5.js");
|
|
274750
274741
|
return { diagram: diagram22 };
|
|
274751
274742
|
}, true ? __vite__mapDeps([35,34,15,1,2]) : void 0, import.meta.url);
|
|
274752
274743
|
return { id: id16, diagram: diagram2 };
|
|
@@ -274763,7 +274754,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
274763
274754
|
}, "detector");
|
|
274764
274755
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
274765
274756
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274766
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-U35MCT3I-
|
|
274757
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-U35MCT3I-BcJ33bp0.js");
|
|
274767
274758
|
return { diagram: diagram22 };
|
|
274768
274759
|
}, true ? __vite__mapDeps([36,13,25,1,2]) : void 0, import.meta.url);
|
|
274769
274760
|
return { id: id17, diagram: diagram2 };
|
|
@@ -274833,7 +274824,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
274833
274824
|
}, "detector");
|
|
274834
274825
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
274835
274826
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274836
|
-
const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-
|
|
274827
|
+
const { diagram: diagram22 } = await import("./flowDiagram-4HSFHLVR-B3925mvz.js");
|
|
274837
274828
|
return { diagram: diagram22 };
|
|
274838
274829
|
}, true ? __vite__mapDeps([14,15,16,1,2]) : void 0, import.meta.url);
|
|
274839
274830
|
return { id: id18, diagram: diagram2 };
|
|
@@ -274850,7 +274841,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
274850
274841
|
}, "detector");
|
|
274851
274842
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
274852
274843
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274853
|
-
const { diagram: diagram22 } = await import("./timeline-definition-BDJGKUSR-
|
|
274844
|
+
const { diagram: diagram22 } = await import("./timeline-definition-BDJGKUSR-Db8O4iZL.js");
|
|
274854
274845
|
return { diagram: diagram22 };
|
|
274855
274846
|
}, true ? __vite__mapDeps([37,25,1,2]) : void 0, import.meta.url);
|
|
274856
274847
|
return { id: id19, diagram: diagram2 };
|
|
@@ -274867,7 +274858,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
274867
274858
|
}, "detector");
|
|
274868
274859
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
274869
274860
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274870
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-ALO5MXBD-
|
|
274861
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-ALO5MXBD-O9uBlpHL.js");
|
|
274871
274862
|
return { diagram: diagram22 };
|
|
274872
274863
|
}, true ? __vite__mapDeps([38,39,1,2]) : void 0, import.meta.url);
|
|
274873
274864
|
return { id: id20, diagram: diagram2 };
|
|
@@ -274884,7 +274875,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
274884
274875
|
}, "detector");
|
|
274885
274876
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
274886
274877
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274887
|
-
const { diagram: diagram22 } = await import("./kanban-definition-NDS4AKOZ-
|
|
274878
|
+
const { diagram: diagram22 } = await import("./kanban-definition-NDS4AKOZ-vzPmig7Y.js");
|
|
274888
274879
|
return { diagram: diagram22 };
|
|
274889
274880
|
}, true ? __vite__mapDeps([40,1,2]) : void 0, import.meta.url);
|
|
274890
274881
|
return { id: id21, diagram: diagram2 };
|
|
@@ -274901,7 +274892,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
274901
274892
|
}, "detector");
|
|
274902
274893
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
274903
274894
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274904
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-QLVOVGJD-
|
|
274895
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-QLVOVGJD-DGEieYSJ.js");
|
|
274905
274896
|
return { diagram: diagram22 };
|
|
274906
274897
|
}, true ? __vite__mapDeps([41,1,2]) : void 0, import.meta.url);
|
|
274907
274898
|
return { id: id22, diagram: diagram2 };
|
|
@@ -274918,7 +274909,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
274918
274909
|
}, "detector");
|
|
274919
274910
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
274920
274911
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274921
|
-
const { diagram: diagram22 } = await import("./diagram-VNBRO52H-
|
|
274912
|
+
const { diagram: diagram22 } = await import("./diagram-VNBRO52H-BXqgQ9w2.js");
|
|
274922
274913
|
return { diagram: diagram22 };
|
|
274923
274914
|
}, true ? __vite__mapDeps([42,19,21,8,10,11,1,2]) : void 0, import.meta.url);
|
|
274924
274915
|
return { id: id23, diagram: diagram2 };
|
|
@@ -274934,7 +274925,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
274934
274925
|
}, "detector");
|
|
274935
274926
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
274936
274927
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274937
|
-
const { diagram: diagram22 } = await import("./diagram-SSKATNLV-
|
|
274928
|
+
const { diagram: diagram22 } = await import("./diagram-SSKATNLV-YOJrQHY2.js");
|
|
274938
274929
|
return { diagram: diagram22 };
|
|
274939
274930
|
}, true ? __vite__mapDeps([43,19,21,8,10,11,1,2]) : void 0, import.meta.url);
|
|
274940
274931
|
return { id: id24, diagram: diagram2 };
|
|
@@ -274950,7 +274941,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
274950
274941
|
}, "detector");
|
|
274951
274942
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
274952
274943
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274953
|
-
const { diagram: diagram22 } = await import("./blockDiagram-JOT3LUYC-
|
|
274944
|
+
const { diagram: diagram22 } = await import("./blockDiagram-JOT3LUYC-D5O4-oIj.js");
|
|
274954
274945
|
return { diagram: diagram22 };
|
|
274955
274946
|
}, true ? __vite__mapDeps([44,11,8,7,16,1,2]) : void 0, import.meta.url);
|
|
274956
274947
|
return { id: id25, diagram: diagram2 };
|
|
@@ -274967,7 +274958,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
274967
274958
|
}, "detector");
|
|
274968
274959
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
274969
274960
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
274970
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-IEHRJDOE-
|
|
274961
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-IEHRJDOE-CcEvEu2C.js");
|
|
274971
274962
|
return { diagram: diagram22 };
|
|
274972
274963
|
}, true ? __vite__mapDeps([45,19,20,21,8,10,11,39,1,2]) : void 0, import.meta.url);
|
|
274973
274964
|
return { id: id26, diagram: diagram2 };
|
|
@@ -315558,12 +315549,23 @@ const StreamingMessage = ({
|
|
|
315558
315549
|
const isStoreMessageComplete = isMessageStreamingComplete(messageId);
|
|
315559
315550
|
const handleComplete = reactExports.useCallback(
|
|
315560
315551
|
(completedMessage) => {
|
|
315561
|
-
|
|
315562
|
-
onComplete
|
|
315563
|
-
|
|
315552
|
+
setTimeout(() => {
|
|
315553
|
+
if (onComplete) {
|
|
315554
|
+
onComplete(completedMessage);
|
|
315555
|
+
}
|
|
315556
|
+
}, 50);
|
|
315564
315557
|
},
|
|
315565
315558
|
[onComplete]
|
|
315566
315559
|
);
|
|
315560
|
+
reactExports.useEffect(() => {
|
|
315561
|
+
if (isStoreMessageComplete && storeMessage?.content && onComplete) {
|
|
315562
|
+
const timer2 = setTimeout(() => {
|
|
315563
|
+
onComplete(storeMessage.content);
|
|
315564
|
+
}, 50);
|
|
315565
|
+
return () => clearTimeout(timer2);
|
|
315566
|
+
}
|
|
315567
|
+
return void 0;
|
|
315568
|
+
}, [isStoreMessageComplete, storeMessage, onComplete]);
|
|
315567
315569
|
const {
|
|
315568
315570
|
message: wsMessage,
|
|
315569
315571
|
isStreamable,
|
|
@@ -315636,18 +315638,46 @@ const StreamingMessage = ({
|
|
|
315636
315638
|
() => status === "connected" && !isStoreMessageComplete,
|
|
315637
315639
|
[status, isStoreMessageComplete]
|
|
315638
315640
|
);
|
|
315641
|
+
const shouldShowStreaming = reactExports.useMemo(() => {
|
|
315642
|
+
return status === "connected" && !isStoreMessageComplete;
|
|
315643
|
+
}, [status, isStoreMessageComplete]);
|
|
315644
|
+
const hasCalledOnCompleteRef = reactExports.useRef(false);
|
|
315645
|
+
reactExports.useEffect(() => {
|
|
315646
|
+
if (!shouldShowStreaming && storeMessage?.content && onComplete && !hasCalledOnCompleteRef.current) {
|
|
315647
|
+
hasCalledOnCompleteRef.current = true;
|
|
315648
|
+
const timer2 = setTimeout(() => {
|
|
315649
|
+
onComplete(storeMessage.content);
|
|
315650
|
+
}, 50);
|
|
315651
|
+
return () => clearTimeout(timer2);
|
|
315652
|
+
}
|
|
315653
|
+
return void 0;
|
|
315654
|
+
}, [shouldShowStreaming, storeMessage, onComplete]);
|
|
315655
|
+
reactExports.useEffect(() => {
|
|
315656
|
+
hasCalledOnCompleteRef.current = false;
|
|
315657
|
+
}, []);
|
|
315658
|
+
reactExports.useEffect(() => {
|
|
315659
|
+
return () => {
|
|
315660
|
+
if (hasCalledOnCompleteRef.current) {
|
|
315661
|
+
hasCalledOnCompleteRef.current = false;
|
|
315662
|
+
}
|
|
315663
|
+
};
|
|
315664
|
+
}, []);
|
|
315639
315665
|
const lastValidMessageRef = reactExports.useRef(null);
|
|
315640
315666
|
const message2 = reactExports.useMemo(() => {
|
|
315641
|
-
if (
|
|
315667
|
+
if (wsMessage) {
|
|
315642
315668
|
lastValidMessageRef.current = wsMessage;
|
|
315643
315669
|
return wsMessage;
|
|
315644
315670
|
}
|
|
315645
|
-
|
|
315646
|
-
|
|
315647
|
-
|
|
315671
|
+
if (isStoreMessageComplete && storeMessage?.content) {
|
|
315672
|
+
lastValidMessageRef.current = storeMessage.content;
|
|
315673
|
+
return storeMessage.content;
|
|
315648
315674
|
}
|
|
315649
|
-
|
|
315650
|
-
|
|
315675
|
+
if (storeMessage?.content) {
|
|
315676
|
+
lastValidMessageRef.current = storeMessage.content;
|
|
315677
|
+
return storeMessage.content;
|
|
315678
|
+
}
|
|
315679
|
+
return lastValidMessageRef.current || null;
|
|
315680
|
+
}, [wsMessage, storeMessage, isStoreMessageComplete]);
|
|
315651
315681
|
const connectionControls = reactExports.useMemo(
|
|
315652
315682
|
() => ({
|
|
315653
315683
|
connect,
|
|
@@ -315971,6 +316001,46 @@ const MessagePaper = React$1.memo(
|
|
|
315971
316001
|
() => message2?.is_streamable === true && message2?.is_complete === false && !isUser,
|
|
315972
316002
|
[message2?.is_streamable, message2?.is_complete, isUser]
|
|
315973
316003
|
);
|
|
316004
|
+
const { isMessageStreamingComplete } = useStreamingMessagesStore();
|
|
316005
|
+
const isStreamingActuallyComplete = reactExports.useMemo(() => {
|
|
316006
|
+
if (!message2?.id) return true;
|
|
316007
|
+
return isMessageStreamingComplete(message2.id);
|
|
316008
|
+
}, [message2?.id, isMessageStreamingComplete]);
|
|
316009
|
+
const shouldShowStreaming = reactExports.useMemo(() => {
|
|
316010
|
+
if (!isStreamable) return false;
|
|
316011
|
+
if (isStreamingActuallyComplete) return false;
|
|
316012
|
+
if (isJobRunning) return true;
|
|
316013
|
+
if (message2?.is_complete === false) return true;
|
|
316014
|
+
return false;
|
|
316015
|
+
}, [
|
|
316016
|
+
isStreamable,
|
|
316017
|
+
isStreamingActuallyComplete,
|
|
316018
|
+
isJobRunning,
|
|
316019
|
+
message2?.is_complete
|
|
316020
|
+
]);
|
|
316021
|
+
const hasHandledCompletionRef = reactExports.useRef(false);
|
|
316022
|
+
reactExports.useEffect(() => {
|
|
316023
|
+
if (!shouldShowStreaming && message2 && !hasHandledCompletionRef.current) {
|
|
316024
|
+
hasHandledCompletionRef.current = true;
|
|
316025
|
+
const timer2 = setTimeout(() => {
|
|
316026
|
+
if (onMessageComplete) {
|
|
316027
|
+
onMessageComplete();
|
|
316028
|
+
}
|
|
316029
|
+
}, 50);
|
|
316030
|
+
return () => clearTimeout(timer2);
|
|
316031
|
+
}
|
|
316032
|
+
return void 0;
|
|
316033
|
+
}, [shouldShowStreaming, message2, onMessageComplete]);
|
|
316034
|
+
reactExports.useEffect(() => {
|
|
316035
|
+
hasHandledCompletionRef.current = false;
|
|
316036
|
+
}, []);
|
|
316037
|
+
reactExports.useEffect(() => {
|
|
316038
|
+
return () => {
|
|
316039
|
+
if (hasHandledCompletionRef.current) {
|
|
316040
|
+
hasHandledCompletionRef.current = false;
|
|
316041
|
+
}
|
|
316042
|
+
};
|
|
316043
|
+
}, []);
|
|
315974
316044
|
const messageStyles = reactExports.useMemo(
|
|
315975
316045
|
() => ({
|
|
315976
316046
|
borderRadius: 2,
|
|
@@ -315992,7 +316062,7 @@ const MessagePaper = React$1.memo(
|
|
|
315992
316062
|
const isNearBottom = !isFarFromBottom;
|
|
315993
316063
|
const shouldAutoScrollRef = reactExports.useRef(true);
|
|
315994
316064
|
reactExports.useEffect(() => {
|
|
315995
|
-
if (!isLastMessage || !
|
|
316065
|
+
if (!isLastMessage || !shouldShowStreaming || !message2) return;
|
|
315996
316066
|
shouldAutoScrollRef.current = isNearBottom;
|
|
315997
316067
|
const scrollInterval = setInterval(() => {
|
|
315998
316068
|
if (shouldAutoScrollRef.current) {
|
|
@@ -316002,12 +316072,18 @@ const MessagePaper = React$1.memo(
|
|
|
316002
316072
|
return () => {
|
|
316003
316073
|
clearInterval(scrollInterval);
|
|
316004
316074
|
};
|
|
316005
|
-
}, [
|
|
316075
|
+
}, [
|
|
316076
|
+
shouldShowStreaming,
|
|
316077
|
+
message2,
|
|
316078
|
+
scrollToBottom,
|
|
316079
|
+
isNearBottom,
|
|
316080
|
+
isLastMessage
|
|
316081
|
+
]);
|
|
316006
316082
|
reactExports.useEffect(() => {
|
|
316007
316083
|
shouldAutoScrollRef.current = isNearBottom;
|
|
316008
316084
|
}, [isNearBottom]);
|
|
316009
316085
|
const streamingMessageComponent = reactExports.useMemo(() => {
|
|
316010
|
-
if (!
|
|
316086
|
+
if (!shouldShowStreaming || !message2) return null;
|
|
316011
316087
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
316012
316088
|
StreamingMessage,
|
|
316013
316089
|
{
|
|
@@ -316027,11 +316103,10 @@ const MessagePaper = React$1.memo(
|
|
|
316027
316103
|
}
|
|
316028
316104
|
);
|
|
316029
316105
|
}, [
|
|
316030
|
-
|
|
316106
|
+
shouldShowStreaming,
|
|
316031
316107
|
message2,
|
|
316032
316108
|
messageStyles,
|
|
316033
316109
|
onMessageComplete,
|
|
316034
|
-
isJobRunning,
|
|
316035
316110
|
markdownStyleProps
|
|
316036
316111
|
]);
|
|
316037
316112
|
const [isThinkingExpanded, setIsThinkingExpanded] = reactExports.useState(false);
|
|
@@ -316044,7 +316119,7 @@ const MessagePaper = React$1.memo(
|
|
|
316044
316119
|
setIsThinkingExpanded(false);
|
|
316045
316120
|
}, []);
|
|
316046
316121
|
const regularMessageComponents = reactExports.useMemo(() => {
|
|
316047
|
-
if (
|
|
316122
|
+
if (shouldShowStreaming || !message2) return null;
|
|
316048
316123
|
const childrenWithRemainingContent = React$1.Children.map(
|
|
316049
316124
|
children2,
|
|
316050
316125
|
(child) => {
|
|
@@ -316083,12 +316158,11 @@ const MessagePaper = React$1.memo(
|
|
|
316083
316158
|
)
|
|
316084
316159
|
] });
|
|
316085
316160
|
}, [
|
|
316086
|
-
|
|
316161
|
+
shouldShowStreaming,
|
|
316162
|
+
message2,
|
|
316087
316163
|
messageStyles,
|
|
316088
316164
|
children2,
|
|
316089
|
-
message2,
|
|
316090
316165
|
isUser,
|
|
316091
|
-
isJobRunning,
|
|
316092
316166
|
isThinkingExpanded,
|
|
316093
316167
|
handleThinkingExpand,
|
|
316094
316168
|
handleThinkingCollapse,
|
|
@@ -316096,7 +316170,7 @@ const MessagePaper = React$1.memo(
|
|
|
316096
316170
|
replies,
|
|
316097
316171
|
remainingContent,
|
|
316098
316172
|
markdownStyleProps
|
|
316099
|
-
]);
|
|
316173
|
+
]) || null;
|
|
316100
316174
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
316101
316175
|
Box,
|
|
316102
316176
|
{
|
|
@@ -316328,7 +316402,7 @@ const MessageItem = reactExports.memo(
|
|
|
316328
316402
|
}
|
|
316329
316403
|
}, []);
|
|
316330
316404
|
const isMessageContentEmpty = !message2.message && (!message2.files || message2.files.length === 0) && !message2.code && !message2.stdout && !message2.stderr && !message2.logging;
|
|
316331
|
-
const shouldHide = (message2.action === "DONE" || message2.action === "ASK") && message2.execution_type === "action" && message2.task_classification === "conversation" || isMessageContentEmpty && message2.is_complete
|
|
316405
|
+
const shouldHide = (message2.action === "DONE" || message2.action === "ASK") && message2.execution_type === "action" && message2.task_classification === "conversation" || isMessageContentEmpty && message2.is_complete;
|
|
316332
316406
|
if (shouldHide) {
|
|
316333
316407
|
return null;
|
|
316334
316408
|
}
|
|
@@ -316653,10 +316727,20 @@ const MessagesView = React$1.memo(
|
|
|
316653
316727
|
const collapsed = messages.length === 0 && !isLoadingMessages && !isFetchingMore;
|
|
316654
316728
|
const lastMessageIsStreaming = messages[messages.length - 1]?.is_streamable && !messages[messages.length - 1]?.is_complete;
|
|
316655
316729
|
const handleMessageComplete = reactExports.useCallback(() => {
|
|
316656
|
-
|
|
316657
|
-
refetch
|
|
316658
|
-
|
|
316730
|
+
setTimeout(() => {
|
|
316731
|
+
if (refetch) {
|
|
316732
|
+
refetch();
|
|
316733
|
+
}
|
|
316734
|
+
}, 200);
|
|
316659
316735
|
}, [refetch]);
|
|
316736
|
+
reactExports.useEffect(() => {
|
|
316737
|
+
if (messages.length > 0) {
|
|
316738
|
+
const lastMessage = messages[messages.length - 1];
|
|
316739
|
+
if (lastMessage?.is_complete && lastMessage?.is_streamable) {
|
|
316740
|
+
console.debug("Last message completed:", lastMessage.id);
|
|
316741
|
+
}
|
|
316742
|
+
}
|
|
316743
|
+
}, [messages]);
|
|
316660
316744
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(MessagesViewWrapper, { collapsed, children: [
|
|
316661
316745
|
isFetchingMore && /* @__PURE__ */ jsxRuntimeExports.jsxs(LoadingMoreIndicator, { isSmallView, children: [
|
|
316662
316746
|
/* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { size: 16, sx: { mr: 1 } }),
|
|
@@ -317557,6 +317641,19 @@ const ChatPage = () => {
|
|
|
317557
317641
|
const { agentId, navigateToAgent } = useAgentRouteParam();
|
|
317558
317642
|
const navigate = useNavigate();
|
|
317559
317643
|
const queryClient2 = useQueryClient();
|
|
317644
|
+
const { isCanvasOpen, setCanvasOpen } = useUiPreferencesStore();
|
|
317645
|
+
reactExports.useEffect(() => {
|
|
317646
|
+
const handleKeyDown = (event) => {
|
|
317647
|
+
if (event.key === "c" && (event.metaKey || event.ctrlKey) && event.shiftKey) {
|
|
317648
|
+
event.preventDefault();
|
|
317649
|
+
setCanvasOpen(!isCanvasOpen);
|
|
317650
|
+
}
|
|
317651
|
+
};
|
|
317652
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
317653
|
+
return () => {
|
|
317654
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
317655
|
+
};
|
|
317656
|
+
}, [isCanvasOpen, setCanvasOpen]);
|
|
317560
317657
|
const { setLastChatAgentId, getLastAgentId } = useAgentSelectionStore();
|
|
317561
317658
|
const effectiveAgentId = agentId || getLastAgentId("chat");
|
|
317562
317659
|
const conversationId = effectiveAgentId || void 0;
|
|
@@ -317722,7 +317819,9 @@ const ChatPage = () => {
|
|
|
317722
317819
|
files: attachments.length > 0 ? attachments : void 0
|
|
317723
317820
|
};
|
|
317724
317821
|
addMessage(conversationId, userMessage);
|
|
317725
|
-
|
|
317822
|
+
requestAnimationFrame(() => {
|
|
317823
|
+
scrollToBottom();
|
|
317824
|
+
});
|
|
317726
317825
|
setIsLoading(true);
|
|
317727
317826
|
try {
|
|
317728
317827
|
const options = {
|
|
@@ -324311,6 +324410,7 @@ const tourCanvasOverviewImage = "" + new URL("canvas-overview-CruGEIRC.png", imp
|
|
|
324311
324410
|
const tourCanvasVariablesImage = "" + new URL("canvas-variables-view-DrA20zqs.png", import.meta.url).href;
|
|
324312
324411
|
const tourChatAttachmentsImage = "" + new URL("chat-attachments-_3cRrONU.png", import.meta.url).href;
|
|
324313
324412
|
const tourChatFullViewImage = "" + new URL("chat-full-view-e-eJPzrw.png", import.meta.url).href;
|
|
324413
|
+
const tourChatInputImage = "" + new URL("chat-input-CU-CA7Se.png", import.meta.url).href;
|
|
324314
324414
|
const tourInlineEditCanvasImage = "" + new URL("inline-edit-canvas-O9conTkE.png", import.meta.url).href;
|
|
324315
324415
|
const tourSteps = [
|
|
324316
324416
|
{
|
|
@@ -324331,7 +324431,7 @@ const tourSteps = [
|
|
|
324331
324431
|
id: "agent-list",
|
|
324332
324432
|
attachTo: { element: '[data-tour-tag="agent-list-panel"]', on: "right" },
|
|
324333
324433
|
title: "Your Agents",
|
|
324334
|
-
text: "On the left, you'll see a list of your available AI agents. You can select an agent to start a conversation or manage its settings. Think of this as your
|
|
324434
|
+
text: "On the left, you'll see a list of your available AI agents. You can select an agent to start a conversation or manage its settings. Think of this as your messenger contacts list, but for AI agents! There are no limits to how many agents you can have, so create as many as you need to handle all your daily tasks.<br/><br/>Use the create agents button at the top of the toolbar to create a new agent at any time. You can also import agents from the Agent Hub, which we will cover later in this tour.",
|
|
324335
324435
|
buttons: [
|
|
324336
324436
|
{
|
|
324337
324437
|
text: "Back",
|
|
@@ -324386,11 +324486,11 @@ const tourSteps = [
|
|
|
324386
324486
|
{
|
|
324387
324487
|
id: "chat-input",
|
|
324388
324488
|
attachTo: {
|
|
324389
|
-
element: '
|
|
324489
|
+
element: '[data-tour-tag="chat-input-textarea"]',
|
|
324390
324490
|
on: "top"
|
|
324391
324491
|
},
|
|
324392
324492
|
title: "Ask Your Agent Anything",
|
|
324393
|
-
text: `Type your request here. Agents can answer questions, perform tasks, search the web, and much more. When you create a new agent, you'll see suggested prompts for ideas!<br /><br />Some powerful requests that you can try:<br /><br /><ul><li>"Create a spreadsheet in my Documents folder with all the major cities in Canada."</li><li>"Search the web for the latest news on AI and make a thorough report."</li><li>Select an attachment and then "translate this document to French."</li></ul
|
|
324493
|
+
text: `Type your request here. Agents can answer questions, perform tasks, search the web, and much more. When you create a new agent, you'll see suggested prompts for ideas!<br /><br />Some powerful requests that you can try:<br /><br /><ul><li>"Create a spreadsheet in my Documents folder with all the major cities in Canada."</li><li>"Search the web for the latest news on AI and make a thorough report."</li><li>Select an attachment and then "translate this document to French."</li></ul><br /><img src="${tourChatInputImage}" alt="Chat Input" style="width: 100%; height: 200px; object-fit: contain; border-radius: 8px;"/><br />You can also attach files to your message by clicking the paperclip button, which we will cover in the next step.`,
|
|
324394
324494
|
buttons: [
|
|
324395
324495
|
{
|
|
324396
324496
|
text: "Back",
|
|
@@ -324574,7 +324674,7 @@ const tourSteps = [
|
|
|
324574
324674
|
on: "top"
|
|
324575
324675
|
},
|
|
324576
324676
|
title: "Documents View",
|
|
324577
|
-
text: `The Documents view shows all your open
|
|
324677
|
+
text: `The Documents view shows all your open notes, blog articles, code, and visualizations as tabs. You can switch between documents to edit them and see dynamic visualizations in HTML created by your agents. Use this view to work with your notes, reports, and agent-generated content.<br /><br />This is where you can get more precise around your agents' work.<br/><img src="${tourInlineEditCanvasImage}" alt="Inline Edit Canvas" style="width: 100%; height: 200px; object-fit: contain; border-radius: 8px;"/><br />In your documents, highlight any text that you want your agent to improve and press Cmd/Ctrl+K to bring up the inline AI editor.
|
|
324578
324678
|
<br /><img src="${tourCanvasCodeInlineEditImage}" alt="Canvas Code Inline Edit" style="width: 100%; height: 200px; object-fit: cover; object-position: top; border-radius: 8px;"/><br />You can be as precise as you want and the agent will edit the document for you in place, using its memories and context so you don't have to re-explain things!`,
|
|
324579
324679
|
buttons: [
|
|
324580
324680
|
{
|