@factorialco/f0-react 1.385.0 → 1.386.0
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/{DataCollectionStorageProvider-CGbqg3A9.js → DataCollectionStorageProvider-qIZ0usNU.js} +16323 -18366
- package/dist/{F0AiChat-Ddo83UfP.js → F0AiChat-c00n76c6.js} +39717 -36870
- package/dist/{F0HILActionConfirmation-C475SHSS.js → F0HILActionConfirmation-B5YWkhyV.js} +156 -155
- package/dist/ai.d.ts +193 -12
- package/dist/ai.js +48 -45
- package/dist/experimental.d.ts +71 -5
- package/dist/experimental.js +267 -267
- package/dist/f0.d.ts +193 -12
- package/dist/f0.js +213 -210
- package/dist/i18n-provider-defaults.d.ts +8 -5
- package/dist/i18n-provider-defaults.js +3 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -64,6 +64,19 @@ export declare type AiChatProviderProps = {
|
|
|
64
64
|
* Optional footer content rendered below the textarea
|
|
65
65
|
*/
|
|
66
66
|
footer?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Async resolver functions for entity references in markdown.
|
|
69
|
+
* Used to fetch profile data for inline entity mentions (hover cards).
|
|
70
|
+
* The consuming app provides these so the chat can resolve entity IDs
|
|
71
|
+
* (e.g. employee IDs) into rich profile data without knowing the API.
|
|
72
|
+
*/
|
|
73
|
+
entityResolvers?: EntityResolvers;
|
|
74
|
+
/**
|
|
75
|
+
* Available tool hints that the user can activate to provide intent context
|
|
76
|
+
* to the AI. Renders a selector button next to the send button.
|
|
77
|
+
* Only one tool hint can be active at a time.
|
|
78
|
+
*/
|
|
79
|
+
toolHints?: AiChatToolHint[];
|
|
67
80
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
68
81
|
threadId: string;
|
|
69
82
|
feedback: string;
|
|
@@ -144,7 +157,12 @@ declare type AiChatProviderReturnValue = {
|
|
|
144
157
|
* Set the footer content. Use this to update the footer from outside the provider (e.g. per page/route).
|
|
145
158
|
*/
|
|
146
159
|
setFooter: React.Dispatch<React.SetStateAction<React.ReactNode | undefined>>;
|
|
147
|
-
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable"
|
|
160
|
+
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityResolvers" | "toolHints"> & {
|
|
161
|
+
/** The currently active tool hint, or null if none is selected */
|
|
162
|
+
activeToolHint: AiChatToolHint | null;
|
|
163
|
+
/** Set the active tool hint (pass null to clear) */
|
|
164
|
+
setActiveToolHint: React.Dispatch<React.SetStateAction<AiChatToolHint | null>>;
|
|
165
|
+
};
|
|
148
166
|
|
|
149
167
|
/**
|
|
150
168
|
* Internal state for the AiChat provider
|
|
@@ -160,6 +178,8 @@ declare interface AiChatState {
|
|
|
160
178
|
defaultVisualizationMode?: VisualizationMode;
|
|
161
179
|
lockVisualizationMode?: boolean;
|
|
162
180
|
footer?: React.ReactNode;
|
|
181
|
+
entityResolvers?: EntityResolvers;
|
|
182
|
+
toolHints?: AiChatToolHint[];
|
|
163
183
|
placeholders?: string[];
|
|
164
184
|
setPlaceholders?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
165
185
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
@@ -173,6 +193,28 @@ declare interface AiChatState {
|
|
|
173
193
|
tracking?: AiChatTrackingOptions;
|
|
174
194
|
}
|
|
175
195
|
|
|
196
|
+
/**
|
|
197
|
+
* A tool hint that can be activated to prepend invisible context to the user's
|
|
198
|
+
* message, telling the AI about the user's intent (e.g. "generate tables",
|
|
199
|
+
* "data analysis"). Similar to Gemini's tool selector UI.
|
|
200
|
+
*
|
|
201
|
+
* Only one tool hint can be active at a time. It persists across messages
|
|
202
|
+
* until the user explicitly removes it.
|
|
203
|
+
*/
|
|
204
|
+
export declare type AiChatToolHint = {
|
|
205
|
+
/** Unique identifier for this tool hint */
|
|
206
|
+
id: string;
|
|
207
|
+
/** Display label shown in the selector and chip */
|
|
208
|
+
label: string;
|
|
209
|
+
/** Optional icon shown in the selector and chip */
|
|
210
|
+
icon?: IconType;
|
|
211
|
+
/**
|
|
212
|
+
* Prompt text injected as invisible context before the user's message.
|
|
213
|
+
* The AI receives this but the user never sees it in the chat.
|
|
214
|
+
*/
|
|
215
|
+
prompt: string;
|
|
216
|
+
};
|
|
217
|
+
|
|
176
218
|
/**
|
|
177
219
|
* Tracking options for the AI chat
|
|
178
220
|
*/
|
|
@@ -217,8 +259,6 @@ export declare const aiTranslations: {
|
|
|
217
259
|
thoughtsGroupTitle: string;
|
|
218
260
|
resourcesGroupTitle: string;
|
|
219
261
|
thinking: string;
|
|
220
|
-
exportTable: string;
|
|
221
|
-
generatedTableFilename: string;
|
|
222
262
|
feedbackModal: {
|
|
223
263
|
positive: {
|
|
224
264
|
title: string;
|
|
@@ -231,9 +271,12 @@ export declare const aiTranslations: {
|
|
|
231
271
|
placeholder: string;
|
|
232
272
|
};
|
|
233
273
|
};
|
|
274
|
+
dataDownloadPreview: string;
|
|
234
275
|
expandChat: string;
|
|
235
276
|
collapseChat: string;
|
|
236
277
|
ask: string;
|
|
278
|
+
viewProfile: string;
|
|
279
|
+
tools: string;
|
|
237
280
|
};
|
|
238
281
|
};
|
|
239
282
|
|
|
@@ -618,9 +661,12 @@ export declare const defaultTranslations: {
|
|
|
618
661
|
readonly placeholder: "Share what didn’t work";
|
|
619
662
|
};
|
|
620
663
|
};
|
|
664
|
+
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
621
665
|
readonly expandChat: "Expand chat";
|
|
622
666
|
readonly collapseChat: "Collapse chat";
|
|
623
667
|
readonly ask: "Ask One";
|
|
668
|
+
readonly viewProfile: "View profile";
|
|
669
|
+
readonly tools: "Tools";
|
|
624
670
|
readonly growth: {
|
|
625
671
|
readonly demoCard: {
|
|
626
672
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -820,10 +866,40 @@ export declare const defaultTranslations: {
|
|
|
820
866
|
};
|
|
821
867
|
};
|
|
822
868
|
|
|
823
|
-
export declare function downloadTableAsExcel(table: HTMLTableElement, filename?: string): void;
|
|
824
|
-
|
|
825
869
|
export declare function Em({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
826
870
|
|
|
871
|
+
/**
|
|
872
|
+
* Generic entity reference renderer for custom `<entity-ref>` HTML tags
|
|
873
|
+
* embedded in AI chat markdown output.
|
|
874
|
+
*
|
|
875
|
+
* Dispatches to type-specific renderers based on the `type` attribute.
|
|
876
|
+
* Falls back to rendering children as plain text for unknown types.
|
|
877
|
+
*
|
|
878
|
+
* Usage in markdown (via rehype-raw):
|
|
879
|
+
* <entity-ref type="person" id="123">Ana García</entity-ref>
|
|
880
|
+
*/
|
|
881
|
+
export declare function EntityRef({ type, id, children, }: {
|
|
882
|
+
type?: string;
|
|
883
|
+
id?: string;
|
|
884
|
+
children?: ReactNode;
|
|
885
|
+
}): JSX_2.Element;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Map of async resolver functions keyed by entity type.
|
|
889
|
+
* Each resolver takes an entity ID and returns the profile data
|
|
890
|
+
* needed to render the entity reference hover card.
|
|
891
|
+
*
|
|
892
|
+
* Extensible: add new entity types here as needed (e.g. `team`, `department`).
|
|
893
|
+
*/
|
|
894
|
+
export declare type EntityResolvers = {
|
|
895
|
+
person?: (id: string) => Promise<PersonProfile>;
|
|
896
|
+
/**
|
|
897
|
+
* Search for persons by name query. Used by the @mention autocomplete
|
|
898
|
+
* in the chat input to let users reference specific employees.
|
|
899
|
+
*/
|
|
900
|
+
searchPersons?: (query: string) => Promise<PersonProfile[]>;
|
|
901
|
+
};
|
|
902
|
+
|
|
827
903
|
export declare const F0ActionItem: ({ title, status, inGroup }: F0ActionItemProps) => JSX_2.Element;
|
|
828
904
|
|
|
829
905
|
/**
|
|
@@ -852,9 +928,9 @@ export declare const F0AiChat: () => JSX_2.Element | null;
|
|
|
852
928
|
/**
|
|
853
929
|
* @experimental This is an experimental component use it at your own risk
|
|
854
930
|
*/
|
|
855
|
-
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, footer, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
931
|
+
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, footer, entityResolvers, toolHints, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
856
932
|
|
|
857
|
-
export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, placeholders, defaultPlaceholder, autoFocus, }: F0AiChatTextAreaProps) => JSX_2.Element;
|
|
933
|
+
export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, placeholders, defaultPlaceholder, autoFocus, entityResolvers, toolHints, activeToolHint, onActiveToolHintChange, }: F0AiChatTextAreaProps) => JSX_2.Element;
|
|
858
934
|
|
|
859
935
|
/**
|
|
860
936
|
* Props for the F0AiChatTextArea component
|
|
@@ -891,6 +967,25 @@ export declare interface F0AiChatTextAreaProps {
|
|
|
891
967
|
* @default true
|
|
892
968
|
*/
|
|
893
969
|
autoFocus?: boolean;
|
|
970
|
+
/**
|
|
971
|
+
* Entity resolvers for @mention autocomplete and entity reference rendering.
|
|
972
|
+
* When `searchPersons` is provided, typing @ in the textarea opens an
|
|
973
|
+
* autocomplete popover to mention employees.
|
|
974
|
+
*/
|
|
975
|
+
entityResolvers?: EntityResolvers;
|
|
976
|
+
/**
|
|
977
|
+
* Available tool hints that the user can activate.
|
|
978
|
+
* Renders a selector button to the left of the send button.
|
|
979
|
+
*/
|
|
980
|
+
toolHints?: AiChatToolHint[];
|
|
981
|
+
/**
|
|
982
|
+
* The currently active tool hint, or null if none is selected.
|
|
983
|
+
*/
|
|
984
|
+
activeToolHint?: AiChatToolHint | null;
|
|
985
|
+
/**
|
|
986
|
+
* Callback when the active tool hint changes (selection or removal).
|
|
987
|
+
*/
|
|
988
|
+
onActiveToolHintChange?: (toolHint: AiChatToolHint | null) => void;
|
|
894
989
|
}
|
|
895
990
|
|
|
896
991
|
export declare const F0AiCollapsibleMessage: ({ icon, title, children, }: F0AiCollapsibleMessageProps) => JSX_2.Element;
|
|
@@ -940,6 +1035,68 @@ declare const F0AuraVoiceAnimationVariants: (props?: ({
|
|
|
940
1035
|
className?: ClassValue;
|
|
941
1036
|
})) | undefined) => string;
|
|
942
1037
|
|
|
1038
|
+
/**
|
|
1039
|
+
* Component that renders an optional markdown preview followed by
|
|
1040
|
+
* a dropdown button with "Download Excel" as the primary action and
|
|
1041
|
+
* "Download CSV" as a secondary option. Files are generated client-side
|
|
1042
|
+
* from the raw dataset provided by the agent.
|
|
1043
|
+
*/
|
|
1044
|
+
export declare const F0DataDownload: ({ markdown, filename, dataset, }: F0DataDownloadProps) => JSX_2.Element;
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* Inline dataset for client-side file generation (Excel / CSV).
|
|
1048
|
+
* Sent by the agent with the raw query results.
|
|
1049
|
+
*/
|
|
1050
|
+
export declare type F0DataDownloadDataset = {
|
|
1051
|
+
/**
|
|
1052
|
+
* Column headers in display order.
|
|
1053
|
+
*/
|
|
1054
|
+
columns: string[];
|
|
1055
|
+
/**
|
|
1056
|
+
* Array of row objects keyed by column name.
|
|
1057
|
+
*/
|
|
1058
|
+
rows: Record<string, unknown>[];
|
|
1059
|
+
/**
|
|
1060
|
+
* Total number of rows returned by the query (before truncation).
|
|
1061
|
+
* Used together with previewCount to render the preview note.
|
|
1062
|
+
*/
|
|
1063
|
+
totalCount?: number;
|
|
1064
|
+
/**
|
|
1065
|
+
* Number of rows shown in the markdown preview table.
|
|
1066
|
+
* Used together with totalCount to render the preview note.
|
|
1067
|
+
*/
|
|
1068
|
+
previewCount?: number;
|
|
1069
|
+
/**
|
|
1070
|
+
* Map of raw column names to human-readable labels in the user's language.
|
|
1071
|
+
* Used for Excel/CSV headers. Falls back to the raw column name when absent.
|
|
1072
|
+
*/
|
|
1073
|
+
columnLabels?: Record<string, string>;
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Props for the F0DataDownload component.
|
|
1078
|
+
*
|
|
1079
|
+
* Renders an optional markdown preview/description followed by
|
|
1080
|
+
* "Download Excel" and "Download CSV" buttons. The component generates
|
|
1081
|
+
* the files client-side from the provided dataset.
|
|
1082
|
+
*/
|
|
1083
|
+
export declare type F0DataDownloadProps = {
|
|
1084
|
+
/**
|
|
1085
|
+
* Optional markdown content to display above the download buttons.
|
|
1086
|
+
* Typically a 5-row preview table generated by the agent.
|
|
1087
|
+
*/
|
|
1088
|
+
markdown?: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* Descriptive filename (without extension) for the downloaded files.
|
|
1091
|
+
* Generated by the AI to reflect the query content in the user's language.
|
|
1092
|
+
*/
|
|
1093
|
+
filename?: string;
|
|
1094
|
+
/**
|
|
1095
|
+
* Raw dataset for client-side Excel and CSV generation.
|
|
1096
|
+
*/
|
|
1097
|
+
dataset: F0DataDownloadDataset;
|
|
1098
|
+
};
|
|
1099
|
+
|
|
943
1100
|
export declare const F0HILActionConfirmation: ({ text, confirmationText, onConfirm, cancelText, onCancel, }: F0HILActionConfirmationProps) => JSX_2.Element;
|
|
944
1101
|
|
|
945
1102
|
/**
|
|
@@ -970,6 +1127,12 @@ export declare type F0HILActionConfirmationProps = {
|
|
|
970
1127
|
|
|
971
1128
|
export declare const f0MarkdownRenderers: NonNullable<AssistantMessageProps["markdownTagRenderers"]>;
|
|
972
1129
|
|
|
1130
|
+
/**
|
|
1131
|
+
* Markdown renderers without the table download button.
|
|
1132
|
+
* Use this when the parent component already provides its own download controls.
|
|
1133
|
+
*/
|
|
1134
|
+
export declare const f0MarkdownRenderersSimple: NonNullable<AssistantMessageProps["markdownTagRenderers"]>;
|
|
1135
|
+
|
|
973
1136
|
export declare const F0MessageSources: ({ sources }: F0MessageSourcesProps) => JSX_2.Element | null;
|
|
974
1137
|
|
|
975
1138
|
/**
|
|
@@ -1127,12 +1290,30 @@ declare type PathsToStringProps<T> = T extends string ? [] : {
|
|
|
1127
1290
|
[K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
|
|
1128
1291
|
}[Extract<keyof T, string>];
|
|
1129
1292
|
|
|
1293
|
+
/**
|
|
1294
|
+
* Profile data for a person entity (employee), resolved asynchronously
|
|
1295
|
+
* and displayed in the entity reference hover card.
|
|
1296
|
+
*/
|
|
1297
|
+
export declare type PersonProfile = {
|
|
1298
|
+
id: string | number;
|
|
1299
|
+
firstName: string;
|
|
1300
|
+
lastName: string;
|
|
1301
|
+
avatarUrl?: string;
|
|
1302
|
+
jobTitle?: string;
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1130
1305
|
export declare function Pre({ children, ...props }: React.HTMLAttributes<HTMLPreElement>): JSX_2.Element;
|
|
1131
1306
|
|
|
1132
1307
|
export declare function Strong({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
1133
1308
|
|
|
1134
1309
|
export declare function Table({ children, ...props }: React.HTMLAttributes<HTMLTableElement>): JSX_2.Element;
|
|
1135
1310
|
|
|
1311
|
+
/**
|
|
1312
|
+
* Table variant without the built-in download button.
|
|
1313
|
+
* Used inside components that already provide their own download controls.
|
|
1314
|
+
*/
|
|
1315
|
+
export declare function TableSimple({ children, ...props }: React.HTMLAttributes<HTMLTableElement>): JSX_2.Element;
|
|
1316
|
+
|
|
1136
1317
|
export declare function Td({ children, ...props }: React.HTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
1137
1318
|
|
|
1138
1319
|
export declare function Th({ children, ...props }: React.HTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
@@ -1253,9 +1434,8 @@ declare module "@tiptap/core" {
|
|
|
1253
1434
|
|
|
1254
1435
|
declare module "@tiptap/core" {
|
|
1255
1436
|
interface Commands<ReturnType> {
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
clearEnhanceHighlight: () => ReturnType;
|
|
1437
|
+
moodTracker: {
|
|
1438
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
1259
1439
|
};
|
|
1260
1440
|
}
|
|
1261
1441
|
}
|
|
@@ -1263,8 +1443,9 @@ declare module "@tiptap/core" {
|
|
|
1263
1443
|
|
|
1264
1444
|
declare module "@tiptap/core" {
|
|
1265
1445
|
interface Commands<ReturnType> {
|
|
1266
|
-
|
|
1267
|
-
|
|
1446
|
+
enhanceHighlight: {
|
|
1447
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
1448
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
1268
1449
|
};
|
|
1269
1450
|
}
|
|
1270
1451
|
}
|
package/dist/ai.js
CHANGED
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
import { A as e, B as
|
|
2
|
-
import { defaultTranslations as
|
|
3
|
-
import { A as
|
|
1
|
+
import { A as e, B as t, C as n, q as o, E as i, h as r, F as l, a as c, D as A, i as u, b as F, j as h, w as C, x as m, y as T, z as d, c as f, r as S, s as p, t as I, H as g, I as k, m as x, L as H, O as P, v as b, P as w, S as M, T as O, n as v, o as D, p as E, U as L, k as R, l as q, d as y, e as z, u as B, g as U, f as j } from "./F0AiChat-c00n76c6.js";
|
|
2
|
+
import { defaultTranslations as G } from "./i18n-provider-defaults.js";
|
|
3
|
+
import { A as K, F as N, c as Q, b as W, a as X, o as Y, u as Z } from "./F0HILActionConfirmation-B5YWkhyV.js";
|
|
4
4
|
export {
|
|
5
5
|
e as A,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
i as
|
|
11
|
-
r as
|
|
12
|
-
l as
|
|
13
|
-
c as
|
|
14
|
-
A as
|
|
15
|
-
u as
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
C as
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
K as AiChatTranslationsProvider,
|
|
7
|
+
t as Blockquote,
|
|
8
|
+
n as ChatSpinner,
|
|
9
|
+
o as Em,
|
|
10
|
+
i as EntityRef,
|
|
11
|
+
r as F0ActionItem,
|
|
12
|
+
l as F0AiChat,
|
|
13
|
+
c as F0AiChatProvider,
|
|
14
|
+
A as F0AiChatTextArea,
|
|
15
|
+
u as F0AiCollapsibleMessage,
|
|
16
|
+
F as F0AiFullscreenChat,
|
|
17
|
+
N as F0AuraVoiceAnimation,
|
|
18
|
+
h as F0DataDownload,
|
|
19
|
+
Q as F0HILActionConfirmation,
|
|
20
|
+
C as F0MessageSources,
|
|
21
|
+
m as F0OneIcon,
|
|
22
|
+
T as F0OneSwitch,
|
|
23
|
+
d as F0Thinking,
|
|
24
|
+
f as FullscreenChatContext,
|
|
25
|
+
S as H1,
|
|
26
|
+
p as H2,
|
|
27
|
+
I as H3,
|
|
26
28
|
g as Hr,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
P,
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
k as I18nProvider,
|
|
30
|
+
x as Image,
|
|
31
|
+
H as Li,
|
|
32
|
+
P as Ol,
|
|
33
|
+
b as P,
|
|
34
|
+
w as Pre,
|
|
35
|
+
M as Strong,
|
|
34
36
|
O as Table,
|
|
35
|
-
v as
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
v as TableSimple,
|
|
38
|
+
D as Td,
|
|
39
|
+
E as Th,
|
|
40
|
+
L as Ul,
|
|
41
|
+
W as actionItemStatuses,
|
|
42
|
+
X as aiTranslations,
|
|
43
|
+
G as defaultTranslations,
|
|
44
|
+
R as f0MarkdownRenderers,
|
|
45
|
+
q as f0MarkdownRenderersSimple,
|
|
46
|
+
Y as oneIconSizes,
|
|
47
|
+
y as useAiChat,
|
|
48
|
+
Z as useAiChatTranslations,
|
|
49
|
+
z as useDefaultCopilotActions,
|
|
50
|
+
B as useI18n,
|
|
51
|
+
U as useMessageSourcesAction,
|
|
52
|
+
j as useOrchestratorThinkingAction
|
|
50
53
|
};
|
package/dist/experimental.d.ts
CHANGED
|
@@ -423,6 +423,19 @@ declare type AiChatProviderProps = {
|
|
|
423
423
|
* Optional footer content rendered below the textarea
|
|
424
424
|
*/
|
|
425
425
|
footer?: React.ReactNode;
|
|
426
|
+
/**
|
|
427
|
+
* Async resolver functions for entity references in markdown.
|
|
428
|
+
* Used to fetch profile data for inline entity mentions (hover cards).
|
|
429
|
+
* The consuming app provides these so the chat can resolve entity IDs
|
|
430
|
+
* (e.g. employee IDs) into rich profile data without knowing the API.
|
|
431
|
+
*/
|
|
432
|
+
entityResolvers?: EntityResolvers;
|
|
433
|
+
/**
|
|
434
|
+
* Available tool hints that the user can activate to provide intent context
|
|
435
|
+
* to the AI. Renders a selector button next to the send button.
|
|
436
|
+
* Only one tool hint can be active at a time.
|
|
437
|
+
*/
|
|
438
|
+
toolHints?: AiChatToolHint[];
|
|
426
439
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
427
440
|
threadId: string;
|
|
428
441
|
feedback: string;
|
|
@@ -434,6 +447,28 @@ declare type AiChatProviderProps = {
|
|
|
434
447
|
tracking?: AiChatTrackingOptions;
|
|
435
448
|
} & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
|
|
436
449
|
|
|
450
|
+
/**
|
|
451
|
+
* A tool hint that can be activated to prepend invisible context to the user's
|
|
452
|
+
* message, telling the AI about the user's intent (e.g. "generate tables",
|
|
453
|
+
* "data analysis"). Similar to Gemini's tool selector UI.
|
|
454
|
+
*
|
|
455
|
+
* Only one tool hint can be active at a time. It persists across messages
|
|
456
|
+
* until the user explicitly removes it.
|
|
457
|
+
*/
|
|
458
|
+
declare type AiChatToolHint = {
|
|
459
|
+
/** Unique identifier for this tool hint */
|
|
460
|
+
id: string;
|
|
461
|
+
/** Display label shown in the selector and chip */
|
|
462
|
+
label: string;
|
|
463
|
+
/** Optional icon shown in the selector and chip */
|
|
464
|
+
icon?: IconType;
|
|
465
|
+
/**
|
|
466
|
+
* Prompt text injected as invisible context before the user's message.
|
|
467
|
+
* The AI receives this but the user never sees it in the chat.
|
|
468
|
+
*/
|
|
469
|
+
prompt: string;
|
|
470
|
+
};
|
|
471
|
+
|
|
437
472
|
/**
|
|
438
473
|
* Tracking options for the AI chat
|
|
439
474
|
*/
|
|
@@ -2548,9 +2583,12 @@ declare const defaultTranslations: {
|
|
|
2548
2583
|
readonly placeholder: "Share what didn’t work";
|
|
2549
2584
|
};
|
|
2550
2585
|
};
|
|
2586
|
+
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
2551
2587
|
readonly expandChat: "Expand chat";
|
|
2552
2588
|
readonly collapseChat: "Collapse chat";
|
|
2553
2589
|
readonly ask: "Ask One";
|
|
2590
|
+
readonly viewProfile: "View profile";
|
|
2591
|
+
readonly tools: "Tools";
|
|
2554
2592
|
readonly growth: {
|
|
2555
2593
|
readonly demoCard: {
|
|
2556
2594
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -2911,6 +2949,22 @@ export declare type enhanceTextParams = {
|
|
|
2911
2949
|
|
|
2912
2950
|
export declare type EntityId = number | string;
|
|
2913
2951
|
|
|
2952
|
+
/**
|
|
2953
|
+
* Map of async resolver functions keyed by entity type.
|
|
2954
|
+
* Each resolver takes an entity ID and returns the profile data
|
|
2955
|
+
* needed to render the entity reference hover card.
|
|
2956
|
+
*
|
|
2957
|
+
* Extensible: add new entity types here as needed (e.g. `team`, `department`).
|
|
2958
|
+
*/
|
|
2959
|
+
declare type EntityResolvers = {
|
|
2960
|
+
person?: (id: string) => Promise<PersonProfile>;
|
|
2961
|
+
/**
|
|
2962
|
+
* Search for persons by name query. Used by the @mention autocomplete
|
|
2963
|
+
* in the chat input to let users reference specific employees.
|
|
2964
|
+
*/
|
|
2965
|
+
searchPersons?: (query: string) => Promise<PersonProfile[]>;
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2914
2968
|
export declare const EntitySelect: <T>(props: EntitySelectProps<T> & {
|
|
2915
2969
|
children?: React.ReactNode;
|
|
2916
2970
|
}) => JSX_2.Element;
|
|
@@ -5075,6 +5129,18 @@ declare type PersonAvatarVariant = Extract<AvatarVariant, {
|
|
|
5075
5129
|
*/
|
|
5076
5130
|
declare const PersonItem: ForwardRefExoticComponent<EmployeeItemProps & RefAttributes<HTMLLIElement>>;
|
|
5077
5131
|
|
|
5132
|
+
/**
|
|
5133
|
+
* Profile data for a person entity (employee), resolved asynchronously
|
|
5134
|
+
* and displayed in the entity reference hover card.
|
|
5135
|
+
*/
|
|
5136
|
+
declare type PersonProfile = {
|
|
5137
|
+
id: string | number;
|
|
5138
|
+
firstName: string;
|
|
5139
|
+
lastName: string;
|
|
5140
|
+
avatarUrl?: string;
|
|
5141
|
+
jobTitle?: string;
|
|
5142
|
+
};
|
|
5143
|
+
|
|
5078
5144
|
export declare const PieChartWidget: ForwardRefExoticComponent<Omit<WidgetProps_2 & {
|
|
5079
5145
|
chart: PieChartProps;
|
|
5080
5146
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|
|
@@ -6771,9 +6837,8 @@ declare module "@tiptap/core" {
|
|
|
6771
6837
|
|
|
6772
6838
|
declare module "@tiptap/core" {
|
|
6773
6839
|
interface Commands<ReturnType> {
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
clearEnhanceHighlight: () => ReturnType;
|
|
6840
|
+
moodTracker: {
|
|
6841
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
6777
6842
|
};
|
|
6778
6843
|
}
|
|
6779
6844
|
}
|
|
@@ -6781,8 +6846,9 @@ declare module "@tiptap/core" {
|
|
|
6781
6846
|
|
|
6782
6847
|
declare module "@tiptap/core" {
|
|
6783
6848
|
interface Commands<ReturnType> {
|
|
6784
|
-
|
|
6785
|
-
|
|
6849
|
+
enhanceHighlight: {
|
|
6850
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
6851
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
6786
6852
|
};
|
|
6787
6853
|
}
|
|
6788
6854
|
}
|