bstp-agent-widget 0.2.128 → 0.2.129
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/dist/angular.cjs +112 -110
- package/dist/angular.css +1 -1
- package/dist/angular.mjs +8979 -8139
- package/dist/element.cjs +137 -135
- package/dist/element.css +1 -1
- package/dist/element.mjs +14802 -13962
- package/dist/index.cjs +112 -110
- package/dist/index.mjs +8972 -8132
- package/dist/shadow.cjs +137 -135
- package/dist/shadow.css +1 -1
- package/dist/shadow.mjs +14795 -13955
- package/dist/styles.css +1 -1
- package/dist/styles.layer.css +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal/api/genai.service.d.mts +6 -2
- package/dist/types/internal/api/genai.service.d.ts +6 -2
- package/dist/types/internal/components/AgentChatPopup/AgentChatPopup.d.mts +18 -0
- package/dist/types/internal/components/AgentChatPopup/AgentChatPopup.d.ts +18 -0
- package/dist/types/internal/components/AgentChatPopup/AgentChatPopupComparison.d.mts +8 -0
- package/dist/types/internal/components/AgentChatPopup/AgentChatPopupComparison.d.ts +8 -0
- package/dist/types/internal/components/AgentChatPopup/index.d.mts +1 -0
- package/dist/types/internal/components/AgentChatPopup/index.d.ts +1 -0
- package/dist/types/internal/components/AgentMarkdownRenderer/AgentMarkdownTableWidget.d.mts +1 -1
- package/dist/types/internal/components/AgentMarkdownRenderer/AgentMarkdownTableWidget.d.ts +1 -1
- package/dist/types/internal/components/AgentPanel/AgentPanel.d.mts +13 -1
- package/dist/types/internal/components/AgentPanel/AgentPanel.d.ts +13 -1
- package/dist/types/internal/components/AgentPanel/AgentPanelContentBody.d.mts +2 -1
- package/dist/types/internal/components/AgentPanel/AgentPanelContentBody.d.ts +2 -1
- package/dist/types/internal/components/AgentPanel/AgentPanelFooter.d.mts +3 -1
- package/dist/types/internal/components/AgentPanel/AgentPanelFooter.d.ts +3 -1
- package/dist/types/internal/components/AgentPanel/AgentPanelHeader.d.mts +3 -1
- package/dist/types/internal/components/AgentPanel/AgentPanelHeader.d.ts +3 -1
- package/dist/types/internal/context/AgentChatActionsContext.d.mts +9 -0
- package/dist/types/internal/context/AgentChatActionsContext.d.ts +9 -0
- package/dist/types/internal/enums/markdown-renderer-render-as.d.mts +13 -0
- package/dist/types/internal/enums/markdown-renderer-render-as.d.ts +13 -0
- package/dist/types/internal/hooks/useAgent.d.mts +9 -0
- package/dist/types/internal/hooks/useAgent.d.ts +9 -0
- package/dist/types/internal/hooks/useAgentActions.d.mts +2 -0
- package/dist/types/internal/hooks/useAgentActions.d.ts +2 -0
- package/dist/types/internal/hooks/useAgentChatPopupComparison.d.mts +13 -0
- package/dist/types/internal/hooks/useAgentChatPopupComparison.d.ts +13 -0
- package/dist/types/internal/hooks/useAgentConnectionStatus.d.mts +12 -0
- package/dist/types/internal/hooks/useAgentConnectionStatus.d.ts +12 -0
- package/dist/types/internal/hooks/useAgentUiOptions.d.mts +1 -0
- package/dist/types/internal/hooks/useAgentUiOptions.d.ts +1 -0
- package/dist/types/internal/hooks/useAgentVoiceHandlers.d.mts +5 -2
- package/dist/types/internal/hooks/useAgentVoiceHandlers.d.ts +5 -2
- package/dist/types/internal/hooks/useGenaiAuth.d.mts +1 -1
- package/dist/types/internal/hooks/useGenaiAuth.d.ts +1 -1
- package/dist/types/internal/hooks/useGenaiLogin.d.mts +1 -1
- package/dist/types/internal/hooks/useGenaiLogin.d.ts +1 -1
- package/dist/types/internal/hooks/useGenaiTenantSwitch.d.mts +1 -1
- package/dist/types/internal/hooks/useGenaiTenantSwitch.d.ts +1 -1
- package/dist/types/internal/hooks/usePopupPortalLayout.d.mts +21 -0
- package/dist/types/internal/hooks/usePopupPortalLayout.d.ts +21 -0
- package/dist/types/internal/hooks/useSendChatMessage.d.mts +1 -0
- package/dist/types/internal/hooks/useSendChatMessage.d.ts +1 -0
- package/dist/types/internal/icons/IconRefresh.d.mts +6 -0
- package/dist/types/internal/icons/IconRefresh.d.ts +6 -0
- package/dist/types/internal/mappers/agent-chat-config.mapper.d.mts +2 -0
- package/dist/types/internal/mappers/agent-chat-config.mapper.d.ts +2 -0
- package/dist/types/internal/mappers/agent-chat-popup.mapper.d.mts +7 -0
- package/dist/types/internal/mappers/agent-chat-popup.mapper.d.ts +7 -0
- package/dist/types/internal/queries/genai/useSendAgentMessageMutation.d.mts +7 -3
- package/dist/types/internal/queries/genai/useSendAgentMessageMutation.d.ts +7 -3
- package/dist/types/internal/queries/genai/useSendAgenticAppChatMutation.d.mts +7 -3
- package/dist/types/internal/queries/genai/useSendAgenticAppChatMutation.d.ts +7 -3
- package/dist/types/internal/theme/theme.d.mts +7 -3
- package/dist/types/internal/theme/theme.d.ts +7 -3
- package/dist/types/internal/types/models/agent-chat-message.d.mts +6 -0
- package/dist/types/internal/types/models/agent-chat-message.d.ts +6 -0
- package/dist/types/internal/types/models/agent-chat-popup-comparison.d.mts +23 -0
- package/dist/types/internal/types/models/agent-chat-popup-comparison.d.ts +23 -0
- package/dist/types/internal/types/models/agent-chat-popup-context.d.mts +9 -0
- package/dist/types/internal/types/models/agent-chat-popup-context.d.ts +9 -0
- package/dist/types/internal/types/models/agent-chat-popup-payload.d.mts +9 -0
- package/dist/types/internal/types/models/agent-chat-popup-payload.d.ts +9 -0
- package/dist/types/internal/utils/agent-chat/parsers/markdown/markdown-table-parser.d.mts +4 -2
- package/dist/types/internal/utils/agent-chat/parsers/markdown/markdown-table-parser.d.ts +4 -2
- package/dist/types/internal/utils/agent-chat/widget/index.d.mts +1 -1
- package/dist/types/internal/utils/agent-chat/widget/index.d.ts +1 -1
- package/dist/types/internal/utils/agent-chat/widget/widget-payload-mapper.d.mts +2 -0
- package/dist/types/internal/utils/agent-chat/widget/widget-payload-mapper.d.ts +2 -0
- package/dist/types/internal/utils/error.utils.d.mts +5 -0
- package/dist/types/internal/utils/error.utils.d.ts +5 -0
- package/package.json +1 -1
- package/dist/types/internal/types/dto/genai-send-agent-message-request.dto.d.mts +0 -4
- package/dist/types/internal/types/dto/genai-send-agent-message-request.dto.d.ts +0 -4
- package/dist/types/internal/types/dto/genai-send-agentic-app-chat-request.dto.d.mts +0 -4
- package/dist/types/internal/types/dto/genai-send-agentic-app-chat-request.dto.d.ts +0 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IconRefreshProps extends Omit<React.SVGProps<SVGSVGElement>, 'size'> {
|
|
3
|
+
size?: number | string;
|
|
4
|
+
}
|
|
5
|
+
export declare function IconRefresh({ size, ...props }: IconRefreshProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { ResolvedWidgetConfig } from '@/types/models/widget-config';
|
|
2
2
|
export declare function resolveAssistantId(config: ResolvedWidgetConfig): number | null;
|
|
3
|
+
/** Catalog’daki seçili agent satırından gelen `label` (`useAgentConfig` / `selectedAssistant.label`). */
|
|
4
|
+
export declare function resolveAssistantDisplayName(config: ResolvedWidgetConfig): string;
|
|
3
5
|
export declare function resolveInitialMessage(config: ResolvedWidgetConfig): string | null;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { ResolvedWidgetConfig } from '@/types/models/widget-config';
|
|
2
2
|
export declare function resolveAssistantId(config: ResolvedWidgetConfig): number | null;
|
|
3
|
+
/** Catalog’daki seçili agent satırından gelen `label` (`useAgentConfig` / `selectedAssistant.label`). */
|
|
4
|
+
export declare function resolveAssistantDisplayName(config: ResolvedWidgetConfig): string;
|
|
3
5
|
export declare function resolveInitialMessage(config: ResolvedWidgetConfig): string | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgentChatPopupContext } from '@/types/models/agent-chat-popup-context';
|
|
2
|
+
export interface ParsedAgentPopupResult {
|
|
3
|
+
displayText: string;
|
|
4
|
+
popup?: AgentChatPopupContext;
|
|
5
|
+
}
|
|
6
|
+
export declare function extractAgentRelatedAgent(message: string): string | undefined;
|
|
7
|
+
export declare function extractAgentPopupResult(message: string): ParsedAgentPopupResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgentChatPopupContext } from '@/types/models/agent-chat-popup-context';
|
|
2
|
+
export interface ParsedAgentPopupResult {
|
|
3
|
+
displayText: string;
|
|
4
|
+
popup?: AgentChatPopupContext;
|
|
5
|
+
}
|
|
6
|
+
export declare function extractAgentRelatedAgent(message: string): string | undefined;
|
|
7
|
+
export declare function extractAgentPopupResult(message: string): ParsedAgentPopupResult;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { GenaiAgentMessageRequest } from '@/types/dto/genai-agent-message-request.dto';
|
|
1
2
|
import { GenaiAgentMessageResponse } from '@/types/dto/genai-agent-message-response.dto';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
export type SendAgentMessageMutationVariables = {
|
|
4
|
+
payload: GenaiAgentMessageRequest;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
};
|
|
7
|
+
export declare const useSendAgentMessageMutation: (options?: (Omit<import("@tanstack/react-query").UseMutationOptions<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgentMessageMutationVariables, unknown>, "meta" | "mutationKey" | "mutationFn"> & {
|
|
4
8
|
meta?: import("../utils/createApiQuery").ApiQueryMeta;
|
|
5
|
-
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>,
|
|
9
|
+
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgentMessageMutationVariables, unknown>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { GenaiAgentMessageRequest } from '@/types/dto/genai-agent-message-request.dto';
|
|
1
2
|
import { GenaiAgentMessageResponse } from '@/types/dto/genai-agent-message-response.dto';
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
export type SendAgentMessageMutationVariables = {
|
|
4
|
+
payload: GenaiAgentMessageRequest;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
};
|
|
7
|
+
export declare const useSendAgentMessageMutation: (options?: (Omit<import("@tanstack/react-query").UseMutationOptions<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgentMessageMutationVariables, unknown>, "meta" | "mutationKey" | "mutationFn"> & {
|
|
4
8
|
meta?: import("../utils/createApiQuery").ApiQueryMeta;
|
|
5
|
-
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>,
|
|
9
|
+
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgentMessageMutationVariables, unknown>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { GenaiAgentMessageResponse } from '@/types/dto/genai-agent-message-response.dto';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
2
|
+
import { GenaiAgenticAppChatRequest } from '@/types/dto/genai-agentic-app-chat-request.dto';
|
|
3
|
+
export type SendAgenticAppChatMutationVariables = {
|
|
4
|
+
payload: GenaiAgenticAppChatRequest;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
};
|
|
7
|
+
export declare const useSendAgenticAppChatMutation: (options?: (Omit<import("@tanstack/react-query").UseMutationOptions<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgenticAppChatMutationVariables, unknown>, "meta" | "mutationKey" | "mutationFn"> & {
|
|
4
8
|
meta?: import("../utils/createApiQuery").ApiQueryMeta;
|
|
5
|
-
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>,
|
|
9
|
+
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgenticAppChatMutationVariables, unknown>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { GenaiAgentMessageResponse } from '@/types/dto/genai-agent-message-response.dto';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
2
|
+
import { GenaiAgenticAppChatRequest } from '@/types/dto/genai-agentic-app-chat-request.dto';
|
|
3
|
+
export type SendAgenticAppChatMutationVariables = {
|
|
4
|
+
payload: GenaiAgenticAppChatRequest;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
};
|
|
7
|
+
export declare const useSendAgenticAppChatMutation: (options?: (Omit<import("@tanstack/react-query").UseMutationOptions<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgenticAppChatMutationVariables, unknown>, "meta" | "mutationKey" | "mutationFn"> & {
|
|
4
8
|
meta?: import("../utils/createApiQuery").ApiQueryMeta;
|
|
5
|
-
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>,
|
|
9
|
+
}) | undefined) => import("@tanstack/react-query").UseMutationResult<GenaiAgentMessageResponse, import("axios").AxiosError<unknown, any>, SendAgenticAppChatMutationVariables, unknown>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultMantineColor, MantineColorsTuple } from '@mantine/core';
|
|
2
2
|
import { AppThemeConfig } from './theme.config';
|
|
3
|
-
type ExtendedMantineColors = 'brand-dark-blue' | 'brand-orange' | '
|
|
3
|
+
type ExtendedMantineColors = 'brand-dark-blue' | 'brand-orange' | 'danger' | 'success' | 'info' | DefaultMantineColor;
|
|
4
4
|
declare module '@mantine/core' {
|
|
5
5
|
/** @public */
|
|
6
6
|
interface MantineThemeColorsOverride {
|
|
@@ -15,6 +15,9 @@ export declare function createAppTheme(config?: AppThemeConfig): {
|
|
|
15
15
|
black?: string | undefined;
|
|
16
16
|
colors?: {
|
|
17
17
|
[x: string & {}]: MantineColorsTuple | undefined;
|
|
18
|
+
success?: MantineColorsTuple | undefined;
|
|
19
|
+
info?: MantineColorsTuple | undefined;
|
|
20
|
+
danger?: MantineColorsTuple | undefined;
|
|
18
21
|
blue?: MantineColorsTuple | undefined;
|
|
19
22
|
cyan?: MantineColorsTuple | undefined;
|
|
20
23
|
gray?: MantineColorsTuple | undefined;
|
|
@@ -29,7 +32,6 @@ export declare function createAppTheme(config?: AppThemeConfig): {
|
|
|
29
32
|
yellow?: MantineColorsTuple | undefined;
|
|
30
33
|
"brand-dark-blue"?: MantineColorsTuple | undefined;
|
|
31
34
|
"brand-orange"?: MantineColorsTuple | undefined;
|
|
32
|
-
accent?: MantineColorsTuple | undefined;
|
|
33
35
|
dark?: MantineColorsTuple | undefined;
|
|
34
36
|
grape?: MantineColorsTuple | undefined;
|
|
35
37
|
} | undefined;
|
|
@@ -165,6 +167,9 @@ export declare const AppTheme: {
|
|
|
165
167
|
black?: string | undefined;
|
|
166
168
|
colors?: {
|
|
167
169
|
[x: string & {}]: MantineColorsTuple | undefined;
|
|
170
|
+
success?: MantineColorsTuple | undefined;
|
|
171
|
+
info?: MantineColorsTuple | undefined;
|
|
172
|
+
danger?: MantineColorsTuple | undefined;
|
|
168
173
|
blue?: MantineColorsTuple | undefined;
|
|
169
174
|
cyan?: MantineColorsTuple | undefined;
|
|
170
175
|
gray?: MantineColorsTuple | undefined;
|
|
@@ -179,7 +184,6 @@ export declare const AppTheme: {
|
|
|
179
184
|
yellow?: MantineColorsTuple | undefined;
|
|
180
185
|
"brand-dark-blue"?: MantineColorsTuple | undefined;
|
|
181
186
|
"brand-orange"?: MantineColorsTuple | undefined;
|
|
182
|
-
accent?: MantineColorsTuple | undefined;
|
|
183
187
|
dark?: MantineColorsTuple | undefined;
|
|
184
188
|
grape?: MantineColorsTuple | undefined;
|
|
185
189
|
} | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultMantineColor, MantineColorsTuple } from '@mantine/core';
|
|
2
2
|
import { AppThemeConfig } from './theme.config';
|
|
3
|
-
type ExtendedMantineColors = 'brand-dark-blue' | 'brand-orange' | '
|
|
3
|
+
type ExtendedMantineColors = 'brand-dark-blue' | 'brand-orange' | 'danger' | 'success' | 'info' | DefaultMantineColor;
|
|
4
4
|
declare module '@mantine/core' {
|
|
5
5
|
/** @public */
|
|
6
6
|
interface MantineThemeColorsOverride {
|
|
@@ -15,6 +15,9 @@ export declare function createAppTheme(config?: AppThemeConfig): {
|
|
|
15
15
|
black?: string | undefined;
|
|
16
16
|
colors?: {
|
|
17
17
|
[x: string & {}]: MantineColorsTuple | undefined;
|
|
18
|
+
success?: MantineColorsTuple | undefined;
|
|
19
|
+
info?: MantineColorsTuple | undefined;
|
|
20
|
+
danger?: MantineColorsTuple | undefined;
|
|
18
21
|
blue?: MantineColorsTuple | undefined;
|
|
19
22
|
cyan?: MantineColorsTuple | undefined;
|
|
20
23
|
gray?: MantineColorsTuple | undefined;
|
|
@@ -29,7 +32,6 @@ export declare function createAppTheme(config?: AppThemeConfig): {
|
|
|
29
32
|
yellow?: MantineColorsTuple | undefined;
|
|
30
33
|
"brand-dark-blue"?: MantineColorsTuple | undefined;
|
|
31
34
|
"brand-orange"?: MantineColorsTuple | undefined;
|
|
32
|
-
accent?: MantineColorsTuple | undefined;
|
|
33
35
|
dark?: MantineColorsTuple | undefined;
|
|
34
36
|
grape?: MantineColorsTuple | undefined;
|
|
35
37
|
} | undefined;
|
|
@@ -165,6 +167,9 @@ export declare const AppTheme: {
|
|
|
165
167
|
black?: string | undefined;
|
|
166
168
|
colors?: {
|
|
167
169
|
[x: string & {}]: MantineColorsTuple | undefined;
|
|
170
|
+
success?: MantineColorsTuple | undefined;
|
|
171
|
+
info?: MantineColorsTuple | undefined;
|
|
172
|
+
danger?: MantineColorsTuple | undefined;
|
|
168
173
|
blue?: MantineColorsTuple | undefined;
|
|
169
174
|
cyan?: MantineColorsTuple | undefined;
|
|
170
175
|
gray?: MantineColorsTuple | undefined;
|
|
@@ -179,7 +184,6 @@ export declare const AppTheme: {
|
|
|
179
184
|
yellow?: MantineColorsTuple | undefined;
|
|
180
185
|
"brand-dark-blue"?: MantineColorsTuple | undefined;
|
|
181
186
|
"brand-orange"?: MantineColorsTuple | undefined;
|
|
182
|
-
accent?: MantineColorsTuple | undefined;
|
|
183
187
|
dark?: MantineColorsTuple | undefined;
|
|
184
188
|
grape?: MantineColorsTuple | undefined;
|
|
185
189
|
} | undefined;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { AgentMessageSender } from '@/enums/agent-chat-message-sender';
|
|
2
|
+
import { AgentChatPopupContext } from '@/types/models/agent-chat-popup-context';
|
|
2
3
|
export interface AgentMessage {
|
|
3
4
|
id: string;
|
|
4
5
|
sentBy: AgentMessageSender;
|
|
5
6
|
text: string;
|
|
6
7
|
createdAt?: string;
|
|
8
|
+
relatedAgent?: string;
|
|
9
|
+
/** True while the assistant reply is being revealed (typewriter animation). */
|
|
10
|
+
isStreaming?: boolean;
|
|
11
|
+
/** Optional title/subtitle overrides for the streaming preview modal. */
|
|
12
|
+
popup?: AgentChatPopupContext;
|
|
7
13
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { AgentMessageSender } from '@/enums/agent-chat-message-sender';
|
|
2
|
+
import { AgentChatPopupContext } from '@/types/models/agent-chat-popup-context';
|
|
2
3
|
export interface AgentMessage {
|
|
3
4
|
id: string;
|
|
4
5
|
sentBy: AgentMessageSender;
|
|
5
6
|
text: string;
|
|
6
7
|
createdAt?: string;
|
|
8
|
+
relatedAgent?: string;
|
|
9
|
+
/** True while the assistant reply is being revealed (typewriter animation). */
|
|
10
|
+
isStreaming?: boolean;
|
|
11
|
+
/** Optional title/subtitle overrides for the streaming preview modal. */
|
|
12
|
+
popup?: AgentChatPopupContext;
|
|
7
13
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type AgentChatPopupComparisonColumnType = string;
|
|
2
|
+
export interface AgentChatPopupComparisonHeader {
|
|
3
|
+
label: string;
|
|
4
|
+
offerName: string;
|
|
5
|
+
badge: string | null;
|
|
6
|
+
}
|
|
7
|
+
export type AgentChatPopupComparisonValue = string | number | boolean | null | string[] | number[] | Record<string, unknown>;
|
|
8
|
+
export type AgentChatPopupComparisonSpecs = Record<string, AgentChatPopupComparisonValue>;
|
|
9
|
+
export interface AgentChatPopupComparisonSelectButton {
|
|
10
|
+
buttonText: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AgentChatPopupComparisonColumn {
|
|
14
|
+
columnType: AgentChatPopupComparisonColumnType;
|
|
15
|
+
header: AgentChatPopupComparisonHeader;
|
|
16
|
+
specs: AgentChatPopupComparisonSpecs;
|
|
17
|
+
selectButton: AgentChatPopupComparisonSelectButton | null;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentChatPopupComparisonModal {
|
|
20
|
+
title: string;
|
|
21
|
+
subtitle: string;
|
|
22
|
+
columns: AgentChatPopupComparisonColumn[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type AgentChatPopupComparisonColumnType = string;
|
|
2
|
+
export interface AgentChatPopupComparisonHeader {
|
|
3
|
+
label: string;
|
|
4
|
+
offerName: string;
|
|
5
|
+
badge: string | null;
|
|
6
|
+
}
|
|
7
|
+
export type AgentChatPopupComparisonValue = string | number | boolean | null | string[] | number[] | Record<string, unknown>;
|
|
8
|
+
export type AgentChatPopupComparisonSpecs = Record<string, AgentChatPopupComparisonValue>;
|
|
9
|
+
export interface AgentChatPopupComparisonSelectButton {
|
|
10
|
+
buttonText: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AgentChatPopupComparisonColumn {
|
|
14
|
+
columnType: AgentChatPopupComparisonColumnType;
|
|
15
|
+
header: AgentChatPopupComparisonHeader;
|
|
16
|
+
specs: AgentChatPopupComparisonSpecs;
|
|
17
|
+
selectButton: AgentChatPopupComparisonSelectButton | null;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentChatPopupComparisonModal {
|
|
20
|
+
title: string;
|
|
21
|
+
subtitle: string;
|
|
22
|
+
columns: AgentChatPopupComparisonColumn[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgentChatPopupComparisonModal } from '@/types/models/agent-chat-popup-comparison';
|
|
2
|
+
/** Optional copy for the assistant modal (static; not driven by panel streaming text). */
|
|
3
|
+
export interface AgentChatPopupContext {
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
body?: string;
|
|
7
|
+
relatedAgent?: string;
|
|
8
|
+
comparisonModal?: AgentChatPopupComparisonModal;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgentChatPopupComparisonModal } from '@/types/models/agent-chat-popup-comparison';
|
|
2
|
+
/** Optional copy for the assistant modal (static; not driven by panel streaming text). */
|
|
3
|
+
export interface AgentChatPopupContext {
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
body?: string;
|
|
7
|
+
relatedAgent?: string;
|
|
8
|
+
comparisonModal?: AgentChatPopupComparisonModal;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgentChatPopupComparisonModal } from './agent-chat-popup-comparison';
|
|
2
|
+
export interface AgentChatPopupPayloadBase {
|
|
3
|
+
renderAs: 'popup';
|
|
4
|
+
relatedAgent?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AgentChatComparisonPopupPayload extends AgentChatPopupPayloadBase {
|
|
7
|
+
comparisonModal: AgentChatPopupComparisonModal;
|
|
8
|
+
}
|
|
9
|
+
export type AgentChatPopupPayload = AgentChatComparisonPopupPayload;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgentChatPopupComparisonModal } from './agent-chat-popup-comparison';
|
|
2
|
+
export interface AgentChatPopupPayloadBase {
|
|
3
|
+
renderAs: 'popup';
|
|
4
|
+
relatedAgent?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AgentChatComparisonPopupPayload extends AgentChatPopupPayloadBase {
|
|
7
|
+
comparisonModal: AgentChatPopupComparisonModal;
|
|
8
|
+
}
|
|
9
|
+
export type AgentChatPopupPayload = AgentChatComparisonPopupPayload;
|
|
@@ -5,8 +5,10 @@ type MarkdownChunk = {
|
|
|
5
5
|
type: 'table';
|
|
6
6
|
config: {
|
|
7
7
|
type: 'table';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
items: string[][];
|
|
9
|
+
visualizationConfig: {
|
|
10
|
+
headers: string[];
|
|
11
|
+
};
|
|
10
12
|
};
|
|
11
13
|
};
|
|
12
14
|
export declare function splitMarkdownByTables(markdown: string): MarkdownChunk[];
|
|
@@ -5,8 +5,10 @@ type MarkdownChunk = {
|
|
|
5
5
|
type: 'table';
|
|
6
6
|
config: {
|
|
7
7
|
type: 'table';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
items: string[][];
|
|
9
|
+
visualizationConfig: {
|
|
10
|
+
headers: string[];
|
|
11
|
+
};
|
|
10
12
|
};
|
|
11
13
|
};
|
|
12
14
|
export declare function splitMarkdownByTables(markdown: string): MarkdownChunk[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { extractUsageDonutItems } from './chart-data-extractor';
|
|
2
2
|
export { toWidgetChunk, type JsonFenceChunk } from './widget-config-builder';
|
|
3
|
-
export { getStructuredDataPayload, getVisualizationType, isLikelyStructuredWidgetPayload, normalizeToStructuredDataRoot, } from './widget-payload-mapper';
|
|
3
|
+
export { getRenderAsType, getStructuredDataPayload, getVisualizationType, isLikelyStructuredWidgetPayload, normalizeToStructuredDataRoot, } from './widget-payload-mapper';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { extractUsageDonutItems } from './chart-data-extractor';
|
|
2
2
|
export { toWidgetChunk, type JsonFenceChunk } from './widget-config-builder';
|
|
3
|
-
export { getStructuredDataPayload, getVisualizationType, isLikelyStructuredWidgetPayload, normalizeToStructuredDataRoot, } from './widget-payload-mapper';
|
|
3
|
+
export { getRenderAsType, getStructuredDataPayload, getVisualizationType, isLikelyStructuredWidgetPayload, normalizeToStructuredDataRoot, } from './widget-payload-mapper';
|
|
@@ -2,10 +2,12 @@ import { MarkdownRendererResponseType } from '@/enums/markdown-renderer-response
|
|
|
2
2
|
import { MarkdownRendererVisualizationType } from '@/enums/markdown-renderer-visualization-type';
|
|
3
3
|
export declare function toMarkdownRendererVisualizationType(value: unknown): MarkdownRendererVisualizationType | null;
|
|
4
4
|
export declare function getVisualizationType(parsed: unknown): MarkdownRendererVisualizationType | string | null;
|
|
5
|
+
export declare function getRenderAsType(parsed: unknown): string | null;
|
|
5
6
|
export declare function toMarkdownRendererResponseType(value: unknown): MarkdownRendererResponseType | null;
|
|
6
7
|
export declare function getStructuredDataPayload(parsed: unknown): {
|
|
7
8
|
data: unknown;
|
|
8
9
|
visualizationConfig: unknown;
|
|
10
|
+
renderAs: string | null;
|
|
9
11
|
responseType: MarkdownRendererResponseType | null;
|
|
10
12
|
} | null;
|
|
11
13
|
export declare function normalizeToStructuredDataRoot(parsed: unknown): unknown;
|
|
@@ -2,10 +2,12 @@ import { MarkdownRendererResponseType } from '@/enums/markdown-renderer-response
|
|
|
2
2
|
import { MarkdownRendererVisualizationType } from '@/enums/markdown-renderer-visualization-type';
|
|
3
3
|
export declare function toMarkdownRendererVisualizationType(value: unknown): MarkdownRendererVisualizationType | null;
|
|
4
4
|
export declare function getVisualizationType(parsed: unknown): MarkdownRendererVisualizationType | string | null;
|
|
5
|
+
export declare function getRenderAsType(parsed: unknown): string | null;
|
|
5
6
|
export declare function toMarkdownRendererResponseType(value: unknown): MarkdownRendererResponseType | null;
|
|
6
7
|
export declare function getStructuredDataPayload(parsed: unknown): {
|
|
7
8
|
data: unknown;
|
|
8
9
|
visualizationConfig: unknown;
|
|
10
|
+
renderAs: string | null;
|
|
9
11
|
responseType: MarkdownRendererResponseType | null;
|
|
10
12
|
} | null;
|
|
11
13
|
export declare function normalizeToStructuredDataRoot(parsed: unknown): unknown;
|
|
@@ -14,3 +14,8 @@ export declare function getErrorMessage(error: AxiosError): ReactNode;
|
|
|
14
14
|
export declare function handleApiError(error: AxiosError): void;
|
|
15
15
|
/** @public */
|
|
16
16
|
export declare function handleCustomApiError(error: AxiosError, params?: ErrorParams): void;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a plain string error message extracted from unknown API errors.
|
|
19
|
+
* This is useful for inline UI errors where ReactNode notifications are not suitable.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getApiErrorMessageString(error: unknown, fallbackMessage?: string): string;
|
|
@@ -14,3 +14,8 @@ export declare function getErrorMessage(error: AxiosError): ReactNode;
|
|
|
14
14
|
export declare function handleApiError(error: AxiosError): void;
|
|
15
15
|
/** @public */
|
|
16
16
|
export declare function handleCustomApiError(error: AxiosError, params?: ErrorParams): void;
|
|
17
|
+
/**
|
|
18
|
+
* Returns a plain string error message extracted from unknown API errors.
|
|
19
|
+
* This is useful for inline UI errors where ReactNode notifications are not suitable.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getApiErrorMessageString(error: unknown, fallbackMessage?: string): string;
|
package/package.json
CHANGED