@factorialco/f0-react 2.19.1 → 2.20.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/F0AiTableCard-CJyoi39I.js +9432 -0
- package/dist/{useDataCollectionSource-DTsD48r9.js → F0CanvasPanel-ClSoMwWX.js} +47587 -88290
- package/dist/F0CanvasPanel.css +1 -0
- package/dist/ai.d.ts +668 -421
- package/dist/ai.js +41 -46
- package/dist/experimental.d.ts +26 -83
- package/dist/experimental.js +2358 -1861
- package/dist/f0.d.ts +671 -426
- package/dist/f0.js +70937 -10702
- package/dist/i18n-provider-defaults.d.ts +9 -45
- package/dist/i18n-provider-defaults.js +6 -42
- package/dist/index-2WEjr-1D.js +54815 -0
- package/dist/index.css +1 -1
- package/dist/styles.css +1 -1
- package/icons/ai/ChartLine.d.ts +4 -0
- package/icons/ai/ChartLine.d.ts.map +1 -0
- package/icons/ai/ChartLine.js +5 -0
- package/icons/ai/index.d.ts +1 -0
- package/icons/ai/index.d.ts.map +1 -1
- package/icons/ai/index.js +1 -0
- package/package.json +2 -2
- package/dist/F0AiProposalCard-CzWoGKwm.js +0 -66685
- package/dist/index-5EqURvlM.js +0 -18951
- package/dist/useDataCollectionSource.css +0 -1
package/dist/f0.d.ts
CHANGED
|
@@ -89,7 +89,6 @@ import { HTMLAttributes } from 'react';
|
|
|
89
89
|
import { IconCellValue } from './types/icon';
|
|
90
90
|
import { ImgHTMLAttributes } from 'react';
|
|
91
91
|
import { InFilterOptions } from './InFilter/types';
|
|
92
|
-
import { InputProps } from '@copilotkit/react-ui';
|
|
93
92
|
import { internalAvatarColors as internalAvatarColors_2 } from './f0';
|
|
94
93
|
import { internalAvatarSizes as internalAvatarSizes_2 } from './f0';
|
|
95
94
|
import { internalAvatarTypes as internalAvatarTypes_2 } from './f0';
|
|
@@ -121,6 +120,7 @@ import { RadarChartProps } from './RadarChart';
|
|
|
121
120
|
import * as React_2 from 'react';
|
|
122
121
|
import { ReactElement } from 'react';
|
|
123
122
|
import { ReactNode } from 'react';
|
|
123
|
+
import { ReactPortal } from 'react';
|
|
124
124
|
import { Ref } from 'react';
|
|
125
125
|
import { RefAttributes } from 'react';
|
|
126
126
|
import { RefObject } from 'react';
|
|
@@ -408,7 +408,7 @@ declare type AddRowActionsResult = PrimaryActionItemDefinition | PrimaryActionIt
|
|
|
408
408
|
|
|
409
409
|
/* Excluded from this release type: AgentState */
|
|
410
410
|
|
|
411
|
-
declare type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
411
|
+
export declare type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
412
412
|
|
|
413
413
|
declare interface AIBlockConfig {
|
|
414
414
|
buttons?: AIButton[];
|
|
@@ -564,12 +564,6 @@ export declare type AiChatProviderProps = {
|
|
|
564
564
|
* them here so canvas logic lives in one place.
|
|
565
565
|
*/
|
|
566
566
|
canvasEntities?: Record<string, CanvasEntityDefinition>;
|
|
567
|
-
/**
|
|
568
|
-
* Available tool hints that the user can activate to provide intent context
|
|
569
|
-
* to the AI. Renders a selector button next to the send button.
|
|
570
|
-
* Only one tool hint can be active at a time.
|
|
571
|
-
*/
|
|
572
|
-
toolHints?: AiChatToolHint[];
|
|
573
567
|
/**
|
|
574
568
|
* Credits configuration. When provided, a credits button is shown in the chat header.
|
|
575
569
|
* Groups fetchUsage, upgradePlanUrl, and company/plan display info.
|
|
@@ -772,7 +766,7 @@ declare type AiChatProviderReturnValue = {
|
|
|
772
766
|
pendingQuote: PendingQuote | null;
|
|
773
767
|
/** Set the pending quote (pass null to clear). */
|
|
774
768
|
setPendingQuote: React.Dispatch<React.SetStateAction<PendingQuote | null>>;
|
|
775
|
-
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "canvasEntities" | "
|
|
769
|
+
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "canvasEntities" | "credits" | "employeeCredits" | "creditWarning" | "fileAttachments"> & {
|
|
776
770
|
/** The current canvas content, or null when canvas is closed */
|
|
777
771
|
canvasContent: CanvasContent | null;
|
|
778
772
|
/** Open the canvas panel with the given content */
|
|
@@ -785,10 +779,6 @@ declare type AiChatProviderReturnValue = {
|
|
|
785
779
|
openGame: (game: "pong") => void;
|
|
786
780
|
/** Close the active mini-game overlay */
|
|
787
781
|
closeGame: () => void;
|
|
788
|
-
/** The currently active tool hint, or null if none is selected */
|
|
789
|
-
activeToolHint: AiChatToolHint | null;
|
|
790
|
-
/** Set the active tool hint (pass null to clear) */
|
|
791
|
-
setActiveToolHint: React.Dispatch<React.SetStateAction<AiChatToolHint | null>>;
|
|
792
782
|
};
|
|
793
783
|
|
|
794
784
|
/**
|
|
@@ -810,7 +800,6 @@ declare interface AiChatState {
|
|
|
810
800
|
entityRefs?: EntityRefs;
|
|
811
801
|
canvasActions?: CanvasActions;
|
|
812
802
|
canvasEntities?: Record<string, CanvasEntityDefinition>;
|
|
813
|
-
toolHints?: AiChatToolHint[];
|
|
814
803
|
credits?: AiChatCredits;
|
|
815
804
|
employeeCredits?: AiChatEmployeeCredits;
|
|
816
805
|
creditWarning?: AiChatCreditWarning;
|
|
@@ -836,32 +825,10 @@ declare interface AiChatState {
|
|
|
836
825
|
runtimeFetch?: typeof fetch;
|
|
837
826
|
}
|
|
838
827
|
|
|
839
|
-
/**
|
|
840
|
-
* A tool hint that can be activated to prepend invisible context to the user's
|
|
841
|
-
* message, telling the AI about the user's intent (e.g. "generate tables",
|
|
842
|
-
* "data analysis"). Similar to Gemini's tool selector UI.
|
|
843
|
-
*
|
|
844
|
-
* Only one tool hint can be active at a time. It persists across messages
|
|
845
|
-
* until the user explicitly removes it.
|
|
846
|
-
*/
|
|
847
|
-
export declare type AiChatToolHint = {
|
|
848
|
-
/** Unique identifier for this tool hint */
|
|
849
|
-
id: string;
|
|
850
|
-
/** Display label shown in the selector and chip */
|
|
851
|
-
label: string;
|
|
852
|
-
/** Optional icon shown in the selector and chip */
|
|
853
|
-
icon?: IconType;
|
|
854
|
-
/**
|
|
855
|
-
* Prompt text injected as invisible context before the user's message.
|
|
856
|
-
* The AI receives this but the user never sees it in the chat.
|
|
857
|
-
*/
|
|
858
|
-
prompt: string;
|
|
859
|
-
};
|
|
860
|
-
|
|
861
828
|
declare type AiChatTrackingOptions = {
|
|
862
829
|
onVisibility?: () => void;
|
|
863
830
|
onClose?: () => void;
|
|
864
|
-
onWelcomeSuggestionClick?: (
|
|
831
|
+
onWelcomeSuggestionClick?: (item: WelcomeScreenSuggestionItem) => void;
|
|
865
832
|
onNewChat?: () => void;
|
|
866
833
|
onMessage?: (message: Message_2) => void;
|
|
867
834
|
};
|
|
@@ -909,6 +876,9 @@ export declare type AiInsightCardContent = {
|
|
|
909
876
|
invertStatus?: boolean;
|
|
910
877
|
};
|
|
911
878
|
|
|
879
|
+
/** Assistant-flavoured `Message`. Same shape — alias for self-documentation. */
|
|
880
|
+
declare type AIMessage_2 = Message_3;
|
|
881
|
+
|
|
912
882
|
/**
|
|
913
883
|
* Default AI chat translations — derived from the global defaultTranslations
|
|
914
884
|
* to avoid manual duplication.
|
|
@@ -929,13 +899,6 @@ export declare const aiTranslations: {
|
|
|
929
899
|
readonly thoughtsGroupTitle: "Reflection";
|
|
930
900
|
readonly resourcesGroupTitle: "Resources";
|
|
931
901
|
readonly thinking: "Thinking...";
|
|
932
|
-
readonly closeDashboard: "Close dashboard";
|
|
933
|
-
readonly unsavedChanges: "Unsaved changes";
|
|
934
|
-
readonly saveChanges: "Save changes";
|
|
935
|
-
readonly discardChanges: "Discard";
|
|
936
|
-
readonly saveAsChanges: "Save as";
|
|
937
|
-
readonly exportTable: "Download table";
|
|
938
|
-
readonly generatedTableFilename: "OneGeneratedTable";
|
|
939
902
|
readonly feedbackModal: {
|
|
940
903
|
readonly positive: {
|
|
941
904
|
readonly title: "What did you like about this response?";
|
|
@@ -948,7 +911,6 @@ export declare const aiTranslations: {
|
|
|
948
911
|
readonly placeholder: "Share what didn’t work";
|
|
949
912
|
};
|
|
950
913
|
};
|
|
951
|
-
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
952
914
|
readonly expandChat: "Expand chat";
|
|
953
915
|
readonly collapseChat: "Collapse chat";
|
|
954
916
|
readonly chatHistory: "Chat history";
|
|
@@ -966,7 +928,6 @@ export declare const aiTranslations: {
|
|
|
966
928
|
readonly deleteChat: "Delete chat";
|
|
967
929
|
readonly ask: "Ask One";
|
|
968
930
|
readonly view: "View";
|
|
969
|
-
readonly tools: "Tools";
|
|
970
931
|
readonly entityRef: {
|
|
971
932
|
readonly candidate: {
|
|
972
933
|
readonly source: "Source";
|
|
@@ -988,42 +949,22 @@ export declare const aiTranslations: {
|
|
|
988
949
|
readonly needMoreCredits: "Need more credits?";
|
|
989
950
|
};
|
|
990
951
|
readonly reportCard: {
|
|
991
|
-
readonly reportLabel: "Report";
|
|
992
952
|
readonly tableLabel: "Table";
|
|
993
953
|
readonly openButton: "Open";
|
|
994
954
|
};
|
|
995
955
|
readonly formCard: {
|
|
996
956
|
readonly moreFields: "Open to see all fields";
|
|
997
957
|
};
|
|
998
|
-
readonly
|
|
999
|
-
readonly
|
|
1000
|
-
readonly
|
|
1001
|
-
readonly
|
|
1002
|
-
readonly saveAs: "Save as";
|
|
1003
|
-
readonly saveDialog: {
|
|
1004
|
-
readonly title: "Save dashboard";
|
|
1005
|
-
readonly titleLabel: "Title";
|
|
1006
|
-
readonly descriptionLabel: "Description";
|
|
1007
|
-
readonly descriptionPlaceholder: "Add a description (optional)";
|
|
1008
|
-
readonly save: "Save";
|
|
1009
|
-
readonly cancel: "Cancel";
|
|
1010
|
-
};
|
|
1011
|
-
readonly status: {
|
|
1012
|
-
readonly saved: "Saved";
|
|
1013
|
-
readonly draft: "Draft";
|
|
1014
|
-
readonly unsaved: "Unsaved";
|
|
1015
|
-
};
|
|
1016
|
-
readonly statusLabel: "Status";
|
|
1017
|
-
readonly lastEdited: "Last edited";
|
|
1018
|
-
readonly createdBy: "Created by";
|
|
958
|
+
readonly aiTable: {
|
|
959
|
+
readonly title: "Table";
|
|
960
|
+
readonly downloadExcel: "Download Excel";
|
|
961
|
+
readonly downloadCsv: "Download CSV";
|
|
1019
962
|
};
|
|
1020
963
|
readonly dataDownload: {
|
|
1021
964
|
readonly title: "Download";
|
|
1022
965
|
readonly download: "Download {{format}}";
|
|
1023
966
|
readonly exportDashboard: "Export dashboard as {{format}}";
|
|
1024
|
-
readonly export: "Export";
|
|
1025
967
|
readonly exporting: "Exporting…";
|
|
1026
|
-
readonly rows: "{{amount}} rows";
|
|
1027
968
|
};
|
|
1028
969
|
readonly dashboardItem: {
|
|
1029
970
|
readonly chartType: "Chart type";
|
|
@@ -1043,11 +984,6 @@ export declare const aiTranslations: {
|
|
|
1043
984
|
readonly soft: "You're running low on AI credits.";
|
|
1044
985
|
readonly getCredits: "Get credits";
|
|
1045
986
|
readonly dismiss: "Dismiss";
|
|
1046
|
-
readonly messageBanner: {
|
|
1047
|
-
readonly title: "This response requires credits";
|
|
1048
|
-
readonly description: "Your company has run out of AI credits.";
|
|
1049
|
-
readonly actionLabel: "Get credits";
|
|
1050
|
-
};
|
|
1051
987
|
};
|
|
1052
988
|
readonly attachFile: "Attach file";
|
|
1053
989
|
readonly removeFile: "Remove";
|
|
@@ -1210,6 +1146,14 @@ export declare type AsyncOrSync<T> = T | ((signal: AbortSignal) => Promise<T>);
|
|
|
1210
1146
|
*/
|
|
1211
1147
|
declare type AsyncWithParams<T, TParams> = (params: TParams) => Promise<T>;
|
|
1212
1148
|
|
|
1149
|
+
export declare type AttachedFile = {
|
|
1150
|
+
id: string;
|
|
1151
|
+
file: File;
|
|
1152
|
+
status: "uploading" | "uploaded" | "error";
|
|
1153
|
+
uploadedFile?: UploadedFile;
|
|
1154
|
+
errorMessage?: string;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1213
1157
|
/**
|
|
1214
1158
|
* An item that can be passed in the `availableFormDefinitions` array.
|
|
1215
1159
|
* Accepts either a plain {@link F0AiAvailableFormDefinition} or the result
|
|
@@ -1951,36 +1895,6 @@ export declare type CanvasActions = {
|
|
|
1951
1895
|
dashboard?: DashboardCanvasActions;
|
|
1952
1896
|
};
|
|
1953
1897
|
|
|
1954
|
-
/**
|
|
1955
|
-
* Shared inline card rendered in the AI chat for any canvas entity.
|
|
1956
|
-
* Shows a module avatar, title, description, and an Open/Close toggle button.
|
|
1957
|
-
* When active, displays a focus ring and the button switches to "Close".
|
|
1958
|
-
*/
|
|
1959
|
-
export declare function CanvasCard({ module: cardModule, title, description, onOpen, showOpenButton, onClose, isActive, children, }: CanvasCardProps): JSX_2.Element;
|
|
1960
|
-
|
|
1961
|
-
export declare namespace CanvasCard {
|
|
1962
|
-
var displayName: string;
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
export declare type CanvasCardProps = {
|
|
1966
|
-
/** Module avatar to display (e.g. "analytics", "surveys", "goals") */
|
|
1967
|
-
module?: ModuleId;
|
|
1968
|
-
/** Primary title */
|
|
1969
|
-
title: string;
|
|
1970
|
-
/** Secondary description line */
|
|
1971
|
-
description: string;
|
|
1972
|
-
/** Called when the user clicks the "Open" button */
|
|
1973
|
-
onOpen: () => void;
|
|
1974
|
-
/** Whether to show the "Open" button */
|
|
1975
|
-
showOpenButton?: boolean;
|
|
1976
|
-
/** Called when the user clicks the "Close" button (active state) */
|
|
1977
|
-
onClose: () => void;
|
|
1978
|
-
/** Whether this card's content is currently shown in the canvas */
|
|
1979
|
-
isActive: boolean;
|
|
1980
|
-
/** Optional content rendered below the card header (e.g. a data preview) */
|
|
1981
|
-
children?: React.ReactNode;
|
|
1982
|
-
};
|
|
1983
|
-
|
|
1984
1898
|
/**
|
|
1985
1899
|
* Discriminated union for canvas panel content.
|
|
1986
1900
|
* Add new entity types to this union as they are implemented.
|
|
@@ -2002,13 +1916,7 @@ export declare type CanvasContentBase = {
|
|
|
2002
1916
|
* Contract for a canvas entity type.
|
|
2003
1917
|
*
|
|
2004
1918
|
* Each entity (dashboard, survey, goal, job-posting…) implements this
|
|
2005
|
-
* interface and is added to the `canvasEntities` record
|
|
2006
|
-
*
|
|
2007
|
-
* To add a new entity type:
|
|
2008
|
-
* 1. Create a folder in `canvas/entities/<your-entity>/`
|
|
2009
|
-
* 2. Define a type extending `CanvasContentBase` in `types.ts`
|
|
2010
|
-
* 3. Implement and export `CanvasEntityDefinition` in `index.tsx`
|
|
2011
|
-
* 4. Add the entity to the record in `canvas/registry.ts`
|
|
1919
|
+
* interface and is added to the `canvasEntities` record passed to F0AiChat.
|
|
2012
1920
|
*/
|
|
2013
1921
|
export declare type CanvasEntityDefinition<T extends CanvasContentBase = CanvasContentBase> = {
|
|
2014
1922
|
/** Must match the `type` discriminant on the content object */
|
|
@@ -2436,7 +2344,7 @@ export declare type ChartColorToken = (typeof chartColorTokens)[number];
|
|
|
2436
2344
|
*/
|
|
2437
2345
|
export declare const chartColorTokens: readonly ["lilac", "barbie", "smoke", "army", "flubber", "indigo", "camel", "radical", "viridian", "orange", "red", "grass", "malibu", "yellow", "purple"];
|
|
2438
2346
|
|
|
2439
|
-
declare interface ChartComputation {
|
|
2347
|
+
export declare interface ChartComputation {
|
|
2440
2348
|
datasetId: string;
|
|
2441
2349
|
xAxis: string;
|
|
2442
2350
|
yAxis: string;
|
|
@@ -2525,13 +2433,13 @@ declare interface ChartThemeTooltip {
|
|
|
2525
2433
|
background: string;
|
|
2526
2434
|
}
|
|
2527
2435
|
|
|
2528
|
-
declare interface ChatDashboardBarChartConfig extends ChatDashboardChartConfigBase {
|
|
2436
|
+
export declare interface ChatDashboardBarChartConfig extends ChatDashboardChartConfigBase {
|
|
2529
2437
|
type: "bar";
|
|
2530
2438
|
orientation?: "vertical" | "horizontal";
|
|
2531
2439
|
stacked?: boolean;
|
|
2532
2440
|
}
|
|
2533
2441
|
|
|
2534
|
-
declare type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig;
|
|
2442
|
+
export declare type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig;
|
|
2535
2443
|
|
|
2536
2444
|
declare interface ChatDashboardChartConfigBase {
|
|
2537
2445
|
showLegend?: boolean;
|
|
@@ -2540,19 +2448,19 @@ declare interface ChatDashboardChartConfigBase {
|
|
|
2540
2448
|
valueFormat?: FormatPreset;
|
|
2541
2449
|
}
|
|
2542
2450
|
|
|
2543
|
-
declare interface ChatDashboardChartItem extends ChatDashboardItemBase {
|
|
2451
|
+
export declare interface ChatDashboardChartItem extends ChatDashboardItemBase {
|
|
2544
2452
|
type: "chart";
|
|
2545
2453
|
chart: ChatDashboardChartConfig;
|
|
2546
2454
|
computation: ChartComputation | RadarComputation | PieComputation | GaugeComputation | HeatmapComputation;
|
|
2547
2455
|
}
|
|
2548
2456
|
|
|
2549
|
-
declare interface ChatDashboardCollectionItem extends ChatDashboardItemBase {
|
|
2457
|
+
export declare interface ChatDashboardCollectionItem extends ChatDashboardItemBase {
|
|
2550
2458
|
type: "collection";
|
|
2551
2459
|
columns: ChatDashboardColumn[];
|
|
2552
2460
|
computation: CollectionComputation;
|
|
2553
2461
|
}
|
|
2554
2462
|
|
|
2555
|
-
declare interface ChatDashboardColumn {
|
|
2463
|
+
export declare interface ChatDashboardColumn {
|
|
2556
2464
|
/** Column key — must match a key in each row object */
|
|
2557
2465
|
id: string;
|
|
2558
2466
|
/** Display header label */
|
|
@@ -2597,16 +2505,16 @@ export declare interface ChatDashboardConfig {
|
|
|
2597
2505
|
}
|
|
2598
2506
|
|
|
2599
2507
|
/** Granularity options exposed by F0's `OneDateNavigator`. */
|
|
2600
|
-
declare type ChatDashboardDateNavigationGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
2508
|
+
export declare type ChatDashboardDateNavigationGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
2601
2509
|
|
|
2602
|
-
declare interface ChatDashboardFilterDefinition {
|
|
2510
|
+
export declare interface ChatDashboardFilterDefinition {
|
|
2603
2511
|
type: "in";
|
|
2604
2512
|
label: string;
|
|
2605
2513
|
column: string;
|
|
2606
2514
|
datasetId: string;
|
|
2607
2515
|
}
|
|
2608
2516
|
|
|
2609
|
-
declare interface ChatDashboardFunnelChartConfig {
|
|
2517
|
+
export declare interface ChatDashboardFunnelChartConfig {
|
|
2610
2518
|
type: "funnel";
|
|
2611
2519
|
sort?: "descending" | "ascending" | "none";
|
|
2612
2520
|
orient?: "horizontal" | "vertical";
|
|
@@ -2617,7 +2525,7 @@ declare interface ChatDashboardFunnelChartConfig {
|
|
|
2617
2525
|
valueFormat?: FormatPreset;
|
|
2618
2526
|
}
|
|
2619
2527
|
|
|
2620
|
-
declare interface ChatDashboardGaugeChartConfig {
|
|
2528
|
+
export declare interface ChatDashboardGaugeChartConfig {
|
|
2621
2529
|
type: "gauge";
|
|
2622
2530
|
min?: number;
|
|
2623
2531
|
max?: number;
|
|
@@ -2625,7 +2533,7 @@ declare interface ChatDashboardGaugeChartConfig {
|
|
|
2625
2533
|
valueFormat?: FormatPreset;
|
|
2626
2534
|
}
|
|
2627
2535
|
|
|
2628
|
-
declare interface ChatDashboardHeatmapChartConfig {
|
|
2536
|
+
export declare interface ChatDashboardHeatmapChartConfig {
|
|
2629
2537
|
type: "heatmap";
|
|
2630
2538
|
min?: number;
|
|
2631
2539
|
max?: number;
|
|
@@ -2634,7 +2542,7 @@ declare interface ChatDashboardHeatmapChartConfig {
|
|
|
2634
2542
|
valueFormat?: FormatPreset;
|
|
2635
2543
|
}
|
|
2636
2544
|
|
|
2637
|
-
declare type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
2545
|
+
export declare type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
2638
2546
|
|
|
2639
2547
|
declare interface ChatDashboardItemBase {
|
|
2640
2548
|
id: string;
|
|
@@ -2673,14 +2581,14 @@ declare interface ChatDashboardItemBase {
|
|
|
2673
2581
|
y?: number;
|
|
2674
2582
|
}
|
|
2675
2583
|
|
|
2676
|
-
declare interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
2584
|
+
export declare interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
2677
2585
|
type: "line";
|
|
2678
2586
|
lineType?: "linear" | "smooth" | "step";
|
|
2679
2587
|
showArea?: boolean;
|
|
2680
2588
|
showDots?: boolean;
|
|
2681
2589
|
}
|
|
2682
2590
|
|
|
2683
|
-
declare type ChatDashboardMetricFormat = {
|
|
2591
|
+
export declare type ChatDashboardMetricFormat = {
|
|
2684
2592
|
type: "number";
|
|
2685
2593
|
} | {
|
|
2686
2594
|
type: "currency";
|
|
@@ -2693,7 +2601,7 @@ declare type ChatDashboardMetricFormat = {
|
|
|
2693
2601
|
prefix?: string;
|
|
2694
2602
|
};
|
|
2695
2603
|
|
|
2696
|
-
declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
2604
|
+
export declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
2697
2605
|
type: "metric";
|
|
2698
2606
|
format?: ChatDashboardMetricFormat;
|
|
2699
2607
|
decimals?: number;
|
|
@@ -2707,7 +2615,7 @@ declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
|
2707
2615
|
* grid. The `column` and `datasetId` are agent-side metadata used by the
|
|
2708
2616
|
* compute SQL builder; they are stripped before reaching F0AnalyticsDashboard.
|
|
2709
2617
|
*/
|
|
2710
|
-
declare type ChatDashboardNavigationFilterDefinition = {
|
|
2618
|
+
export declare type ChatDashboardNavigationFilterDefinition = {
|
|
2711
2619
|
type: "dateNavigation";
|
|
2712
2620
|
label: string;
|
|
2713
2621
|
column: string;
|
|
@@ -2716,7 +2624,7 @@ declare type ChatDashboardNavigationFilterDefinition = {
|
|
|
2716
2624
|
defaultGranularity?: ChatDashboardDateNavigationGranularity;
|
|
2717
2625
|
};
|
|
2718
2626
|
|
|
2719
|
-
declare interface ChatDashboardPieChartConfig {
|
|
2627
|
+
export declare interface ChatDashboardPieChartConfig {
|
|
2720
2628
|
type: "pie";
|
|
2721
2629
|
innerRadius?: number;
|
|
2722
2630
|
showLegend?: boolean;
|
|
@@ -2725,16 +2633,18 @@ declare interface ChatDashboardPieChartConfig {
|
|
|
2725
2633
|
valueFormat?: FormatPreset;
|
|
2726
2634
|
}
|
|
2727
2635
|
|
|
2728
|
-
declare interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfigBase {
|
|
2636
|
+
export declare interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfigBase {
|
|
2729
2637
|
type: "radar";
|
|
2730
2638
|
showArea?: boolean;
|
|
2731
2639
|
}
|
|
2732
2640
|
|
|
2733
2641
|
export declare const ChatSpinner: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
2734
2642
|
|
|
2735
|
-
declare type
|
|
2736
|
-
|
|
2737
|
-
|
|
2643
|
+
export declare type ChatThread = {
|
|
2644
|
+
id: string;
|
|
2645
|
+
title: string;
|
|
2646
|
+
createdAt: string;
|
|
2647
|
+
updatedAt: string;
|
|
2738
2648
|
};
|
|
2739
2649
|
|
|
2740
2650
|
/**
|
|
@@ -2868,7 +2778,7 @@ export declare const chipVariants: (props?: ({
|
|
|
2868
2778
|
/**
|
|
2869
2779
|
* A single selectable option within a clarifying question step.
|
|
2870
2780
|
*/
|
|
2871
|
-
declare interface ClarifyingOption {
|
|
2781
|
+
export declare interface ClarifyingOption {
|
|
2872
2782
|
/** Unique identifier for this option */
|
|
2873
2783
|
id: string;
|
|
2874
2784
|
/** Display label shown to the user */
|
|
@@ -2939,7 +2849,7 @@ export declare interface ClarifyingStepData {
|
|
|
2939
2849
|
* A step enriched with the user's current interaction state.
|
|
2940
2850
|
* Used internally by the controller to track selections per step.
|
|
2941
2851
|
*/
|
|
2942
|
-
declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
2852
|
+
export declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
2943
2853
|
/** IDs of currently selected options */
|
|
2944
2854
|
selectedOptionIds: string[];
|
|
2945
2855
|
/** Current custom answer text (preserved even when deactivated) */
|
|
@@ -2948,13 +2858,9 @@ declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
|
2948
2858
|
isCustomAnswerActive: boolean;
|
|
2949
2859
|
}
|
|
2950
2860
|
|
|
2951
|
-
export declare function CloseCanvasButton({ onClick }: {
|
|
2952
|
-
onClick: () => void;
|
|
2953
|
-
}): JSX_2.Element;
|
|
2954
|
-
|
|
2955
2861
|
declare type ColId = string;
|
|
2956
2862
|
|
|
2957
|
-
declare interface CollectionComputation {
|
|
2863
|
+
export declare interface CollectionComputation {
|
|
2958
2864
|
datasetId: string;
|
|
2959
2865
|
sortBy?: string;
|
|
2960
2866
|
sortOrder?: "asc" | "desc";
|
|
@@ -3328,45 +3234,6 @@ export declare type DashboardCanvasContent = CanvasContentBase & {
|
|
|
3328
3234
|
savedDashboardUnsaved?: boolean;
|
|
3329
3235
|
};
|
|
3330
3236
|
|
|
3331
|
-
export declare function DashboardCanvasProvider({ content, children, }: {
|
|
3332
|
-
content: DashboardCanvasContent;
|
|
3333
|
-
children: ReactNode;
|
|
3334
|
-
}): ReactNode;
|
|
3335
|
-
|
|
3336
|
-
/**
|
|
3337
|
-
* Dashboard-specific card that wraps CanvasCard with config-store
|
|
3338
|
-
* subscription logic. Re-renders when the user edits and saves
|
|
3339
|
-
* the dashboard layout.
|
|
3340
|
-
*
|
|
3341
|
-
* All saved-dashboard state (id, category, unsaved) is passed through
|
|
3342
|
-
* from the action arguments. The meta store overrides props after
|
|
3343
|
-
* save/create operations so close/re-open preserves the latest state.
|
|
3344
|
-
*/
|
|
3345
|
-
export declare function DashboardCard({ config: originalConfig, apiConfig, savedDashboardId: propSavedId, savedDashboardCategory: propSavedCategory, savedDashboardDescription: propSavedDescription, savedDashboardUnsaved: propSavedUnsaved, }: DashboardCardProps): JSX_2.Element;
|
|
3346
|
-
|
|
3347
|
-
export declare namespace DashboardCard {
|
|
3348
|
-
var displayName: string;
|
|
3349
|
-
}
|
|
3350
|
-
|
|
3351
|
-
export declare type DashboardCardProps = {
|
|
3352
|
-
/** The original dashboard config from the agent */
|
|
3353
|
-
config: ChatDashboardConfig;
|
|
3354
|
-
/** API config for server-side dashboard computation */
|
|
3355
|
-
apiConfig: {
|
|
3356
|
-
baseUrl: string;
|
|
3357
|
-
headers: Record<string, string>;
|
|
3358
|
-
runtimeFetch?: typeof fetch;
|
|
3359
|
-
};
|
|
3360
|
-
/** Present when the dashboard is a pre-saved dashboard */
|
|
3361
|
-
savedDashboardId?: string;
|
|
3362
|
-
/** Category of the saved dashboard */
|
|
3363
|
-
savedDashboardCategory?: string;
|
|
3364
|
-
/** Description of the saved dashboard */
|
|
3365
|
-
savedDashboardDescription?: string;
|
|
3366
|
-
/** Whether the dashboard has unsaved changes */
|
|
3367
|
-
savedDashboardUnsaved?: boolean;
|
|
3368
|
-
};
|
|
3369
|
-
|
|
3370
3237
|
/**
|
|
3371
3238
|
* Chart display configuration — discriminated on `type`.
|
|
3372
3239
|
* This object is JSON-serializable (no functions, except optional formatters).
|
|
@@ -3428,12 +3295,7 @@ export declare interface DashboardCollectionItem<Filters extends FiltersDefiniti
|
|
|
3428
3295
|
visualizations: ReadonlyArray<any>;
|
|
3429
3296
|
}
|
|
3430
3297
|
|
|
3431
|
-
export declare
|
|
3432
|
-
content: DashboardCanvasContent;
|
|
3433
|
-
refreshKey: number;
|
|
3434
|
-
}): ReactNode;
|
|
3435
|
-
|
|
3436
|
-
declare interface DashboardFetchSpec {
|
|
3298
|
+
export declare interface DashboardFetchSpec {
|
|
3437
3299
|
fetch: Array<{
|
|
3438
3300
|
toolId: string;
|
|
3439
3301
|
args: Record<string, unknown>;
|
|
@@ -3442,18 +3304,6 @@ declare interface DashboardFetchSpec {
|
|
|
3442
3304
|
columnLabels?: Record<string, string>;
|
|
3443
3305
|
}
|
|
3444
3306
|
|
|
3445
|
-
/**
|
|
3446
|
-
* Canvas header for the dashboard entity. Layout, title, status tag,
|
|
3447
|
-
* metadata strip, and the action row (export + close) are all delegated
|
|
3448
|
-
* to `ResourceHeader`. The close button is just another `secondaryAction`
|
|
3449
|
-
* with `hideLabel`, so the shared header component doesn't need to know
|
|
3450
|
-
* about canvas-specific close affordances.
|
|
3451
|
-
*/
|
|
3452
|
-
export declare function DashboardHeader({ content, onClose, }: {
|
|
3453
|
-
content: DashboardCanvasContent;
|
|
3454
|
-
onClose: () => void;
|
|
3455
|
-
}): JSX_2.Element;
|
|
3456
|
-
|
|
3457
3307
|
/**
|
|
3458
3308
|
* A single dashboard item. Discriminated on `type`.
|
|
3459
3309
|
*
|
|
@@ -3540,7 +3390,7 @@ declare type DashboardItemLayout = {
|
|
|
3540
3390
|
* list page since this conversation was first opened). The header prefers
|
|
3541
3391
|
* these values over the ones baked into `content` / `config`.
|
|
3542
3392
|
*/
|
|
3543
|
-
declare type DashboardMetadata = {
|
|
3393
|
+
export declare type DashboardMetadata = {
|
|
3544
3394
|
/**
|
|
3545
3395
|
* Latest persisted title. When present, the header displays this instead
|
|
3546
3396
|
* of `content.title` so the chat-history snapshot never shadows the
|
|
@@ -3746,36 +3596,14 @@ export declare type DataDownloadCanvasContent = CanvasContentBase & {
|
|
|
3746
3596
|
markdown?: string;
|
|
3747
3597
|
};
|
|
3748
3598
|
|
|
3749
|
-
export declare function DataDownloadCard({ title: titleProp, dataset, filename, markdown, }: DataDownloadCardProps): JSX_2.Element;
|
|
3750
|
-
|
|
3751
|
-
export declare namespace DataDownloadCard {
|
|
3752
|
-
var displayName: string;
|
|
3753
|
-
}
|
|
3754
|
-
|
|
3755
|
-
export declare type DataDownloadCardProps = {
|
|
3756
|
-
title?: string;
|
|
3757
|
-
dataset: DataDownloadDataset;
|
|
3758
|
-
filename?: string;
|
|
3759
|
-
markdown?: string;
|
|
3760
|
-
};
|
|
3761
|
-
|
|
3762
|
-
export declare function DataDownloadContent({ content, }: {
|
|
3763
|
-
content: DataDownloadCanvasContent;
|
|
3764
|
-
refreshKey?: number;
|
|
3765
|
-
}): JSX_2.Element;
|
|
3766
|
-
|
|
3767
3599
|
/**
|
|
3768
3600
|
* Inline dataset for client-side file generation (Excel / CSV).
|
|
3769
3601
|
* Sent by the agent with the raw query results.
|
|
3770
3602
|
*/
|
|
3771
3603
|
export declare type DataDownloadDataset = {
|
|
3772
|
-
/**
|
|
3773
|
-
* Column headers in display order.
|
|
3774
|
-
*/
|
|
3604
|
+
/** Column headers in display order. */
|
|
3775
3605
|
columns: string[];
|
|
3776
|
-
/**
|
|
3777
|
-
* Array of row objects keyed by column name.
|
|
3778
|
-
*/
|
|
3606
|
+
/** Array of row objects keyed by column name. */
|
|
3779
3607
|
rows: Record<string, unknown>[];
|
|
3780
3608
|
/**
|
|
3781
3609
|
* Total number of rows returned by the query (before truncation).
|
|
@@ -3794,16 +3622,6 @@ export declare type DataDownloadDataset = {
|
|
|
3794
3622
|
columnLabels?: Record<string, string>;
|
|
3795
3623
|
};
|
|
3796
3624
|
|
|
3797
|
-
export declare function DataDownloadHeader({ content, onClose, }: {
|
|
3798
|
-
content: DataDownloadCanvasContent;
|
|
3799
|
-
onClose: () => void;
|
|
3800
|
-
}): JSX_2.Element;
|
|
3801
|
-
|
|
3802
|
-
export declare function DataDownloadProvider({ content, children, }: {
|
|
3803
|
-
content: DataDownloadCanvasContent;
|
|
3804
|
-
children: ReactNode;
|
|
3805
|
-
}): JSX_2.Element;
|
|
3806
|
-
|
|
3807
3625
|
/**
|
|
3808
3626
|
* Represents an error that occurred during data fetching
|
|
3809
3627
|
*/
|
|
@@ -4004,6 +3822,8 @@ declare type DateFilterOptions_2 = {
|
|
|
4004
3822
|
*/
|
|
4005
3823
|
export declare type DateGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
4006
3824
|
|
|
3825
|
+
export declare type DateGroup = "today" | "yesterday" | "thisMonth" | "older";
|
|
3826
|
+
|
|
4007
3827
|
export declare type DateNavigationOptions = {
|
|
4008
3828
|
min?: Date;
|
|
4009
3829
|
max?: Date;
|
|
@@ -4528,13 +4348,6 @@ export declare const defaultTranslations: {
|
|
|
4528
4348
|
readonly thoughtsGroupTitle: "Reflection";
|
|
4529
4349
|
readonly resourcesGroupTitle: "Resources";
|
|
4530
4350
|
readonly thinking: "Thinking...";
|
|
4531
|
-
readonly closeDashboard: "Close dashboard";
|
|
4532
|
-
readonly unsavedChanges: "Unsaved changes";
|
|
4533
|
-
readonly saveChanges: "Save changes";
|
|
4534
|
-
readonly discardChanges: "Discard";
|
|
4535
|
-
readonly saveAsChanges: "Save as";
|
|
4536
|
-
readonly exportTable: "Download table";
|
|
4537
|
-
readonly generatedTableFilename: "OneGeneratedTable";
|
|
4538
4351
|
readonly feedbackModal: {
|
|
4539
4352
|
readonly positive: {
|
|
4540
4353
|
readonly title: "What did you like about this response?";
|
|
@@ -4547,7 +4360,6 @@ export declare const defaultTranslations: {
|
|
|
4547
4360
|
readonly placeholder: "Share what didn’t work";
|
|
4548
4361
|
};
|
|
4549
4362
|
};
|
|
4550
|
-
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
4551
4363
|
readonly expandChat: "Expand chat";
|
|
4552
4364
|
readonly collapseChat: "Collapse chat";
|
|
4553
4365
|
readonly chatHistory: "Chat history";
|
|
@@ -4565,7 +4377,6 @@ export declare const defaultTranslations: {
|
|
|
4565
4377
|
readonly deleteChat: "Delete chat";
|
|
4566
4378
|
readonly ask: "Ask One";
|
|
4567
4379
|
readonly view: "View";
|
|
4568
|
-
readonly tools: "Tools";
|
|
4569
4380
|
readonly entityRef: {
|
|
4570
4381
|
readonly candidate: {
|
|
4571
4382
|
readonly source: "Source";
|
|
@@ -4587,42 +4398,22 @@ export declare const defaultTranslations: {
|
|
|
4587
4398
|
readonly needMoreCredits: "Need more credits?";
|
|
4588
4399
|
};
|
|
4589
4400
|
readonly reportCard: {
|
|
4590
|
-
readonly reportLabel: "Report";
|
|
4591
4401
|
readonly tableLabel: "Table";
|
|
4592
4402
|
readonly openButton: "Open";
|
|
4593
4403
|
};
|
|
4594
4404
|
readonly formCard: {
|
|
4595
4405
|
readonly moreFields: "Open to see all fields";
|
|
4596
4406
|
};
|
|
4597
|
-
readonly
|
|
4598
|
-
readonly
|
|
4599
|
-
readonly
|
|
4600
|
-
readonly
|
|
4601
|
-
readonly saveAs: "Save as";
|
|
4602
|
-
readonly saveDialog: {
|
|
4603
|
-
readonly title: "Save dashboard";
|
|
4604
|
-
readonly titleLabel: "Title";
|
|
4605
|
-
readonly descriptionLabel: "Description";
|
|
4606
|
-
readonly descriptionPlaceholder: "Add a description (optional)";
|
|
4607
|
-
readonly save: "Save";
|
|
4608
|
-
readonly cancel: "Cancel";
|
|
4609
|
-
};
|
|
4610
|
-
readonly status: {
|
|
4611
|
-
readonly saved: "Saved";
|
|
4612
|
-
readonly draft: "Draft";
|
|
4613
|
-
readonly unsaved: "Unsaved";
|
|
4614
|
-
};
|
|
4615
|
-
readonly statusLabel: "Status";
|
|
4616
|
-
readonly lastEdited: "Last edited";
|
|
4617
|
-
readonly createdBy: "Created by";
|
|
4407
|
+
readonly aiTable: {
|
|
4408
|
+
readonly title: "Table";
|
|
4409
|
+
readonly downloadExcel: "Download Excel";
|
|
4410
|
+
readonly downloadCsv: "Download CSV";
|
|
4618
4411
|
};
|
|
4619
4412
|
readonly dataDownload: {
|
|
4620
4413
|
readonly title: "Download";
|
|
4621
4414
|
readonly download: "Download {{format}}";
|
|
4622
4415
|
readonly exportDashboard: "Export dashboard as {{format}}";
|
|
4623
|
-
readonly export: "Export";
|
|
4624
4416
|
readonly exporting: "Exporting…";
|
|
4625
|
-
readonly rows: "{{amount}} rows";
|
|
4626
4417
|
};
|
|
4627
4418
|
readonly dashboardItem: {
|
|
4628
4419
|
readonly chartType: "Chart type";
|
|
@@ -4642,11 +4433,6 @@ export declare const defaultTranslations: {
|
|
|
4642
4433
|
readonly soft: "You're running low on AI credits.";
|
|
4643
4434
|
readonly getCredits: "Get credits";
|
|
4644
4435
|
readonly dismiss: "Dismiss";
|
|
4645
|
-
readonly messageBanner: {
|
|
4646
|
-
readonly title: "This response requires credits";
|
|
4647
|
-
readonly description: "Your company has run out of AI credits.";
|
|
4648
|
-
readonly actionLabel: "Get credits";
|
|
4649
|
-
};
|
|
4650
4436
|
};
|
|
4651
4437
|
readonly attachFile: "Attach file";
|
|
4652
4438
|
readonly removeFile: "Remove";
|
|
@@ -4864,8 +4650,6 @@ export declare const defaultTranslations: {
|
|
|
4864
4650
|
};
|
|
4865
4651
|
};
|
|
4866
4652
|
readonly forms: {
|
|
4867
|
-
readonly yes: "Yes";
|
|
4868
|
-
readonly no: "No";
|
|
4869
4653
|
readonly actionBar: {
|
|
4870
4654
|
readonly unsavedChanges: "You have changes pending to be saved";
|
|
4871
4655
|
readonly saving: "Saving...";
|
|
@@ -5153,6 +4937,13 @@ export declare type DropIntent = {
|
|
|
5153
4937
|
type: "cancel";
|
|
5154
4938
|
};
|
|
5155
4939
|
|
|
4940
|
+
export declare const DropOverlay: ({ visible, onFilesDropped }: DropOverlayProps) => JSX_2.Element;
|
|
4941
|
+
|
|
4942
|
+
declare interface DropOverlayProps {
|
|
4943
|
+
visible: boolean;
|
|
4944
|
+
onFilesDropped: (files: File[]) => void;
|
|
4945
|
+
}
|
|
4946
|
+
|
|
5156
4947
|
export declare interface DurationFieldConfig {
|
|
5157
4948
|
suffix?: string;
|
|
5158
4949
|
max?: number;
|
|
@@ -5501,7 +5292,7 @@ export declare interface F0ActionItemProps {
|
|
|
5501
5292
|
/**
|
|
5502
5293
|
* The title text displayed next to the status icon
|
|
5503
5294
|
*/
|
|
5504
|
-
title
|
|
5295
|
+
title?: string;
|
|
5505
5296
|
/**
|
|
5506
5297
|
* Current status of the action item
|
|
5507
5298
|
*/
|
|
@@ -5558,12 +5349,193 @@ export declare interface F0AiAvailableFormDefinition<TParams extends Record<stri
|
|
|
5558
5349
|
*/
|
|
5559
5350
|
export declare const F0AiChat: () => JSX_2.Element | null;
|
|
5560
5351
|
|
|
5352
|
+
/**
|
|
5353
|
+
* Headless chat header. Renders a top bar with title (or thread selector),
|
|
5354
|
+
* credits popover, fullscreen toggle and close button. Has two visual
|
|
5355
|
+
* variants:
|
|
5356
|
+
* - with-history: title acts as a thread selector (clickable) — the host
|
|
5357
|
+
* wires `onOpenHistory` to mount its own history dialog.
|
|
5358
|
+
* - legacy: title is static; a "new chat" button is shown when `hasMessages`.
|
|
5359
|
+
*
|
|
5360
|
+
* Decoupled from CopilotKit and `useAiChat()` — everything via props.
|
|
5361
|
+
*/
|
|
5362
|
+
export declare const F0AiChatHeader: ({ historyEnabled, title, currentThreadTitle, fullscreen, lockVisualizationMode, onToggleVisualizationMode, onClose, onNewChat, onOpenHistory, hasMessages, credits, employeeCredits, }: F0AiChatHeaderProps) => JSX_2.Element;
|
|
5363
|
+
|
|
5364
|
+
export declare type F0AiChatHeaderProps = {
|
|
5365
|
+
/**
|
|
5366
|
+
* When true, renders the with-history variant: the title acts as a thread
|
|
5367
|
+
* selector that triggers `onOpenHistory`. When false (default), renders
|
|
5368
|
+
* the legacy variant with `title` shown as a static heading.
|
|
5369
|
+
*/
|
|
5370
|
+
historyEnabled?: boolean;
|
|
5371
|
+
/** Static title for the legacy variant. Empty or undefined hides the heading. */
|
|
5372
|
+
title?: string;
|
|
5373
|
+
/**
|
|
5374
|
+
* With-history variant: title of the currently loaded thread, or null for
|
|
5375
|
+
* a brand-new conversation (renders the "New conversation" placeholder).
|
|
5376
|
+
*/
|
|
5377
|
+
currentThreadTitle?: string | null;
|
|
5378
|
+
/** Whether the chat is currently in fullscreen mode (controls expand/minimize icon). */
|
|
5379
|
+
fullscreen?: boolean;
|
|
5380
|
+
/** When true, hides the expand/minimize button and the history selector. */
|
|
5381
|
+
lockVisualizationMode?: boolean;
|
|
5382
|
+
/** Toggle fullscreen ↔ sidepanel. */
|
|
5383
|
+
onToggleVisualizationMode?: () => void;
|
|
5384
|
+
/** Close button (X) callback. */
|
|
5385
|
+
onClose: () => void;
|
|
5386
|
+
/**
|
|
5387
|
+
* Legacy variant only: callback for the "new chat" button. Hidden when
|
|
5388
|
+
* `hasMessages` is false (i.e. the thread is empty so a new chat would be
|
|
5389
|
+
* a no-op).
|
|
5390
|
+
*/
|
|
5391
|
+
onNewChat?: () => void;
|
|
5392
|
+
/** With-history variant: callback fired when the user clicks the title. */
|
|
5393
|
+
onOpenHistory?: () => void;
|
|
5394
|
+
/** Legacy variant gate: only renders the "new chat" button when true. */
|
|
5395
|
+
hasMessages?: boolean;
|
|
5396
|
+
/** Credits configuration. When present, renders the credits popover button. */
|
|
5397
|
+
credits?: AiChatCredits;
|
|
5398
|
+
/**
|
|
5399
|
+
* Employee-level credits configuration. When present, an employee-only
|
|
5400
|
+
* popover is rendered **instead of** the classic one (mutually exclusive
|
|
5401
|
+
* with `credits`). Hosts opt in per-employee.
|
|
5402
|
+
*/
|
|
5403
|
+
employeeCredits?: AiChatEmployeeCredits;
|
|
5404
|
+
};
|
|
5405
|
+
|
|
5406
|
+
/**
|
|
5407
|
+
* Headless chat-history dialog. Receives threads + handlers via props so
|
|
5408
|
+
* it can be wired against any backend or mocked in stories. No CopilotKit
|
|
5409
|
+
* or `useAiChat()` dependency.
|
|
5410
|
+
*/
|
|
5411
|
+
export declare const F0AiChatHistory: ({ onClose, onSelectThread, onNewChat, threads, isLoading, error, pinnedIds, onPinThread, onUnpinThread, onDeleteThread, }: F0AiChatHistoryProps) => ReactPortal;
|
|
5412
|
+
|
|
5413
|
+
export declare type F0AiChatHistoryProps = {
|
|
5414
|
+
/** Close the dialog (overlay click, ESC, or post-selection). */
|
|
5415
|
+
onClose: () => void;
|
|
5416
|
+
/** Called when the user picks a thread to load. */
|
|
5417
|
+
onSelectThread: (threadId: string, title: string) => void;
|
|
5418
|
+
/** Called when the user clicks "Start new chat". */
|
|
5419
|
+
onNewChat: () => void;
|
|
5420
|
+
/** Thread list (already fetched). */
|
|
5421
|
+
threads: ChatThread[];
|
|
5422
|
+
/** Whether the threads are still being fetched. */
|
|
5423
|
+
isLoading: boolean;
|
|
5424
|
+
/** Fetch error message, or null when no error. */
|
|
5425
|
+
error: string | null;
|
|
5426
|
+
/** Set of pinned thread IDs. */
|
|
5427
|
+
pinnedIds: Set<string>;
|
|
5428
|
+
/** Called when the user pins a thread. */
|
|
5429
|
+
onPinThread: (id: string) => void;
|
|
5430
|
+
/** Called when the user unpins a thread. */
|
|
5431
|
+
onUnpinThread: (id: string) => void;
|
|
5432
|
+
/** Called when the user deletes a thread (may be async). */
|
|
5433
|
+
onDeleteThread: (id: string) => Promise<void> | void;
|
|
5434
|
+
};
|
|
5435
|
+
|
|
5561
5436
|
/**
|
|
5562
5437
|
* @experimental This is an experimental component use it at your own risk
|
|
5563
5438
|
*/
|
|
5564
|
-
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities,
|
|
5439
|
+
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities, credits, employeeCredits, creditWarning, fileAttachments, onThumbsUp, onThumbsDown, onBeforeSendMessage, runtimeFetch, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
5440
|
+
|
|
5441
|
+
/**
|
|
5442
|
+
* Headless chat composer.
|
|
5443
|
+
*
|
|
5444
|
+
* Owns local UI state (text, cursor, attached files, mention popover) and
|
|
5445
|
+
* emits a structured payload via `onSubmit`. The consumer decides what to
|
|
5446
|
+
* do with it (forward to CopilotKit, log it, mock it…). It carries no
|
|
5447
|
+
* coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
|
|
5448
|
+
* provide the wiring.
|
|
5449
|
+
*/
|
|
5450
|
+
export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingQuestion, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, searchPersons, onProcessFilesRef, disclaimer, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
|
|
5451
|
+
|
|
5452
|
+
export declare type F0AiChatTextAreaProps = {
|
|
5453
|
+
ref: RefObject<HTMLDivElement>;
|
|
5454
|
+
/** Emitted when the user submits. Awaited so the textarea can stay disabled. */
|
|
5455
|
+
onSubmit: (payload: F0AiChatTextAreaSubmitPayload) => void | Promise<void>;
|
|
5456
|
+
/** Called when the user clicks the stop button while a response is streaming. */
|
|
5457
|
+
onStop?: () => void;
|
|
5458
|
+
/** Whether a response is currently streaming. Switches the submit button to "stop". */
|
|
5459
|
+
inProgress?: boolean;
|
|
5460
|
+
/**
|
|
5461
|
+
* Optional gate run before submission. Return `false` to abort the send
|
|
5462
|
+
* (e.g. show a quota dialog). The textarea stays focused and the input
|
|
5463
|
+
* is preserved.
|
|
5464
|
+
*/
|
|
5465
|
+
onBeforeSubmit?: () => boolean | Promise<boolean>;
|
|
5466
|
+
/** Rotating placeholders for the typewriter effect. Empty/single-entry skips the typewriter. */
|
|
5467
|
+
placeholders?: string[];
|
|
5468
|
+
/** Credit warning banner shown above the composer. */
|
|
5469
|
+
creditWarning?: AiChatCreditWarning;
|
|
5470
|
+
/**
|
|
5471
|
+
* Clarifying question to render in place of the input. When non-null the
|
|
5472
|
+
* panel takes over the composer surface and submission is blocked.
|
|
5473
|
+
*/
|
|
5474
|
+
clarifyingQuestion?: ClarifyingQuestionState | null;
|
|
5475
|
+
/** Pending context shown as a chip; prepended invisibly on submit. */
|
|
5476
|
+
pendingContext?: PendingContext | null;
|
|
5477
|
+
/** Called when the user dismisses pending context (or it gets consumed on submit). */
|
|
5478
|
+
onPendingContextChange?: (context: PendingContext | null) => void;
|
|
5479
|
+
/** Pending quote shown as a chip above the textarea. */
|
|
5480
|
+
pendingQuote?: PendingQuote | null;
|
|
5481
|
+
/** Called when the user dismisses the quote (or it gets consumed on submit). */
|
|
5482
|
+
onPendingQuoteChange?: (quote: PendingQuote | null) => void;
|
|
5483
|
+
/** File attachment configuration. When omitted, attachments are disabled. */
|
|
5484
|
+
fileAttachments?: AiChatFileAttachmentConfig;
|
|
5485
|
+
/** Async search used by the @-mention popover. When omitted, mentions are disabled. */
|
|
5486
|
+
searchPersons?: (query: string) => Promise<PersonProfile[]>;
|
|
5487
|
+
/**
|
|
5488
|
+
* Registers a callback that lets external drop zones forward dropped
|
|
5489
|
+
* files to this textarea's file-attachment pipeline. The textarea calls
|
|
5490
|
+
* the registrar with the handler on mount and with `null` on unmount.
|
|
5491
|
+
*/
|
|
5492
|
+
onProcessFilesRef?: (handler: ((files: File[]) => void) | null) => void;
|
|
5493
|
+
/**
|
|
5494
|
+
* Optional disclaimer text + link rendered below the textarea. Hidden on
|
|
5495
|
+
* the welcome screen of the fullscreen layout to give the footer room.
|
|
5496
|
+
*/
|
|
5497
|
+
disclaimer?: AiChatDisclaimer;
|
|
5498
|
+
/**
|
|
5499
|
+
* Optional footer (e.g. powered-by, legal copy) rendered below the
|
|
5500
|
+
* textarea on the welcome screen.
|
|
5501
|
+
*/
|
|
5502
|
+
footer?: ReactNode;
|
|
5503
|
+
/**
|
|
5504
|
+
* Whether the chat is currently in its welcome state (no messages yet).
|
|
5505
|
+
* Controls footer visibility and welcome-screen-only layout tweaks.
|
|
5506
|
+
*/
|
|
5507
|
+
isWelcomeScreen?: boolean;
|
|
5508
|
+
/**
|
|
5509
|
+
* Grouped suggestions rendered as outline buttons above the composer on
|
|
5510
|
+
* the welcome screen. Clicking a group opens a single popover (above the
|
|
5511
|
+
* row, left-aligned, spanning the composer width) with that group's items.
|
|
5512
|
+
* Hovering an item previews its prompt in the textarea placeholder.
|
|
5513
|
+
*/
|
|
5514
|
+
welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
|
|
5515
|
+
/** Called when the user clicks a sub-suggestion. */
|
|
5516
|
+
onSuggestionClick?: (item: WelcomeScreenSuggestionItem) => void;
|
|
5517
|
+
/**
|
|
5518
|
+
* When true, the composer adopts the fullscreen layout: the welcome
|
|
5519
|
+
* footer is pushed to the bottom and the disclaimer is hidden so the
|
|
5520
|
+
* footer is the only thing under the textarea.
|
|
5521
|
+
*/
|
|
5522
|
+
fullscreen?: boolean;
|
|
5523
|
+
};
|
|
5565
5524
|
|
|
5566
|
-
|
|
5525
|
+
/**
|
|
5526
|
+
* Payload emitted by `F0AiChatTextArea` when the user submits.
|
|
5527
|
+
*
|
|
5528
|
+
* `text` already contains the inline markup the renderer expects:
|
|
5529
|
+
* `<entity-ref>` tags for @mentions, `<reply-quote>` for the quoted
|
|
5530
|
+
* fragment, and HTML-escaped user-typed text. The consumer decides how
|
|
5531
|
+
* to wrap it (plain string vs multipart message) when forwarding to
|
|
5532
|
+
* the agent.
|
|
5533
|
+
*/
|
|
5534
|
+
export declare type F0AiChatTextAreaSubmitPayload = {
|
|
5535
|
+
text: string;
|
|
5536
|
+
files: UploadedFile[];
|
|
5537
|
+
context: PendingContext | null;
|
|
5538
|
+
};
|
|
5567
5539
|
|
|
5568
5540
|
/**
|
|
5569
5541
|
* Context value for the AI form registry
|
|
@@ -5697,11 +5669,6 @@ export declare function F0AiFormRegistryProvider({ children, availableFormDefini
|
|
|
5697
5669
|
availableFormDefinitions?: AvailableFormDefinitionItem[];
|
|
5698
5670
|
}): JSX_2.Element;
|
|
5699
5671
|
|
|
5700
|
-
/**
|
|
5701
|
-
* @experimental This is an experimental component use it at your own risk
|
|
5702
|
-
*/
|
|
5703
|
-
export declare const F0AiFullscreenChat: () => JSX_2.Element | null;
|
|
5704
|
-
|
|
5705
5672
|
export declare const F0AiInsightCard: WithDataTestIdReturnType_4<ForwardRefExoticComponent<F0AiInsightCardPublicProps & RefAttributes<HTMLDivElement>> & {
|
|
5706
5673
|
Skeleton: () => JSX_2.Element;
|
|
5707
5674
|
}>;
|
|
@@ -5746,6 +5713,92 @@ export declare class F0AiMask {
|
|
|
5746
5713
|
private render;
|
|
5747
5714
|
}
|
|
5748
5715
|
|
|
5716
|
+
export declare const F0AiMessagesContainer: (props: F0AiMessagesContainerProps) => JSX_2.Element;
|
|
5717
|
+
|
|
5718
|
+
export declare type F0AiMessagesContainerProps = {
|
|
5719
|
+
/** Optional override for the assistant bubble component. */
|
|
5720
|
+
AssistantMessage?: MessageSlotComponent;
|
|
5721
|
+
/** Optional override for the user bubble component. */
|
|
5722
|
+
UserMessage?: MessageSlotComponent;
|
|
5723
|
+
/** Called when the user triggers regeneration on an assistant message. */
|
|
5724
|
+
onRegenerate?: (messageId: string) => void;
|
|
5725
|
+
/** Called when the user copies an assistant message's content. */
|
|
5726
|
+
onCopy?: (content: string) => void;
|
|
5727
|
+
/** Pre-processed turns to render (assembled by the connected wrapper). */
|
|
5728
|
+
turns: RenderableTurn[];
|
|
5729
|
+
/** Show a skeleton in place of the turns while a thread is being fetched. */
|
|
5730
|
+
isLoadingThread?: boolean;
|
|
5731
|
+
/** Optional React node rendered inline at the end of the list (e.g. CopilotKit interrupt). */
|
|
5732
|
+
interrupt?: ReactNode;
|
|
5733
|
+
/** Greeting shown above the initial message in the welcome screen. */
|
|
5734
|
+
greeting?: string;
|
|
5735
|
+
/** Initial message(s) shown in the welcome screen, or a default if omitted. */
|
|
5736
|
+
initialMessage?: string | string[];
|
|
5737
|
+
/** Optional click on the One icon (factorial uses it for the pong easter egg). */
|
|
5738
|
+
onWelcomeIconClick?: () => void;
|
|
5739
|
+
/** Returns a React node for an assistant message's tool call, or null. */
|
|
5740
|
+
renderToolCall?: F0AssistantMessageExtraProps["renderToolCall"];
|
|
5741
|
+
/** Called when the user selects text and clicks Reply (user or assistant bubble). */
|
|
5742
|
+
onReplyQuote?: (text: string) => void;
|
|
5743
|
+
/** Called when an assistant message finishes generating — for analytics. */
|
|
5744
|
+
onAssistantMessageRendered?: (message: Message_3) => void;
|
|
5745
|
+
/** Disables auto-scrollIntoView on new user messages (fullscreen sets false). */
|
|
5746
|
+
autoScrollUserIntoView?: boolean;
|
|
5747
|
+
/**
|
|
5748
|
+
* Renders the markdown content of user/assistant messages. The connected
|
|
5749
|
+
* wrapper provides a CopilotKit + f0-markdown-renderers implementation;
|
|
5750
|
+
* standalone consumers can omit it and a plain whitespace-preserving
|
|
5751
|
+
* fallback is used.
|
|
5752
|
+
*/
|
|
5753
|
+
renderMarkdown?: (content: string) => ReactNode;
|
|
5754
|
+
/** When omitted, feedback (thumbs + modal) is hidden. */
|
|
5755
|
+
feedback?: FeedbackConfig;
|
|
5756
|
+
/** Pause turnMinHeight observer (e.g. while a clarifying panel is open). */
|
|
5757
|
+
freezeLayout?: boolean;
|
|
5758
|
+
/** Disable the top/bottom scroll shadows. */
|
|
5759
|
+
noShadows?: boolean;
|
|
5760
|
+
/** Passthrough children appended after the last turn (CopilotKit parity). */
|
|
5761
|
+
children?: ReactNode;
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5764
|
+
/**
|
|
5765
|
+
* Information source attached to an assistant message.
|
|
5766
|
+
*/
|
|
5767
|
+
export declare type F0AiMessageSource = {
|
|
5768
|
+
title: string;
|
|
5769
|
+
link?: string;
|
|
5770
|
+
/** Name of an icon exported by `@factorialco/f0-react/icons/app`. */
|
|
5771
|
+
icon?: string;
|
|
5772
|
+
targetBlank?: boolean;
|
|
5773
|
+
};
|
|
5774
|
+
|
|
5775
|
+
/**
|
|
5776
|
+
* Renders a collapsible group of information sources attached to an
|
|
5777
|
+
* assistant message. Sources without a `link` render as plain rows;
|
|
5778
|
+
* sources with a `link` render as clickable Actions. Pure presentational
|
|
5779
|
+
* — no hooks, no AI coupling.
|
|
5780
|
+
*/
|
|
5781
|
+
export declare function F0AiMessageSources({ sources, title: titleProp, }: F0AiMessageSourcesProps): JSX_2.Element | null;
|
|
5782
|
+
|
|
5783
|
+
export declare namespace F0AiMessageSources {
|
|
5784
|
+
var displayName: string;
|
|
5785
|
+
}
|
|
5786
|
+
|
|
5787
|
+
export declare type F0AiMessageSourcesProps = {
|
|
5788
|
+
sources: F0AiMessageSource[];
|
|
5789
|
+
/**
|
|
5790
|
+
* Override the section title. Defaults to the
|
|
5791
|
+
* `ai.resourcesGroupTitle` translation key.
|
|
5792
|
+
*/
|
|
5793
|
+
title?: string;
|
|
5794
|
+
};
|
|
5795
|
+
|
|
5796
|
+
export declare const F0AiPong: ({ onClose }: F0AiPongProps) => JSX_2.Element;
|
|
5797
|
+
|
|
5798
|
+
declare interface F0AiPongProps {
|
|
5799
|
+
onClose: () => void;
|
|
5800
|
+
}
|
|
5801
|
+
|
|
5749
5802
|
export declare function F0AiProposalCard(props: F0AiProposalCardProps): JSX_2.Element;
|
|
5750
5803
|
|
|
5751
5804
|
export declare namespace F0AiProposalCard {
|
|
@@ -5787,6 +5840,37 @@ export declare interface F0AiProposalCardHiddenActions {
|
|
|
5787
5840
|
|
|
5788
5841
|
export declare type F0AiProposalCardProps = F0AiProposalCardBaseProps & (F0AiProposalCardActions | F0AiProposalCardHiddenActions);
|
|
5789
5842
|
|
|
5843
|
+
/**
|
|
5844
|
+
* Compact inline table for small datasets shown directly in an AI chat
|
|
5845
|
+
* stream. Headers come from `columnLabels` when present, otherwise from
|
|
5846
|
+
* the raw column id. Shows a download dropdown (Excel / CSV) — Excel
|
|
5847
|
+
* support is loaded lazily via `xlsx`. Pure presentational — no hooks,
|
|
5848
|
+
* no AI coupling.
|
|
5849
|
+
*/
|
|
5850
|
+
export declare function F0AiTableCard({ dataset, title: titleProp, filename, }: F0AiTableCardProps): JSX_2.Element | null;
|
|
5851
|
+
|
|
5852
|
+
export declare namespace F0AiTableCard {
|
|
5853
|
+
var displayName: string;
|
|
5854
|
+
}
|
|
5855
|
+
|
|
5856
|
+
export declare type F0AiTableCardProps = {
|
|
5857
|
+
/**
|
|
5858
|
+
* Tabular data to render. Reuses the same shape used by the
|
|
5859
|
+
* `dataDownload` canvas entity so the agent payload travels untouched.
|
|
5860
|
+
*/
|
|
5861
|
+
dataset: DataDownloadDataset;
|
|
5862
|
+
/**
|
|
5863
|
+
* Title shown above the table. Defaults to the `ai.aiTable.title`
|
|
5864
|
+
* translation key (English: "Table").
|
|
5865
|
+
*/
|
|
5866
|
+
title?: string;
|
|
5867
|
+
/**
|
|
5868
|
+
* Filename used for downloads (without extension). Defaults to the
|
|
5869
|
+
* slugified title, or `"table"` when no title is provided.
|
|
5870
|
+
*/
|
|
5871
|
+
filename?: string;
|
|
5872
|
+
};
|
|
5873
|
+
|
|
5790
5874
|
export declare const F0Alert: WithDataTestIdReturnType_3<({ title, description, action, link, icon, variant, onClose, }: F0AlertProps) => JSX_2.Element>;
|
|
5791
5875
|
|
|
5792
5876
|
export declare interface F0AlertProps {
|
|
@@ -5912,6 +5996,26 @@ declare type F0ArraySelectConfig<T extends string | number = string, R extends R
|
|
|
5912
5996
|
fieldType?: "select";
|
|
5913
5997
|
};
|
|
5914
5998
|
|
|
5999
|
+
declare type F0AssistantMessageExtraProps = {
|
|
6000
|
+
/**
|
|
6001
|
+
* Returns a React node for the message's tool call, or null when there is
|
|
6002
|
+
* nothing to render. The container's connected wrapper closes over the
|
|
6003
|
+
* full message list to call CopilotKit's lazy tool renderer; standalone
|
|
6004
|
+
* consumers can omit it.
|
|
6005
|
+
*/
|
|
6006
|
+
renderToolCall?: (message: Message_3) => ReactNode | null;
|
|
6007
|
+
/** Called when the user selects text in this message and clicks Reply. */
|
|
6008
|
+
onReplyQuote?: (text: string) => void;
|
|
6009
|
+
/** Called once the assistant message has finished generating — for analytics. */
|
|
6010
|
+
onRendered?: (message: Message_3) => void;
|
|
6011
|
+
/**
|
|
6012
|
+
* Renders the assistant text content. The connected wrapper provides a
|
|
6013
|
+
* markdown-aware implementation; standalone consumers can omit it and a
|
|
6014
|
+
* plain whitespace-preserving fallback is used instead.
|
|
6015
|
+
*/
|
|
6016
|
+
renderMarkdown?: (content: string) => ReactNode;
|
|
6017
|
+
};
|
|
6018
|
+
|
|
5915
6019
|
export declare function F0AuraVoiceAnimation({ size, state, color, colorShift, audioTrack, themeMode, className, ref, ...props }: F0AuraVoiceAnimationProps & ComponentProps<"div"> & VariantProps<typeof F0AuraVoiceAnimationVariants>): JSX_2.Element;
|
|
5916
6020
|
|
|
5917
6021
|
export declare interface F0AuraVoiceAnimationProps {
|
|
@@ -6440,6 +6544,62 @@ declare type F0ButtonToggleInternalProps = {
|
|
|
6440
6544
|
|
|
6441
6545
|
export declare type F0ButtonToggleProps = Omit<F0ButtonToggleInternalProps, (typeof privateProps_2)[number]>;
|
|
6442
6546
|
|
|
6547
|
+
/**
|
|
6548
|
+
* Shared inline card rendered in the AI chat for any canvas entity.
|
|
6549
|
+
* Shows a module avatar, title, description, and an Open/Close toggle button.
|
|
6550
|
+
* When active, displays a focus ring and the button switches to "Close".
|
|
6551
|
+
*/
|
|
6552
|
+
export declare function F0CanvasCard({ module: cardModule, title, description, onOpen, showOpenButton, onClose, isActive, children, }: F0CanvasCardProps): JSX_2.Element;
|
|
6553
|
+
|
|
6554
|
+
export declare namespace F0CanvasCard {
|
|
6555
|
+
var displayName: string;
|
|
6556
|
+
}
|
|
6557
|
+
|
|
6558
|
+
export declare type F0CanvasCardProps = {
|
|
6559
|
+
/** Module avatar to display (e.g. "analytics", "surveys", "goals") */
|
|
6560
|
+
module?: ModuleId;
|
|
6561
|
+
/** Primary title */
|
|
6562
|
+
title: string;
|
|
6563
|
+
/** Secondary description line */
|
|
6564
|
+
description: string;
|
|
6565
|
+
/** Called when the user clicks the "Open" button */
|
|
6566
|
+
onOpen: () => void;
|
|
6567
|
+
/** Whether to show the "Open" button */
|
|
6568
|
+
showOpenButton?: boolean;
|
|
6569
|
+
/** Called when the user clicks the "Close" button (active state) */
|
|
6570
|
+
onClose: () => void;
|
|
6571
|
+
/** Whether this card's content is currently shown in the canvas */
|
|
6572
|
+
isActive: boolean;
|
|
6573
|
+
/** Optional content rendered below the card header (e.g. a data preview) */
|
|
6574
|
+
children?: React.ReactNode;
|
|
6575
|
+
};
|
|
6576
|
+
|
|
6577
|
+
/**
|
|
6578
|
+
* Entity-agnostic canvas panel that renders content alongside the chat sidebar.
|
|
6579
|
+
*
|
|
6580
|
+
* Looks up the entity definition from the `entities` prop using
|
|
6581
|
+
* `content.type` and delegates rendering of body and header actions to the
|
|
6582
|
+
* entity module. The panel shell handles animation, body scroll area, and
|
|
6583
|
+
* refreshKey bookkeeping (auto-increments when `content` changes by identity).
|
|
6584
|
+
*
|
|
6585
|
+
* Headless: no CopilotKit or `useAiChat()` dependency — the host wires
|
|
6586
|
+
* `content`, `onClose` and `entities` directly.
|
|
6587
|
+
*/
|
|
6588
|
+
export declare function F0CanvasPanel({ content, onClose, entities, }: F0CanvasPanelProps): ReactNode;
|
|
6589
|
+
|
|
6590
|
+
export declare namespace F0CanvasPanel {
|
|
6591
|
+
var displayName: string;
|
|
6592
|
+
}
|
|
6593
|
+
|
|
6594
|
+
export declare type F0CanvasPanelProps = {
|
|
6595
|
+
/** Current canvas content to render. When null, the panel collapses. */
|
|
6596
|
+
content: CanvasContent | null;
|
|
6597
|
+
/** Called when the user closes the canvas. */
|
|
6598
|
+
onClose: () => void;
|
|
6599
|
+
/** Canvas entity registry keyed by `CanvasContent["type"]`. */
|
|
6600
|
+
entities?: Record<string, CanvasEntityDefinition<any>>;
|
|
6601
|
+
};
|
|
6602
|
+
|
|
6443
6603
|
export declare const F0Card: WithDataTestIdReturnType_3<ForwardRefExoticComponent<F0CardProps & RefAttributes<HTMLDivElement>> & {
|
|
6444
6604
|
Skeleton: ({ compact }: {
|
|
6445
6605
|
compact?: boolean;
|
|
@@ -6506,6 +6666,24 @@ export declare const F0ChipList: WithDataTestIdReturnType_3< {
|
|
|
6506
6666
|
displayName: string;
|
|
6507
6667
|
}>;
|
|
6508
6668
|
|
|
6669
|
+
/**
|
|
6670
|
+
* Animated wrapper that mounts/unmounts the clarifying question panel.
|
|
6671
|
+
*
|
|
6672
|
+
* Uses Motion's native `height: "auto"` support — it measures the
|
|
6673
|
+
* content internally, so the same transition covers the initial
|
|
6674
|
+
* appearance, step changes with a different number of options, and
|
|
6675
|
+
* dismissal. No manual ResizeObserver.
|
|
6676
|
+
*
|
|
6677
|
+
* Props-driven: the entire panel state (current step, navigation,
|
|
6678
|
+
* callbacks) lives in `clarifyingQuestion`. No coupling to `useAiChat`
|
|
6679
|
+
* — embedders can construct a state object themselves.
|
|
6680
|
+
*/
|
|
6681
|
+
export declare const F0ClarifyingPanel: ({ clarifyingQuestion, }: F0ClarifyingPanelProps) => JSX_2.Element;
|
|
6682
|
+
|
|
6683
|
+
declare interface F0ClarifyingPanelProps {
|
|
6684
|
+
clarifyingQuestion: ClarifyingQuestionState;
|
|
6685
|
+
}
|
|
6686
|
+
|
|
6509
6687
|
/**
|
|
6510
6688
|
* F0 config options specific to custom fields
|
|
6511
6689
|
*
|
|
@@ -8499,25 +8677,6 @@ export declare type F0LinkProps = Omit<ActionLinkProps, "variant" | "href"> & {
|
|
|
8499
8677
|
href?: string;
|
|
8500
8678
|
};
|
|
8501
8679
|
|
|
8502
|
-
export declare const F0MessageCreditsWarning: ({ actionHref, }: F0MessageCreditsWarningProps) => JSX_2.Element;
|
|
8503
|
-
|
|
8504
|
-
/**
|
|
8505
|
-
* Args for credits warning copilot action
|
|
8506
|
-
*/
|
|
8507
|
-
export declare interface F0MessageCreditsWarningArgs {
|
|
8508
|
-
actionHref?: string;
|
|
8509
|
-
}
|
|
8510
|
-
|
|
8511
|
-
/**
|
|
8512
|
-
* Props for the F0MessageCreditsWarning component
|
|
8513
|
-
*/
|
|
8514
|
-
export declare interface F0MessageCreditsWarningProps {
|
|
8515
|
-
/**
|
|
8516
|
-
* Optional URL used by the action button.
|
|
8517
|
-
*/
|
|
8518
|
-
actionHref?: string;
|
|
8519
|
-
}
|
|
8520
|
-
|
|
8521
8680
|
export declare const F0ModuleCard: ({ moduleName, description, onAction, actionHref, imageSrc, }: F0ModuleCardProps) => JSX_2.Element;
|
|
8522
8681
|
|
|
8523
8682
|
/**
|
|
@@ -9550,14 +9709,20 @@ export declare interface F0ZodType<T extends ZodTypeAny = ZodTypeAny> {
|
|
|
9550
9709
|
_innerSchema: T;
|
|
9551
9710
|
}
|
|
9552
9711
|
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9712
|
+
export declare type FeedbackConfig = {
|
|
9713
|
+
threadId: string;
|
|
9714
|
+
onThumbsUp: (msg: AIMessage_2, ctx: {
|
|
9715
|
+
threadId: string;
|
|
9716
|
+
feedback: string;
|
|
9717
|
+
}) => void;
|
|
9718
|
+
onThumbsDown: (msg: AIMessage_2, ctx: {
|
|
9719
|
+
threadId: string;
|
|
9720
|
+
feedback: string;
|
|
9721
|
+
}) => void;
|
|
9559
9722
|
};
|
|
9560
9723
|
|
|
9724
|
+
/* Excluded from this release type: FieldItem */
|
|
9725
|
+
|
|
9561
9726
|
export declare function fieldsToSeconds(fields: DurationFields): number;
|
|
9562
9727
|
|
|
9563
9728
|
/**
|
|
@@ -9865,7 +10030,7 @@ declare const fontSizes: readonly ["sm", "md", "lg"];
|
|
|
9865
10030
|
* real formatter function. The wrapper component maps these to actual
|
|
9866
10031
|
* `(value: number) => string` functions at render time.
|
|
9867
10032
|
*/
|
|
9868
|
-
declare type FormatPreset = {
|
|
10033
|
+
export declare type FormatPreset = {
|
|
9869
10034
|
type: "number";
|
|
9870
10035
|
} | {
|
|
9871
10036
|
type: "currency";
|
|
@@ -9886,45 +10051,6 @@ export declare type FormCanvasContent = CanvasContentBase & {
|
|
|
9886
10051
|
formModule?: ModuleId;
|
|
9887
10052
|
};
|
|
9888
10053
|
|
|
9889
|
-
/**
|
|
9890
|
-
* Form-specific card rendered inline in the AI chat stream.
|
|
9891
|
-
* Shows the active form name, description, and an Open/Close button
|
|
9892
|
-
* that opens the form in the canvas panel.
|
|
9893
|
-
* When field data is provided, displays a summary of field labels and values.
|
|
9894
|
-
*/
|
|
9895
|
-
export declare function FormCard({ formName, formDescription, module: formModule, cardTitle, cardDescription, fieldDescriptions, formValues, valueFormatter, }: FormCardProps): JSX_2.Element;
|
|
9896
|
-
|
|
9897
|
-
export declare namespace FormCard {
|
|
9898
|
-
var displayName: string;
|
|
9899
|
-
}
|
|
9900
|
-
|
|
9901
|
-
export declare type FormCardProps = {
|
|
9902
|
-
/** Unique name of the form in the registry */
|
|
9903
|
-
formName: string;
|
|
9904
|
-
/** Optional description shown on the card */
|
|
9905
|
-
formDescription?: string;
|
|
9906
|
-
/** Module avatar for the card */
|
|
9907
|
-
module?: ModuleId;
|
|
9908
|
-
/** Custom title override for the card (set by the AI via fillForm) */
|
|
9909
|
-
cardTitle: string;
|
|
9910
|
-
/** Custom description override for the card (set by the AI via fillForm) */
|
|
9911
|
-
cardDescription: string;
|
|
9912
|
-
/** Field label metadata from the form schema */
|
|
9913
|
-
fieldDescriptions?: Record<string, FieldMeta>;
|
|
9914
|
-
/** Current form values */
|
|
9915
|
-
formValues?: Record<string, unknown>;
|
|
9916
|
-
/**
|
|
9917
|
-
* Optional callback to format a field value into a DetailsItemContent.
|
|
9918
|
-
* Return `undefined` to fall back to built-in formatting.
|
|
9919
|
-
*/
|
|
9920
|
-
valueFormatter?: FormCardValueFormatter;
|
|
9921
|
-
};
|
|
9922
|
-
|
|
9923
|
-
declare type FormCardValueFormatter = (key: string, value: unknown, meta: {
|
|
9924
|
-
fieldType?: string;
|
|
9925
|
-
customFieldName?: string;
|
|
9926
|
-
}) => DetailsItemContent | DetailsItemContent[] | undefined;
|
|
9927
|
-
|
|
9928
10054
|
export declare interface FormCardValueFormatterEntry<T = unknown> {
|
|
9929
10055
|
/** Scope to a specific form. Omit to apply to all forms. */
|
|
9930
10056
|
formName?: string;
|
|
@@ -9942,17 +10068,6 @@ export declare function FormCardValueFormatterProvider({ children, }: {
|
|
|
9942
10068
|
children: ReactNode;
|
|
9943
10069
|
}): JSX_2.Element;
|
|
9944
10070
|
|
|
9945
|
-
/**
|
|
9946
|
-
* Canvas panel content for forms.
|
|
9947
|
-
* Propless — reads the active form from coagent shared state
|
|
9948
|
-
* and delegates to VirtualFormContent for rendering.
|
|
9949
|
-
*/
|
|
9950
|
-
export declare function FormContent(): ReactNode;
|
|
9951
|
-
|
|
9952
|
-
export declare namespace FormContent {
|
|
9953
|
-
var displayName: string;
|
|
9954
|
-
}
|
|
9955
|
-
|
|
9956
10071
|
/* Excluded from this release type: FormDefinitionItem */
|
|
9957
10072
|
|
|
9958
10073
|
/**
|
|
@@ -9992,13 +10107,6 @@ export declare interface FormFieldProps {
|
|
|
9992
10107
|
ref?: React.RefCallback<HTMLElement>;
|
|
9993
10108
|
}
|
|
9994
10109
|
|
|
9995
|
-
export declare function FormHeader({ title, description, module, onClose, }: {
|
|
9996
|
-
title: string;
|
|
9997
|
-
description?: string;
|
|
9998
|
-
module?: ModuleId;
|
|
9999
|
-
onClose: () => void;
|
|
10000
|
-
}): JSX_2.Element;
|
|
10001
|
-
|
|
10002
10110
|
/** Fraction tokens for proportional widths */
|
|
10003
10111
|
export declare type FractionToken = "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "5/6";
|
|
10004
10112
|
|
|
@@ -10085,7 +10193,7 @@ export declare interface GaugeChartConfig {
|
|
|
10085
10193
|
*/
|
|
10086
10194
|
export declare function GaugeChartSkeleton(): JSX_2.Element;
|
|
10087
10195
|
|
|
10088
|
-
declare interface GaugeComputation {
|
|
10196
|
+
export declare interface GaugeComputation {
|
|
10089
10197
|
datasetId: string;
|
|
10090
10198
|
aggregation: AggregationType;
|
|
10091
10199
|
column?: string;
|
|
@@ -10339,7 +10447,7 @@ export declare interface HeatmapChartConfig {
|
|
|
10339
10447
|
*/
|
|
10340
10448
|
export declare function HeatmapChartSkeleton(): JSX_2.Element;
|
|
10341
10449
|
|
|
10342
|
-
declare interface HeatmapComputation {
|
|
10450
|
+
export declare interface HeatmapComputation {
|
|
10343
10451
|
datasetId: string;
|
|
10344
10452
|
xAxis: string;
|
|
10345
10453
|
yAxis: string;
|
|
@@ -10870,16 +10978,6 @@ export declare const linkVariants: readonly ["link", "unstyled", "mention"];
|
|
|
10870
10978
|
*/
|
|
10871
10979
|
declare type ListCollectionProps<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = CollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, ListVisualizationOptions<Record, Filters, Sortings>>;
|
|
10872
10980
|
|
|
10873
|
-
/**
|
|
10874
|
-
* External store for saved (user-edited) dashboard configs.
|
|
10875
|
-
*
|
|
10876
|
-
* This lives outside React's component tree so that `F0ChatReportCard`
|
|
10877
|
-
* (rendered inside CopilotKit's message list) can subscribe to changes
|
|
10878
|
-
* via `useSyncExternalStore` — which works regardless of whether the
|
|
10879
|
-
* React context provider is an ancestor.
|
|
10880
|
-
*/
|
|
10881
|
-
declare type Listener = () => void;
|
|
10882
|
-
|
|
10883
10981
|
declare type ListPropertyDefinition<R, Sortings extends SortingsDefinition> = WithOptionalSorting_2<R, Sortings> & PropertyDefinition_2<R>;
|
|
10884
10982
|
|
|
10885
10983
|
declare type ListVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition> = {
|
|
@@ -10989,18 +11087,34 @@ export declare interface Message {
|
|
|
10989
11087
|
dateTime: string;
|
|
10990
11088
|
}
|
|
10991
11089
|
|
|
10992
|
-
export declare const MessageSources: ({ sources }: MessageSourcesProps) => JSX_2.Element | null;
|
|
10993
|
-
|
|
10994
11090
|
/**
|
|
10995
|
-
*
|
|
11091
|
+
* Loose message shape used by the headless container and its
|
|
11092
|
+
* subcomponents. Mirrors the CopilotKit `Message`/`AIMessage` shape
|
|
11093
|
+
* (which the bridge builds upstream) but is owned by f0 so the
|
|
11094
|
+
* headless boundary doesn't import from `@copilotkit/shared`.
|
|
11095
|
+
*
|
|
11096
|
+
* Most fields are optional / wide on purpose — the headless renders
|
|
11097
|
+
* what it finds and ignores the rest.
|
|
10996
11098
|
*/
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11099
|
+
declare type Message_3 = {
|
|
11100
|
+
id?: string;
|
|
11101
|
+
role?: string;
|
|
11102
|
+
content?: unknown;
|
|
11103
|
+
toolCalls?: Array<{
|
|
11104
|
+
id: string;
|
|
11105
|
+
type?: string;
|
|
11106
|
+
function?: {
|
|
11107
|
+
name: string;
|
|
11108
|
+
arguments: string;
|
|
11109
|
+
};
|
|
11110
|
+
}>;
|
|
11111
|
+
generativeUI?: () => unknown;
|
|
11112
|
+
rawData?: unknown;
|
|
11113
|
+
[key: string]: any;
|
|
11002
11114
|
};
|
|
11003
11115
|
|
|
11116
|
+
declare type MessageSlotComponent = ComponentType<any>;
|
|
11117
|
+
|
|
11004
11118
|
declare type MetadataAction = {
|
|
11005
11119
|
icon: IconType;
|
|
11006
11120
|
label: string;
|
|
@@ -11091,7 +11205,7 @@ declare interface MetadataProps {
|
|
|
11091
11205
|
collapse?: boolean;
|
|
11092
11206
|
}
|
|
11093
11207
|
|
|
11094
|
-
declare interface MetricComputation {
|
|
11208
|
+
export declare interface MetricComputation {
|
|
11095
11209
|
datasetId: string;
|
|
11096
11210
|
aggregation: AggregationType;
|
|
11097
11211
|
column?: string;
|
|
@@ -11762,10 +11876,6 @@ export declare type OnSelectItemsCallback<R extends RecordType, Filters extends
|
|
|
11762
11876
|
|
|
11763
11877
|
declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
11764
11878
|
|
|
11765
|
-
export declare type OrchestratorThinkingResult = {
|
|
11766
|
-
inGroup?: boolean;
|
|
11767
|
-
};
|
|
11768
|
-
|
|
11769
11879
|
/** Overflow values */
|
|
11770
11880
|
export declare type OverflowToken = "visible" | "hidden" | "auto" | "scroll";
|
|
11771
11881
|
|
|
@@ -11952,7 +12062,7 @@ declare interface PieChartSkeletonProps {
|
|
|
11952
12062
|
innerRadius?: number;
|
|
11953
12063
|
}
|
|
11954
12064
|
|
|
11955
|
-
declare interface PieComputation {
|
|
12065
|
+
export declare interface PieComputation {
|
|
11956
12066
|
datasetId: string;
|
|
11957
12067
|
nameColumn: string;
|
|
11958
12068
|
valueColumn: string;
|
|
@@ -11962,6 +12072,14 @@ declare interface PieComputation {
|
|
|
11962
12072
|
limit?: number;
|
|
11963
12073
|
}
|
|
11964
12074
|
|
|
12075
|
+
export declare function PongBall({ size, className, style }: PongBallProps): JSX_2.Element;
|
|
12076
|
+
|
|
12077
|
+
declare interface PongBallProps {
|
|
12078
|
+
size?: number;
|
|
12079
|
+
className?: string;
|
|
12080
|
+
style?: React.CSSProperties;
|
|
12081
|
+
}
|
|
12082
|
+
|
|
11965
12083
|
declare type PopupSize = "sm" | "md" | "lg";
|
|
11966
12084
|
|
|
11967
12085
|
/** CSS position */
|
|
@@ -12299,7 +12417,7 @@ declare interface RadarChartSkeletonProps {
|
|
|
12299
12417
|
showLegend?: boolean;
|
|
12300
12418
|
}
|
|
12301
12419
|
|
|
12302
|
-
declare interface RadarComputation {
|
|
12420
|
+
export declare interface RadarComputation {
|
|
12303
12421
|
datasetId: string;
|
|
12304
12422
|
seriesColumn: string;
|
|
12305
12423
|
indicators: Array<{
|
|
@@ -12361,6 +12479,62 @@ declare type RelaxedNumericWithFormatter = Omit<NumericWithFormatter, "numericVa
|
|
|
12361
12479
|
numericValue: Numeric;
|
|
12362
12480
|
};
|
|
12363
12481
|
|
|
12482
|
+
/**
|
|
12483
|
+
* Pre-processed turn ready to render. The bridge (F0AiChat/Connected*)
|
|
12484
|
+
* assembles these by filtering CopilotKit bookkeeping, expanding AG-UI
|
|
12485
|
+
* tool-call messages, and analysing role/stream state. The headless
|
|
12486
|
+
* container iterates them as-is — no message-shape inspection.
|
|
12487
|
+
*
|
|
12488
|
+
* A turn renders as: leading user messages → optional Thinking section →
|
|
12489
|
+
* assistant messages → optional inline live-thinking message → optional
|
|
12490
|
+
* end-of-turn indicator → optional feedback footer.
|
|
12491
|
+
*/
|
|
12492
|
+
export declare type RenderableTurn = {
|
|
12493
|
+
/** Messages rendered before the thinking section (typically the user message). */
|
|
12494
|
+
userMessages: Message_3[];
|
|
12495
|
+
/**
|
|
12496
|
+
* Optional collapsible "thinking" header rendered between user and
|
|
12497
|
+
* assistant blocks. Titles are pre-parsed upstream.
|
|
12498
|
+
*/
|
|
12499
|
+
thinking?: {
|
|
12500
|
+
titles: string[];
|
|
12501
|
+
/**
|
|
12502
|
+
* Whether this turn is still streaming. The collapsible stays locked
|
|
12503
|
+
* open while true (no chevron, no toggle) and auto-collapses on the
|
|
12504
|
+
* transition to false.
|
|
12505
|
+
*/
|
|
12506
|
+
inProgress?: boolean;
|
|
12507
|
+
/**
|
|
12508
|
+
* Whether the agent already moved from reflecting to writing the
|
|
12509
|
+
* response. When true every item renders as `completed`; otherwise
|
|
12510
|
+
* the last item is `executing` while the rest are `completed`.
|
|
12511
|
+
*/
|
|
12512
|
+
isWriting?: boolean;
|
|
12513
|
+
};
|
|
12514
|
+
/** Messages rendered after the thinking section (assistant replies). */
|
|
12515
|
+
assistantMessages: Message_3[];
|
|
12516
|
+
/** True while the agent is still producing content for this turn. */
|
|
12517
|
+
isInProgress: boolean;
|
|
12518
|
+
/**
|
|
12519
|
+
* Optional end-of-turn indicator:
|
|
12520
|
+
* - `"thinking"`: agent is running but hasn't emitted any assistant output
|
|
12521
|
+
* yet (renders an action item titled "Thinking...").
|
|
12522
|
+
* - `"activity"`: agent is streaming with some assistant output already
|
|
12523
|
+
* visible (renders an empty action item).
|
|
12524
|
+
*/
|
|
12525
|
+
endIndicator?: "thinking" | "activity";
|
|
12526
|
+
/**
|
|
12527
|
+
* Optional feedback footer (thumbs + copy button). When omitted, the
|
|
12528
|
+
* turn renders without feedback affordances.
|
|
12529
|
+
*/
|
|
12530
|
+
feedback?: {
|
|
12531
|
+
/** Concatenated assistant content for the copy button. */
|
|
12532
|
+
content: string;
|
|
12533
|
+
/** Reference message attached to feedback submissions. */
|
|
12534
|
+
targetMessage: Message_3;
|
|
12535
|
+
};
|
|
12536
|
+
};
|
|
12537
|
+
|
|
12364
12538
|
/**
|
|
12365
12539
|
* Callback provided to F0Form / F0WizardForm that renders custom fields
|
|
12366
12540
|
* identified by `customFieldName` instead of an inline `render` function.
|
|
@@ -12623,13 +12797,6 @@ export declare type RowSpanToken = "1" | "2" | "3" | "4" | "5" | "6" | "full";
|
|
|
12623
12797
|
/** Grid row count (1–6 + none) */
|
|
12624
12798
|
export declare type RowsToken = "1" | "2" | "3" | "4" | "5" | "6" | "none";
|
|
12625
12799
|
|
|
12626
|
-
export declare const savedDashboardConfigStore: {
|
|
12627
|
-
get(toolCallId: string): ChatDashboardConfig | undefined;
|
|
12628
|
-
set(toolCallId: string, config: ChatDashboardConfig): void;
|
|
12629
|
-
subscribe(listener: Listener): () => void;
|
|
12630
|
-
getSnapshot(): number;
|
|
12631
|
-
};
|
|
12632
|
-
|
|
12633
12800
|
export declare type SearchFilterDefinition = BaseFilterDefinition<"search">;
|
|
12634
12801
|
|
|
12635
12802
|
declare type SearchOptions = {
|
|
@@ -12896,28 +13063,6 @@ export declare type SortingsStateMultiple = {
|
|
|
12896
13063
|
|
|
12897
13064
|
export declare type SortOrder = "asc" | "desc";
|
|
12898
13065
|
|
|
12899
|
-
/**
|
|
12900
|
-
* Source object for message sources
|
|
12901
|
-
*/
|
|
12902
|
-
export declare type Source = {
|
|
12903
|
-
/**
|
|
12904
|
-
* Title of the source
|
|
12905
|
-
*/
|
|
12906
|
-
title: string;
|
|
12907
|
-
/**
|
|
12908
|
-
* Optional link URL
|
|
12909
|
-
*/
|
|
12910
|
-
link?: string;
|
|
12911
|
-
/**
|
|
12912
|
-
* Optional icon name (from @/icons/app)
|
|
12913
|
-
*/
|
|
12914
|
-
icon?: string;
|
|
12915
|
-
/**
|
|
12916
|
-
* Whether to open link in new tab
|
|
12917
|
-
*/
|
|
12918
|
-
targetBlank?: boolean;
|
|
12919
|
-
};
|
|
12920
|
-
|
|
12921
13066
|
/**
|
|
12922
13067
|
* Token types for F0Box props.
|
|
12923
13068
|
* These map to the design tokens defined in @factorialco/f0-core.
|
|
@@ -13582,6 +13727,37 @@ declare const textVariants: (props?: ({
|
|
|
13582
13727
|
className?: ClassValue;
|
|
13583
13728
|
})) | undefined) => string;
|
|
13584
13729
|
|
|
13730
|
+
/** Props for the Thinking collapsible section. */
|
|
13731
|
+
export declare type ThinkingProps = {
|
|
13732
|
+
/** Pre-parsed step titles to show inside the collapsed group. */
|
|
13733
|
+
titles: string[];
|
|
13734
|
+
/** Section heading (defaults to "Thoughts" from i18n). */
|
|
13735
|
+
title?: string;
|
|
13736
|
+
/**
|
|
13737
|
+
* Whether the turn is still streaming. Locks the collapsible open (no
|
|
13738
|
+
* chevron, no user toggle) while true and auto-collapses on the
|
|
13739
|
+
* transition to false. After that, the user can toggle freely.
|
|
13740
|
+
*/
|
|
13741
|
+
inProgress?: boolean;
|
|
13742
|
+
/**
|
|
13743
|
+
* Whether the agent already started writing the response. When true,
|
|
13744
|
+
* every item renders as `completed` regardless of `inProgress`.
|
|
13745
|
+
*/
|
|
13746
|
+
isWriting?: boolean;
|
|
13747
|
+
};
|
|
13748
|
+
|
|
13749
|
+
export declare interface ThreadActionHandlers {
|
|
13750
|
+
onSelect: (threadId: string, title: string) => void;
|
|
13751
|
+
onPin: (id: string) => void;
|
|
13752
|
+
onUnpin: (id: string) => void;
|
|
13753
|
+
onDelete: (id: string) => void;
|
|
13754
|
+
}
|
|
13755
|
+
|
|
13756
|
+
export declare interface ThreadGroup {
|
|
13757
|
+
key: DateGroup;
|
|
13758
|
+
threads: ChatThread[];
|
|
13759
|
+
}
|
|
13760
|
+
|
|
13585
13761
|
export declare type TimelineRowStatus = (typeof timelineRowStatuses)[number];
|
|
13586
13762
|
|
|
13587
13763
|
export declare const timelineRowStatuses: readonly ["completed", "in-progress", "not-started"];
|
|
@@ -13862,6 +14038,15 @@ declare interface UpsellRequestResponseDialogProps {
|
|
|
13862
14038
|
portalContainer?: HTMLElement | null;
|
|
13863
14039
|
}
|
|
13864
14040
|
|
|
14041
|
+
/**
|
|
14042
|
+
* Read the AiChat context. Returns an inert fallback when no provider
|
|
14043
|
+
* is mounted — that case is intentional in `ApplicationFrame`, which
|
|
14044
|
+
* renders chat-aware components in both the AI-enabled tree and the
|
|
14045
|
+
* promotion-chat tree.
|
|
14046
|
+
*
|
|
14047
|
+
* Most consumers don't need to think about this — they're rendered
|
|
14048
|
+
* under `<F0AiChatProvider>` and receive the real context.
|
|
14049
|
+
*/
|
|
13865
14050
|
export declare function useAiChat(): AiChatProviderReturnValue;
|
|
13866
14051
|
|
|
13867
14052
|
export declare function useAiChatTranslations(): AiChatTranslations;
|
|
@@ -13873,6 +14058,40 @@ export declare function useAiChatTranslations(): AiChatTranslations;
|
|
|
13873
14058
|
*/
|
|
13874
14059
|
export declare function useCanvasEntity(type: string | undefined): CanvasEntityDefinition<any> | undefined;
|
|
13875
14060
|
|
|
14061
|
+
/**
|
|
14062
|
+
* Headless chat-history state manager. Pure UI logic — the caller injects
|
|
14063
|
+
* `fetchThreads` and `deleteThread` callbacks so this hook never embeds
|
|
14064
|
+
* URLs, auth headers or fetch wiring. Manages pinned threads in
|
|
14065
|
+
* localStorage and the threads list (loading/error/data).
|
|
14066
|
+
*/
|
|
14067
|
+
export declare function useChatHistory({ enabled, fetchThreads: fetchThreadsCb, deleteThread: deleteThreadCb, }: UseChatHistoryOptions): UseChatHistoryReturn;
|
|
14068
|
+
|
|
14069
|
+
declare type UseChatHistoryOptions = {
|
|
14070
|
+
/** When true, fetches threads on mount. Default: `false`. */
|
|
14071
|
+
enabled?: boolean;
|
|
14072
|
+
/**
|
|
14073
|
+
* Async callback that returns the list of threads. The host owns the
|
|
14074
|
+
* URL/auth/fetch — this hook only calls the callback and manages state.
|
|
14075
|
+
*/
|
|
14076
|
+
fetchThreads: () => Promise<ChatThread[]>;
|
|
14077
|
+
/**
|
|
14078
|
+
* Async callback that deletes a thread by id. Should throw or reject on
|
|
14079
|
+
* failure; the hook will then re-fetch to restore consistency.
|
|
14080
|
+
*/
|
|
14081
|
+
deleteThread: (id: string) => Promise<void>;
|
|
14082
|
+
};
|
|
14083
|
+
|
|
14084
|
+
declare type UseChatHistoryReturn = {
|
|
14085
|
+
threads: ChatThread[];
|
|
14086
|
+
isLoading: boolean;
|
|
14087
|
+
error: string | null;
|
|
14088
|
+
refetch: () => void;
|
|
14089
|
+
pinnedIds: Set<string>;
|
|
14090
|
+
pinThread: (id: string) => void;
|
|
14091
|
+
unpinThread: (id: string) => void;
|
|
14092
|
+
deleteThread: (id: string) => Promise<void>;
|
|
14093
|
+
};
|
|
14094
|
+
|
|
13876
14095
|
/**
|
|
13877
14096
|
* A core React hook that manages data fetching, state management, and pagination within the Collections ecosystem.
|
|
13878
14097
|
*
|
|
@@ -14282,8 +14501,22 @@ export declare interface User {
|
|
|
14282
14501
|
imageUrl: string;
|
|
14283
14502
|
}
|
|
14284
14503
|
|
|
14504
|
+
export declare type UserBinaryPart = {
|
|
14505
|
+
type: "binary";
|
|
14506
|
+
url: string;
|
|
14507
|
+
filename: string;
|
|
14508
|
+
mimeType: string;
|
|
14509
|
+
};
|
|
14510
|
+
|
|
14285
14511
|
export declare const useReducedMotion: () => boolean;
|
|
14286
14512
|
|
|
14513
|
+
export declare type UserReaction = "like" | "dislike";
|
|
14514
|
+
|
|
14515
|
+
export declare type UserTextPart = {
|
|
14516
|
+
type: "text";
|
|
14517
|
+
text: string;
|
|
14518
|
+
};
|
|
14519
|
+
|
|
14287
14520
|
/**
|
|
14288
14521
|
* Hook to convert a Zod schema with F0 configurations into a FormDefinitionItem array.
|
|
14289
14522
|
*
|
|
@@ -14556,11 +14789,23 @@ export declare const WeekStartDay: {
|
|
|
14556
14789
|
export declare type WeekStartsOn = (typeof WeekStartDay)[keyof typeof WeekStartDay];
|
|
14557
14790
|
|
|
14558
14791
|
/**
|
|
14559
|
-
*
|
|
14792
|
+
* A welcome-screen group rendered as an outline button in the welcome row.
|
|
14793
|
+
* Clicking the group opens a popover listing its `items`.
|
|
14560
14794
|
*/
|
|
14561
14795
|
export declare type WelcomeScreenSuggestion = {
|
|
14562
14796
|
icon: IconType;
|
|
14563
|
-
|
|
14797
|
+
label: string;
|
|
14798
|
+
items: WelcomeScreenSuggestionItem[];
|
|
14799
|
+
};
|
|
14800
|
+
|
|
14801
|
+
/**
|
|
14802
|
+
* A single sub-suggestion shown inside a welcome-screen group's popover.
|
|
14803
|
+
* The `title` is the label users see; `prompt` is what gets sent to the AI
|
|
14804
|
+
* when they click (falls back to `title` when omitted). They can diverge so
|
|
14805
|
+
* you can show a short, scannable title while sending a fully-formed prompt.
|
|
14806
|
+
*/
|
|
14807
|
+
export declare type WelcomeScreenSuggestionItem = {
|
|
14808
|
+
title: string;
|
|
14564
14809
|
prompt?: string;
|
|
14565
14810
|
};
|
|
14566
14811
|
|
|
@@ -14667,6 +14912,11 @@ declare module "gridstack" {
|
|
|
14667
14912
|
}
|
|
14668
14913
|
|
|
14669
14914
|
|
|
14915
|
+
declare namespace Calendar {
|
|
14916
|
+
var displayName: string;
|
|
14917
|
+
}
|
|
14918
|
+
|
|
14919
|
+
|
|
14670
14920
|
declare module "@tiptap/core" {
|
|
14671
14921
|
interface Commands<ReturnType> {
|
|
14672
14922
|
aiBlock: {
|
|
@@ -14716,11 +14966,6 @@ declare module "@tiptap/core" {
|
|
|
14716
14966
|
}
|
|
14717
14967
|
|
|
14718
14968
|
|
|
14719
|
-
declare namespace Calendar {
|
|
14720
|
-
var displayName: string;
|
|
14721
|
-
}
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
14969
|
declare namespace F0GraphNodeWrapperInner {
|
|
14725
14970
|
var displayName: string;
|
|
14726
14971
|
}
|