@aintela/chat 0.2.15
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 +161 -0
- package/dist/ClientMessage-EKgfuTp8.js +40 -0
- package/dist/ClientMessage-EKgfuTp8.js.map +1 -0
- package/dist/Memory-DjLZqgbF.js +84 -0
- package/dist/Memory-DjLZqgbF.js.map +1 -0
- package/dist/Prompt-DZb7OaPp.js +37 -0
- package/dist/Prompt-DZb7OaPp.js.map +1 -0
- package/dist/artifactHtmlHandler-CMQJf1cX.js +41 -0
- package/dist/artifactHtmlHandler-CMQJf1cX.js.map +1 -0
- package/dist/auth-CcTgInbY.js +524 -0
- package/dist/auth-CcTgInbY.js.map +1 -0
- package/dist/components.d.ts +2 -0
- package/dist/components.js +14159 -0
- package/dist/components.js.map +1 -0
- package/dist/environmentUtils-BaKw5_VD.js +462 -0
- package/dist/environmentUtils-BaKw5_VD.js.map +1 -0
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.js +9 -0
- package/dist/hooks.js.map +1 -0
- package/dist/httpArtifactService-BAR60Gu1.js +1802 -0
- package/dist/httpArtifactService-BAR60Gu1.js.map +1 -0
- package/dist/httpSessionService-5Kr__oQL.js +279 -0
- package/dist/httpSessionService-5Kr__oQL.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +226 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces.d.ts +2 -0
- package/dist/interfaces.js +11 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/models.d.ts +2 -0
- package/dist/models.js +54 -0
- package/dist/models.js.map +1 -0
- package/dist/serializer-DyHZxlAG.js +1276 -0
- package/dist/serializer-DyHZxlAG.js.map +1 -0
- package/dist/services.d.ts +2 -0
- package/dist/services.js +16 -0
- package/dist/services.js.map +1 -0
- package/dist/sortable-table-DgQHxWIh.js +819 -0
- package/dist/sortable-table-DgQHxWIh.js.map +1 -0
- package/dist/src/ErrorBondary.d.ts +10 -0
- package/dist/src/components/AiChat/AiChat.d.ts +3 -0
- package/dist/src/components/AiChat/AiChatContext.d.ts +76 -0
- package/dist/src/components/AiChat/AiChatDrawer.d.ts +3 -0
- package/dist/src/components/AiChat/AiChatFloating.d.ts +3 -0
- package/dist/src/components/AiChat/AiChatProvider.d.ts +7 -0
- package/dist/src/components/AiChat/AiChatSessionStore.d.ts +1 -0
- package/dist/src/components/AiChat/AiChatTypes.d.ts +227 -0
- package/dist/src/components/AiChat/ChatPane/AlertDialog.d.ts +12 -0
- package/dist/src/components/AiChat/ChatPane/AskUserSheet.d.ts +25 -0
- package/dist/src/components/AiChat/ChatPane/ChatPane.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/ConnectionState.d.ts +2 -0
- package/dist/src/components/AiChat/ChatPane/CurrentMessage.d.ts +12 -0
- package/dist/src/components/AiChat/ChatPane/Event.d.ts +6 -0
- package/dist/src/components/AiChat/ChatPane/FloatingConnectionStatus.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/FriendlyPartDisplay.d.ts +13 -0
- package/dist/src/components/AiChat/ChatPane/LastPrompts.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/Message.d.ts +11 -0
- package/dist/src/components/AiChat/ChatPane/MessageAgent.d.ts +16 -0
- package/dist/src/components/AiChat/ChatPane/MessageNonTextDisplay.d.ts +16 -0
- package/dist/src/components/AiChat/ChatPane/MessagePart.d.ts +15 -0
- package/dist/src/components/AiChat/ChatPane/MessagePersona.d.ts +13 -0
- package/dist/src/components/AiChat/ChatPane/MessageUser.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/ModelSelector.d.ts +11 -0
- package/dist/src/components/AiChat/ChatPane/Prompt.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/SessionDataDialog.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/StickyQuestionHeader.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/StreamStatistics.d.ts +32 -0
- package/dist/src/components/AiChat/ChatPane/SubAgentBox.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/TaskList.d.ts +6 -0
- package/dist/src/components/AiChat/ChatPane/friendlyToolConfig.d.ts +11 -0
- package/dist/src/components/AiChat/ChatPane/parts/AskUserPart.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/parts/BoxedPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/FunctionPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/SuspendedPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/TextPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/ThoughtPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/UiToolDispatcher.d.ts +16 -0
- package/dist/src/components/AiChat/ChatPane/parts/WaitingPart.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/index.d.ts +20 -0
- package/dist/src/components/AiChat/ChatPane/parts/index.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +22 -0
- package/dist/src/components/AiChat/ChatPane/parts/uiToolRegistry.d.ts +121 -0
- package/dist/src/components/AiChat/index.d.ts +13 -0
- package/dist/src/components/AiChat/sessionStateManagerService.d.ts +47 -0
- package/dist/src/components/AiChat/stateConfiguration.d.ts +80 -0
- package/dist/src/components/Library/ArtifactRender.d.ts +18 -0
- package/dist/src/components/Library/DelayTextComponent.d.ts +9 -0
- package/dist/src/components/Library/LinearBackgroundProgress.d.ts +8 -0
- package/dist/src/components/Library/LinearProgressBarWithMarkers.d.ts +14 -0
- package/dist/src/components/Library/LoadingDots.d.ts +8 -0
- package/dist/src/components/Library/MarkdowmExtended.d.ts +32 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/ChartSkeleton.d.ts +3 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/IFrameSkeleton.d.ts +3 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/MetricGroupSkeleton.d.ts +8 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/MetricSkeleton.d.ts +7 -0
- package/dist/src/components/Library/VizLibrary/Skeletons/TableSkeleton.d.ts +7 -0
- package/dist/src/components/Library/VizLibrary/index.d.ts +5 -0
- package/dist/src/components/LlmResponseRender/EnvironmentContext.d.ts +33 -0
- package/dist/src/components/LlmResponseRender/GeneratingVisualization.d.ts +13 -0
- package/dist/src/components/LlmResponseRender/LiveJsxBlock.d.ts +55 -0
- package/dist/src/components/LlmResponseRender/LlmResponseRender.d.ts +29 -0
- package/dist/src/components/LlmResponseRender/index.d.ts +6 -0
- package/dist/src/components/LlmResponseRender/jsxScope.d.ts +41 -0
- package/dist/src/components/LlmResponseRender/liveTsxConfig.d.ts +18 -0
- package/dist/src/components/LlmResponseRender/parseBlocks.d.ts +39 -0
- package/dist/src/components/Stopwatch.d.ts +12 -0
- package/dist/src/components/index.d.ts +30 -0
- package/dist/src/components/v2/AgentActivityV2.d.ts +32 -0
- package/dist/src/components/v2/AiChatFloatingV2.d.ts +3 -0
- package/dist/src/components/v2/AiChatV2Pane.d.ts +20 -0
- package/dist/src/components/v2/AppBarV2.d.ts +38 -0
- package/dist/src/components/v2/AppRailV2.d.ts +21 -0
- package/dist/src/components/v2/AppShellV2.d.ts +13 -0
- package/dist/src/components/v2/ChatsHistoryV2.d.ts +47 -0
- package/dist/src/components/v2/LastPromptsV2.d.ts +6 -0
- package/dist/src/components/v2/MobileDrawerV2.d.ts +43 -0
- package/dist/src/components/v2/PromptV2.d.ts +164 -0
- package/dist/src/components/v2/RunProgressPanelV2.d.ts +28 -0
- package/dist/src/components/v2/RunProgressStripV2.d.ts +2 -0
- package/dist/src/components/v2/Sparkline.d.ts +10 -0
- package/dist/src/components/v2/SubAgentBoxV2.d.ts +15 -0
- package/dist/src/components/v2/TaskListV2.d.ts +8 -0
- package/dist/src/components/v2/icons.d.ts +42 -0
- package/dist/src/components/v2/index.d.ts +34 -0
- package/dist/src/components/v2/styles.d.ts +6 -0
- package/dist/src/components/v2/toolCategories.d.ts +18 -0
- package/dist/src/components/v2/useResponsiveLayout.d.ts +9 -0
- package/dist/src/hooks/index.d.ts +4 -0
- package/dist/src/hooks/useChatSessions.d.ts +68 -0
- package/dist/src/hooks/useContainerWidth.d.ts +2 -0
- package/dist/src/hooks/useIntervalHook.d.ts +2 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/interfaces/IHeartbeatPort.d.ts +4 -0
- package/dist/src/interfaces/INotificationPort.d.ts +4 -0
- package/dist/src/interfaces/index.d.ts +4 -0
- package/dist/src/interfaces/memoryService.d.ts +37 -0
- package/dist/src/interfaces/schedulingService.d.ts +64 -0
- package/dist/src/models/Agent.d.ts +32 -0
- package/dist/src/models/Artifact.d.ts +21 -0
- package/dist/src/models/ArtifactData.d.ts +30 -0
- package/dist/src/models/ChatSession.d.ts +57 -0
- package/dist/src/models/ClientMessage.d.ts +38 -0
- package/dist/src/models/Customer.d.ts +7 -0
- package/dist/src/models/EndMessageData.d.ts +6 -0
- package/dist/src/models/IAbiContext.d.ts +8 -0
- package/dist/src/models/IDBStorable.d.ts +14 -0
- package/dist/src/models/Interaction.d.ts +36 -0
- package/dist/src/models/InteractionPart.d.ts +69 -0
- package/dist/src/models/LlmSession.d.ts +10 -0
- package/dist/src/models/Memory.d.ts +48 -0
- package/dist/src/models/Notification.d.ts +11 -0
- package/dist/src/models/Prompt.d.ts +20 -0
- package/dist/src/models/SendMessageResponse.d.ts +21 -0
- package/dist/src/models/ServerEvent.d.ts +130 -0
- package/dist/src/models/connectionState.d.ts +9 -0
- package/dist/src/models/contexts.d.ts +33 -0
- package/dist/src/models/enums.d.ts +333 -0
- package/dist/src/models/index.d.ts +36 -0
- package/dist/src/models/semanticKernelModel/index.d.ts +2 -0
- package/dist/src/models/semanticKernelModel/init.d.ts +1 -0
- package/dist/src/models/semanticKernelModel/models.d.ts +208 -0
- package/dist/src/models/semanticKernelModel/serializer.d.ts +40 -0
- package/dist/src/models/serverReponse.d.ts +5 -0
- package/dist/src/models/subAgentModel.d.ts +48 -0
- package/dist/src/models/todoListModel.d.ts +18 -0
- package/dist/src/services/WebSocketConnection/WebSocketConnectionV2.d.ts +163 -0
- package/dist/src/services/WebSocketConnection/webSocketConnection.d.ts +75 -0
- package/dist/src/services/artifactHtmlHandler.d.ts +6 -0
- package/dist/src/services/eventBusService.d.ts +119 -0
- package/dist/src/services/httpArtifactService.d.ts +25 -0
- package/dist/src/services/httpSessionService.d.ts +31 -0
- package/dist/src/services/index.d.ts +16 -0
- package/dist/src/services/interactionService.d.ts +28 -0
- package/dist/src/services/interactionService.test.d.ts +1 -0
- package/dist/src/services/interfaces/artifactService.d.ts +13 -0
- package/dist/src/services/servers/AgentGatewayService.d.ts +167 -0
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +44 -0
- package/dist/src/services/servers/agentGatewayWSAsync.test.d.ts +1 -0
- package/dist/src/services/servers/sessionService/ISessionService.d.ts +20 -0
- package/dist/src/services/sessionEventDecoder.d.ts +22 -0
- package/dist/src/services/sessionEventDecoder.test.d.ts +1 -0
- package/dist/src/services/storageService.d.ts +73 -0
- package/dist/src/themes/index.d.ts +3 -0
- package/dist/src/themes/v2-chart-palette.d.ts +1 -0
- package/dist/src/themes/v2.d.ts +71 -0
- package/dist/src/utils/auth.d.ts +9 -0
- package/dist/src/utils/envOverrides.d.ts +23 -0
- package/dist/src/utils/envUtils.d.ts +13 -0
- package/dist/src/utils/environmentUtils.d.ts +43 -0
- package/dist/src/utils/fileUtils.d.ts +6 -0
- package/dist/src/utils/getAgentArtifactsBaseUrl.d.ts +1 -0
- package/dist/src/utils/getAgentBaseUrl.d.ts +1 -0
- package/dist/src/utils/getDotNetBaseUrl.d.ts +5 -0
- package/dist/src/utils/index.d.ts +17 -0
- package/dist/src/utils/interactionIdChecker.d.ts +27 -0
- package/dist/src/utils/jsonDetector.d.ts +50 -0
- package/dist/src/utils/jsonUtils.d.ts +1 -0
- package/dist/src/utils/materialIconsList.d.ts +42 -0
- package/dist/src/utils/materialIconsSvg.d.ts +51 -0
- package/dist/src/utils/objectUtils.d.ts +31 -0
- package/dist/src/utils/parseArtifact.d.ts +3 -0
- package/dist/src/utils/sessionWindowParameters.d.ts +3 -0
- package/dist/src/utils/sortable-table.d.ts +31 -0
- package/dist/src/utils/stringUtils.d.ts +8 -0
- package/dist/src/utils/uriUtils.d.ts +39 -0
- package/dist/src/utils/urlParser.d.ts +8 -0
- package/dist/style.css +94 -0
- package/dist/tests/fakes/fakeWebSocket.d.ts +32 -0
- package/dist/tests/fakes/makeGateway.d.ts +24 -0
- package/dist/tests/fixtures.d.ts +73 -0
- package/dist/useChatSessions-DttlifVk.js +107 -0
- package/dist/useChatSessions-DttlifVk.js.map +1 -0
- package/dist/useContainerWidth-Df2PmSoC.js +52 -0
- package/dist/useContainerWidth-Df2PmSoC.js.map +1 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +49 -0
- package/dist/utils.js.map +1 -0
- package/package.json +127 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SxProps } from '@mui/material';
|
|
2
|
+
interface Marker {
|
|
3
|
+
position: number;
|
|
4
|
+
label: string;
|
|
5
|
+
color: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LinearProgressBarWithMarkersProps {
|
|
8
|
+
value: number;
|
|
9
|
+
valueBuffer: number;
|
|
10
|
+
markers: Marker[];
|
|
11
|
+
sx: SxProps;
|
|
12
|
+
}
|
|
13
|
+
declare function LinearProgressBarWithMarkers({ value, valueBuffer, markers, sx }: LinearProgressBarWithMarkersProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default LinearProgressBarWithMarkers;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface MarkdownExtendedProps {
|
|
3
|
+
text: string;
|
|
4
|
+
sessionId: string;
|
|
5
|
+
preStyle?: React.CSSProperties | null;
|
|
6
|
+
onDrawCodeBlock?: (code: string, className: string) => React.ReactNode;
|
|
7
|
+
onLinkClicked?: (link: string, content: string | null) => void;
|
|
8
|
+
mode?: 'compact' | 'full';
|
|
9
|
+
readingMode?: boolean;
|
|
10
|
+
partial?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Heading-style variant.
|
|
13
|
+
* - `'classic'` (default): bold headings in `theme.palette.primary.main`
|
|
14
|
+
* with a colored bottom border. Matches the v1 dashboard-app look.
|
|
15
|
+
* - `'minimal'`: subtler text-color headings with no border, smaller
|
|
16
|
+
* font sizes — for chat / inline content where headings shouldn't
|
|
17
|
+
* compete with the surrounding chrome (used by the v2 layout).
|
|
18
|
+
*/
|
|
19
|
+
variant?: 'classic' | 'minimal';
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Lets a parent subtree opt every nested `MarkdownExtended` into the
|
|
23
|
+
* minimal heading style without prop-drilling. The explicit `variant`
|
|
24
|
+
* prop on `MarkdownExtended` always wins.
|
|
25
|
+
*/
|
|
26
|
+
export interface MarkdownExtendedDefaults {
|
|
27
|
+
variant?: 'classic' | 'minimal';
|
|
28
|
+
}
|
|
29
|
+
export declare const MarkdownExtendedContext: React.Context<MarkdownExtendedDefaults>;
|
|
30
|
+
export declare const useMarkdownExtendedDefaults: () => MarkdownExtendedDefaults;
|
|
31
|
+
declare const MarkdownExtended: React.FC<MarkdownExtendedProps>;
|
|
32
|
+
export default MarkdownExtended;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MetricGroupSkeletonProps {
|
|
3
|
+
metrics?: number;
|
|
4
|
+
showIcon?: boolean;
|
|
5
|
+
showChangeRow?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const MetricGroupSkeleton: React.FC<MetricGroupSkeletonProps>;
|
|
8
|
+
export default MetricGroupSkeleton;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as ChartSkeleton } from './Skeletons/ChartSkeleton';
|
|
2
|
+
export { default as MetricSkeleton } from './Skeletons/MetricSkeleton';
|
|
3
|
+
export { default as MetricGroupSkeleton } from './Skeletons/MetricGroupSkeleton';
|
|
4
|
+
export { default as TableSkeleton } from './Skeletons/TableSkeleton';
|
|
5
|
+
export { default as IFrameSkeleton } from './Skeletons/IFrameSkeleton';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const EnvironmentProvider: React.FC<{
|
|
3
|
+
value: Record<string, unknown>;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function useEnvironment<T = Record<string, unknown>>(): T;
|
|
7
|
+
/**
|
|
8
|
+
* Non-throwing variant: returns the surrounding environment, or an empty `{}`
|
|
9
|
+
* when there's no `EnvironmentProvider` in scope. Use it where an environment
|
|
10
|
+
* is optional — e.g. the UI-tool dispatcher resolves `env` for actions on
|
|
11
|
+
* EVERY uiTool part, including chat surfaces that have no provider (there the
|
|
12
|
+
* action's `env.foo?.()` calls simply no-op). On replay, the surrounding
|
|
13
|
+
* `InertEnvironmentProvider` already neutralises every callable.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useEnvironmentOptional<T = Record<string, unknown>>(): T;
|
|
16
|
+
/**
|
|
17
|
+
* Replaces every callable property of the surrounding environment
|
|
18
|
+
* with a no-op for `children`. Non-callable properties (data, refs,
|
|
19
|
+
* primitive values) pass through unchanged. Use it to isolate
|
|
20
|
+
* historical / replayed React subtrees — e.g. completed chat
|
|
21
|
+
* messages whose body still carries live-TSX side-effect hooks like
|
|
22
|
+
* `useDashboardPad` — so re-mounting them on session reload cannot
|
|
23
|
+
* mutate live application state. The subtrees still render, their
|
|
24
|
+
* components still fetch data, but their side-effect calls dead-end
|
|
25
|
+
* at this boundary.
|
|
26
|
+
*
|
|
27
|
+
* No-throw when there's no parent env: returns an empty record so
|
|
28
|
+
* `useEnvironment` consumers inside don't blow up either. That
|
|
29
|
+
* matches the "inert by default" semantics of historical replay.
|
|
30
|
+
*/
|
|
31
|
+
export declare const InertEnvironmentProvider: React.FC<{
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface GeneratingVisualizationProps {
|
|
3
|
+
/**
|
|
4
|
+
* 0..1 fill progress. Drives the six bar buckets left-to-right —
|
|
5
|
+
* each bar represents 1/6 of full. The dot tracer above ignores
|
|
6
|
+
* progress on purpose (it traces the *target* outline so the bars
|
|
7
|
+
* visibly "catch up" to it as ticks land).
|
|
8
|
+
*/
|
|
9
|
+
progress?: number;
|
|
10
|
+
bytes?: number;
|
|
11
|
+
}
|
|
12
|
+
declare const GeneratingVisualization: React.FC<GeneratingVisualizationProps>;
|
|
13
|
+
export default GeneratingVisualization;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Server-emitted sentinel inside a ```liveTsx fence that signals the
|
|
4
|
+
* block's content should be abandoned (compile failed server-side,
|
|
5
|
+
* retry incoming). LiveJsxBlock renders nothing when present — the
|
|
6
|
+
* next ```liveTsx fence opens a fresh block. Keep in sync with the
|
|
7
|
+
* .NET WSServer's JsxLiveStreamProcessor.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LIVE_TSX_INVALID_SENTINEL = "<!--liveTsx:invalid-->";
|
|
10
|
+
interface LiveJsxBlockProps {
|
|
11
|
+
/**
|
|
12
|
+
* Server-compiled JS function body. The .NET WSServer's
|
|
13
|
+
* `JsxLiveStreamProcessor` runs every closing ```liveTsx fence through
|
|
14
|
+
* the tsx-sidecar's `build` method (type-check + esbuild transform +
|
|
15
|
+
* scope-binding rewrite) before it reaches the chat markdown. By the
|
|
16
|
+
* time we see it here, `code` is already valid JS of the shape:
|
|
17
|
+
*
|
|
18
|
+
* var React = __scope['react'];
|
|
19
|
+
* var Box = __scope['@mui/material'].Box;
|
|
20
|
+
* function MyComponent() { return React.createElement(Box, ...); }
|
|
21
|
+
* return MyComponent;
|
|
22
|
+
*
|
|
23
|
+
* — exactly what `new Function('__scope', code)(scope)` needs to
|
|
24
|
+
* return the React component. No sucrase, no regex import rewriter,
|
|
25
|
+
* no main-thread compile pause per block.
|
|
26
|
+
*/
|
|
27
|
+
code: string;
|
|
28
|
+
/** Extra scope entries merged on top of the default scope */
|
|
29
|
+
scope?: Record<string, unknown>;
|
|
30
|
+
partial: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* 0..1 progress hint for partial blocks. Surfaces in the placeholder
|
|
33
|
+
* (`GeneratingVisualization`) as filled bar buckets — see parseBlocks
|
|
34
|
+
* for the tick-marker → fraction derivation.
|
|
35
|
+
*/
|
|
36
|
+
progress?: number;
|
|
37
|
+
bytes?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare class JsxErrorBoundary extends React.Component<{
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
fallback: (error: Error) => React.ReactNode;
|
|
42
|
+
}, {
|
|
43
|
+
error: Error | null;
|
|
44
|
+
}> {
|
|
45
|
+
state: {
|
|
46
|
+
error: Error | null;
|
|
47
|
+
};
|
|
48
|
+
static getDerivedStateFromError(error: Error): {
|
|
49
|
+
error: Error;
|
|
50
|
+
};
|
|
51
|
+
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
|
52
|
+
render(): React.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
declare const LiveJsxBlock: React.FC<LiveJsxBlockProps>;
|
|
55
|
+
export default LiveJsxBlock;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Interaction } from '../../models/Interaction';
|
|
3
|
+
import { EventBusService } from '../../services/eventBusService';
|
|
4
|
+
interface LlmResponseRenderProps {
|
|
5
|
+
/** Full LLM response in markdown (may contain ```jsx code blocks) */
|
|
6
|
+
content: string;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
partial: boolean;
|
|
9
|
+
/** Extra components/values to make available inside JSX blocks */
|
|
10
|
+
scope?: Record<string, unknown>;
|
|
11
|
+
eventBusService?: EventBusService;
|
|
12
|
+
onLinkClicked: (link: string, content: string | null) => void;
|
|
13
|
+
/** The interaction this text belongs to — used to resolve
|
|
14
|
+
* `{{Component:<slotId>}}` tokens to their UI tool part. */
|
|
15
|
+
message?: Interaction;
|
|
16
|
+
onGoing?: boolean;
|
|
17
|
+
friendlyMode?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Renders an LLM markdown response with live JSX previews.
|
|
21
|
+
*
|
|
22
|
+
* Regular markdown blocks → MarkdownExtended (syntax highlighting, icons, etc.)
|
|
23
|
+
* ```liveTsx blocks → compiled at runtime with Sucrase and mounted as React components
|
|
24
|
+
*
|
|
25
|
+
* Usage:
|
|
26
|
+
* <LlmResponseRender content={llmResponse} sessionId={sessionId} />
|
|
27
|
+
*/
|
|
28
|
+
declare const LlmResponseRender: React.FC<LlmResponseRenderProps>;
|
|
29
|
+
export default LlmResponseRender;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as LlmResponseRender } from './LlmResponseRender';
|
|
2
|
+
export { default as LiveJsxBlock, JsxErrorBoundary } from './LiveJsxBlock';
|
|
3
|
+
export { parseContentBlocks, type ContentBlock } from './parseBlocks';
|
|
4
|
+
export { getDefaultJsxScope, extendModuleRegistry, extendDefaultScope } from './jsxScope';
|
|
5
|
+
export { EnvironmentProvider, InertEnvironmentProvider, useEnvironment, useEnvironmentOptional, } from './EnvironmentContext';
|
|
6
|
+
export { LiveTsxConfigProvider, useLiveTsxMaxCharsForFull, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL, } from './liveTsxConfig';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extend the module registry with additional exports.
|
|
3
|
+
* Call once at app startup to inject components that were moved out of the library
|
|
4
|
+
* but are still imported by LLM-generated code under `@envision/ui-library`.
|
|
5
|
+
*
|
|
6
|
+
* Extensions are stored on globalThis so they survive Vite HMR reloads
|
|
7
|
+
* (module-level variables would be reset when this file is re-evaluated).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { extendModuleRegistry } from '@envision/ui-library/components';
|
|
12
|
+
* import { ExamplePad, ExampleCardSketh, PrototypePad } from '@app/components/LlmComponents';
|
|
13
|
+
*
|
|
14
|
+
* extendModuleRegistry('@envision/ui-library', { ExamplePad, ExampleCardSketh, PrototypePad });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function extendModuleRegistry(specifier: string, exports: Record<string, unknown>): void;
|
|
18
|
+
/**
|
|
19
|
+
* Extend the bare-identifier scope injected into every compiled liveTsx
|
|
20
|
+
* block. Use this for components/values that the LLM is allowed to reference
|
|
21
|
+
* without an explicit `import` (e.g. VizLibrary's Chart/Metric/ContainTable).
|
|
22
|
+
*
|
|
23
|
+
* Extensions are stored on globalThis so they survive Vite HMR reloads.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { extendDefaultScope } from '@envision/ui-library/components';
|
|
28
|
+
* import * as VizLibrary from '@app/components/VizLibrary';
|
|
29
|
+
* extendDefaultScope(VizLibrary);
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function extendDefaultScope(exports: Record<string, unknown>): void;
|
|
33
|
+
export declare function getModuleRegistry(): Promise<Record<string, Record<string, unknown>>>;
|
|
34
|
+
/**
|
|
35
|
+
* Base scope injected into every compiled LiveJSX block.
|
|
36
|
+
*
|
|
37
|
+
* React is always present because Sucrase classic JSX emits
|
|
38
|
+
* React.createElement() calls. JS globals are included because
|
|
39
|
+
* `new Function` code does not see the outer lexical environment.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getDefaultJsxScope(): Record<string, unknown>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL = 3000;
|
|
3
|
+
/**
|
|
4
|
+
* Read the host-configured "100%" cap for placeholder progress. Falls
|
|
5
|
+
* back to {@link LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL} when no provider
|
|
6
|
+
* is mounted above. Consumed inside `LlmResponseRender` and forwarded
|
|
7
|
+
* to `parseContentBlocks`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useLiveTsxMaxCharsForFull(): number;
|
|
10
|
+
/**
|
|
11
|
+
* Wraps any subtree that renders `LlmResponseRender` with a custom
|
|
12
|
+
* `maxCharsForFull`. Place near the top of a view (e.g. ComposerViewV2)
|
|
13
|
+
* so every chat surface inside picks up the same hint.
|
|
14
|
+
*/
|
|
15
|
+
export declare const LiveTsxConfigProvider: React.FC<{
|
|
16
|
+
maxCharsForFull?: number;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type ContentBlock = {
|
|
2
|
+
type: 'liveTsx' | 'markdown' | 'slot';
|
|
3
|
+
content?: string;
|
|
4
|
+
code?: string;
|
|
5
|
+
/** For `slot` blocks: the SlotId from a UI tool's result, matched to a
|
|
6
|
+
* `{{Component:<slotId>}}` token in the assistant text. */
|
|
7
|
+
slotId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Per-block lifecycle state. False once a closed liveTsx fence has
|
|
10
|
+
* been parsed out of the chat text (the sidecar's build succeeded
|
|
11
|
+
* and the compiled JS is safe to mount). True for a "loading"
|
|
12
|
+
* marker without a paired closing fence, and for the trailing
|
|
13
|
+
* unclosed fence at the end of streaming text.
|
|
14
|
+
*/
|
|
15
|
+
partial?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 0..1 progress hint for partial liveTsx blocks. Derived from the
|
|
18
|
+
* count of <i data-lt-tick></i> markers the server emits into the
|
|
19
|
+
* chat text every `STRIDE` chars of TSX body received (see
|
|
20
|
+
* `LiveTsxProgressStride` in JsxLiveStreamProcessor.cs). Mapped to
|
|
21
|
+
* `MAX_CHARS_FOR_FULL` and clamped to 1. Consumed by
|
|
22
|
+
* `GeneratingVisualization` to fill the placeholder's bar buckets.
|
|
23
|
+
*/
|
|
24
|
+
progress?: number;
|
|
25
|
+
bytes?: number;
|
|
26
|
+
};
|
|
27
|
+
export declare const DEFAULT_MAX_CHARS_FOR_FULL = 2000;
|
|
28
|
+
/**
|
|
29
|
+
* Splits a markdown string into sequential content blocks:
|
|
30
|
+
* - 'markdown' — regular content (headings, paragraphs, non-JSX code fences, etc.)
|
|
31
|
+
* - 'liveTsx' — fenced code blocks tagged ```liveTsx
|
|
32
|
+
*
|
|
33
|
+
* When the text ends with an unclosed ```liveTsx fence (common during streaming),
|
|
34
|
+
* the partial code is still emitted as a 'liveTsx' block so it goes through
|
|
35
|
+
* LiveJsxBlock (and skeleton detection) instead of the markdown renderer.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseContentBlocks(text: string, options?: {
|
|
38
|
+
maxCharsForFull?: number;
|
|
39
|
+
}): ContentBlock[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface StopwatchProps {
|
|
3
|
+
on: boolean;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
showButton?: boolean;
|
|
7
|
+
startingPoint: Date;
|
|
8
|
+
stopPoint?: Date;
|
|
9
|
+
id?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Stopwatch: React.FC<StopwatchProps>;
|
|
12
|
+
export default Stopwatch;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { default as AiChat } from './AiChat/AiChat';
|
|
2
|
+
export { default as ChatPane } from './AiChat/ChatPane/ChatPane';
|
|
3
|
+
export { AiChatProvider } from './AiChat/AiChatProvider';
|
|
4
|
+
export { AiChatDrawer } from './AiChat/AiChatDrawer';
|
|
5
|
+
export { AiChatFloating } from './AiChat/AiChatFloating';
|
|
6
|
+
export { AiChatServiceContext, useAiChatServices, useAiChatSessionStore, } from './AiChat/AiChatContext';
|
|
7
|
+
export type { AiChatContextState as AiChatServices } from './AiChat/AiChatContext';
|
|
8
|
+
export type { AiChatProps, AiChatHandle, AiChatStyleProps, AiChatDrawerProps, AiChatFloatingProps, ConnectionInformation, } from './AiChat/AiChatTypes';
|
|
9
|
+
export type { AiChatState, AiChatStore, SubAgentState } from './AiChat/stateConfiguration';
|
|
10
|
+
export { createAiChatStore } from './AiChat/stateConfiguration';
|
|
11
|
+
export { createAiChatSessionStore } from './AiChat/AiChatSessionStore';
|
|
12
|
+
export { SessionStateManagerService, IDLE_TIMEOUT, WARNING_THRESHOLD, } from './AiChat/sessionStateManagerService';
|
|
13
|
+
export { default as Message } from './AiChat/ChatPane/Message';
|
|
14
|
+
export { default as SubAgentBox } from './AiChat/ChatPane/SubAgentBox';
|
|
15
|
+
export type { SubAgentBoxProps } from './AiChat/ChatPane/SubAgentBox';
|
|
16
|
+
export { classifyPart, DEFAULT_PART_RENDERERS, TextPart, ThoughtPart, FunctionPart, WaitingPart, SuspendedPart, BoxedPart, UiToolDispatcher, } from './AiChat/ChatPane/parts';
|
|
17
|
+
export type { PartKind, PartRendererProps, PartRenderer, PartRendererMap, } from './AiChat/ChatPane/parts';
|
|
18
|
+
export { createUiToolRegistry, parseUiArgs, parseClientOutput } from './AiChat/ChatPane/parts';
|
|
19
|
+
export type { UiToolRegistry, UiToolRegistryBuilder, UiToolContext, UiToolActionContext, UiToolArgs, UiToolRenderFn, UiToolActionFn, UiToolRenderOptions, UiToolActionOptions, UiToolEntry, UiToolRenderEntry, UiToolActionEntry, } from './AiChat/ChatPane/parts';
|
|
20
|
+
export { useContainerWidth, useContainerRectangle } from '../hooks/useContainerWidth';
|
|
21
|
+
export { default as Stopwatch } from './Stopwatch';
|
|
22
|
+
export { default as LoadingDots } from './Library/LoadingDots';
|
|
23
|
+
export { default as MarkdownExtended } from './Library/MarkdowmExtended';
|
|
24
|
+
export { default as ArtifactRender } from './Library/ArtifactRender';
|
|
25
|
+
export { default as LinearBackgroundProgress } from './Library/LinearBackgroundProgress';
|
|
26
|
+
export { default as LinearProgressBarWithMarkers } from './Library/LinearProgressBarWithMarkers';
|
|
27
|
+
export { default as DelayTextComponent } from './Library/DelayTextComponent';
|
|
28
|
+
export { LlmResponseRender, LiveJsxBlock, JsxErrorBoundary, EnvironmentProvider, InertEnvironmentProvider, useEnvironment, useEnvironmentOptional, LiveTsxConfigProvider, useLiveTsxMaxCharsForFull, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL, extendModuleRegistry, extendDefaultScope, getDefaultJsxScope, parseContentBlocks, } from './LlmResponseRender';
|
|
29
|
+
export type { ContentBlock } from './LlmResponseRender';
|
|
30
|
+
export * from './v2';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AgentActivityV2Props {
|
|
3
|
+
/** Hide reasoning rows ("Pensando…"). */
|
|
4
|
+
hideReasoning?: boolean;
|
|
5
|
+
/** Maximum visible height before the timeline scrolls. Defaults to 320px. */
|
|
6
|
+
maxHeight?: number | string;
|
|
7
|
+
/** Empty state to show when there are no parts to render. */
|
|
8
|
+
emptyState?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Display order. `'chronological'` (default) keeps stream order with
|
|
11
|
+
* the live row at the bottom and auto-scrolls as new parts arrive;
|
|
12
|
+
* `'newest-first'` puts the most recent part on top.
|
|
13
|
+
*/
|
|
14
|
+
order?: 'newest-first' | 'chronological';
|
|
15
|
+
/**
|
|
16
|
+
* When true (default) tool rows hide their args/JSON preview line and
|
|
17
|
+
* only reveal it when the user clicks the row to expand. Set to false
|
|
18
|
+
* to always show the preview inline.
|
|
19
|
+
*/
|
|
20
|
+
compact?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Render a horizontal pill strip at the top to navigate by turn:
|
|
23
|
+
* an "All turns" pill (merged history) plus one pill per past
|
|
24
|
+
* interaction. While a turn is in flight the live activities are
|
|
25
|
+
* shown by default; clicking a pill switches the view. When a turn
|
|
26
|
+
* closes the panel goes empty until the user picks a pill — i.e.
|
|
27
|
+
* we don't keep showing the previous turn's stale activities.
|
|
28
|
+
* Defaults to `false`.
|
|
29
|
+
*/
|
|
30
|
+
showTurnHistory?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare const AgentActivityV2: React.FC<AgentActivityV2Props>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AiChatV2PaneProps {
|
|
3
|
+
/** Override the title shown in the header. Defaults to the current session's overview. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Optional mono-styled subtitle, e.g. "· 14 sem · BI_Master". */
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Right-aligned slot, e.g. "Pin no dashboard" chip. */
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
|
+
/** Hide the header entirely. */
|
|
10
|
+
hideHeader?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Optional content rendered below the prompt input, inside the same
|
|
13
|
+
* column. Mirrors the `bottomSlot` of the v1 AiChat / AiChatFloating:
|
|
14
|
+
* the inner ChatPane keeps its own scroll and the slot lives below
|
|
15
|
+
* it as a fixed-height row. The responsive DataExplorer uses this
|
|
16
|
+
* to mount `<RunProgressStripV2 />` on mobile.
|
|
17
|
+
*/
|
|
18
|
+
bottomSlot?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const AiChatV2Pane: React.FC<AiChatV2PaneProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const APPBAR_V2_HEIGHT = 48;
|
|
3
|
+
export interface AppBarV2Props {
|
|
4
|
+
/** Logo / brand mark on the far left. */
|
|
5
|
+
logo?: React.ReactNode;
|
|
6
|
+
/** Product or app name shown next to the logo. */
|
|
7
|
+
productName?: string;
|
|
8
|
+
/** Optional breadcrumb / context node rendered between brand and search. */
|
|
9
|
+
breadcrumb?: React.ReactNode;
|
|
10
|
+
/** Right-aligned slot, typically the user-profile menu. */
|
|
11
|
+
rightAccessory?: React.ReactNode;
|
|
12
|
+
/** Called when the user clicks the (decorative) search box. */
|
|
13
|
+
onSearchClick?: () => void;
|
|
14
|
+
/** Override the search box placeholder text. */
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
/** Hide the search box entirely. */
|
|
17
|
+
hideSearch?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Replace the built-in decorative search with a host-provided
|
|
20
|
+
* node (e.g. <DashboardsAutocompleteV2 />). When provided,
|
|
21
|
+
* `onSearchClick` and `searchPlaceholder` are ignored.
|
|
22
|
+
*/
|
|
23
|
+
searchSlot?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Hamburger trigger rendered before the logo. Hosts mount this on
|
|
26
|
+
* the responsive (< lg) breakpoint to open the MobileDrawerV2.
|
|
27
|
+
*/
|
|
28
|
+
hamburger?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Compact mode — the responsive (< lg) chrome. Hides the search
|
|
31
|
+
* box (no room next to the hamburger), tightens horizontal gaps,
|
|
32
|
+
* and lets the breadcrumb slot carry just the company chip (the
|
|
33
|
+
* host decides what to pass). The desktop layout is preserved
|
|
34
|
+
* when this is `false` (the default).
|
|
35
|
+
*/
|
|
36
|
+
compact?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const AppBarV2: React.FC<AppBarV2Props>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AppRailV2View {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
/** Route the view navigates to (e.g. '/dashboards'). */
|
|
7
|
+
to: string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional matcher. By default the view is active when pathname starts
|
|
10
|
+
* with `to`. Use this when two views share a prefix.
|
|
11
|
+
*/
|
|
12
|
+
isActive?: (pathname: string) => boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface AppRailV2Props {
|
|
15
|
+
views: AppRailV2View[];
|
|
16
|
+
/** Logo / brand mark rendered at the top of the rail. */
|
|
17
|
+
logo?: React.ReactNode;
|
|
18
|
+
/** Optional content rendered at the bottom (avatar, settings). */
|
|
19
|
+
footer?: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const AppRailV2: React.FC<AppRailV2Props>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AppShellV2Props {
|
|
3
|
+
/** Rendered at the top, full width. Typically <AppBarV2 ... />. */
|
|
4
|
+
appBar?: React.ReactNode;
|
|
5
|
+
/** Rendered on the left, full height under the top bar. Typically <AppRailV2 ... />. */
|
|
6
|
+
rail?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Optional content rendered in place of <Outlet />. Useful for tests or
|
|
9
|
+
* when nesting an alternate router. Defaults to <Outlet />.
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const AppShellV2: React.FC<AppShellV2Props>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ChatSessionGroup, ChatSessionListItem } from '../../hooks';
|
|
3
|
+
import { ChatSession } from '../../models/ChatSession';
|
|
4
|
+
export interface ChatsHistoryV2Item {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
/** e.g. "agora", "2h", "1d", "5d", "1sem" */
|
|
8
|
+
time?: string;
|
|
9
|
+
snippet?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Optional session kind. The host distinguishes between regular
|
|
12
|
+
* data-explorer chats and composer sessions (those that produced
|
|
13
|
+
* a dashboard) so the row can render a small visual cue and the
|
|
14
|
+
* click handler can route to the right view.
|
|
15
|
+
*/
|
|
16
|
+
kind?: 'chat' | 'composer';
|
|
17
|
+
/**
|
|
18
|
+
* When true, animate `title` char-by-char whenever it changes.
|
|
19
|
+
* Host marks the "current working session" with this so the
|
|
20
|
+
* generated overview reveals itself as if being typed live.
|
|
21
|
+
*/
|
|
22
|
+
typewriter?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface ChatsHistoryV2Props {
|
|
25
|
+
groups: ChatSessionGroup[];
|
|
26
|
+
newActiveSession?: ChatSession;
|
|
27
|
+
activeId?: string;
|
|
28
|
+
onSelect?: (item: ChatSessionListItem) => void;
|
|
29
|
+
onNewSession?: () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Rename a session. Receives the new title. The host should patch
|
|
32
|
+
* the session's `overview` (or whatever it shows as the title) and
|
|
33
|
+
* refresh the list.
|
|
34
|
+
*/
|
|
35
|
+
onRename?: (id: string, newTitle: string) => void | Promise<void>;
|
|
36
|
+
/** Delete a session. The host should confirm if it wants extra friction beyond the built-in dialog. */
|
|
37
|
+
onDelete?: (id: string) => void | Promise<void>;
|
|
38
|
+
/** Footer slot, typically a small avatar + name. */
|
|
39
|
+
footer?: React.ReactNode;
|
|
40
|
+
/** Header brand mark / app name. */
|
|
41
|
+
header?: React.ReactNode;
|
|
42
|
+
/** Search box label override. */
|
|
43
|
+
searchPlaceholder?: string;
|
|
44
|
+
/** Total count override; defaults to flat sum of items. */
|
|
45
|
+
totalCount?: number;
|
|
46
|
+
}
|
|
47
|
+
export declare const ChatsHistoryV2: React.FC<ChatsHistoryV2Props>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface LastPromptsV2Props {
|
|
3
|
+
/** Receives the selected prompt's text (and optional JSON payload). */
|
|
4
|
+
onPromptSelected: (promptText: string, promptJson?: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const LastPromptsV2: React.FC<LastPromptsV2Props>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MobileDrawerV2NavItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
to: string;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
isActive?: (pathname: string) => boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const MOBILE_NAV_DEFAULT: MobileDrawerV2NavItem[];
|
|
10
|
+
export interface MobileDrawerV2Props {
|
|
11
|
+
/** Controlled open state. */
|
|
12
|
+
open: boolean;
|
|
13
|
+
width?: string;
|
|
14
|
+
/** Fired when the drawer requests to close (backdrop click, ESC, nav tap). */
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
/** Override the nav-icon list. Defaults to Dashboards + Data Explorer. */
|
|
17
|
+
navItems?: MobileDrawerV2NavItem[];
|
|
18
|
+
/** Brand mark rendered at the top of the drawer. */
|
|
19
|
+
logo?: React.ReactNode;
|
|
20
|
+
/** Optional product name shown next to the logo. */
|
|
21
|
+
productName?: string;
|
|
22
|
+
/** Bottom-pinned content — typically the UserProfile menu. */
|
|
23
|
+
userProfile?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Sessions list element — typically a self-contained
|
|
26
|
+
* `<MobileSessionsList />` adapter that fetches its own data.
|
|
27
|
+
* Rendered between the nav and the user footer when the active
|
|
28
|
+
* pathname starts with `/data-explorer`. The component is only
|
|
29
|
+
* mounted when its route is active; passing both slots as JSX
|
|
30
|
+
* does NOT mount both (React elements are descriptions until
|
|
31
|
+
* committed).
|
|
32
|
+
*/
|
|
33
|
+
sessionsList?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Dashboards list element — `<MobileDashboardsList />` or
|
|
36
|
+
* equivalent. Rendered when the active pathname starts with
|
|
37
|
+
* `/board`.
|
|
38
|
+
*/
|
|
39
|
+
dashboardsList?: React.ReactNode;
|
|
40
|
+
/** When true, tapping a nav item also closes the drawer. Defaults true. */
|
|
41
|
+
closeOnNavigate?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const MobileDrawerV2: React.FC<MobileDrawerV2Props>;
|