@factorialco/f0-react 1.384.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-C9X4oJL2.js → DataCollectionStorageProvider-qIZ0usNU.js} +16323 -18366
- package/dist/{F0AiChat-C037KOv0.js → F0AiChat-c00n76c6.js} +29958 -27095
- package/dist/{F0HILActionConfirmation-Ba1wbwZK.js → F0HILActionConfirmation-B5YWkhyV.js} +156 -155
- package/dist/ai.d.ts +217 -18
- package/dist/ai.js +48 -45
- package/dist/experimental.d.ts +89 -10
- package/dist/experimental.js +267 -267
- package/dist/f0.d.ts +217 -18
- package/dist/f0.js +213 -210
- package/dist/i18n-provider-defaults.d.ts +13 -10
- 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;
|
|
@@ -72,6 +85,7 @@ export declare type AiChatProviderProps = {
|
|
|
72
85
|
threadId: string;
|
|
73
86
|
feedback: string;
|
|
74
87
|
}) => void;
|
|
88
|
+
tracking?: AiChatTrackingOptions;
|
|
75
89
|
} & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
|
|
76
90
|
|
|
77
91
|
/**
|
|
@@ -102,6 +116,7 @@ declare type AiChatProviderReturnValue = {
|
|
|
102
116
|
threadId: string;
|
|
103
117
|
feedback: string;
|
|
104
118
|
}) => void;
|
|
119
|
+
tracking?: AiChatTrackingOptions;
|
|
105
120
|
/**
|
|
106
121
|
* Clear/reset the chat conversation
|
|
107
122
|
*/
|
|
@@ -142,7 +157,12 @@ declare type AiChatProviderReturnValue = {
|
|
|
142
157
|
* Set the footer content. Use this to update the footer from outside the provider (e.g. per page/route).
|
|
143
158
|
*/
|
|
144
159
|
setFooter: React.Dispatch<React.SetStateAction<React.ReactNode | undefined>>;
|
|
145
|
-
} & 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
|
+
};
|
|
146
166
|
|
|
147
167
|
/**
|
|
148
168
|
* Internal state for the AiChat provider
|
|
@@ -158,6 +178,8 @@ declare interface AiChatState {
|
|
|
158
178
|
defaultVisualizationMode?: VisualizationMode;
|
|
159
179
|
lockVisualizationMode?: boolean;
|
|
160
180
|
footer?: React.ReactNode;
|
|
181
|
+
entityResolvers?: EntityResolvers;
|
|
182
|
+
toolHints?: AiChatToolHint[];
|
|
161
183
|
placeholders?: string[];
|
|
162
184
|
setPlaceholders?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
163
185
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
@@ -168,8 +190,42 @@ declare interface AiChatState {
|
|
|
168
190
|
threadId: string;
|
|
169
191
|
feedback: string;
|
|
170
192
|
}) => void;
|
|
193
|
+
tracking?: AiChatTrackingOptions;
|
|
171
194
|
}
|
|
172
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
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Tracking options for the AI chat
|
|
220
|
+
*/
|
|
221
|
+
declare type AiChatTrackingOptions = {
|
|
222
|
+
onVisibility?: () => void;
|
|
223
|
+
onClose?: () => void;
|
|
224
|
+
onWelcomeSuggestionClick?: (suggestion: WelcomeScreenSuggestion) => void;
|
|
225
|
+
onNewChat?: () => void;
|
|
226
|
+
onMessage?: (message: Message) => void;
|
|
227
|
+
};
|
|
228
|
+
|
|
173
229
|
/**
|
|
174
230
|
* AI Chat translations type
|
|
175
231
|
*/
|
|
@@ -203,8 +259,6 @@ export declare const aiTranslations: {
|
|
|
203
259
|
thoughtsGroupTitle: string;
|
|
204
260
|
resourcesGroupTitle: string;
|
|
205
261
|
thinking: string;
|
|
206
|
-
exportTable: string;
|
|
207
|
-
generatedTableFilename: string;
|
|
208
262
|
feedbackModal: {
|
|
209
263
|
positive: {
|
|
210
264
|
title: string;
|
|
@@ -217,9 +271,12 @@ export declare const aiTranslations: {
|
|
|
217
271
|
placeholder: string;
|
|
218
272
|
};
|
|
219
273
|
};
|
|
274
|
+
dataDownloadPreview: string;
|
|
220
275
|
expandChat: string;
|
|
221
276
|
collapseChat: string;
|
|
222
277
|
ask: string;
|
|
278
|
+
viewProfile: string;
|
|
279
|
+
tools: string;
|
|
223
280
|
};
|
|
224
281
|
};
|
|
225
282
|
|
|
@@ -604,9 +661,12 @@ export declare const defaultTranslations: {
|
|
|
604
661
|
readonly placeholder: "Share what didn’t work";
|
|
605
662
|
};
|
|
606
663
|
};
|
|
664
|
+
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
607
665
|
readonly expandChat: "Expand chat";
|
|
608
666
|
readonly collapseChat: "Collapse chat";
|
|
609
667
|
readonly ask: "Ask One";
|
|
668
|
+
readonly viewProfile: "View profile";
|
|
669
|
+
readonly tools: "Tools";
|
|
610
670
|
readonly growth: {
|
|
611
671
|
readonly demoCard: {
|
|
612
672
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -806,10 +866,40 @@ export declare const defaultTranslations: {
|
|
|
806
866
|
};
|
|
807
867
|
};
|
|
808
868
|
|
|
809
|
-
export declare function downloadTableAsExcel(table: HTMLTableElement, filename?: string): void;
|
|
810
|
-
|
|
811
869
|
export declare function Em({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
812
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
|
+
|
|
813
903
|
export declare const F0ActionItem: ({ title, status, inGroup }: F0ActionItemProps) => JSX_2.Element;
|
|
814
904
|
|
|
815
905
|
/**
|
|
@@ -838,9 +928,9 @@ export declare const F0AiChat: () => JSX_2.Element | null;
|
|
|
838
928
|
/**
|
|
839
929
|
* @experimental This is an experimental component use it at your own risk
|
|
840
930
|
*/
|
|
841
|
-
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, footer, onThumbsUp, onThumbsDown, children, agent, ...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;
|
|
842
932
|
|
|
843
|
-
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;
|
|
844
934
|
|
|
845
935
|
/**
|
|
846
936
|
* Props for the F0AiChatTextArea component
|
|
@@ -877,6 +967,25 @@ export declare interface F0AiChatTextAreaProps {
|
|
|
877
967
|
* @default true
|
|
878
968
|
*/
|
|
879
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;
|
|
880
989
|
}
|
|
881
990
|
|
|
882
991
|
export declare const F0AiCollapsibleMessage: ({ icon, title, children, }: F0AiCollapsibleMessageProps) => JSX_2.Element;
|
|
@@ -926,6 +1035,68 @@ declare const F0AuraVoiceAnimationVariants: (props?: ({
|
|
|
926
1035
|
className?: ClassValue;
|
|
927
1036
|
})) | undefined) => string;
|
|
928
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
|
+
|
|
929
1100
|
export declare const F0HILActionConfirmation: ({ text, confirmationText, onConfirm, cancelText, onCancel, }: F0HILActionConfirmationProps) => JSX_2.Element;
|
|
930
1101
|
|
|
931
1102
|
/**
|
|
@@ -956,6 +1127,12 @@ export declare type F0HILActionConfirmationProps = {
|
|
|
956
1127
|
|
|
957
1128
|
export declare const f0MarkdownRenderers: NonNullable<AssistantMessageProps["markdownTagRenderers"]>;
|
|
958
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
|
+
|
|
959
1136
|
export declare const F0MessageSources: ({ sources }: F0MessageSourcesProps) => JSX_2.Element | null;
|
|
960
1137
|
|
|
961
1138
|
/**
|
|
@@ -992,12 +1169,16 @@ export declare interface F0OneIconProps extends SVGProps<SVGSVGElement> {
|
|
|
992
1169
|
size?: "xs" | "sm" | "md" | "lg";
|
|
993
1170
|
}
|
|
994
1171
|
|
|
995
|
-
export declare const F0OneSwitch: ({ className, disabled, tooltip, autoOpen, }: F0OneSwitchProps) => JSX_2.Element | null;
|
|
1172
|
+
export declare const F0OneSwitch: ({ className, disabled, onVisible, tooltip, autoOpen, onToggle, }: F0OneSwitchProps) => JSX_2.Element | null;
|
|
996
1173
|
|
|
997
1174
|
/**
|
|
998
1175
|
* Props for the F0OneSwitch component
|
|
999
1176
|
*/
|
|
1000
1177
|
export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> & {
|
|
1178
|
+
/** Callback when the switch is visible */
|
|
1179
|
+
onVisible?: () => void;
|
|
1180
|
+
/** Callback when the switch is toggled */
|
|
1181
|
+
onToggle?: () => void;
|
|
1001
1182
|
/** Custom text shown in the tooltip when the chat is closed */
|
|
1002
1183
|
tooltip?: {
|
|
1003
1184
|
whenDisabled?: string;
|
|
@@ -1109,12 +1290,30 @@ declare type PathsToStringProps<T> = T extends string ? [] : {
|
|
|
1109
1290
|
[K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
|
|
1110
1291
|
}[Extract<keyof T, string>];
|
|
1111
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
|
+
|
|
1112
1305
|
export declare function Pre({ children, ...props }: React.HTMLAttributes<HTMLPreElement>): JSX_2.Element;
|
|
1113
1306
|
|
|
1114
1307
|
export declare function Strong({ children, ...props }: React.HTMLAttributes<HTMLSpanElement>): JSX_2.Element;
|
|
1115
1308
|
|
|
1116
1309
|
export declare function Table({ children, ...props }: React.HTMLAttributes<HTMLTableElement>): JSX_2.Element;
|
|
1117
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
|
+
|
|
1118
1317
|
export declare function Td({ children, ...props }: React.HTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
1119
1318
|
|
|
1120
1319
|
export declare function Th({ children, ...props }: React.HTMLAttributes<HTMLTableCellElement>): JSX_2.Element;
|
|
@@ -1223,11 +1422,6 @@ declare module "gridstack" {
|
|
|
1223
1422
|
}
|
|
1224
1423
|
|
|
1225
1424
|
|
|
1226
|
-
declare namespace Calendar {
|
|
1227
|
-
var displayName: string;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
1425
|
declare module "@tiptap/core" {
|
|
1232
1426
|
interface Commands<ReturnType> {
|
|
1233
1427
|
aiBlock: {
|
|
@@ -1240,9 +1434,8 @@ declare module "@tiptap/core" {
|
|
|
1240
1434
|
|
|
1241
1435
|
declare module "@tiptap/core" {
|
|
1242
1436
|
interface Commands<ReturnType> {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
clearEnhanceHighlight: () => ReturnType;
|
|
1437
|
+
moodTracker: {
|
|
1438
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
1246
1439
|
};
|
|
1247
1440
|
}
|
|
1248
1441
|
}
|
|
@@ -1250,8 +1443,9 @@ declare module "@tiptap/core" {
|
|
|
1250
1443
|
|
|
1251
1444
|
declare module "@tiptap/core" {
|
|
1252
1445
|
interface Commands<ReturnType> {
|
|
1253
|
-
|
|
1254
|
-
|
|
1446
|
+
enhanceHighlight: {
|
|
1447
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
1448
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
1255
1449
|
};
|
|
1256
1450
|
}
|
|
1257
1451
|
}
|
|
@@ -1275,3 +1469,8 @@ declare module "@tiptap/core" {
|
|
|
1275
1469
|
};
|
|
1276
1470
|
}
|
|
1277
1471
|
}
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
declare namespace Calendar {
|
|
1475
|
+
var displayName: string;
|
|
1476
|
+
}
|
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
|
@@ -51,6 +51,7 @@ import { JSONContent as JSONContent_2 } from '@tiptap/core';
|
|
|
51
51
|
import { JSX as JSX_2 } from 'react';
|
|
52
52
|
import { LineChartProps } from './experimental';
|
|
53
53
|
import { LongTextCellValue } from './types/longText';
|
|
54
|
+
import { Message as Message_2 } from '@copilotkit/shared';
|
|
54
55
|
import { NumberCellValue } from './types/number';
|
|
55
56
|
import { NumberCellValue as NumberCellValue_2 } from './experimental';
|
|
56
57
|
import { NumberFilterOptions } from './NumberFilter/NumberFilter';
|
|
@@ -422,6 +423,19 @@ declare type AiChatProviderProps = {
|
|
|
422
423
|
* Optional footer content rendered below the textarea
|
|
423
424
|
*/
|
|
424
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[];
|
|
425
439
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
426
440
|
threadId: string;
|
|
427
441
|
feedback: string;
|
|
@@ -430,8 +444,42 @@ declare type AiChatProviderProps = {
|
|
|
430
444
|
threadId: string;
|
|
431
445
|
feedback: string;
|
|
432
446
|
}) => void;
|
|
447
|
+
tracking?: AiChatTrackingOptions;
|
|
433
448
|
} & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
|
|
434
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
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Tracking options for the AI chat
|
|
474
|
+
*/
|
|
475
|
+
declare type AiChatTrackingOptions = {
|
|
476
|
+
onVisibility?: () => void;
|
|
477
|
+
onClose?: () => void;
|
|
478
|
+
onWelcomeSuggestionClick?: (suggestion: WelcomeScreenSuggestion) => void;
|
|
479
|
+
onNewChat?: () => void;
|
|
480
|
+
onMessage?: (message: Message_2) => void;
|
|
481
|
+
};
|
|
482
|
+
|
|
435
483
|
/**
|
|
436
484
|
* @experimental This is an experimental component use it at your own risk
|
|
437
485
|
*/
|
|
@@ -2535,9 +2583,12 @@ declare const defaultTranslations: {
|
|
|
2535
2583
|
readonly placeholder: "Share what didn’t work";
|
|
2536
2584
|
};
|
|
2537
2585
|
};
|
|
2586
|
+
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
2538
2587
|
readonly expandChat: "Expand chat";
|
|
2539
2588
|
readonly collapseChat: "Collapse chat";
|
|
2540
2589
|
readonly ask: "Ask One";
|
|
2590
|
+
readonly viewProfile: "View profile";
|
|
2591
|
+
readonly tools: "Tools";
|
|
2541
2592
|
readonly growth: {
|
|
2542
2593
|
readonly demoCard: {
|
|
2543
2594
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -2898,6 +2949,22 @@ export declare type enhanceTextParams = {
|
|
|
2898
2949
|
|
|
2899
2950
|
export declare type EntityId = number | string;
|
|
2900
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
|
+
|
|
2901
2968
|
export declare const EntitySelect: <T>(props: EntitySelectProps<T> & {
|
|
2902
2969
|
children?: React.ReactNode;
|
|
2903
2970
|
}) => JSX_2.Element;
|
|
@@ -5062,6 +5129,18 @@ declare type PersonAvatarVariant = Extract<AvatarVariant, {
|
|
|
5062
5129
|
*/
|
|
5063
5130
|
declare const PersonItem: ForwardRefExoticComponent<EmployeeItemProps & RefAttributes<HTMLLIElement>>;
|
|
5064
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
|
+
|
|
5065
5144
|
export declare const PieChartWidget: ForwardRefExoticComponent<Omit<WidgetProps_2 & {
|
|
5066
5145
|
chart: PieChartProps;
|
|
5067
5146
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|
|
@@ -6746,11 +6825,6 @@ declare module "gridstack" {
|
|
|
6746
6825
|
}
|
|
6747
6826
|
|
|
6748
6827
|
|
|
6749
|
-
declare namespace Calendar {
|
|
6750
|
-
var displayName: string;
|
|
6751
|
-
}
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
6828
|
declare module "@tiptap/core" {
|
|
6755
6829
|
interface Commands<ReturnType> {
|
|
6756
6830
|
aiBlock: {
|
|
@@ -6763,9 +6837,8 @@ declare module "@tiptap/core" {
|
|
|
6763
6837
|
|
|
6764
6838
|
declare module "@tiptap/core" {
|
|
6765
6839
|
interface Commands<ReturnType> {
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
clearEnhanceHighlight: () => ReturnType;
|
|
6840
|
+
moodTracker: {
|
|
6841
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
6769
6842
|
};
|
|
6770
6843
|
}
|
|
6771
6844
|
}
|
|
@@ -6773,8 +6846,9 @@ declare module "@tiptap/core" {
|
|
|
6773
6846
|
|
|
6774
6847
|
declare module "@tiptap/core" {
|
|
6775
6848
|
interface Commands<ReturnType> {
|
|
6776
|
-
|
|
6777
|
-
|
|
6849
|
+
enhanceHighlight: {
|
|
6850
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
6851
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
6778
6852
|
};
|
|
6779
6853
|
}
|
|
6780
6854
|
}
|
|
@@ -6798,3 +6872,8 @@ declare module "@tiptap/core" {
|
|
|
6798
6872
|
};
|
|
6799
6873
|
}
|
|
6800
6874
|
}
|
|
6875
|
+
|
|
6876
|
+
|
|
6877
|
+
declare namespace Calendar {
|
|
6878
|
+
var displayName: string;
|
|
6879
|
+
}
|