@djangocfg/ui-tools 2.1.335 → 2.1.337
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 +68 -2
- package/dist/ChatRoot-PNNGQCYF.css +7 -0
- package/dist/ChatRoot-PNNGQCYF.css.map +1 -0
- package/dist/ChatRoot-XV2QXMV4.mjs +5 -0
- package/dist/ChatRoot-XV2QXMV4.mjs.map +1 -0
- package/dist/ChatRoot-YX4RLHQX.cjs +14 -0
- package/dist/ChatRoot-YX4RLHQX.cjs.map +1 -0
- package/dist/{CronScheduler.client-3O3VU4CI.mjs → CronScheduler.client-DLMXCPAJ.mjs} +4 -4
- package/dist/{CronScheduler.client-3O3VU4CI.mjs.map → CronScheduler.client-DLMXCPAJ.mjs.map} +1 -1
- package/dist/{CronScheduler.client-A4GO6YBY.cjs → CronScheduler.client-WEJF4PWQ.cjs} +14 -14
- package/dist/{CronScheduler.client-A4GO6YBY.cjs.map → CronScheduler.client-WEJF4PWQ.cjs.map} +1 -1
- package/dist/{DocsLayout-XLDB6CJ2.cjs → DocsLayout-N5ZJZPBY.cjs} +200 -199
- package/dist/DocsLayout-N5ZJZPBY.cjs.map +1 -0
- package/dist/{DocsLayout-CTJINVBM.mjs → DocsLayout-VFPPNKSQ.mjs} +7 -6
- package/dist/DocsLayout-VFPPNKSQ.mjs.map +1 -0
- package/dist/JsonSchemaForm-DD7CLRIG.cjs +13 -0
- package/dist/{JsonSchemaForm-6WMS4CIY.cjs.map → JsonSchemaForm-DD7CLRIG.cjs.map} +1 -1
- package/dist/JsonSchemaForm-XKUIVELK.mjs +4 -0
- package/dist/{JsonSchemaForm-KX4JT3M4.mjs.map → JsonSchemaForm-XKUIVELK.mjs.map} +1 -1
- package/dist/JsonTree-55625VVH.mjs +5 -0
- package/dist/{JsonTree-F27RMYSI.cjs.map → JsonTree-55625VVH.mjs.map} +1 -1
- package/dist/JsonTree-DCM5QGWF.cjs +11 -0
- package/dist/{JsonTree-QTJYSHCV.mjs.map → JsonTree-DCM5QGWF.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-6WVWDO75.cjs → LottiePlayer.client-2S7ISJ2S.cjs} +6 -6
- package/dist/{LottiePlayer.client-6WVWDO75.cjs.map → LottiePlayer.client-2S7ISJ2S.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs → LottiePlayer.client-5LDSSJWS.mjs} +4 -4
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs.map → LottiePlayer.client-5LDSSJWS.mjs.map} +1 -1
- package/dist/{MapContainer-RYG4HPH4.cjs → MapContainer-76YL2JXL.cjs} +8 -8
- package/dist/{MapContainer-RYG4HPH4.cjs.map → MapContainer-76YL2JXL.cjs.map} +1 -1
- package/dist/{MapContainer-GXQLP5WY.mjs → MapContainer-7HXBI3OH.mjs} +3 -3
- package/dist/{MapContainer-GXQLP5WY.mjs.map → MapContainer-7HXBI3OH.mjs.map} +1 -1
- package/dist/{Mermaid.client-SXRRI2YW.mjs → Mermaid.client-NL4SVR7F.mjs} +4 -4
- package/dist/{Mermaid.client-SXRRI2YW.mjs.map → Mermaid.client-NL4SVR7F.mjs.map} +1 -1
- package/dist/{Mermaid.client-W76R5AKJ.cjs → Mermaid.client-NNTI6DFX.cjs} +26 -26
- package/dist/{Mermaid.client-W76R5AKJ.cjs.map → Mermaid.client-NNTI6DFX.cjs.map} +1 -1
- package/dist/Player-BRV7XTWR.mjs +4 -0
- package/dist/{Player-M3GC3VPE.mjs.map → Player-BRV7XTWR.mjs.map} +1 -1
- package/dist/Player-PM7F7DD7.cjs +13 -0
- package/dist/{Player-ZL2X5LGG.cjs.map → Player-PM7F7DD7.cjs.map} +1 -1
- package/dist/{PrettyCode.client-RPDIE5CH.cjs → PrettyCode.client-KOHDVPPN.cjs} +13 -13
- package/dist/{PrettyCode.client-RPDIE5CH.cjs.map → PrettyCode.client-KOHDVPPN.cjs.map} +1 -1
- package/dist/{PrettyCode.client-SPMTQEG4.mjs → PrettyCode.client-ZGYGKE7G.mjs} +4 -4
- package/dist/{PrettyCode.client-SPMTQEG4.mjs.map → PrettyCode.client-ZGYGKE7G.mjs.map} +1 -1
- package/dist/TreeRoot-N72OYKXU.cjs +19 -0
- package/dist/{TreeRoot-A3J65L6F.mjs.map → TreeRoot-N72OYKXU.cjs.map} +1 -1
- package/dist/TreeRoot-VGAIXCUA.mjs +4 -0
- package/dist/{TreeRoot-DSK5JILT.cjs.map → TreeRoot-VGAIXCUA.mjs.map} +1 -1
- package/dist/chunk-2ZLKZ5VR.mjs +631 -0
- package/dist/chunk-2ZLKZ5VR.mjs.map +1 -0
- package/dist/{chunk-LFWQ36LJ.mjs → chunk-5G5YBFS6.mjs} +4 -4
- package/dist/{chunk-LFWQ36LJ.mjs.map → chunk-5G5YBFS6.mjs.map} +1 -1
- package/dist/{chunk-IHAY6FO6.cjs → chunk-5I5QNGUG.cjs} +17 -17
- package/dist/{chunk-IHAY6FO6.cjs.map → chunk-5I5QNGUG.cjs.map} +1 -1
- package/dist/{chunk-F2CMIIOH.cjs → chunk-76NNDZH6.cjs} +42 -42
- package/dist/{chunk-F2CMIIOH.cjs.map → chunk-76NNDZH6.cjs.map} +1 -1
- package/dist/chunk-B5AWZOHJ.cjs +649 -0
- package/dist/chunk-B5AWZOHJ.cjs.map +1 -0
- package/dist/{chunk-KR6B3LVY.mjs → chunk-B6IR5KSC.mjs} +3 -3
- package/dist/{chunk-KR6B3LVY.mjs.map → chunk-B6IR5KSC.mjs.map} +1 -1
- package/dist/{chunk-5LBDYFWH.mjs → chunk-C6GXVH5J.mjs} +3 -3
- package/dist/{chunk-5LBDYFWH.mjs.map → chunk-C6GXVH5J.mjs.map} +1 -1
- package/dist/{chunk-NRKD4F5X.cjs → chunk-FEN5S772.cjs} +36 -36
- package/dist/{chunk-NRKD4F5X.cjs.map → chunk-FEN5S772.cjs.map} +1 -1
- package/dist/{chunk-2SMCH62O.cjs → chunk-FP2RLYQZ.cjs} +11 -11
- package/dist/{chunk-2SMCH62O.cjs.map → chunk-FP2RLYQZ.cjs.map} +1 -1
- package/dist/{chunk-MOME6KYD.mjs → chunk-G5IEC7SR.mjs} +3 -3
- package/dist/{chunk-MOME6KYD.mjs.map → chunk-G5IEC7SR.mjs.map} +1 -1
- package/dist/{chunk-SE5IERVH.mjs → chunk-GYIO7W7M.mjs} +3 -3
- package/dist/{chunk-SE5IERVH.mjs.map → chunk-GYIO7W7M.mjs.map} +1 -1
- package/dist/{chunk-3Z3A7FHA.cjs → chunk-IEEAENLX.cjs} +48 -48
- package/dist/{chunk-3Z3A7FHA.cjs.map → chunk-IEEAENLX.cjs.map} +1 -1
- package/dist/{chunk-DFTVB66S.cjs → chunk-KNDLV4PI.cjs} +85 -85
- package/dist/{chunk-DFTVB66S.cjs.map → chunk-KNDLV4PI.cjs.map} +1 -1
- package/dist/{chunk-SSUOENAZ.mjs → chunk-KNEQRUBA.mjs} +3 -3
- package/dist/{chunk-SSUOENAZ.mjs.map → chunk-KNEQRUBA.mjs.map} +1 -1
- package/dist/{chunk-CGILA3WO.mjs → chunk-N2XQF2OL.mjs} +5 -3
- package/dist/{chunk-CGILA3WO.mjs.map → chunk-N2XQF2OL.mjs.map} +1 -1
- package/dist/{chunk-EUADAUBQ.mjs → chunk-N4MZYNR4.mjs} +4 -4
- package/dist/{chunk-EUADAUBQ.mjs.map → chunk-N4MZYNR4.mjs.map} +1 -1
- package/dist/{chunk-GGKGH5PM.mjs → chunk-OBRSGM64.mjs} +4 -4
- package/dist/{chunk-GGKGH5PM.mjs.map → chunk-OBRSGM64.mjs.map} +1 -1
- package/dist/{chunk-6JTB2X72.mjs → chunk-ODO4GMW7.mjs} +3 -3
- package/dist/{chunk-6JTB2X72.mjs.map → chunk-ODO4GMW7.mjs.map} +1 -1
- package/dist/{chunk-WGEGR3DF.cjs → chunk-OLISEQHS.cjs} +5 -2
- package/dist/{chunk-WGEGR3DF.cjs.map → chunk-OLISEQHS.cjs.map} +1 -1
- package/dist/{chunk-PZKAH7WQ.mjs → chunk-PVAX67JG.mjs} +3 -3
- package/dist/{chunk-PZKAH7WQ.mjs.map → chunk-PVAX67JG.mjs.map} +1 -1
- package/dist/{chunk-PRPG2T2E.cjs → chunk-QJ6GTUCO.cjs} +6 -6
- package/dist/{chunk-PRPG2T2E.cjs.map → chunk-QJ6GTUCO.cjs.map} +1 -1
- package/dist/chunk-QW4RBGHN.cjs +961 -0
- package/dist/chunk-QW4RBGHN.cjs.map +1 -0
- package/dist/{chunk-33AMWFBZ.cjs → chunk-SGP7V2UW.cjs} +15 -15
- package/dist/{chunk-33AMWFBZ.cjs.map → chunk-SGP7V2UW.cjs.map} +1 -1
- package/dist/{chunk-FX2QFYWF.mjs → chunk-VWQ5WOIL.mjs} +3 -3
- package/dist/{chunk-FX2QFYWF.mjs.map → chunk-VWQ5WOIL.mjs.map} +1 -1
- package/dist/{chunk-ZLQHUZDU.cjs → chunk-YDPDTOSP.cjs} +139 -139
- package/dist/{chunk-ZLQHUZDU.cjs.map → chunk-YDPDTOSP.cjs.map} +1 -1
- package/dist/{chunk-77HQWEQ6.cjs → chunk-YW5IVWHQ.cjs} +33 -33
- package/dist/{chunk-77HQWEQ6.cjs.map → chunk-YW5IVWHQ.cjs.map} +1 -1
- package/dist/chunk-YWSQDBNU.mjs +2339 -0
- package/dist/chunk-YWSQDBNU.mjs.map +1 -0
- package/dist/{chunk-YXBOAGIM.cjs → chunk-YXZ6GU7H.cjs} +7 -7
- package/dist/{chunk-YXBOAGIM.cjs.map → chunk-YXZ6GU7H.cjs.map} +1 -1
- package/dist/{chunk-62Y65TGK.mjs → chunk-ZUFTH5IR.mjs} +8 -631
- package/dist/chunk-ZUFTH5IR.mjs.map +1 -0
- package/dist/chunk-ZWPBBAR2.cjs +2379 -0
- package/dist/chunk-ZWPBBAR2.cjs.map +1 -0
- package/dist/components-EHOGXATG.cjs +22 -0
- package/dist/{components-5UXYNAKR.cjs.map → components-EHOGXATG.cjs.map} +1 -1
- package/dist/components-MQ6DR7TX.cjs +26 -0
- package/dist/{components-CFXOEVPN.mjs.map → components-MQ6DR7TX.cjs.map} +1 -1
- package/dist/components-XRX7QGLB.mjs +5 -0
- package/dist/{components-WYEZL5TE.cjs.map → components-XRX7QGLB.mjs.map} +1 -1
- package/dist/components-YATKRWLH.mjs +5 -0
- package/dist/{components-ZAGG2PBO.mjs.map → components-YATKRWLH.mjs.map} +1 -1
- package/dist/file-icon/index.cjs +6 -6
- package/dist/file-icon/index.mjs +1 -1
- package/dist/index.cjs +739 -215
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1025 -39
- package/dist/index.d.ts +1025 -39
- package/dist/index.mjs +387 -31
- package/dist/index.mjs.map +1 -1
- package/dist/tree/index.cjs +38 -38
- package/dist/tree/index.d.cts +2 -2
- package/dist/tree/index.d.ts +2 -2
- package/dist/tree/index.mjs +3 -3
- package/package.json +6 -6
- package/src/index.ts +5 -0
- package/src/stories/index.ts +3 -1
- package/src/tools/Chat/Chat.story.tsx +1006 -0
- package/src/tools/Chat/README.md +528 -0
- package/src/tools/Chat/components/Attachments.tsx +192 -0
- package/src/tools/Chat/components/ChatRoot.tsx +208 -0
- package/src/tools/Chat/components/Composer.tsx +134 -0
- package/src/tools/Chat/components/EmptyState.tsx +47 -0
- package/src/tools/Chat/components/ErrorBanner.tsx +47 -0
- package/src/tools/Chat/components/JumpToLatest.tsx +30 -0
- package/src/tools/Chat/components/MessageActions.tsx +72 -0
- package/src/tools/Chat/components/MessageBubble.tsx +228 -0
- package/src/tools/Chat/components/MessageList.tsx +82 -0
- package/src/tools/Chat/components/Sources.tsx +55 -0
- package/src/tools/Chat/components/StreamingIndicator.tsx +29 -0
- package/src/tools/Chat/components/ToolCalls.tsx +172 -0
- package/src/tools/Chat/components/index.ts +24 -0
- package/src/tools/Chat/config.ts +55 -0
- package/src/tools/Chat/context/ChatProvider.tsx +126 -0
- package/src/tools/Chat/context/index.ts +9 -0
- package/src/tools/Chat/core/audio/audioBus.ts +172 -0
- package/src/tools/Chat/core/audio/index.ts +8 -0
- package/src/tools/Chat/core/audio/preferences.ts +68 -0
- package/src/tools/Chat/core/audio/types.ts +49 -0
- package/src/tools/Chat/core/ids.ts +16 -0
- package/src/tools/Chat/core/index.ts +5 -0
- package/src/tools/Chat/core/logger.ts +73 -0
- package/src/tools/Chat/core/markdown.ts +56 -0
- package/src/tools/Chat/core/payload-dispatch.ts +54 -0
- package/src/tools/Chat/core/persona.ts +35 -0
- package/src/tools/Chat/core/reducer.ts +335 -0
- package/src/tools/Chat/core/transport/http.ts +167 -0
- package/src/tools/Chat/core/transport/index.ts +13 -0
- package/src/tools/Chat/core/transport/mock.ts +134 -0
- package/src/tools/Chat/core/transport/sse.ts +116 -0
- package/src/tools/Chat/core/transport/types.ts +24 -0
- package/src/tools/Chat/hooks/index.ts +26 -0
- package/src/tools/Chat/hooks/useChat.ts +555 -0
- package/src/tools/Chat/hooks/useChatAudio.ts +191 -0
- package/src/tools/Chat/hooks/useChatComposer.ts +227 -0
- package/src/tools/Chat/hooks/useChatHistory.ts +59 -0
- package/src/tools/Chat/hooks/useChatLayout.ts +111 -0
- package/src/tools/Chat/hooks/useChatLightbox.ts +34 -0
- package/src/tools/Chat/hooks/useChatScroll.ts +132 -0
- package/src/tools/Chat/index.ts +161 -0
- package/src/tools/Chat/lazy.tsx +14 -0
- package/src/tools/Chat/types.ts +237 -0
- package/src/tools/Chat/utils/collectImageAttachments.ts +13 -0
- package/src/tools/Map/README.md +384 -0
- package/dist/DocsLayout-CTJINVBM.mjs.map +0 -1
- package/dist/DocsLayout-XLDB6CJ2.cjs.map +0 -1
- package/dist/JsonSchemaForm-6WMS4CIY.cjs +0 -13
- package/dist/JsonSchemaForm-KX4JT3M4.mjs +0 -4
- package/dist/JsonTree-F27RMYSI.cjs +0 -11
- package/dist/JsonTree-QTJYSHCV.mjs +0 -5
- package/dist/Player-M3GC3VPE.mjs +0 -4
- package/dist/Player-ZL2X5LGG.cjs +0 -13
- package/dist/TreeRoot-A3J65L6F.mjs +0 -4
- package/dist/TreeRoot-DSK5JILT.cjs +0 -19
- package/dist/chunk-62Y65TGK.mjs.map +0 -1
- package/dist/chunk-TKSFZHCG.cjs +0 -1597
- package/dist/chunk-TKSFZHCG.cjs.map +0 -1
- package/dist/components-5UXYNAKR.cjs +0 -22
- package/dist/components-CFXOEVPN.mjs +0 -5
- package/dist/components-WYEZL5TE.cjs +0 -26
- package/dist/components-ZAGG2PBO.mjs +0 -5
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
export { ArrayFieldItemTemplate, ArrayFieldTemplate, BaseInputTemplate, CheckboxWidget, ColorWidget, ErrorListTemplate, FieldTemplate, JsonSchemaForm, NumberWidget, ObjectFieldTemplate, SelectWidget, SliderWidget, SwitchWidget, TextWidget, evaluateDisabledWhen, getRequiredFields, hasRequiredFields, mergeDefaults, normalizeFormData, safeJsonParse, safeJsonStringify, validateRequiredFields, validateSchema } from './chunk-
|
|
2
|
-
export { useLottie } from './chunk-
|
|
3
|
-
export { Player as AudioPlayer } from './chunk-
|
|
4
|
-
export { NativeProvider, StreamProvider, VideoControls, VideoErrorFallback, VideoPlayer, VideoPlayerProvider, VidstackProvider, createVideoErrorFallback, isSimpleStreamSource, resolveFileSource, resolvePlayerMode, resolveStreamSource, useVideoPlayerContext } from './chunk-
|
|
5
|
-
export { ImageViewer } from './chunk-
|
|
6
|
-
export { generateContentKey, useAudioCache, useBlobUrlCleanup, useImageCache, useMediaCacheStore, useVideoCache, useVideoPlayerSettings } from './chunk-
|
|
7
|
-
export { CronSchedulerProvider, CustomInput, DayChips, MonthDayGrid, SchedulePreview, ScheduleTypeSelector, TimeSelector, buildCron, humanizeCron, isValidCron, parseCron, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays } from './chunk-
|
|
8
|
-
|
|
9
|
-
export {
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export { ArrayFieldItemTemplate, ArrayFieldTemplate, BaseInputTemplate, CheckboxWidget, ColorWidget, ErrorListTemplate, FieldTemplate, JsonSchemaForm, NumberWidget, ObjectFieldTemplate, SelectWidget, SliderWidget, SwitchWidget, TextWidget, evaluateDisabledWhen, getRequiredFields, hasRequiredFields, mergeDefaults, normalizeFormData, safeJsonParse, safeJsonStringify, validateRequiredFields, validateSchema } from './chunk-GYIO7W7M.mjs';
|
|
2
|
+
export { useLottie } from './chunk-ODO4GMW7.mjs';
|
|
3
|
+
export { Player as AudioPlayer } from './chunk-VWQ5WOIL.mjs';
|
|
4
|
+
export { NativeProvider, StreamProvider, VideoControls, VideoErrorFallback, VideoPlayer, VideoPlayerProvider, VidstackProvider, createVideoErrorFallback, isSimpleStreamSource, resolveFileSource, resolvePlayerMode, resolveStreamSource, useVideoPlayerContext } from './chunk-N4MZYNR4.mjs';
|
|
5
|
+
export { ImageViewer } from './chunk-OBRSGM64.mjs';
|
|
6
|
+
export { generateContentKey, useAudioCache, useBlobUrlCleanup, useImageCache, useMediaCacheStore, useVideoCache, useVideoPlayerSettings } from './chunk-C6GXVH5J.mjs';
|
|
7
|
+
export { CronSchedulerProvider, CustomInput, DayChips, MonthDayGrid, SchedulePreview, ScheduleTypeSelector, TimeSelector, buildCron, humanizeCron, isValidCron, parseCron, useCronCustom, useCronMonthDays, useCronPreview, useCronScheduler, useCronSchedulerContext, useCronTime, useCronType, useCronWeekDays } from './chunk-PVAX67JG.mjs';
|
|
8
|
+
import { LIMITS, createId } from './chunk-YWSQDBNU.mjs';
|
|
9
|
+
export { Attachments, AttachmentsGrid, AttachmentsList, CHAT_EVENT_NAME, CSS_VARS, ChatProvider, ChatRoot, Composer, DEFAULT_LABELS, DEFAULT_SIDEBAR, DEFAULT_Z_INDEX, EmptyState, ErrorBanner, HOTKEYS, JumpToLatest, LIMITS, MessageActions, MessageBubble, MessageList, STORAGE_KEYS, Sources, StreamingIndicator, ToolCalls, createId, createTokenBuffer, deriveInitials, getChatLogger, initialState, reducer, resolvePersona, useChat, useChatAudio, useChatAudioPrefs, useChatComposer, useChatContext, useChatContextOptional, useChatHistory, useChatLayout, useChatScroll } from './chunk-YWSQDBNU.mjs';
|
|
10
|
+
export { TreeError, TreeSkeleton, createDemoTree } from './chunk-B6IR5KSC.mjs';
|
|
11
|
+
export { DEFAULT_TREE_APPEARANCE, DEFAULT_TREE_LABELS, TreeRoot as Tree, TreeChevron, TreeContent, TreeEmpty, TreeIcon, TreeIndentGuides, TreeLabel, TreeProvider, TreeRoot, TreeRow, TreeSearchInput, appearanceToStyle, clearTreeState, createChildCache, flattenTree, loadTreeState, resolveAppearance, resolveChildren, saveTreeState, useTreeActions, useTreeContext, useTreeExpansion, useTreeFocus, useTreeKeyboard, useTreeLabels, useTreeRows, useTreeSearch, useTreeSelection, useTreeTypeAhead } from './chunk-G5IEC7SR.mjs';
|
|
12
|
+
import { PlaygroundProvider } from './chunk-ZUFTH5IR.mjs';
|
|
13
|
+
export { MarkdownMessage, Mermaid_default as Mermaid, PrettyCode_default as PrettyCode, extractTextFromChildren, useCollapsibleContent } from './chunk-2ZLKZ5VR.mjs';
|
|
14
|
+
export { JsonTree_default as JsonTree } from './chunk-5G5YBFS6.mjs';
|
|
15
|
+
import './chunk-KNEQRUBA.mjs';
|
|
16
|
+
import { __name, __publicField } from './chunk-N2XQF2OL.mjs';
|
|
15
17
|
import * as React from 'react';
|
|
16
18
|
import { lazy, forwardRef, useRef, useState, useCallback, useImperativeHandle, useEffect, createContext, Suspense, useContext, useMemo } from 'react';
|
|
17
19
|
import { cn } from '@djangocfg/ui-core/lib';
|
|
@@ -190,21 +192,21 @@ function createLazyComponent(loader, options = {}) {
|
|
|
190
192
|
}
|
|
191
193
|
__name(createLazyComponent, "createLazyComponent");
|
|
192
194
|
var LazyMapContainer = createLazyComponent(
|
|
193
|
-
() => import('./MapContainer-
|
|
195
|
+
() => import('./MapContainer-7HXBI3OH.mjs').then((mod) => ({ default: mod.MapContainer })),
|
|
194
196
|
{
|
|
195
197
|
displayName: "LazyMapContainer",
|
|
196
198
|
fallback: /* @__PURE__ */ jsx(MapLoadingFallback, { minHeight: 400 })
|
|
197
199
|
}
|
|
198
200
|
);
|
|
199
201
|
var LazyMapView = createLazyComponent(
|
|
200
|
-
() => import('./MapContainer-
|
|
202
|
+
() => import('./MapContainer-7HXBI3OH.mjs').then((mod) => ({ default: mod.MapView })),
|
|
201
203
|
{
|
|
202
204
|
displayName: "LazyMapView",
|
|
203
205
|
fallback: /* @__PURE__ */ jsx(MapLoadingFallback, { minHeight: 400 })
|
|
204
206
|
}
|
|
205
207
|
);
|
|
206
208
|
var LazyMermaid = createLazyComponent(
|
|
207
|
-
() => import('./Mermaid.client-
|
|
209
|
+
() => import('./Mermaid.client-NL4SVR7F.mjs'),
|
|
208
210
|
{
|
|
209
211
|
displayName: "LazyMermaid",
|
|
210
212
|
fallback: /* @__PURE__ */ jsx(
|
|
@@ -225,7 +227,7 @@ function CodeLoadingFallback() {
|
|
|
225
227
|
}
|
|
226
228
|
__name(CodeLoadingFallback, "CodeLoadingFallback");
|
|
227
229
|
var LazyPrettyCode = createLazyComponent(
|
|
228
|
-
() => import('./PrettyCode.client-
|
|
230
|
+
() => import('./PrettyCode.client-ZGYGKE7G.mjs'),
|
|
229
231
|
{
|
|
230
232
|
displayName: "LazyPrettyCode",
|
|
231
233
|
fallback: /* @__PURE__ */ jsx(CodeLoadingFallback, {})
|
|
@@ -239,7 +241,7 @@ function OpenapiLoadingFallback() {
|
|
|
239
241
|
}
|
|
240
242
|
__name(OpenapiLoadingFallback, "OpenapiLoadingFallback");
|
|
241
243
|
var LazyDocsLayout = createLazyComponent(
|
|
242
|
-
() => import('./DocsLayout-
|
|
244
|
+
() => import('./DocsLayout-VFPPNKSQ.mjs').then((mod) => ({ default: mod.DocsLayout })),
|
|
243
245
|
{
|
|
244
246
|
displayName: "LazyDocsLayout",
|
|
245
247
|
fallback: /* @__PURE__ */ jsx(OpenapiLoadingFallback, {})
|
|
@@ -250,7 +252,7 @@ var LazyOpenapiViewer = /* @__PURE__ */ __name(({ config }) => {
|
|
|
250
252
|
}, "LazyOpenapiViewer");
|
|
251
253
|
LazyOpenapiViewer.displayName = "LazyOpenapiViewer";
|
|
252
254
|
var LazyJsonSchemaForm = createLazyComponent(
|
|
253
|
-
() => import('./JsonSchemaForm-
|
|
255
|
+
() => import('./JsonSchemaForm-XKUIVELK.mjs').then((mod) => ({ default: mod.JsonSchemaForm })),
|
|
254
256
|
{
|
|
255
257
|
displayName: "LazyJsonSchemaForm",
|
|
256
258
|
fallback: /* @__PURE__ */ jsx(
|
|
@@ -271,14 +273,14 @@ function LottieLoadingFallback() {
|
|
|
271
273
|
}
|
|
272
274
|
__name(LottieLoadingFallback, "LottieLoadingFallback");
|
|
273
275
|
var LazyLottiePlayer = createLazyComponent(
|
|
274
|
-
() => import('./LottiePlayer.client-
|
|
276
|
+
() => import('./LottiePlayer.client-5LDSSJWS.mjs').then((mod) => ({ default: mod.LottiePlayer })),
|
|
275
277
|
{
|
|
276
278
|
displayName: "LazyLottiePlayer",
|
|
277
279
|
fallback: /* @__PURE__ */ jsx(LottieLoadingFallback, {})
|
|
278
280
|
}
|
|
279
281
|
);
|
|
280
282
|
var LazyPlayer = createLazyComponent(
|
|
281
|
-
() => import('./Player-
|
|
283
|
+
() => import('./Player-BRV7XTWR.mjs').then((mod) => ({ default: mod.Player })),
|
|
282
284
|
{
|
|
283
285
|
displayName: "LazyAudioPlayer",
|
|
284
286
|
fallback: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border/60 bg-card px-4 py-6 text-sm text-muted-foreground", children: "Loading audio player\u2026" })
|
|
@@ -303,28 +305,28 @@ function VideoLoadingFallback() {
|
|
|
303
305
|
}
|
|
304
306
|
__name(VideoLoadingFallback, "VideoLoadingFallback");
|
|
305
307
|
var LazyVideoPlayer = createLazyComponent(
|
|
306
|
-
() => import('./components-
|
|
308
|
+
() => import('./components-XRX7QGLB.mjs').then((mod) => ({ default: mod.VideoPlayer })),
|
|
307
309
|
{
|
|
308
310
|
displayName: "LazyVideoPlayer",
|
|
309
311
|
fallback: /* @__PURE__ */ jsx(VideoLoadingFallback, {})
|
|
310
312
|
}
|
|
311
313
|
);
|
|
312
314
|
var LazyJsonTree = createLazyComponent(
|
|
313
|
-
() => import('./JsonTree-
|
|
315
|
+
() => import('./JsonTree-55625VVH.mjs'),
|
|
314
316
|
{
|
|
315
317
|
displayName: "LazyJsonTree",
|
|
316
318
|
fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 100, text: "Loading JSON viewer..." })
|
|
317
319
|
}
|
|
318
320
|
);
|
|
319
321
|
var LazyImageViewer = createLazyComponent(
|
|
320
|
-
() => import('./components-
|
|
322
|
+
() => import('./components-YATKRWLH.mjs').then((mod) => ({ default: mod.ImageViewer })),
|
|
321
323
|
{
|
|
322
324
|
displayName: "LazyImageViewer",
|
|
323
325
|
fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 200, text: "Loading image viewer..." })
|
|
324
326
|
}
|
|
325
327
|
);
|
|
326
328
|
var LazyCronScheduler = createLazyComponent(
|
|
327
|
-
() => import('./CronScheduler.client-
|
|
329
|
+
() => import('./CronScheduler.client-DLMXCPAJ.mjs'),
|
|
328
330
|
{
|
|
329
331
|
displayName: "LazyCronScheduler",
|
|
330
332
|
fallback: /* @__PURE__ */ jsx(
|
|
@@ -338,14 +340,368 @@ var LazyCronScheduler = createLazyComponent(
|
|
|
338
340
|
}
|
|
339
341
|
);
|
|
340
342
|
var LazyTree = createLazyComponent(
|
|
341
|
-
() => import('./TreeRoot-
|
|
343
|
+
() => import('./TreeRoot-VGAIXCUA.mjs'),
|
|
342
344
|
{
|
|
343
345
|
displayName: "LazyTree",
|
|
344
346
|
fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 200, text: "Loading tree\u2026" })
|
|
345
347
|
}
|
|
346
348
|
);
|
|
349
|
+
var LazyChat = createLazyComponent(
|
|
350
|
+
() => import('./ChatRoot-XV2QXMV4.mjs').then((m) => ({ default: m.ChatRoot })),
|
|
351
|
+
{
|
|
352
|
+
displayName: "LazyChat",
|
|
353
|
+
fallback: /* @__PURE__ */ jsx(LoadingFallback, { minHeight: 320, text: "Loading chat\u2026" })
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
|
|
357
|
+
// src/tools/Chat/core/transport/types.ts
|
|
358
|
+
var _TransportError = class _TransportError extends Error {
|
|
359
|
+
constructor(message, code = "transport_error") {
|
|
360
|
+
super(message);
|
|
361
|
+
__publicField(this, "code");
|
|
362
|
+
this.name = "TransportError";
|
|
363
|
+
this.code = code;
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
__name(_TransportError, "TransportError");
|
|
367
|
+
var TransportError = _TransportError;
|
|
368
|
+
|
|
369
|
+
// src/tools/Chat/core/transport/sse.ts
|
|
370
|
+
var DEFAULT_MAP = /* @__PURE__ */ __name((raw) => {
|
|
371
|
+
if (!raw.data) return null;
|
|
372
|
+
try {
|
|
373
|
+
const parsed = JSON.parse(raw.data);
|
|
374
|
+
if (raw.event && !("type" in parsed)) {
|
|
375
|
+
return { ...parsed, type: raw.event };
|
|
376
|
+
}
|
|
377
|
+
return parsed;
|
|
378
|
+
} catch {
|
|
379
|
+
return null;
|
|
380
|
+
}
|
|
381
|
+
}, "DEFAULT_MAP");
|
|
382
|
+
async function* parseSSE(response, options = {}) {
|
|
383
|
+
if (!response.body) {
|
|
384
|
+
throw new Error("SSE response has no body");
|
|
385
|
+
}
|
|
386
|
+
const map = options.map ?? DEFAULT_MAP;
|
|
387
|
+
const idleMs = options.idleTimeoutMs ?? LIMITS.sseIdleMs;
|
|
388
|
+
const reader = response.body.getReader();
|
|
389
|
+
const decoder = new TextDecoder();
|
|
390
|
+
let buffer = "";
|
|
391
|
+
let lastChunkAt = Date.now();
|
|
392
|
+
const idleCheck = /* @__PURE__ */ __name(() => {
|
|
393
|
+
if (Date.now() - lastChunkAt > idleMs) {
|
|
394
|
+
throw new Error(`SSE idle timeout (${idleMs}ms)`);
|
|
395
|
+
}
|
|
396
|
+
}, "idleCheck");
|
|
397
|
+
try {
|
|
398
|
+
while (true) {
|
|
399
|
+
if (options.signal?.aborted) {
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
const { value, done } = await reader.read();
|
|
403
|
+
if (done) break;
|
|
404
|
+
lastChunkAt = Date.now();
|
|
405
|
+
buffer += decoder.decode(value, { stream: true });
|
|
406
|
+
let separator = buffer.indexOf("\n\n");
|
|
407
|
+
while (separator !== -1) {
|
|
408
|
+
const rawBlock = buffer.slice(0, separator);
|
|
409
|
+
buffer = buffer.slice(separator + 2);
|
|
410
|
+
const raw = parseEventBlock(rawBlock);
|
|
411
|
+
const evt = map(raw);
|
|
412
|
+
if (evt) yield evt;
|
|
413
|
+
separator = buffer.indexOf("\n\n");
|
|
414
|
+
}
|
|
415
|
+
idleCheck();
|
|
416
|
+
}
|
|
417
|
+
if (buffer.trim()) {
|
|
418
|
+
const raw = parseEventBlock(buffer);
|
|
419
|
+
const evt = map(raw);
|
|
420
|
+
if (evt) yield evt;
|
|
421
|
+
}
|
|
422
|
+
} finally {
|
|
423
|
+
try {
|
|
424
|
+
reader.releaseLock();
|
|
425
|
+
} catch {
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
__name(parseSSE, "parseSSE");
|
|
430
|
+
function parseEventBlock(block) {
|
|
431
|
+
const out = {};
|
|
432
|
+
const lines = block.split(/\r?\n/);
|
|
433
|
+
const dataLines = [];
|
|
434
|
+
for (const line of lines) {
|
|
435
|
+
if (!line || line.startsWith(":")) continue;
|
|
436
|
+
const colon = line.indexOf(":");
|
|
437
|
+
if (colon === -1) continue;
|
|
438
|
+
const field = line.slice(0, colon).trim();
|
|
439
|
+
const value = line.slice(colon + 1).replace(/^ /, "");
|
|
440
|
+
if (field === "event") out.event = value;
|
|
441
|
+
else if (field === "data") dataLines.push(value);
|
|
442
|
+
}
|
|
443
|
+
if (dataLines.length) out.data = dataLines.join("\n");
|
|
444
|
+
return out;
|
|
445
|
+
}
|
|
446
|
+
__name(parseEventBlock, "parseEventBlock");
|
|
447
|
+
|
|
448
|
+
// src/tools/Chat/core/transport/http.ts
|
|
449
|
+
var DEFAULT_TIMEOUT = 2e4;
|
|
450
|
+
async function jsonOrThrow(res, label) {
|
|
451
|
+
if (!res.ok) {
|
|
452
|
+
const text = await res.text().catch(() => "");
|
|
453
|
+
throw new TransportError(
|
|
454
|
+
`${label} failed (${res.status}): ${text || res.statusText}`,
|
|
455
|
+
mapStatusToCode(res.status)
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
try {
|
|
459
|
+
return await res.json();
|
|
460
|
+
} catch {
|
|
461
|
+
throw new TransportError(`${label} returned invalid JSON`, "invalid_response");
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
__name(jsonOrThrow, "jsonOrThrow");
|
|
465
|
+
function mapStatusToCode(status) {
|
|
466
|
+
if (status === 401) return "unauthorized";
|
|
467
|
+
if (status === 403) return "forbidden";
|
|
468
|
+
if (status === 404) return "not_found";
|
|
469
|
+
if (status === 429) return "rate_limited";
|
|
470
|
+
if (status >= 500) return "server_error";
|
|
471
|
+
return "http_error";
|
|
472
|
+
}
|
|
473
|
+
__name(mapStatusToCode, "mapStatusToCode");
|
|
474
|
+
function withTimeout(signal, timeoutMs) {
|
|
475
|
+
const ctrl = new AbortController();
|
|
476
|
+
const onAbort = /* @__PURE__ */ __name(() => ctrl.abort(), "onAbort");
|
|
477
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
478
|
+
setTimeout(() => ctrl.abort(), timeoutMs);
|
|
479
|
+
return ctrl.signal;
|
|
480
|
+
}
|
|
481
|
+
__name(withTimeout, "withTimeout");
|
|
482
|
+
function createHttpTransport(config) {
|
|
483
|
+
const fetchImpl = config.fetchImpl ?? fetch;
|
|
484
|
+
const timeout = config.timeoutMs ?? DEFAULT_TIMEOUT;
|
|
485
|
+
const base = config.baseUrl.replace(/\/$/, "");
|
|
486
|
+
async function buildHeaders(extra) {
|
|
487
|
+
const auth = await config.getAuthHeader?.() ?? {};
|
|
488
|
+
return {
|
|
489
|
+
"Content-Type": "application/json",
|
|
490
|
+
...auth,
|
|
491
|
+
...extra ?? {}
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
__name(buildHeaders, "buildHeaders");
|
|
495
|
+
return {
|
|
496
|
+
async createSession(opts) {
|
|
497
|
+
const res = await fetchImpl(`${base}/sessions`, {
|
|
498
|
+
method: "POST",
|
|
499
|
+
headers: await buildHeaders(),
|
|
500
|
+
body: JSON.stringify({ slug: config.slug, metadata: opts?.metadata ?? {} }),
|
|
501
|
+
signal: withTimeout(void 0, timeout)
|
|
502
|
+
});
|
|
503
|
+
return jsonOrThrow(res, "createSession");
|
|
504
|
+
},
|
|
505
|
+
async loadHistory(sessionId, cursor, limit) {
|
|
506
|
+
const params = new URLSearchParams();
|
|
507
|
+
if (cursor) params.set("cursor", cursor);
|
|
508
|
+
if (limit) params.set("limit", String(limit));
|
|
509
|
+
const url = `${base}/sessions/${encodeURIComponent(sessionId)}/history${params.toString() ? `?${params.toString()}` : ""}`;
|
|
510
|
+
const res = await fetchImpl(url, {
|
|
511
|
+
method: "GET",
|
|
512
|
+
headers: await buildHeaders(),
|
|
513
|
+
signal: withTimeout(void 0, timeout)
|
|
514
|
+
});
|
|
515
|
+
return jsonOrThrow(res, "loadHistory");
|
|
516
|
+
},
|
|
517
|
+
async *stream(sessionId, content, options) {
|
|
518
|
+
const url = `${base}/sessions/${encodeURIComponent(sessionId)}/messages`;
|
|
519
|
+
const res = await fetchImpl(url, {
|
|
520
|
+
method: "POST",
|
|
521
|
+
headers: await buildHeaders({ Accept: "text/event-stream" }),
|
|
522
|
+
body: JSON.stringify({
|
|
523
|
+
content,
|
|
524
|
+
attachments: options.attachments ?? [],
|
|
525
|
+
metadata: options.metadata ?? {}
|
|
526
|
+
}),
|
|
527
|
+
signal: options.signal
|
|
528
|
+
});
|
|
529
|
+
if (!res.ok) {
|
|
530
|
+
const text = await res.text().catch(() => "");
|
|
531
|
+
throw new TransportError(
|
|
532
|
+
`stream failed (${res.status}): ${text || res.statusText}`,
|
|
533
|
+
mapStatusToCode(res.status)
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
yield* parseSSE(res, { signal: options.signal });
|
|
537
|
+
},
|
|
538
|
+
async send(sessionId, content, options) {
|
|
539
|
+
const url = `${base}/sessions/${encodeURIComponent(sessionId)}/messages/buffered`;
|
|
540
|
+
const res = await fetchImpl(url, {
|
|
541
|
+
method: "POST",
|
|
542
|
+
headers: await buildHeaders(),
|
|
543
|
+
body: JSON.stringify({
|
|
544
|
+
content,
|
|
545
|
+
attachments: options?.attachments ?? [],
|
|
546
|
+
metadata: options?.metadata ?? {}
|
|
547
|
+
}),
|
|
548
|
+
signal: options?.signal ?? withTimeout(void 0, timeout)
|
|
549
|
+
});
|
|
550
|
+
return jsonOrThrow(res, "send");
|
|
551
|
+
},
|
|
552
|
+
async closeSession(sessionId) {
|
|
553
|
+
const url = `${base}/sessions/${encodeURIComponent(sessionId)}`;
|
|
554
|
+
const res = await fetchImpl(url, {
|
|
555
|
+
method: "DELETE",
|
|
556
|
+
headers: await buildHeaders(),
|
|
557
|
+
signal: withTimeout(void 0, timeout)
|
|
558
|
+
});
|
|
559
|
+
if (!res.ok && res.status !== 404) {
|
|
560
|
+
throw new TransportError(`closeSession failed (${res.status})`, mapStatusToCode(res.status));
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
__name(createHttpTransport, "createHttpTransport");
|
|
566
|
+
|
|
567
|
+
// src/tools/Chat/core/transport/mock.ts
|
|
568
|
+
var DEFAULT_REPLY = "Hi there!";
|
|
569
|
+
function splitForStream(text, parts = 4) {
|
|
570
|
+
if (!text) return [];
|
|
571
|
+
const chunkSize = Math.max(1, Math.ceil(text.length / parts));
|
|
572
|
+
const out = [];
|
|
573
|
+
for (let i = 0; i < text.length; i += chunkSize) {
|
|
574
|
+
out.push(text.slice(i, i + chunkSize));
|
|
575
|
+
}
|
|
576
|
+
return out;
|
|
577
|
+
}
|
|
578
|
+
__name(splitForStream, "splitForStream");
|
|
579
|
+
var sleep = /* @__PURE__ */ __name((ms) => new Promise((r) => setTimeout(r, ms)), "sleep");
|
|
580
|
+
function createMockTransport(opts = {}) {
|
|
581
|
+
const replies = opts.replies?.length ? opts.replies : [DEFAULT_REPLY];
|
|
582
|
+
const latency = opts.latencyMs ?? 30;
|
|
583
|
+
const history = [...opts.initialMessages ?? []];
|
|
584
|
+
let turn = 0;
|
|
585
|
+
let attempt = 0;
|
|
586
|
+
return {
|
|
587
|
+
async createSession(_opts) {
|
|
588
|
+
await sleep(latency);
|
|
589
|
+
return {
|
|
590
|
+
sessionId: createId("s"),
|
|
591
|
+
messages: history.length ? [...history] : void 0,
|
|
592
|
+
hasMore: false,
|
|
593
|
+
cursor: null,
|
|
594
|
+
resumed: history.length > 0
|
|
595
|
+
};
|
|
596
|
+
},
|
|
597
|
+
async loadHistory(_sid, _cursor, _limit) {
|
|
598
|
+
await sleep(latency);
|
|
599
|
+
return { messages: [], hasMore: false, nextCursor: null };
|
|
600
|
+
},
|
|
601
|
+
async *stream(_sid, content, options) {
|
|
602
|
+
attempt += 1;
|
|
603
|
+
if (opts.shouldFail?.(attempt)) {
|
|
604
|
+
throw new Error("mock transport scripted failure");
|
|
605
|
+
}
|
|
606
|
+
history.push({
|
|
607
|
+
id: createId("u"),
|
|
608
|
+
role: "user",
|
|
609
|
+
content,
|
|
610
|
+
createdAt: Date.now()
|
|
611
|
+
});
|
|
612
|
+
const messageId = createId("a");
|
|
613
|
+
yield { type: "message_start", messageId, sessionId: _sid };
|
|
614
|
+
const reply = replies[turn % replies.length];
|
|
615
|
+
turn += 1;
|
|
616
|
+
if (typeof reply === "string") {
|
|
617
|
+
for (const piece of splitForStream(reply)) {
|
|
618
|
+
if (options.signal.aborted) return;
|
|
619
|
+
await sleep(latency);
|
|
620
|
+
yield { type: "chunk", delta: piece };
|
|
621
|
+
}
|
|
622
|
+
yield { type: "message_end", tokensIn: content.length, tokensOut: reply.length };
|
|
623
|
+
} else {
|
|
624
|
+
for (const ev of reply) {
|
|
625
|
+
if (options.signal.aborted) return;
|
|
626
|
+
await sleep(latency);
|
|
627
|
+
yield ev;
|
|
628
|
+
}
|
|
629
|
+
const lastType = reply[reply.length - 1]?.type;
|
|
630
|
+
if (lastType !== "message_end" && lastType !== "error") {
|
|
631
|
+
yield { type: "message_end" };
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
async send(_sid, content, _options) {
|
|
636
|
+
await sleep(latency);
|
|
637
|
+
const reply = replies[turn % replies.length];
|
|
638
|
+
turn += 1;
|
|
639
|
+
const text = typeof reply === "string" ? reply : reply.filter((e) => e.type === "chunk").map((e) => e.delta).join("");
|
|
640
|
+
return {
|
|
641
|
+
id: createId("a"),
|
|
642
|
+
role: "assistant",
|
|
643
|
+
content: text || DEFAULT_REPLY,
|
|
644
|
+
createdAt: Date.now()
|
|
645
|
+
};
|
|
646
|
+
},
|
|
647
|
+
async closeSession(_sid) {
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
__name(createMockTransport, "createMockTransport");
|
|
652
|
+
function useChatLightbox() {
|
|
653
|
+
const [state, setState] = useState(null);
|
|
654
|
+
const open = useCallback((att, gallery) => {
|
|
655
|
+
const list = gallery && gallery.length ? gallery : [att];
|
|
656
|
+
const idx = list.findIndex((a) => a.id === att.id);
|
|
657
|
+
setState({ gallery: list, index: idx === -1 ? 0 : idx });
|
|
658
|
+
}, []);
|
|
659
|
+
const close = useCallback(() => setState(null), []);
|
|
660
|
+
return { state, open, close };
|
|
661
|
+
}
|
|
662
|
+
__name(useChatLightbox, "useChatLightbox");
|
|
663
|
+
|
|
664
|
+
// src/tools/Chat/core/payload-dispatch.ts
|
|
665
|
+
function dispatchToolPayload(matchers, fallback) {
|
|
666
|
+
return (value, kind, call) => {
|
|
667
|
+
for (const m of matchers) {
|
|
668
|
+
if (m.match(value, kind, call)) return m.render(value, kind, call);
|
|
669
|
+
}
|
|
670
|
+
return fallback(value, kind, call);
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
__name(dispatchToolPayload, "dispatchToolPayload");
|
|
674
|
+
function isPlainObject(v) {
|
|
675
|
+
return v !== null && typeof v === "object" && !Array.isArray(v);
|
|
676
|
+
}
|
|
677
|
+
__name(isPlainObject, "isPlainObject");
|
|
678
|
+
function isLatLng(v) {
|
|
679
|
+
return isPlainObject(v) && typeof v.lat === "number" && typeof v.lng === "number";
|
|
680
|
+
}
|
|
681
|
+
__name(isLatLng, "isLatLng");
|
|
682
|
+
function isGeoJSONFeatureCollection(v) {
|
|
683
|
+
return isPlainObject(v) && v.type === "FeatureCollection" && Array.isArray(v.features);
|
|
684
|
+
}
|
|
685
|
+
__name(isGeoJSONFeatureCollection, "isGeoJSONFeatureCollection");
|
|
686
|
+
function isStringValue(v) {
|
|
687
|
+
return typeof v === "string";
|
|
688
|
+
}
|
|
689
|
+
__name(isStringValue, "isStringValue");
|
|
690
|
+
|
|
691
|
+
// src/tools/Chat/utils/collectImageAttachments.ts
|
|
692
|
+
function collectImageAttachments(messages) {
|
|
693
|
+
const out = [];
|
|
694
|
+
for (const m of messages) {
|
|
695
|
+
if (!m.attachments) continue;
|
|
696
|
+
for (const a of m.attachments) {
|
|
697
|
+
if (a.type === "image") out.push(a);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return out;
|
|
701
|
+
}
|
|
702
|
+
__name(collectImageAttachments, "collectImageAttachments");
|
|
347
703
|
var LottiePlayerClient = lazy(
|
|
348
|
-
() => import('./LottiePlayer.client-
|
|
704
|
+
() => import('./LottiePlayer.client-5LDSSJWS.mjs').then((mod) => ({ default: mod.LottiePlayer }))
|
|
349
705
|
);
|
|
350
706
|
var LoadingFallback5 = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
351
707
|
/* @__PURE__ */ jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-gray-300 border-t-gray-900" }),
|
|
@@ -356,14 +712,14 @@ function LottiePlayer(props) {
|
|
|
356
712
|
}
|
|
357
713
|
__name(LottiePlayer, "LottiePlayer");
|
|
358
714
|
var DocsLayout = lazy(
|
|
359
|
-
() => import('./DocsLayout-
|
|
715
|
+
() => import('./DocsLayout-VFPPNKSQ.mjs').then((mod) => ({ default: mod.DocsLayout }))
|
|
360
716
|
);
|
|
361
717
|
var LoadingFallback6 = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: "Loading API Playground..." }) }), "LoadingFallback");
|
|
362
718
|
var Playground = /* @__PURE__ */ __name(({ config }) => {
|
|
363
719
|
return /* @__PURE__ */ jsx(PlaygroundProvider, { config, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingFallback6, {}), children: /* @__PURE__ */ jsx(DocsLayout, {}) }) });
|
|
364
720
|
}, "Playground");
|
|
365
721
|
var OpenapiViewer_default = Playground;
|
|
366
|
-
var CronSchedulerClient = lazy(() => import('./CronScheduler.client-
|
|
722
|
+
var CronSchedulerClient = lazy(() => import('./CronScheduler.client-DLMXCPAJ.mjs'));
|
|
367
723
|
function CronScheduler(props) {
|
|
368
724
|
return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(CronSchedulerFallback, {}), children: /* @__PURE__ */ jsx(CronSchedulerClient, { ...props }) });
|
|
369
725
|
}
|
|
@@ -1376,6 +1732,6 @@ function MarkdownToolbar({ editor }) {
|
|
|
1376
1732
|
}
|
|
1377
1733
|
__name(MarkdownToolbar, "MarkdownToolbar");
|
|
1378
1734
|
|
|
1379
|
-
export { CardLoadingFallback, CronScheduler, DiffEditor, Editor, EditorProvider, LazyPlayer as LazyAudioPlayer, LazyCronScheduler, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyTree, LazyVideoPlayer, LazyWrapper, LoadingFallback, LottiePlayer, MapLoadingFallback, MarkdownEditor, OpenapiViewer_default as OpenapiViewer, Spinner, createLazyComponent, mentionPresets, useEditor, useEditorContext, useLanguage, useMonaco };
|
|
1735
|
+
export { CardLoadingFallback, CronScheduler, DiffEditor, Editor, EditorProvider, LazyPlayer as LazyAudioPlayer, LazyChat, LazyCronScheduler, LazyImageViewer, LazyJsonSchemaForm, LazyJsonTree, LazyLottiePlayer, LazyMapContainer, LazyMapView, LazyMermaid, LazyOpenapiViewer, LazyPrettyCode, LazyTree, LazyVideoPlayer, LazyWrapper, LoadingFallback, LottiePlayer, MapLoadingFallback, MarkdownEditor, OpenapiViewer_default as OpenapiViewer, Spinner, TransportError, collectImageAttachments, createHttpTransport, createLazyComponent, createMockTransport, dispatchToolPayload, isGeoJSONFeatureCollection, isLatLng, isPlainObject, isStringValue, mentionPresets, parseSSE, useChatLightbox, useEditor, useEditorContext, useLanguage, useMonaco };
|
|
1380
1736
|
//# sourceMappingURL=index.mjs.map
|
|
1381
1737
|
//# sourceMappingURL=index.mjs.map
|