@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/ai.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { baseColors } from '@factorialco/f0-core';
|
|
|
5
5
|
import { ClassValue } from 'cva';
|
|
6
6
|
import { CompanyItemProps } from './types';
|
|
7
7
|
import { ComponentProps } from 'react';
|
|
8
|
+
import { ComponentType } from 'react';
|
|
8
9
|
import { CopilotKitProps } from '@copilotkit/react-core';
|
|
9
10
|
import { EmployeeItemProps } from './types';
|
|
10
11
|
import { F0TagBalanceProps as F0TagBalanceProps_2 } from './types';
|
|
@@ -14,7 +15,6 @@ import { F0TagTeamProps } from './types';
|
|
|
14
15
|
import { f1Colors } from '@factorialco/f0-core';
|
|
15
16
|
import { ForwardedRef } from 'react';
|
|
16
17
|
import { ForwardRefExoticComponent } from 'react';
|
|
17
|
-
import { InputProps } from '@copilotkit/react-ui';
|
|
18
18
|
import { ItemProps } from './types';
|
|
19
19
|
import { JSX as JSX_2 } from 'react';
|
|
20
20
|
import { LocalAudioTrack } from 'livekit-client';
|
|
@@ -23,8 +23,10 @@ import { Props as Props_3 } from './types';
|
|
|
23
23
|
import * as React_2 from 'react';
|
|
24
24
|
import { ReactElement } from 'react';
|
|
25
25
|
import { ReactNode } from 'react';
|
|
26
|
+
import { ReactPortal } from 'react';
|
|
26
27
|
import { Ref } from 'react';
|
|
27
28
|
import { RefAttributes } from 'react';
|
|
29
|
+
import { RefObject } from 'react';
|
|
28
30
|
import { RemoteAudioTrack } from 'livekit-client';
|
|
29
31
|
import { SVGProps } from 'react';
|
|
30
32
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
@@ -46,7 +48,7 @@ export declare const actionItemStatuses: readonly ["inProgress", "executing", "c
|
|
|
46
48
|
|
|
47
49
|
/* Excluded from this release type: AgentState */
|
|
48
50
|
|
|
49
|
-
declare type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
51
|
+
export declare type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
54
|
* Credits configuration for the AI chat.
|
|
@@ -188,12 +190,6 @@ export declare type AiChatProviderProps = {
|
|
|
188
190
|
* them here so canvas logic lives in one place.
|
|
189
191
|
*/
|
|
190
192
|
canvasEntities?: Record<string, CanvasEntityDefinition>;
|
|
191
|
-
/**
|
|
192
|
-
* Available tool hints that the user can activate to provide intent context
|
|
193
|
-
* to the AI. Renders a selector button next to the send button.
|
|
194
|
-
* Only one tool hint can be active at a time.
|
|
195
|
-
*/
|
|
196
|
-
toolHints?: AiChatToolHint[];
|
|
197
193
|
/**
|
|
198
194
|
* Credits configuration. When provided, a credits button is shown in the chat header.
|
|
199
195
|
* Groups fetchUsage, upgradePlanUrl, and company/plan display info.
|
|
@@ -396,7 +392,7 @@ declare type AiChatProviderReturnValue = {
|
|
|
396
392
|
pendingQuote: PendingQuote | null;
|
|
397
393
|
/** Set the pending quote (pass null to clear). */
|
|
398
394
|
setPendingQuote: React.Dispatch<React.SetStateAction<PendingQuote | null>>;
|
|
399
|
-
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "canvasEntities" | "
|
|
395
|
+
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "canvasEntities" | "credits" | "employeeCredits" | "creditWarning" | "fileAttachments"> & {
|
|
400
396
|
/** The current canvas content, or null when canvas is closed */
|
|
401
397
|
canvasContent: CanvasContent | null;
|
|
402
398
|
/** Open the canvas panel with the given content */
|
|
@@ -409,10 +405,6 @@ declare type AiChatProviderReturnValue = {
|
|
|
409
405
|
openGame: (game: "pong") => void;
|
|
410
406
|
/** Close the active mini-game overlay */
|
|
411
407
|
closeGame: () => void;
|
|
412
|
-
/** The currently active tool hint, or null if none is selected */
|
|
413
|
-
activeToolHint: AiChatToolHint | null;
|
|
414
|
-
/** Set the active tool hint (pass null to clear) */
|
|
415
|
-
setActiveToolHint: React.Dispatch<React.SetStateAction<AiChatToolHint | null>>;
|
|
416
408
|
};
|
|
417
409
|
|
|
418
410
|
/**
|
|
@@ -434,7 +426,6 @@ declare interface AiChatState {
|
|
|
434
426
|
entityRefs?: EntityRefs;
|
|
435
427
|
canvasActions?: CanvasActions;
|
|
436
428
|
canvasEntities?: Record<string, CanvasEntityDefinition>;
|
|
437
|
-
toolHints?: AiChatToolHint[];
|
|
438
429
|
credits?: AiChatCredits;
|
|
439
430
|
employeeCredits?: AiChatEmployeeCredits;
|
|
440
431
|
creditWarning?: AiChatCreditWarning;
|
|
@@ -460,32 +451,10 @@ declare interface AiChatState {
|
|
|
460
451
|
runtimeFetch?: typeof fetch;
|
|
461
452
|
}
|
|
462
453
|
|
|
463
|
-
/**
|
|
464
|
-
* A tool hint that can be activated to prepend invisible context to the user's
|
|
465
|
-
* message, telling the AI about the user's intent (e.g. "generate tables",
|
|
466
|
-
* "data analysis"). Similar to Gemini's tool selector UI.
|
|
467
|
-
*
|
|
468
|
-
* Only one tool hint can be active at a time. It persists across messages
|
|
469
|
-
* until the user explicitly removes it.
|
|
470
|
-
*/
|
|
471
|
-
export declare type AiChatToolHint = {
|
|
472
|
-
/** Unique identifier for this tool hint */
|
|
473
|
-
id: string;
|
|
474
|
-
/** Display label shown in the selector and chip */
|
|
475
|
-
label: string;
|
|
476
|
-
/** Optional icon shown in the selector and chip */
|
|
477
|
-
icon?: IconType;
|
|
478
|
-
/**
|
|
479
|
-
* Prompt text injected as invisible context before the user's message.
|
|
480
|
-
* The AI receives this but the user never sees it in the chat.
|
|
481
|
-
*/
|
|
482
|
-
prompt: string;
|
|
483
|
-
};
|
|
484
|
-
|
|
485
454
|
declare type AiChatTrackingOptions = {
|
|
486
455
|
onVisibility?: () => void;
|
|
487
456
|
onClose?: () => void;
|
|
488
|
-
onWelcomeSuggestionClick?: (
|
|
457
|
+
onWelcomeSuggestionClick?: (item: WelcomeScreenSuggestionItem) => void;
|
|
489
458
|
onNewChat?: () => void;
|
|
490
459
|
onMessage?: (message: Message) => void;
|
|
491
460
|
};
|
|
@@ -533,6 +502,9 @@ export declare type AiInsightCardContent = {
|
|
|
533
502
|
invertStatus?: boolean;
|
|
534
503
|
};
|
|
535
504
|
|
|
505
|
+
/** Assistant-flavoured `Message`. Same shape — alias for self-documentation. */
|
|
506
|
+
declare type AIMessage_2 = Message_2;
|
|
507
|
+
|
|
536
508
|
/**
|
|
537
509
|
* Default AI chat translations — derived from the global defaultTranslations
|
|
538
510
|
* to avoid manual duplication.
|
|
@@ -553,13 +525,6 @@ export declare const aiTranslations: {
|
|
|
553
525
|
readonly thoughtsGroupTitle: "Reflection";
|
|
554
526
|
readonly resourcesGroupTitle: "Resources";
|
|
555
527
|
readonly thinking: "Thinking...";
|
|
556
|
-
readonly closeDashboard: "Close dashboard";
|
|
557
|
-
readonly unsavedChanges: "Unsaved changes";
|
|
558
|
-
readonly saveChanges: "Save changes";
|
|
559
|
-
readonly discardChanges: "Discard";
|
|
560
|
-
readonly saveAsChanges: "Save as";
|
|
561
|
-
readonly exportTable: "Download table";
|
|
562
|
-
readonly generatedTableFilename: "OneGeneratedTable";
|
|
563
528
|
readonly feedbackModal: {
|
|
564
529
|
readonly positive: {
|
|
565
530
|
readonly title: "What did you like about this response?";
|
|
@@ -572,7 +537,6 @@ export declare const aiTranslations: {
|
|
|
572
537
|
readonly placeholder: "Share what didn’t work";
|
|
573
538
|
};
|
|
574
539
|
};
|
|
575
|
-
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
576
540
|
readonly expandChat: "Expand chat";
|
|
577
541
|
readonly collapseChat: "Collapse chat";
|
|
578
542
|
readonly chatHistory: "Chat history";
|
|
@@ -590,7 +554,6 @@ export declare const aiTranslations: {
|
|
|
590
554
|
readonly deleteChat: "Delete chat";
|
|
591
555
|
readonly ask: "Ask One";
|
|
592
556
|
readonly view: "View";
|
|
593
|
-
readonly tools: "Tools";
|
|
594
557
|
readonly entityRef: {
|
|
595
558
|
readonly candidate: {
|
|
596
559
|
readonly source: "Source";
|
|
@@ -612,42 +575,22 @@ export declare const aiTranslations: {
|
|
|
612
575
|
readonly needMoreCredits: "Need more credits?";
|
|
613
576
|
};
|
|
614
577
|
readonly reportCard: {
|
|
615
|
-
readonly reportLabel: "Report";
|
|
616
578
|
readonly tableLabel: "Table";
|
|
617
579
|
readonly openButton: "Open";
|
|
618
580
|
};
|
|
619
581
|
readonly formCard: {
|
|
620
582
|
readonly moreFields: "Open to see all fields";
|
|
621
583
|
};
|
|
622
|
-
readonly
|
|
623
|
-
readonly
|
|
624
|
-
readonly
|
|
625
|
-
readonly
|
|
626
|
-
readonly saveAs: "Save as";
|
|
627
|
-
readonly saveDialog: {
|
|
628
|
-
readonly title: "Save dashboard";
|
|
629
|
-
readonly titleLabel: "Title";
|
|
630
|
-
readonly descriptionLabel: "Description";
|
|
631
|
-
readonly descriptionPlaceholder: "Add a description (optional)";
|
|
632
|
-
readonly save: "Save";
|
|
633
|
-
readonly cancel: "Cancel";
|
|
634
|
-
};
|
|
635
|
-
readonly status: {
|
|
636
|
-
readonly saved: "Saved";
|
|
637
|
-
readonly draft: "Draft";
|
|
638
|
-
readonly unsaved: "Unsaved";
|
|
639
|
-
};
|
|
640
|
-
readonly statusLabel: "Status";
|
|
641
|
-
readonly lastEdited: "Last edited";
|
|
642
|
-
readonly createdBy: "Created by";
|
|
584
|
+
readonly aiTable: {
|
|
585
|
+
readonly title: "Table";
|
|
586
|
+
readonly downloadExcel: "Download Excel";
|
|
587
|
+
readonly downloadCsv: "Download CSV";
|
|
643
588
|
};
|
|
644
589
|
readonly dataDownload: {
|
|
645
590
|
readonly title: "Download";
|
|
646
591
|
readonly download: "Download {{format}}";
|
|
647
592
|
readonly exportDashboard: "Export dashboard as {{format}}";
|
|
648
|
-
readonly export: "Export";
|
|
649
593
|
readonly exporting: "Exporting…";
|
|
650
|
-
readonly rows: "{{amount}} rows";
|
|
651
594
|
};
|
|
652
595
|
readonly dashboardItem: {
|
|
653
596
|
readonly chartType: "Chart type";
|
|
@@ -667,11 +610,6 @@ export declare const aiTranslations: {
|
|
|
667
610
|
readonly soft: "You're running low on AI credits.";
|
|
668
611
|
readonly getCredits: "Get credits";
|
|
669
612
|
readonly dismiss: "Dismiss";
|
|
670
|
-
readonly messageBanner: {
|
|
671
|
-
readonly title: "This response requires credits";
|
|
672
|
-
readonly description: "Your company has run out of AI credits.";
|
|
673
|
-
readonly actionLabel: "Get credits";
|
|
674
|
-
};
|
|
675
613
|
};
|
|
676
614
|
readonly attachFile: "Attach file";
|
|
677
615
|
readonly removeFile: "Remove";
|
|
@@ -757,6 +695,14 @@ export declare type AppendToolCall = {
|
|
|
757
695
|
};
|
|
758
696
|
};
|
|
759
697
|
|
|
698
|
+
export declare type AttachedFile = {
|
|
699
|
+
id: string;
|
|
700
|
+
file: File;
|
|
701
|
+
status: "uploading" | "uploaded" | "error";
|
|
702
|
+
uploadedFile?: UploadedFile;
|
|
703
|
+
errorMessage?: string;
|
|
704
|
+
};
|
|
705
|
+
|
|
760
706
|
declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
761
707
|
size?: (typeof internalAvatarSizes)[number];
|
|
762
708
|
type?: (typeof internalAvatarTypes)[number];
|
|
@@ -903,36 +849,6 @@ export declare type CanvasActions = {
|
|
|
903
849
|
dashboard?: DashboardCanvasActions;
|
|
904
850
|
};
|
|
905
851
|
|
|
906
|
-
/**
|
|
907
|
-
* Shared inline card rendered in the AI chat for any canvas entity.
|
|
908
|
-
* Shows a module avatar, title, description, and an Open/Close toggle button.
|
|
909
|
-
* When active, displays a focus ring and the button switches to "Close".
|
|
910
|
-
*/
|
|
911
|
-
export declare function CanvasCard({ module: cardModule, title, description, onOpen, showOpenButton, onClose, isActive, children, }: CanvasCardProps): JSX_2.Element;
|
|
912
|
-
|
|
913
|
-
export declare namespace CanvasCard {
|
|
914
|
-
var displayName: string;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
export declare type CanvasCardProps = {
|
|
918
|
-
/** Module avatar to display (e.g. "analytics", "surveys", "goals") */
|
|
919
|
-
module?: ModuleId;
|
|
920
|
-
/** Primary title */
|
|
921
|
-
title: string;
|
|
922
|
-
/** Secondary description line */
|
|
923
|
-
description: string;
|
|
924
|
-
/** Called when the user clicks the "Open" button */
|
|
925
|
-
onOpen: () => void;
|
|
926
|
-
/** Whether to show the "Open" button */
|
|
927
|
-
showOpenButton?: boolean;
|
|
928
|
-
/** Called when the user clicks the "Close" button (active state) */
|
|
929
|
-
onClose: () => void;
|
|
930
|
-
/** Whether this card's content is currently shown in the canvas */
|
|
931
|
-
isActive: boolean;
|
|
932
|
-
/** Optional content rendered below the card header (e.g. a data preview) */
|
|
933
|
-
children?: React.ReactNode;
|
|
934
|
-
};
|
|
935
|
-
|
|
936
852
|
/**
|
|
937
853
|
* Discriminated union for canvas panel content.
|
|
938
854
|
* Add new entity types to this union as they are implemented.
|
|
@@ -954,13 +870,7 @@ export declare type CanvasContentBase = {
|
|
|
954
870
|
* Contract for a canvas entity type.
|
|
955
871
|
*
|
|
956
872
|
* Each entity (dashboard, survey, goal, job-posting…) implements this
|
|
957
|
-
* interface and is added to the `canvasEntities` record
|
|
958
|
-
*
|
|
959
|
-
* To add a new entity type:
|
|
960
|
-
* 1. Create a folder in `canvas/entities/<your-entity>/`
|
|
961
|
-
* 2. Define a type extending `CanvasContentBase` in `types.ts`
|
|
962
|
-
* 3. Implement and export `CanvasEntityDefinition` in `index.tsx`
|
|
963
|
-
* 4. Add the entity to the record in `canvas/registry.ts`
|
|
873
|
+
* interface and is added to the `canvasEntities` record passed to F0AiChat.
|
|
964
874
|
*/
|
|
965
875
|
export declare type CanvasEntityDefinition<T extends CanvasContentBase = CanvasContentBase> = {
|
|
966
876
|
/** Must match the `type` discriminant on the content object */
|
|
@@ -994,7 +904,7 @@ declare type CardInternalProps = F0AiInsightCardProps & {
|
|
|
994
904
|
className?: string;
|
|
995
905
|
};
|
|
996
906
|
|
|
997
|
-
declare interface ChartComputation {
|
|
907
|
+
export declare interface ChartComputation {
|
|
998
908
|
datasetId: string;
|
|
999
909
|
xAxis: string;
|
|
1000
910
|
yAxis: string;
|
|
@@ -1005,13 +915,13 @@ declare interface ChartComputation {
|
|
|
1005
915
|
limit?: number;
|
|
1006
916
|
}
|
|
1007
917
|
|
|
1008
|
-
declare interface ChatDashboardBarChartConfig extends ChatDashboardChartConfigBase {
|
|
918
|
+
export declare interface ChatDashboardBarChartConfig extends ChatDashboardChartConfigBase {
|
|
1009
919
|
type: "bar";
|
|
1010
920
|
orientation?: "vertical" | "horizontal";
|
|
1011
921
|
stacked?: boolean;
|
|
1012
922
|
}
|
|
1013
923
|
|
|
1014
|
-
declare type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig;
|
|
924
|
+
export declare type ChatDashboardChartConfig = ChatDashboardBarChartConfig | ChatDashboardLineChartConfig | ChatDashboardFunnelChartConfig | ChatDashboardRadarChartConfig | ChatDashboardPieChartConfig | ChatDashboardGaugeChartConfig | ChatDashboardHeatmapChartConfig;
|
|
1015
925
|
|
|
1016
926
|
declare interface ChatDashboardChartConfigBase {
|
|
1017
927
|
showLegend?: boolean;
|
|
@@ -1020,19 +930,19 @@ declare interface ChatDashboardChartConfigBase {
|
|
|
1020
930
|
valueFormat?: FormatPreset;
|
|
1021
931
|
}
|
|
1022
932
|
|
|
1023
|
-
declare interface ChatDashboardChartItem extends ChatDashboardItemBase {
|
|
933
|
+
export declare interface ChatDashboardChartItem extends ChatDashboardItemBase {
|
|
1024
934
|
type: "chart";
|
|
1025
935
|
chart: ChatDashboardChartConfig;
|
|
1026
936
|
computation: ChartComputation | RadarComputation | PieComputation | GaugeComputation | HeatmapComputation;
|
|
1027
937
|
}
|
|
1028
938
|
|
|
1029
|
-
declare interface ChatDashboardCollectionItem extends ChatDashboardItemBase {
|
|
939
|
+
export declare interface ChatDashboardCollectionItem extends ChatDashboardItemBase {
|
|
1030
940
|
type: "collection";
|
|
1031
941
|
columns: ChatDashboardColumn[];
|
|
1032
942
|
computation: CollectionComputation;
|
|
1033
943
|
}
|
|
1034
944
|
|
|
1035
|
-
declare interface ChatDashboardColumn {
|
|
945
|
+
export declare interface ChatDashboardColumn {
|
|
1036
946
|
/** Column key — must match a key in each row object */
|
|
1037
947
|
id: string;
|
|
1038
948
|
/** Display header label */
|
|
@@ -1077,16 +987,16 @@ export declare interface ChatDashboardConfig {
|
|
|
1077
987
|
}
|
|
1078
988
|
|
|
1079
989
|
/** Granularity options exposed by F0's `OneDateNavigator`. */
|
|
1080
|
-
declare type ChatDashboardDateNavigationGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
990
|
+
export declare type ChatDashboardDateNavigationGranularity = "day" | "week" | "month" | "quarter" | "halfyear" | "year" | "range";
|
|
1081
991
|
|
|
1082
|
-
declare interface ChatDashboardFilterDefinition {
|
|
992
|
+
export declare interface ChatDashboardFilterDefinition {
|
|
1083
993
|
type: "in";
|
|
1084
994
|
label: string;
|
|
1085
995
|
column: string;
|
|
1086
996
|
datasetId: string;
|
|
1087
997
|
}
|
|
1088
998
|
|
|
1089
|
-
declare interface ChatDashboardFunnelChartConfig {
|
|
999
|
+
export declare interface ChatDashboardFunnelChartConfig {
|
|
1090
1000
|
type: "funnel";
|
|
1091
1001
|
sort?: "descending" | "ascending" | "none";
|
|
1092
1002
|
orient?: "horizontal" | "vertical";
|
|
@@ -1097,7 +1007,7 @@ declare interface ChatDashboardFunnelChartConfig {
|
|
|
1097
1007
|
valueFormat?: FormatPreset;
|
|
1098
1008
|
}
|
|
1099
1009
|
|
|
1100
|
-
declare interface ChatDashboardGaugeChartConfig {
|
|
1010
|
+
export declare interface ChatDashboardGaugeChartConfig {
|
|
1101
1011
|
type: "gauge";
|
|
1102
1012
|
min?: number;
|
|
1103
1013
|
max?: number;
|
|
@@ -1105,7 +1015,7 @@ declare interface ChatDashboardGaugeChartConfig {
|
|
|
1105
1015
|
valueFormat?: FormatPreset;
|
|
1106
1016
|
}
|
|
1107
1017
|
|
|
1108
|
-
declare interface ChatDashboardHeatmapChartConfig {
|
|
1018
|
+
export declare interface ChatDashboardHeatmapChartConfig {
|
|
1109
1019
|
type: "heatmap";
|
|
1110
1020
|
min?: number;
|
|
1111
1021
|
max?: number;
|
|
@@ -1114,7 +1024,7 @@ declare interface ChatDashboardHeatmapChartConfig {
|
|
|
1114
1024
|
valueFormat?: FormatPreset;
|
|
1115
1025
|
}
|
|
1116
1026
|
|
|
1117
|
-
declare type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
1027
|
+
export declare type ChatDashboardItem = ChatDashboardChartItem | ChatDashboardMetricItem | ChatDashboardCollectionItem;
|
|
1118
1028
|
|
|
1119
1029
|
declare interface ChatDashboardItemBase {
|
|
1120
1030
|
id: string;
|
|
@@ -1153,14 +1063,14 @@ declare interface ChatDashboardItemBase {
|
|
|
1153
1063
|
y?: number;
|
|
1154
1064
|
}
|
|
1155
1065
|
|
|
1156
|
-
declare interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
1066
|
+
export declare interface ChatDashboardLineChartConfig extends ChatDashboardChartConfigBase {
|
|
1157
1067
|
type: "line";
|
|
1158
1068
|
lineType?: "linear" | "smooth" | "step";
|
|
1159
1069
|
showArea?: boolean;
|
|
1160
1070
|
showDots?: boolean;
|
|
1161
1071
|
}
|
|
1162
1072
|
|
|
1163
|
-
declare type ChatDashboardMetricFormat = {
|
|
1073
|
+
export declare type ChatDashboardMetricFormat = {
|
|
1164
1074
|
type: "number";
|
|
1165
1075
|
} | {
|
|
1166
1076
|
type: "currency";
|
|
@@ -1173,7 +1083,7 @@ declare type ChatDashboardMetricFormat = {
|
|
|
1173
1083
|
prefix?: string;
|
|
1174
1084
|
};
|
|
1175
1085
|
|
|
1176
|
-
declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
1086
|
+
export declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
1177
1087
|
type: "metric";
|
|
1178
1088
|
format?: ChatDashboardMetricFormat;
|
|
1179
1089
|
decimals?: number;
|
|
@@ -1187,7 +1097,7 @@ declare interface ChatDashboardMetricItem extends ChatDashboardItemBase {
|
|
|
1187
1097
|
* grid. The `column` and `datasetId` are agent-side metadata used by the
|
|
1188
1098
|
* compute SQL builder; they are stripped before reaching F0AnalyticsDashboard.
|
|
1189
1099
|
*/
|
|
1190
|
-
declare type ChatDashboardNavigationFilterDefinition = {
|
|
1100
|
+
export declare type ChatDashboardNavigationFilterDefinition = {
|
|
1191
1101
|
type: "dateNavigation";
|
|
1192
1102
|
label: string;
|
|
1193
1103
|
column: string;
|
|
@@ -1196,7 +1106,7 @@ declare type ChatDashboardNavigationFilterDefinition = {
|
|
|
1196
1106
|
defaultGranularity?: ChatDashboardDateNavigationGranularity;
|
|
1197
1107
|
};
|
|
1198
1108
|
|
|
1199
|
-
declare interface ChatDashboardPieChartConfig {
|
|
1109
|
+
export declare interface ChatDashboardPieChartConfig {
|
|
1200
1110
|
type: "pie";
|
|
1201
1111
|
innerRadius?: number;
|
|
1202
1112
|
showLegend?: boolean;
|
|
@@ -1205,22 +1115,24 @@ declare interface ChatDashboardPieChartConfig {
|
|
|
1205
1115
|
valueFormat?: FormatPreset;
|
|
1206
1116
|
}
|
|
1207
1117
|
|
|
1208
|
-
declare interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfigBase {
|
|
1118
|
+
export declare interface ChatDashboardRadarChartConfig extends ChatDashboardChartConfigBase {
|
|
1209
1119
|
type: "radar";
|
|
1210
1120
|
showArea?: boolean;
|
|
1211
1121
|
}
|
|
1212
1122
|
|
|
1213
1123
|
export declare const ChatSpinner: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1214
1124
|
|
|
1215
|
-
declare type
|
|
1216
|
-
|
|
1217
|
-
|
|
1125
|
+
export declare type ChatThread = {
|
|
1126
|
+
id: string;
|
|
1127
|
+
title: string;
|
|
1128
|
+
createdAt: string;
|
|
1129
|
+
updatedAt: string;
|
|
1218
1130
|
};
|
|
1219
1131
|
|
|
1220
1132
|
/**
|
|
1221
1133
|
* A single selectable option within a clarifying question step.
|
|
1222
1134
|
*/
|
|
1223
|
-
declare interface ClarifyingOption {
|
|
1135
|
+
export declare interface ClarifyingOption {
|
|
1224
1136
|
/** Unique identifier for this option */
|
|
1225
1137
|
id: string;
|
|
1226
1138
|
/** Display label shown to the user */
|
|
@@ -1291,7 +1203,7 @@ export declare interface ClarifyingStepData {
|
|
|
1291
1203
|
* A step enriched with the user's current interaction state.
|
|
1292
1204
|
* Used internally by the controller to track selections per step.
|
|
1293
1205
|
*/
|
|
1294
|
-
declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
1206
|
+
export declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
1295
1207
|
/** IDs of currently selected options */
|
|
1296
1208
|
selectedOptionIds: string[];
|
|
1297
1209
|
/** Current custom answer text (preserved even when deactivated) */
|
|
@@ -1300,11 +1212,7 @@ declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
|
1300
1212
|
isCustomAnswerActive: boolean;
|
|
1301
1213
|
}
|
|
1302
1214
|
|
|
1303
|
-
export declare
|
|
1304
|
-
onClick: () => void;
|
|
1305
|
-
}): JSX_2.Element;
|
|
1306
|
-
|
|
1307
|
-
declare interface CollectionComputation {
|
|
1215
|
+
export declare interface CollectionComputation {
|
|
1308
1216
|
datasetId: string;
|
|
1309
1217
|
sortBy?: string;
|
|
1310
1218
|
sortOrder?: "asc" | "desc";
|
|
@@ -1383,51 +1291,7 @@ export declare type DashboardCanvasContent = CanvasContentBase & {
|
|
|
1383
1291
|
savedDashboardUnsaved?: boolean;
|
|
1384
1292
|
};
|
|
1385
1293
|
|
|
1386
|
-
export declare
|
|
1387
|
-
content: DashboardCanvasContent;
|
|
1388
|
-
children: ReactNode;
|
|
1389
|
-
}): ReactNode;
|
|
1390
|
-
|
|
1391
|
-
/**
|
|
1392
|
-
* Dashboard-specific card that wraps CanvasCard with config-store
|
|
1393
|
-
* subscription logic. Re-renders when the user edits and saves
|
|
1394
|
-
* the dashboard layout.
|
|
1395
|
-
*
|
|
1396
|
-
* All saved-dashboard state (id, category, unsaved) is passed through
|
|
1397
|
-
* from the action arguments. The meta store overrides props after
|
|
1398
|
-
* save/create operations so close/re-open preserves the latest state.
|
|
1399
|
-
*/
|
|
1400
|
-
export declare function DashboardCard({ config: originalConfig, apiConfig, savedDashboardId: propSavedId, savedDashboardCategory: propSavedCategory, savedDashboardDescription: propSavedDescription, savedDashboardUnsaved: propSavedUnsaved, }: DashboardCardProps): JSX_2.Element;
|
|
1401
|
-
|
|
1402
|
-
export declare namespace DashboardCard {
|
|
1403
|
-
var displayName: string;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
export declare type DashboardCardProps = {
|
|
1407
|
-
/** The original dashboard config from the agent */
|
|
1408
|
-
config: ChatDashboardConfig;
|
|
1409
|
-
/** API config for server-side dashboard computation */
|
|
1410
|
-
apiConfig: {
|
|
1411
|
-
baseUrl: string;
|
|
1412
|
-
headers: Record<string, string>;
|
|
1413
|
-
runtimeFetch?: typeof fetch;
|
|
1414
|
-
};
|
|
1415
|
-
/** Present when the dashboard is a pre-saved dashboard */
|
|
1416
|
-
savedDashboardId?: string;
|
|
1417
|
-
/** Category of the saved dashboard */
|
|
1418
|
-
savedDashboardCategory?: string;
|
|
1419
|
-
/** Description of the saved dashboard */
|
|
1420
|
-
savedDashboardDescription?: string;
|
|
1421
|
-
/** Whether the dashboard has unsaved changes */
|
|
1422
|
-
savedDashboardUnsaved?: boolean;
|
|
1423
|
-
};
|
|
1424
|
-
|
|
1425
|
-
export declare function DashboardContent({ content, refreshKey: _parentRefreshKey, }: {
|
|
1426
|
-
content: DashboardCanvasContent;
|
|
1427
|
-
refreshKey: number;
|
|
1428
|
-
}): ReactNode;
|
|
1429
|
-
|
|
1430
|
-
declare interface DashboardFetchSpec {
|
|
1294
|
+
export declare interface DashboardFetchSpec {
|
|
1431
1295
|
fetch: Array<{
|
|
1432
1296
|
toolId: string;
|
|
1433
1297
|
args: Record<string, unknown>;
|
|
@@ -1436,18 +1300,6 @@ declare interface DashboardFetchSpec {
|
|
|
1436
1300
|
columnLabels?: Record<string, string>;
|
|
1437
1301
|
}
|
|
1438
1302
|
|
|
1439
|
-
/**
|
|
1440
|
-
* Canvas header for the dashboard entity. Layout, title, status tag,
|
|
1441
|
-
* metadata strip, and the action row (export + close) are all delegated
|
|
1442
|
-
* to `ResourceHeader`. The close button is just another `secondaryAction`
|
|
1443
|
-
* with `hideLabel`, so the shared header component doesn't need to know
|
|
1444
|
-
* about canvas-specific close affordances.
|
|
1445
|
-
*/
|
|
1446
|
-
export declare function DashboardHeader({ content, onClose, }: {
|
|
1447
|
-
content: DashboardCanvasContent;
|
|
1448
|
-
onClose: () => void;
|
|
1449
|
-
}): JSX_2.Element;
|
|
1450
|
-
|
|
1451
1303
|
/**
|
|
1452
1304
|
* Creator + last-edited metadata for a saved dashboard. Returned by
|
|
1453
1305
|
* `DashboardCanvasActions.getMetadata` so the header can render the author
|
|
@@ -1459,7 +1311,7 @@ export declare function DashboardHeader({ content, onClose, }: {
|
|
|
1459
1311
|
* list page since this conversation was first opened). The header prefers
|
|
1460
1312
|
* these values over the ones baked into `content` / `config`.
|
|
1461
1313
|
*/
|
|
1462
|
-
declare type DashboardMetadata = {
|
|
1314
|
+
export declare type DashboardMetadata = {
|
|
1463
1315
|
/**
|
|
1464
1316
|
* Latest persisted title. When present, the header displays this instead
|
|
1465
1317
|
* of `content.title` so the chat-history snapshot never shadows the
|
|
@@ -1498,36 +1350,14 @@ export declare type DataDownloadCanvasContent = CanvasContentBase & {
|
|
|
1498
1350
|
markdown?: string;
|
|
1499
1351
|
};
|
|
1500
1352
|
|
|
1501
|
-
export declare function DataDownloadCard({ title: titleProp, dataset, filename, markdown, }: DataDownloadCardProps): JSX_2.Element;
|
|
1502
|
-
|
|
1503
|
-
export declare namespace DataDownloadCard {
|
|
1504
|
-
var displayName: string;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
export declare type DataDownloadCardProps = {
|
|
1508
|
-
title?: string;
|
|
1509
|
-
dataset: DataDownloadDataset;
|
|
1510
|
-
filename?: string;
|
|
1511
|
-
markdown?: string;
|
|
1512
|
-
};
|
|
1513
|
-
|
|
1514
|
-
export declare function DataDownloadContent({ content, }: {
|
|
1515
|
-
content: DataDownloadCanvasContent;
|
|
1516
|
-
refreshKey?: number;
|
|
1517
|
-
}): JSX_2.Element;
|
|
1518
|
-
|
|
1519
1353
|
/**
|
|
1520
1354
|
* Inline dataset for client-side file generation (Excel / CSV).
|
|
1521
1355
|
* Sent by the agent with the raw query results.
|
|
1522
1356
|
*/
|
|
1523
1357
|
export declare type DataDownloadDataset = {
|
|
1524
|
-
/**
|
|
1525
|
-
* Column headers in display order.
|
|
1526
|
-
*/
|
|
1358
|
+
/** Column headers in display order. */
|
|
1527
1359
|
columns: string[];
|
|
1528
|
-
/**
|
|
1529
|
-
* Array of row objects keyed by column name.
|
|
1530
|
-
*/
|
|
1360
|
+
/** Array of row objects keyed by column name. */
|
|
1531
1361
|
rows: Record<string, unknown>[];
|
|
1532
1362
|
/**
|
|
1533
1363
|
* Total number of rows returned by the query (before truncation).
|
|
@@ -1546,16 +1376,6 @@ export declare type DataDownloadDataset = {
|
|
|
1546
1376
|
columnLabels?: Record<string, string>;
|
|
1547
1377
|
};
|
|
1548
1378
|
|
|
1549
|
-
export declare function DataDownloadHeader({ content, onClose, }: {
|
|
1550
|
-
content: DataDownloadCanvasContent;
|
|
1551
|
-
onClose: () => void;
|
|
1552
|
-
}): JSX_2.Element;
|
|
1553
|
-
|
|
1554
|
-
export declare function DataDownloadProvider({ content, children, }: {
|
|
1555
|
-
content: DataDownloadCanvasContent;
|
|
1556
|
-
children: ReactNode;
|
|
1557
|
-
}): JSX_2.Element;
|
|
1558
|
-
|
|
1559
1379
|
declare const DataList: ForwardRefExoticComponent<DataListProps & RefAttributes<HTMLUListElement>> & {
|
|
1560
1380
|
Item: ForwardRefExoticComponent<ItemProps & RefAttributes<HTMLLIElement>>;
|
|
1561
1381
|
CompanyItem: ForwardRefExoticComponent<CompanyItemProps & RefAttributes<HTMLLIElement>>;
|
|
@@ -1577,6 +1397,8 @@ declare type DataListProps = {
|
|
|
1577
1397
|
isHorizontal?: boolean;
|
|
1578
1398
|
};
|
|
1579
1399
|
|
|
1400
|
+
export declare type DateGroup = "today" | "yesterday" | "thisMonth" | "older";
|
|
1401
|
+
|
|
1580
1402
|
export declare const defaultTranslations: {
|
|
1581
1403
|
readonly countries: {
|
|
1582
1404
|
ad: string;
|
|
@@ -1961,13 +1783,6 @@ export declare const defaultTranslations: {
|
|
|
1961
1783
|
readonly thoughtsGroupTitle: "Reflection";
|
|
1962
1784
|
readonly resourcesGroupTitle: "Resources";
|
|
1963
1785
|
readonly thinking: "Thinking...";
|
|
1964
|
-
readonly closeDashboard: "Close dashboard";
|
|
1965
|
-
readonly unsavedChanges: "Unsaved changes";
|
|
1966
|
-
readonly saveChanges: "Save changes";
|
|
1967
|
-
readonly discardChanges: "Discard";
|
|
1968
|
-
readonly saveAsChanges: "Save as";
|
|
1969
|
-
readonly exportTable: "Download table";
|
|
1970
|
-
readonly generatedTableFilename: "OneGeneratedTable";
|
|
1971
1786
|
readonly feedbackModal: {
|
|
1972
1787
|
readonly positive: {
|
|
1973
1788
|
readonly title: "What did you like about this response?";
|
|
@@ -1980,7 +1795,6 @@ export declare const defaultTranslations: {
|
|
|
1980
1795
|
readonly placeholder: "Share what didn’t work";
|
|
1981
1796
|
};
|
|
1982
1797
|
};
|
|
1983
|
-
readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
|
|
1984
1798
|
readonly expandChat: "Expand chat";
|
|
1985
1799
|
readonly collapseChat: "Collapse chat";
|
|
1986
1800
|
readonly chatHistory: "Chat history";
|
|
@@ -1998,7 +1812,6 @@ export declare const defaultTranslations: {
|
|
|
1998
1812
|
readonly deleteChat: "Delete chat";
|
|
1999
1813
|
readonly ask: "Ask One";
|
|
2000
1814
|
readonly view: "View";
|
|
2001
|
-
readonly tools: "Tools";
|
|
2002
1815
|
readonly entityRef: {
|
|
2003
1816
|
readonly candidate: {
|
|
2004
1817
|
readonly source: "Source";
|
|
@@ -2020,42 +1833,22 @@ export declare const defaultTranslations: {
|
|
|
2020
1833
|
readonly needMoreCredits: "Need more credits?";
|
|
2021
1834
|
};
|
|
2022
1835
|
readonly reportCard: {
|
|
2023
|
-
readonly reportLabel: "Report";
|
|
2024
1836
|
readonly tableLabel: "Table";
|
|
2025
1837
|
readonly openButton: "Open";
|
|
2026
1838
|
};
|
|
2027
1839
|
readonly formCard: {
|
|
2028
1840
|
readonly moreFields: "Open to see all fields";
|
|
2029
1841
|
};
|
|
2030
|
-
readonly
|
|
2031
|
-
readonly
|
|
2032
|
-
readonly
|
|
2033
|
-
readonly
|
|
2034
|
-
readonly saveAs: "Save as";
|
|
2035
|
-
readonly saveDialog: {
|
|
2036
|
-
readonly title: "Save dashboard";
|
|
2037
|
-
readonly titleLabel: "Title";
|
|
2038
|
-
readonly descriptionLabel: "Description";
|
|
2039
|
-
readonly descriptionPlaceholder: "Add a description (optional)";
|
|
2040
|
-
readonly save: "Save";
|
|
2041
|
-
readonly cancel: "Cancel";
|
|
2042
|
-
};
|
|
2043
|
-
readonly status: {
|
|
2044
|
-
readonly saved: "Saved";
|
|
2045
|
-
readonly draft: "Draft";
|
|
2046
|
-
readonly unsaved: "Unsaved";
|
|
2047
|
-
};
|
|
2048
|
-
readonly statusLabel: "Status";
|
|
2049
|
-
readonly lastEdited: "Last edited";
|
|
2050
|
-
readonly createdBy: "Created by";
|
|
1842
|
+
readonly aiTable: {
|
|
1843
|
+
readonly title: "Table";
|
|
1844
|
+
readonly downloadExcel: "Download Excel";
|
|
1845
|
+
readonly downloadCsv: "Download CSV";
|
|
2051
1846
|
};
|
|
2052
1847
|
readonly dataDownload: {
|
|
2053
1848
|
readonly title: "Download";
|
|
2054
1849
|
readonly download: "Download {{format}}";
|
|
2055
1850
|
readonly exportDashboard: "Export dashboard as {{format}}";
|
|
2056
|
-
readonly export: "Export";
|
|
2057
1851
|
readonly exporting: "Exporting…";
|
|
2058
|
-
readonly rows: "{{amount}} rows";
|
|
2059
1852
|
};
|
|
2060
1853
|
readonly dashboardItem: {
|
|
2061
1854
|
readonly chartType: "Chart type";
|
|
@@ -2075,11 +1868,6 @@ export declare const defaultTranslations: {
|
|
|
2075
1868
|
readonly soft: "You're running low on AI credits.";
|
|
2076
1869
|
readonly getCredits: "Get credits";
|
|
2077
1870
|
readonly dismiss: "Dismiss";
|
|
2078
|
-
readonly messageBanner: {
|
|
2079
|
-
readonly title: "This response requires credits";
|
|
2080
|
-
readonly description: "Your company has run out of AI credits.";
|
|
2081
|
-
readonly actionLabel: "Get credits";
|
|
2082
|
-
};
|
|
2083
1871
|
};
|
|
2084
1872
|
readonly attachFile: "Attach file";
|
|
2085
1873
|
readonly removeFile: "Remove";
|
|
@@ -2297,8 +2085,6 @@ export declare const defaultTranslations: {
|
|
|
2297
2085
|
};
|
|
2298
2086
|
};
|
|
2299
2087
|
readonly forms: {
|
|
2300
|
-
readonly yes: "Yes";
|
|
2301
|
-
readonly no: "No";
|
|
2302
2088
|
readonly actionBar: {
|
|
2303
2089
|
readonly unsavedChanges: "You have changes pending to be saved";
|
|
2304
2090
|
readonly saving: "Saving...";
|
|
@@ -2445,6 +2231,13 @@ declare type DetailsItemContent = (ComponentProps<typeof DataList.Item> & {
|
|
|
2445
2231
|
*/
|
|
2446
2232
|
declare type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
2447
2233
|
|
|
2234
|
+
export declare const DropOverlay: ({ visible, onFilesDropped }: DropOverlayProps) => JSX_2.Element;
|
|
2235
|
+
|
|
2236
|
+
declare interface DropOverlayProps {
|
|
2237
|
+
visible: boolean;
|
|
2238
|
+
onFilesDropped: (files: File[]) => void;
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2448
2241
|
/**
|
|
2449
2242
|
* Employee credits usage data returned by the host app.
|
|
2450
2243
|
*
|
|
@@ -2522,7 +2315,7 @@ export declare interface F0ActionItemProps {
|
|
|
2522
2315
|
/**
|
|
2523
2316
|
* The title text displayed next to the status icon
|
|
2524
2317
|
*/
|
|
2525
|
-
title
|
|
2318
|
+
title?: string;
|
|
2526
2319
|
/**
|
|
2527
2320
|
* Current status of the action item
|
|
2528
2321
|
*/
|
|
@@ -2539,16 +2332,192 @@ export declare interface F0ActionItemProps {
|
|
|
2539
2332
|
export declare const F0AiChat: () => JSX_2.Element | null;
|
|
2540
2333
|
|
|
2541
2334
|
/**
|
|
2542
|
-
*
|
|
2335
|
+
* Headless chat header. Renders a top bar with title (or thread selector),
|
|
2336
|
+
* credits popover, fullscreen toggle and close button. Has two visual
|
|
2337
|
+
* variants:
|
|
2338
|
+
* - with-history: title acts as a thread selector (clickable) — the host
|
|
2339
|
+
* wires `onOpenHistory` to mount its own history dialog.
|
|
2340
|
+
* - legacy: title is static; a "new chat" button is shown when `hasMessages`.
|
|
2341
|
+
*
|
|
2342
|
+
* Decoupled from CopilotKit and `useAiChat()` — everything via props.
|
|
2543
2343
|
*/
|
|
2544
|
-
export declare const
|
|
2344
|
+
export declare const F0AiChatHeader: ({ historyEnabled, title, currentThreadTitle, fullscreen, lockVisualizationMode, onToggleVisualizationMode, onClose, onNewChat, onOpenHistory, hasMessages, credits, employeeCredits, }: F0AiChatHeaderProps) => JSX_2.Element;
|
|
2545
2345
|
|
|
2546
|
-
export declare
|
|
2346
|
+
export declare type F0AiChatHeaderProps = {
|
|
2347
|
+
/**
|
|
2348
|
+
* When true, renders the with-history variant: the title acts as a thread
|
|
2349
|
+
* selector that triggers `onOpenHistory`. When false (default), renders
|
|
2350
|
+
* the legacy variant with `title` shown as a static heading.
|
|
2351
|
+
*/
|
|
2352
|
+
historyEnabled?: boolean;
|
|
2353
|
+
/** Static title for the legacy variant. Empty or undefined hides the heading. */
|
|
2354
|
+
title?: string;
|
|
2355
|
+
/**
|
|
2356
|
+
* With-history variant: title of the currently loaded thread, or null for
|
|
2357
|
+
* a brand-new conversation (renders the "New conversation" placeholder).
|
|
2358
|
+
*/
|
|
2359
|
+
currentThreadTitle?: string | null;
|
|
2360
|
+
/** Whether the chat is currently in fullscreen mode (controls expand/minimize icon). */
|
|
2361
|
+
fullscreen?: boolean;
|
|
2362
|
+
/** When true, hides the expand/minimize button and the history selector. */
|
|
2363
|
+
lockVisualizationMode?: boolean;
|
|
2364
|
+
/** Toggle fullscreen ↔ sidepanel. */
|
|
2365
|
+
onToggleVisualizationMode?: () => void;
|
|
2366
|
+
/** Close button (X) callback. */
|
|
2367
|
+
onClose: () => void;
|
|
2368
|
+
/**
|
|
2369
|
+
* Legacy variant only: callback for the "new chat" button. Hidden when
|
|
2370
|
+
* `hasMessages` is false (i.e. the thread is empty so a new chat would be
|
|
2371
|
+
* a no-op).
|
|
2372
|
+
*/
|
|
2373
|
+
onNewChat?: () => void;
|
|
2374
|
+
/** With-history variant: callback fired when the user clicks the title. */
|
|
2375
|
+
onOpenHistory?: () => void;
|
|
2376
|
+
/** Legacy variant gate: only renders the "new chat" button when true. */
|
|
2377
|
+
hasMessages?: boolean;
|
|
2378
|
+
/** Credits configuration. When present, renders the credits popover button. */
|
|
2379
|
+
credits?: AiChatCredits;
|
|
2380
|
+
/**
|
|
2381
|
+
* Employee-level credits configuration. When present, an employee-only
|
|
2382
|
+
* popover is rendered **instead of** the classic one (mutually exclusive
|
|
2383
|
+
* with `credits`). Hosts opt in per-employee.
|
|
2384
|
+
*/
|
|
2385
|
+
employeeCredits?: AiChatEmployeeCredits;
|
|
2386
|
+
};
|
|
2387
|
+
|
|
2388
|
+
/**
|
|
2389
|
+
* Headless chat-history dialog. Receives threads + handlers via props so
|
|
2390
|
+
* it can be wired against any backend or mocked in stories. No CopilotKit
|
|
2391
|
+
* or `useAiChat()` dependency.
|
|
2392
|
+
*/
|
|
2393
|
+
export declare const F0AiChatHistory: ({ onClose, onSelectThread, onNewChat, threads, isLoading, error, pinnedIds, onPinThread, onUnpinThread, onDeleteThread, }: F0AiChatHistoryProps) => ReactPortal;
|
|
2394
|
+
|
|
2395
|
+
export declare type F0AiChatHistoryProps = {
|
|
2396
|
+
/** Close the dialog (overlay click, ESC, or post-selection). */
|
|
2397
|
+
onClose: () => void;
|
|
2398
|
+
/** Called when the user picks a thread to load. */
|
|
2399
|
+
onSelectThread: (threadId: string, title: string) => void;
|
|
2400
|
+
/** Called when the user clicks "Start new chat". */
|
|
2401
|
+
onNewChat: () => void;
|
|
2402
|
+
/** Thread list (already fetched). */
|
|
2403
|
+
threads: ChatThread[];
|
|
2404
|
+
/** Whether the threads are still being fetched. */
|
|
2405
|
+
isLoading: boolean;
|
|
2406
|
+
/** Fetch error message, or null when no error. */
|
|
2407
|
+
error: string | null;
|
|
2408
|
+
/** Set of pinned thread IDs. */
|
|
2409
|
+
pinnedIds: Set<string>;
|
|
2410
|
+
/** Called when the user pins a thread. */
|
|
2411
|
+
onPinThread: (id: string) => void;
|
|
2412
|
+
/** Called when the user unpins a thread. */
|
|
2413
|
+
onUnpinThread: (id: string) => void;
|
|
2414
|
+
/** Called when the user deletes a thread (may be async). */
|
|
2415
|
+
onDeleteThread: (id: string) => Promise<void> | void;
|
|
2416
|
+
};
|
|
2547
2417
|
|
|
2548
2418
|
/**
|
|
2549
2419
|
* @experimental This is an experimental component use it at your own risk
|
|
2550
2420
|
*/
|
|
2551
|
-
export declare const
|
|
2421
|
+
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;
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* Headless chat composer.
|
|
2425
|
+
*
|
|
2426
|
+
* Owns local UI state (text, cursor, attached files, mention popover) and
|
|
2427
|
+
* emits a structured payload via `onSubmit`. The consumer decides what to
|
|
2428
|
+
* do with it (forward to CopilotKit, log it, mock it…). It carries no
|
|
2429
|
+
* coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
|
|
2430
|
+
* provide the wiring.
|
|
2431
|
+
*/
|
|
2432
|
+
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;
|
|
2433
|
+
|
|
2434
|
+
export declare type F0AiChatTextAreaProps = {
|
|
2435
|
+
ref: RefObject<HTMLDivElement>;
|
|
2436
|
+
/** Emitted when the user submits. Awaited so the textarea can stay disabled. */
|
|
2437
|
+
onSubmit: (payload: F0AiChatTextAreaSubmitPayload) => void | Promise<void>;
|
|
2438
|
+
/** Called when the user clicks the stop button while a response is streaming. */
|
|
2439
|
+
onStop?: () => void;
|
|
2440
|
+
/** Whether a response is currently streaming. Switches the submit button to "stop". */
|
|
2441
|
+
inProgress?: boolean;
|
|
2442
|
+
/**
|
|
2443
|
+
* Optional gate run before submission. Return `false` to abort the send
|
|
2444
|
+
* (e.g. show a quota dialog). The textarea stays focused and the input
|
|
2445
|
+
* is preserved.
|
|
2446
|
+
*/
|
|
2447
|
+
onBeforeSubmit?: () => boolean | Promise<boolean>;
|
|
2448
|
+
/** Rotating placeholders for the typewriter effect. Empty/single-entry skips the typewriter. */
|
|
2449
|
+
placeholders?: string[];
|
|
2450
|
+
/** Credit warning banner shown above the composer. */
|
|
2451
|
+
creditWarning?: AiChatCreditWarning;
|
|
2452
|
+
/**
|
|
2453
|
+
* Clarifying question to render in place of the input. When non-null the
|
|
2454
|
+
* panel takes over the composer surface and submission is blocked.
|
|
2455
|
+
*/
|
|
2456
|
+
clarifyingQuestion?: ClarifyingQuestionState | null;
|
|
2457
|
+
/** Pending context shown as a chip; prepended invisibly on submit. */
|
|
2458
|
+
pendingContext?: PendingContext | null;
|
|
2459
|
+
/** Called when the user dismisses pending context (or it gets consumed on submit). */
|
|
2460
|
+
onPendingContextChange?: (context: PendingContext | null) => void;
|
|
2461
|
+
/** Pending quote shown as a chip above the textarea. */
|
|
2462
|
+
pendingQuote?: PendingQuote | null;
|
|
2463
|
+
/** Called when the user dismisses the quote (or it gets consumed on submit). */
|
|
2464
|
+
onPendingQuoteChange?: (quote: PendingQuote | null) => void;
|
|
2465
|
+
/** File attachment configuration. When omitted, attachments are disabled. */
|
|
2466
|
+
fileAttachments?: AiChatFileAttachmentConfig;
|
|
2467
|
+
/** Async search used by the @-mention popover. When omitted, mentions are disabled. */
|
|
2468
|
+
searchPersons?: (query: string) => Promise<PersonProfile[]>;
|
|
2469
|
+
/**
|
|
2470
|
+
* Registers a callback that lets external drop zones forward dropped
|
|
2471
|
+
* files to this textarea's file-attachment pipeline. The textarea calls
|
|
2472
|
+
* the registrar with the handler on mount and with `null` on unmount.
|
|
2473
|
+
*/
|
|
2474
|
+
onProcessFilesRef?: (handler: ((files: File[]) => void) | null) => void;
|
|
2475
|
+
/**
|
|
2476
|
+
* Optional disclaimer text + link rendered below the textarea. Hidden on
|
|
2477
|
+
* the welcome screen of the fullscreen layout to give the footer room.
|
|
2478
|
+
*/
|
|
2479
|
+
disclaimer?: AiChatDisclaimer;
|
|
2480
|
+
/**
|
|
2481
|
+
* Optional footer (e.g. powered-by, legal copy) rendered below the
|
|
2482
|
+
* textarea on the welcome screen.
|
|
2483
|
+
*/
|
|
2484
|
+
footer?: ReactNode;
|
|
2485
|
+
/**
|
|
2486
|
+
* Whether the chat is currently in its welcome state (no messages yet).
|
|
2487
|
+
* Controls footer visibility and welcome-screen-only layout tweaks.
|
|
2488
|
+
*/
|
|
2489
|
+
isWelcomeScreen?: boolean;
|
|
2490
|
+
/**
|
|
2491
|
+
* Grouped suggestions rendered as outline buttons above the composer on
|
|
2492
|
+
* the welcome screen. Clicking a group opens a single popover (above the
|
|
2493
|
+
* row, left-aligned, spanning the composer width) with that group's items.
|
|
2494
|
+
* Hovering an item previews its prompt in the textarea placeholder.
|
|
2495
|
+
*/
|
|
2496
|
+
welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
|
|
2497
|
+
/** Called when the user clicks a sub-suggestion. */
|
|
2498
|
+
onSuggestionClick?: (item: WelcomeScreenSuggestionItem) => void;
|
|
2499
|
+
/**
|
|
2500
|
+
* When true, the composer adopts the fullscreen layout: the welcome
|
|
2501
|
+
* footer is pushed to the bottom and the disclaimer is hidden so the
|
|
2502
|
+
* footer is the only thing under the textarea.
|
|
2503
|
+
*/
|
|
2504
|
+
fullscreen?: boolean;
|
|
2505
|
+
};
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* Payload emitted by `F0AiChatTextArea` when the user submits.
|
|
2509
|
+
*
|
|
2510
|
+
* `text` already contains the inline markup the renderer expects:
|
|
2511
|
+
* `<entity-ref>` tags for @mentions, `<reply-quote>` for the quoted
|
|
2512
|
+
* fragment, and HTML-escaped user-typed text. The consumer decides how
|
|
2513
|
+
* to wrap it (plain string vs multipart message) when forwarding to
|
|
2514
|
+
* the agent.
|
|
2515
|
+
*/
|
|
2516
|
+
export declare type F0AiChatTextAreaSubmitPayload = {
|
|
2517
|
+
text: string;
|
|
2518
|
+
files: UploadedFile[];
|
|
2519
|
+
context: PendingContext | null;
|
|
2520
|
+
};
|
|
2552
2521
|
|
|
2553
2522
|
export declare const F0AiInsightCard: WithDataTestIdReturnType<ForwardRefExoticComponent<F0AiInsightCardPublicProps & RefAttributes<HTMLDivElement>> & {
|
|
2554
2523
|
Skeleton: () => JSX_2.Element;
|
|
@@ -2594,6 +2563,92 @@ export declare class F0AiMask {
|
|
|
2594
2563
|
private render;
|
|
2595
2564
|
}
|
|
2596
2565
|
|
|
2566
|
+
export declare const F0AiMessagesContainer: (props: F0AiMessagesContainerProps) => JSX_2.Element;
|
|
2567
|
+
|
|
2568
|
+
export declare type F0AiMessagesContainerProps = {
|
|
2569
|
+
/** Optional override for the assistant bubble component. */
|
|
2570
|
+
AssistantMessage?: MessageSlotComponent;
|
|
2571
|
+
/** Optional override for the user bubble component. */
|
|
2572
|
+
UserMessage?: MessageSlotComponent;
|
|
2573
|
+
/** Called when the user triggers regeneration on an assistant message. */
|
|
2574
|
+
onRegenerate?: (messageId: string) => void;
|
|
2575
|
+
/** Called when the user copies an assistant message's content. */
|
|
2576
|
+
onCopy?: (content: string) => void;
|
|
2577
|
+
/** Pre-processed turns to render (assembled by the connected wrapper). */
|
|
2578
|
+
turns: RenderableTurn[];
|
|
2579
|
+
/** Show a skeleton in place of the turns while a thread is being fetched. */
|
|
2580
|
+
isLoadingThread?: boolean;
|
|
2581
|
+
/** Optional React node rendered inline at the end of the list (e.g. CopilotKit interrupt). */
|
|
2582
|
+
interrupt?: ReactNode;
|
|
2583
|
+
/** Greeting shown above the initial message in the welcome screen. */
|
|
2584
|
+
greeting?: string;
|
|
2585
|
+
/** Initial message(s) shown in the welcome screen, or a default if omitted. */
|
|
2586
|
+
initialMessage?: string | string[];
|
|
2587
|
+
/** Optional click on the One icon (factorial uses it for the pong easter egg). */
|
|
2588
|
+
onWelcomeIconClick?: () => void;
|
|
2589
|
+
/** Returns a React node for an assistant message's tool call, or null. */
|
|
2590
|
+
renderToolCall?: F0AssistantMessageExtraProps["renderToolCall"];
|
|
2591
|
+
/** Called when the user selects text and clicks Reply (user or assistant bubble). */
|
|
2592
|
+
onReplyQuote?: (text: string) => void;
|
|
2593
|
+
/** Called when an assistant message finishes generating — for analytics. */
|
|
2594
|
+
onAssistantMessageRendered?: (message: Message_2) => void;
|
|
2595
|
+
/** Disables auto-scrollIntoView on new user messages (fullscreen sets false). */
|
|
2596
|
+
autoScrollUserIntoView?: boolean;
|
|
2597
|
+
/**
|
|
2598
|
+
* Renders the markdown content of user/assistant messages. The connected
|
|
2599
|
+
* wrapper provides a CopilotKit + f0-markdown-renderers implementation;
|
|
2600
|
+
* standalone consumers can omit it and a plain whitespace-preserving
|
|
2601
|
+
* fallback is used.
|
|
2602
|
+
*/
|
|
2603
|
+
renderMarkdown?: (content: string) => ReactNode;
|
|
2604
|
+
/** When omitted, feedback (thumbs + modal) is hidden. */
|
|
2605
|
+
feedback?: FeedbackConfig;
|
|
2606
|
+
/** Pause turnMinHeight observer (e.g. while a clarifying panel is open). */
|
|
2607
|
+
freezeLayout?: boolean;
|
|
2608
|
+
/** Disable the top/bottom scroll shadows. */
|
|
2609
|
+
noShadows?: boolean;
|
|
2610
|
+
/** Passthrough children appended after the last turn (CopilotKit parity). */
|
|
2611
|
+
children?: ReactNode;
|
|
2612
|
+
};
|
|
2613
|
+
|
|
2614
|
+
/**
|
|
2615
|
+
* Information source attached to an assistant message.
|
|
2616
|
+
*/
|
|
2617
|
+
export declare type F0AiMessageSource = {
|
|
2618
|
+
title: string;
|
|
2619
|
+
link?: string;
|
|
2620
|
+
/** Name of an icon exported by `@factorialco/f0-react/icons/app`. */
|
|
2621
|
+
icon?: string;
|
|
2622
|
+
targetBlank?: boolean;
|
|
2623
|
+
};
|
|
2624
|
+
|
|
2625
|
+
/**
|
|
2626
|
+
* Renders a collapsible group of information sources attached to an
|
|
2627
|
+
* assistant message. Sources without a `link` render as plain rows;
|
|
2628
|
+
* sources with a `link` render as clickable Actions. Pure presentational
|
|
2629
|
+
* — no hooks, no AI coupling.
|
|
2630
|
+
*/
|
|
2631
|
+
export declare function F0AiMessageSources({ sources, title: titleProp, }: F0AiMessageSourcesProps): JSX_2.Element | null;
|
|
2632
|
+
|
|
2633
|
+
export declare namespace F0AiMessageSources {
|
|
2634
|
+
var displayName: string;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
export declare type F0AiMessageSourcesProps = {
|
|
2638
|
+
sources: F0AiMessageSource[];
|
|
2639
|
+
/**
|
|
2640
|
+
* Override the section title. Defaults to the
|
|
2641
|
+
* `ai.resourcesGroupTitle` translation key.
|
|
2642
|
+
*/
|
|
2643
|
+
title?: string;
|
|
2644
|
+
};
|
|
2645
|
+
|
|
2646
|
+
export declare const F0AiPong: ({ onClose }: F0AiPongProps) => JSX_2.Element;
|
|
2647
|
+
|
|
2648
|
+
declare interface F0AiPongProps {
|
|
2649
|
+
onClose: () => void;
|
|
2650
|
+
}
|
|
2651
|
+
|
|
2597
2652
|
export declare function F0AiProposalCard(props: F0AiProposalCardProps): JSX_2.Element;
|
|
2598
2653
|
|
|
2599
2654
|
export declare namespace F0AiProposalCard {
|
|
@@ -2635,6 +2690,57 @@ export declare interface F0AiProposalCardHiddenActions {
|
|
|
2635
2690
|
|
|
2636
2691
|
export declare type F0AiProposalCardProps = F0AiProposalCardBaseProps & (F0AiProposalCardActions | F0AiProposalCardHiddenActions);
|
|
2637
2692
|
|
|
2693
|
+
/**
|
|
2694
|
+
* Compact inline table for small datasets shown directly in an AI chat
|
|
2695
|
+
* stream. Headers come from `columnLabels` when present, otherwise from
|
|
2696
|
+
* the raw column id. Shows a download dropdown (Excel / CSV) — Excel
|
|
2697
|
+
* support is loaded lazily via `xlsx`. Pure presentational — no hooks,
|
|
2698
|
+
* no AI coupling.
|
|
2699
|
+
*/
|
|
2700
|
+
export declare function F0AiTableCard({ dataset, title: titleProp, filename, }: F0AiTableCardProps): JSX_2.Element | null;
|
|
2701
|
+
|
|
2702
|
+
export declare namespace F0AiTableCard {
|
|
2703
|
+
var displayName: string;
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
export declare type F0AiTableCardProps = {
|
|
2707
|
+
/**
|
|
2708
|
+
* Tabular data to render. Reuses the same shape used by the
|
|
2709
|
+
* `dataDownload` canvas entity so the agent payload travels untouched.
|
|
2710
|
+
*/
|
|
2711
|
+
dataset: DataDownloadDataset;
|
|
2712
|
+
/**
|
|
2713
|
+
* Title shown above the table. Defaults to the `ai.aiTable.title`
|
|
2714
|
+
* translation key (English: "Table").
|
|
2715
|
+
*/
|
|
2716
|
+
title?: string;
|
|
2717
|
+
/**
|
|
2718
|
+
* Filename used for downloads (without extension). Defaults to the
|
|
2719
|
+
* slugified title, or `"table"` when no title is provided.
|
|
2720
|
+
*/
|
|
2721
|
+
filename?: string;
|
|
2722
|
+
};
|
|
2723
|
+
|
|
2724
|
+
declare type F0AssistantMessageExtraProps = {
|
|
2725
|
+
/**
|
|
2726
|
+
* Returns a React node for the message's tool call, or null when there is
|
|
2727
|
+
* nothing to render. The container's connected wrapper closes over the
|
|
2728
|
+
* full message list to call CopilotKit's lazy tool renderer; standalone
|
|
2729
|
+
* consumers can omit it.
|
|
2730
|
+
*/
|
|
2731
|
+
renderToolCall?: (message: Message_2) => ReactNode | null;
|
|
2732
|
+
/** Called when the user selects text in this message and clicks Reply. */
|
|
2733
|
+
onReplyQuote?: (text: string) => void;
|
|
2734
|
+
/** Called once the assistant message has finished generating — for analytics. */
|
|
2735
|
+
onRendered?: (message: Message_2) => void;
|
|
2736
|
+
/**
|
|
2737
|
+
* Renders the assistant text content. The connected wrapper provides a
|
|
2738
|
+
* markdown-aware implementation; standalone consumers can omit it and a
|
|
2739
|
+
* plain whitespace-preserving fallback is used instead.
|
|
2740
|
+
*/
|
|
2741
|
+
renderMarkdown?: (content: string) => ReactNode;
|
|
2742
|
+
};
|
|
2743
|
+
|
|
2638
2744
|
export declare function F0AuraVoiceAnimation({ size, state, color, colorShift, audioTrack, themeMode, className, ref, ...props }: F0AuraVoiceAnimationProps & ComponentProps<"div"> & VariantProps<typeof F0AuraVoiceAnimationVariants>): JSX_2.Element;
|
|
2639
2745
|
|
|
2640
2746
|
export declare interface F0AuraVoiceAnimationProps {
|
|
@@ -2779,6 +2885,80 @@ declare type F0AvatarTeamProps = {
|
|
|
2779
2885
|
badge?: AvatarBadge;
|
|
2780
2886
|
} & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
|
|
2781
2887
|
|
|
2888
|
+
/**
|
|
2889
|
+
* Shared inline card rendered in the AI chat for any canvas entity.
|
|
2890
|
+
* Shows a module avatar, title, description, and an Open/Close toggle button.
|
|
2891
|
+
* When active, displays a focus ring and the button switches to "Close".
|
|
2892
|
+
*/
|
|
2893
|
+
export declare function F0CanvasCard({ module: cardModule, title, description, onOpen, showOpenButton, onClose, isActive, children, }: F0CanvasCardProps): JSX_2.Element;
|
|
2894
|
+
|
|
2895
|
+
export declare namespace F0CanvasCard {
|
|
2896
|
+
var displayName: string;
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
export declare type F0CanvasCardProps = {
|
|
2900
|
+
/** Module avatar to display (e.g. "analytics", "surveys", "goals") */
|
|
2901
|
+
module?: ModuleId;
|
|
2902
|
+
/** Primary title */
|
|
2903
|
+
title: string;
|
|
2904
|
+
/** Secondary description line */
|
|
2905
|
+
description: string;
|
|
2906
|
+
/** Called when the user clicks the "Open" button */
|
|
2907
|
+
onOpen: () => void;
|
|
2908
|
+
/** Whether to show the "Open" button */
|
|
2909
|
+
showOpenButton?: boolean;
|
|
2910
|
+
/** Called when the user clicks the "Close" button (active state) */
|
|
2911
|
+
onClose: () => void;
|
|
2912
|
+
/** Whether this card's content is currently shown in the canvas */
|
|
2913
|
+
isActive: boolean;
|
|
2914
|
+
/** Optional content rendered below the card header (e.g. a data preview) */
|
|
2915
|
+
children?: React.ReactNode;
|
|
2916
|
+
};
|
|
2917
|
+
|
|
2918
|
+
/**
|
|
2919
|
+
* Entity-agnostic canvas panel that renders content alongside the chat sidebar.
|
|
2920
|
+
*
|
|
2921
|
+
* Looks up the entity definition from the `entities` prop using
|
|
2922
|
+
* `content.type` and delegates rendering of body and header actions to the
|
|
2923
|
+
* entity module. The panel shell handles animation, body scroll area, and
|
|
2924
|
+
* refreshKey bookkeeping (auto-increments when `content` changes by identity).
|
|
2925
|
+
*
|
|
2926
|
+
* Headless: no CopilotKit or `useAiChat()` dependency — the host wires
|
|
2927
|
+
* `content`, `onClose` and `entities` directly.
|
|
2928
|
+
*/
|
|
2929
|
+
export declare function F0CanvasPanel({ content, onClose, entities, }: F0CanvasPanelProps): ReactNode;
|
|
2930
|
+
|
|
2931
|
+
export declare namespace F0CanvasPanel {
|
|
2932
|
+
var displayName: string;
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
export declare type F0CanvasPanelProps = {
|
|
2936
|
+
/** Current canvas content to render. When null, the panel collapses. */
|
|
2937
|
+
content: CanvasContent | null;
|
|
2938
|
+
/** Called when the user closes the canvas. */
|
|
2939
|
+
onClose: () => void;
|
|
2940
|
+
/** Canvas entity registry keyed by `CanvasContent["type"]`. */
|
|
2941
|
+
entities?: Record<string, CanvasEntityDefinition<any>>;
|
|
2942
|
+
};
|
|
2943
|
+
|
|
2944
|
+
/**
|
|
2945
|
+
* Animated wrapper that mounts/unmounts the clarifying question panel.
|
|
2946
|
+
*
|
|
2947
|
+
* Uses Motion's native `height: "auto"` support — it measures the
|
|
2948
|
+
* content internally, so the same transition covers the initial
|
|
2949
|
+
* appearance, step changes with a different number of options, and
|
|
2950
|
+
* dismissal. No manual ResizeObserver.
|
|
2951
|
+
*
|
|
2952
|
+
* Props-driven: the entire panel state (current step, navigation,
|
|
2953
|
+
* callbacks) lives in `clarifyingQuestion`. No coupling to `useAiChat`
|
|
2954
|
+
* — embedders can construct a state object themselves.
|
|
2955
|
+
*/
|
|
2956
|
+
export declare const F0ClarifyingPanel: ({ clarifyingQuestion, }: F0ClarifyingPanelProps) => JSX_2.Element;
|
|
2957
|
+
|
|
2958
|
+
declare interface F0ClarifyingPanelProps {
|
|
2959
|
+
clarifyingQuestion: ClarifyingQuestionState;
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2782
2962
|
export declare const F0HILActionConfirmation: ({ text, confirmationText, onConfirm, cancelText, onCancel, }: F0HILActionConfirmationProps) => JSX_2.Element;
|
|
2783
2963
|
|
|
2784
2964
|
/**
|
|
@@ -2814,25 +2994,6 @@ declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<type
|
|
|
2814
2994
|
color?: "default" | "currentColor" | `#${string}` | Lowercase<NestedKeyOf<typeof f1Colors.icon>>;
|
|
2815
2995
|
}
|
|
2816
2996
|
|
|
2817
|
-
export declare const F0MessageCreditsWarning: ({ actionHref, }: F0MessageCreditsWarningProps) => JSX_2.Element;
|
|
2818
|
-
|
|
2819
|
-
/**
|
|
2820
|
-
* Args for credits warning copilot action
|
|
2821
|
-
*/
|
|
2822
|
-
export declare interface F0MessageCreditsWarningArgs {
|
|
2823
|
-
actionHref?: string;
|
|
2824
|
-
}
|
|
2825
|
-
|
|
2826
|
-
/**
|
|
2827
|
-
* Props for the F0MessageCreditsWarning component
|
|
2828
|
-
*/
|
|
2829
|
-
export declare interface F0MessageCreditsWarningProps {
|
|
2830
|
-
/**
|
|
2831
|
-
* Optional URL used by the action button.
|
|
2832
|
-
*/
|
|
2833
|
-
actionHref?: string;
|
|
2834
|
-
}
|
|
2835
|
-
|
|
2836
2997
|
export declare const F0OneIcon: ForwardRefExoticComponent<Omit<F0OneIconProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
2837
2998
|
|
|
2838
2999
|
/**
|
|
@@ -2967,10 +3128,16 @@ declare interface F0TagStatusProps {
|
|
|
2967
3128
|
|
|
2968
3129
|
declare const F0TagTeam: WithDataTestIdReturnType<ForwardRefExoticComponent<F0TagTeamProps & RefAttributes<HTMLDivElement>>>;
|
|
2969
3130
|
|
|
2970
|
-
declare type
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
3131
|
+
export declare type FeedbackConfig = {
|
|
3132
|
+
threadId: string;
|
|
3133
|
+
onThumbsUp: (msg: AIMessage_2, ctx: {
|
|
3134
|
+
threadId: string;
|
|
3135
|
+
feedback: string;
|
|
3136
|
+
}) => void;
|
|
3137
|
+
onThumbsDown: (msg: AIMessage_2, ctx: {
|
|
3138
|
+
threadId: string;
|
|
3139
|
+
feedback: string;
|
|
3140
|
+
}) => void;
|
|
2974
3141
|
};
|
|
2975
3142
|
|
|
2976
3143
|
declare type FileAvatarVariant = Extract<AvatarVariant, {
|
|
@@ -2991,7 +3158,7 @@ declare type FlagAvatarVariant = Extract<AvatarVariant, {
|
|
|
2991
3158
|
* real formatter function. The wrapper component maps these to actual
|
|
2992
3159
|
* `(value: number) => string` functions at render time.
|
|
2993
3160
|
*/
|
|
2994
|
-
declare type FormatPreset = {
|
|
3161
|
+
export declare type FormatPreset = {
|
|
2995
3162
|
type: "number";
|
|
2996
3163
|
} | {
|
|
2997
3164
|
type: "currency";
|
|
@@ -3012,45 +3179,6 @@ export declare type FormCanvasContent = CanvasContentBase & {
|
|
|
3012
3179
|
formModule?: ModuleId;
|
|
3013
3180
|
};
|
|
3014
3181
|
|
|
3015
|
-
/**
|
|
3016
|
-
* Form-specific card rendered inline in the AI chat stream.
|
|
3017
|
-
* Shows the active form name, description, and an Open/Close button
|
|
3018
|
-
* that opens the form in the canvas panel.
|
|
3019
|
-
* When field data is provided, displays a summary of field labels and values.
|
|
3020
|
-
*/
|
|
3021
|
-
export declare function FormCard({ formName, formDescription, module: formModule, cardTitle, cardDescription, fieldDescriptions, formValues, valueFormatter, }: FormCardProps): JSX_2.Element;
|
|
3022
|
-
|
|
3023
|
-
export declare namespace FormCard {
|
|
3024
|
-
var displayName: string;
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
export declare type FormCardProps = {
|
|
3028
|
-
/** Unique name of the form in the registry */
|
|
3029
|
-
formName: string;
|
|
3030
|
-
/** Optional description shown on the card */
|
|
3031
|
-
formDescription?: string;
|
|
3032
|
-
/** Module avatar for the card */
|
|
3033
|
-
module?: ModuleId;
|
|
3034
|
-
/** Custom title override for the card (set by the AI via fillForm) */
|
|
3035
|
-
cardTitle: string;
|
|
3036
|
-
/** Custom description override for the card (set by the AI via fillForm) */
|
|
3037
|
-
cardDescription: string;
|
|
3038
|
-
/** Field label metadata from the form schema */
|
|
3039
|
-
fieldDescriptions?: Record<string, FieldMeta>;
|
|
3040
|
-
/** Current form values */
|
|
3041
|
-
formValues?: Record<string, unknown>;
|
|
3042
|
-
/**
|
|
3043
|
-
* Optional callback to format a field value into a DetailsItemContent.
|
|
3044
|
-
* Return `undefined` to fall back to built-in formatting.
|
|
3045
|
-
*/
|
|
3046
|
-
valueFormatter?: FormCardValueFormatter;
|
|
3047
|
-
};
|
|
3048
|
-
|
|
3049
|
-
declare type FormCardValueFormatter = (key: string, value: unknown, meta: {
|
|
3050
|
-
fieldType?: string;
|
|
3051
|
-
customFieldName?: string;
|
|
3052
|
-
}) => DetailsItemContent | DetailsItemContent[] | undefined;
|
|
3053
|
-
|
|
3054
3182
|
export declare interface FormCardValueFormatterEntry<T = unknown> {
|
|
3055
3183
|
/** Scope to a specific form. Omit to apply to all forms. */
|
|
3056
3184
|
formName?: string;
|
|
@@ -3068,25 +3196,7 @@ export declare function FormCardValueFormatterProvider({ children, }: {
|
|
|
3068
3196
|
children: ReactNode;
|
|
3069
3197
|
}): JSX_2.Element;
|
|
3070
3198
|
|
|
3071
|
-
|
|
3072
|
-
* Canvas panel content for forms.
|
|
3073
|
-
* Propless — reads the active form from coagent shared state
|
|
3074
|
-
* and delegates to VirtualFormContent for rendering.
|
|
3075
|
-
*/
|
|
3076
|
-
export declare function FormContent(): ReactNode;
|
|
3077
|
-
|
|
3078
|
-
export declare namespace FormContent {
|
|
3079
|
-
var displayName: string;
|
|
3080
|
-
}
|
|
3081
|
-
|
|
3082
|
-
export declare function FormHeader({ title, description, module, onClose, }: {
|
|
3083
|
-
title: string;
|
|
3084
|
-
description?: string;
|
|
3085
|
-
module?: ModuleId;
|
|
3086
|
-
onClose: () => void;
|
|
3087
|
-
}): JSX_2.Element;
|
|
3088
|
-
|
|
3089
|
-
declare interface GaugeComputation {
|
|
3199
|
+
export declare interface GaugeComputation {
|
|
3090
3200
|
datasetId: string;
|
|
3091
3201
|
aggregation: AggregationType;
|
|
3092
3202
|
column?: string;
|
|
@@ -3095,7 +3205,7 @@ declare interface GaugeComputation {
|
|
|
3095
3205
|
name?: string;
|
|
3096
3206
|
}
|
|
3097
3207
|
|
|
3098
|
-
declare interface HeatmapComputation {
|
|
3208
|
+
export declare interface HeatmapComputation {
|
|
3099
3209
|
datasetId: string;
|
|
3100
3210
|
xAxis: string;
|
|
3101
3211
|
yAxis: string;
|
|
@@ -3160,16 +3270,6 @@ declare type Level = (typeof levels)[number];
|
|
|
3160
3270
|
|
|
3161
3271
|
declare const levels: readonly ["info", "warning", "critical", "positive"];
|
|
3162
3272
|
|
|
3163
|
-
/**
|
|
3164
|
-
* External store for saved (user-edited) dashboard configs.
|
|
3165
|
-
*
|
|
3166
|
-
* This lives outside React's component tree so that `F0ChatReportCard`
|
|
3167
|
-
* (rendered inside CopilotKit's message list) can subscribe to changes
|
|
3168
|
-
* via `useSyncExternalStore` — which works regardless of whether the
|
|
3169
|
-
* React context provider is an ancestor.
|
|
3170
|
-
*/
|
|
3171
|
-
declare type Listener = () => void;
|
|
3172
|
-
|
|
3173
3273
|
export declare type MaskOptions = {
|
|
3174
3274
|
/**
|
|
3175
3275
|
* The width of the Mask element.
|
|
@@ -3226,19 +3326,35 @@ export declare type MaskOptions = {
|
|
|
3226
3326
|
styles?: Partial<CSSStyleDeclaration>;
|
|
3227
3327
|
};
|
|
3228
3328
|
|
|
3229
|
-
export declare const MessageSources: ({ sources }: MessageSourcesProps) => JSX_2.Element | null;
|
|
3230
|
-
|
|
3231
3329
|
/**
|
|
3232
|
-
*
|
|
3330
|
+
* Loose message shape used by the headless container and its
|
|
3331
|
+
* subcomponents. Mirrors the CopilotKit `Message`/`AIMessage` shape
|
|
3332
|
+
* (which the bridge builds upstream) but is owned by f0 so the
|
|
3333
|
+
* headless boundary doesn't import from `@copilotkit/shared`.
|
|
3334
|
+
*
|
|
3335
|
+
* Most fields are optional / wide on purpose — the headless renders
|
|
3336
|
+
* what it finds and ignores the rest.
|
|
3233
3337
|
*/
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3338
|
+
declare type Message_2 = {
|
|
3339
|
+
id?: string;
|
|
3340
|
+
role?: string;
|
|
3341
|
+
content?: unknown;
|
|
3342
|
+
toolCalls?: Array<{
|
|
3343
|
+
id: string;
|
|
3344
|
+
type?: string;
|
|
3345
|
+
function?: {
|
|
3346
|
+
name: string;
|
|
3347
|
+
arguments: string;
|
|
3348
|
+
};
|
|
3349
|
+
}>;
|
|
3350
|
+
generativeUI?: () => unknown;
|
|
3351
|
+
rawData?: unknown;
|
|
3352
|
+
[key: string]: any;
|
|
3239
3353
|
};
|
|
3240
3354
|
|
|
3241
|
-
declare
|
|
3355
|
+
declare type MessageSlotComponent = ComponentType<any>;
|
|
3356
|
+
|
|
3357
|
+
export declare interface MetricComputation {
|
|
3242
3358
|
datasetId: string;
|
|
3243
3359
|
aggregation: AggregationType;
|
|
3244
3360
|
column?: string;
|
|
@@ -3453,10 +3569,6 @@ export declare type OneIconSize = (typeof oneIconSizes)[number];
|
|
|
3453
3569
|
|
|
3454
3570
|
export declare const oneIconSizes: readonly ["xs", "sm", "md", "lg"];
|
|
3455
3571
|
|
|
3456
|
-
export declare type OrchestratorThinkingResult = {
|
|
3457
|
-
inGroup?: boolean;
|
|
3458
|
-
};
|
|
3459
|
-
|
|
3460
3572
|
declare type PathsToStringProps<T> = T extends string ? [] : {
|
|
3461
3573
|
[K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
|
|
3462
3574
|
}[Extract<keyof T, string>];
|
|
@@ -3503,7 +3615,7 @@ export declare type PersonProfile = {
|
|
|
3503
3615
|
|
|
3504
3616
|
declare type PersonTagProps = ComponentProps<typeof F0TagPerson>;
|
|
3505
3617
|
|
|
3506
|
-
declare interface PieComputation {
|
|
3618
|
+
export declare interface PieComputation {
|
|
3507
3619
|
datasetId: string;
|
|
3508
3620
|
nameColumn: string;
|
|
3509
3621
|
valueColumn: string;
|
|
@@ -3513,6 +3625,14 @@ declare interface PieComputation {
|
|
|
3513
3625
|
limit?: number;
|
|
3514
3626
|
}
|
|
3515
3627
|
|
|
3628
|
+
export declare function PongBall({ size, className, style }: PongBallProps): JSX_2.Element;
|
|
3629
|
+
|
|
3630
|
+
declare interface PongBallProps {
|
|
3631
|
+
size?: number;
|
|
3632
|
+
className?: string;
|
|
3633
|
+
style?: React.CSSProperties;
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3516
3636
|
declare const privateProps: readonly ["className"];
|
|
3517
3637
|
|
|
3518
3638
|
declare type Props<Text extends string = string> = {
|
|
@@ -3536,7 +3656,7 @@ declare type Props_2 = {
|
|
|
3536
3656
|
customColor: string;
|
|
3537
3657
|
});
|
|
3538
3658
|
|
|
3539
|
-
declare interface RadarComputation {
|
|
3659
|
+
export declare interface RadarComputation {
|
|
3540
3660
|
datasetId: string;
|
|
3541
3661
|
seriesColumn: string;
|
|
3542
3662
|
indicators: Array<{
|
|
@@ -3557,6 +3677,62 @@ declare type RelaxedNumericWithFormatter = Omit<NumericWithFormatter, "numericVa
|
|
|
3557
3677
|
numericValue: Numeric;
|
|
3558
3678
|
};
|
|
3559
3679
|
|
|
3680
|
+
/**
|
|
3681
|
+
* Pre-processed turn ready to render. The bridge (F0AiChat/Connected*)
|
|
3682
|
+
* assembles these by filtering CopilotKit bookkeeping, expanding AG-UI
|
|
3683
|
+
* tool-call messages, and analysing role/stream state. The headless
|
|
3684
|
+
* container iterates them as-is — no message-shape inspection.
|
|
3685
|
+
*
|
|
3686
|
+
* A turn renders as: leading user messages → optional Thinking section →
|
|
3687
|
+
* assistant messages → optional inline live-thinking message → optional
|
|
3688
|
+
* end-of-turn indicator → optional feedback footer.
|
|
3689
|
+
*/
|
|
3690
|
+
export declare type RenderableTurn = {
|
|
3691
|
+
/** Messages rendered before the thinking section (typically the user message). */
|
|
3692
|
+
userMessages: Message_2[];
|
|
3693
|
+
/**
|
|
3694
|
+
* Optional collapsible "thinking" header rendered between user and
|
|
3695
|
+
* assistant blocks. Titles are pre-parsed upstream.
|
|
3696
|
+
*/
|
|
3697
|
+
thinking?: {
|
|
3698
|
+
titles: string[];
|
|
3699
|
+
/**
|
|
3700
|
+
* Whether this turn is still streaming. The collapsible stays locked
|
|
3701
|
+
* open while true (no chevron, no toggle) and auto-collapses on the
|
|
3702
|
+
* transition to false.
|
|
3703
|
+
*/
|
|
3704
|
+
inProgress?: boolean;
|
|
3705
|
+
/**
|
|
3706
|
+
* Whether the agent already moved from reflecting to writing the
|
|
3707
|
+
* response. When true every item renders as `completed`; otherwise
|
|
3708
|
+
* the last item is `executing` while the rest are `completed`.
|
|
3709
|
+
*/
|
|
3710
|
+
isWriting?: boolean;
|
|
3711
|
+
};
|
|
3712
|
+
/** Messages rendered after the thinking section (assistant replies). */
|
|
3713
|
+
assistantMessages: Message_2[];
|
|
3714
|
+
/** True while the agent is still producing content for this turn. */
|
|
3715
|
+
isInProgress: boolean;
|
|
3716
|
+
/**
|
|
3717
|
+
* Optional end-of-turn indicator:
|
|
3718
|
+
* - `"thinking"`: agent is running but hasn't emitted any assistant output
|
|
3719
|
+
* yet (renders an action item titled "Thinking...").
|
|
3720
|
+
* - `"activity"`: agent is streaming with some assistant output already
|
|
3721
|
+
* visible (renders an empty action item).
|
|
3722
|
+
*/
|
|
3723
|
+
endIndicator?: "thinking" | "activity";
|
|
3724
|
+
/**
|
|
3725
|
+
* Optional feedback footer (thumbs + copy button). When omitted, the
|
|
3726
|
+
* turn renders without feedback affordances.
|
|
3727
|
+
*/
|
|
3728
|
+
feedback?: {
|
|
3729
|
+
/** Concatenated assistant content for the copy button. */
|
|
3730
|
+
content: string;
|
|
3731
|
+
/** Reference message attached to feedback submissions. */
|
|
3732
|
+
targetMessage: Message_2;
|
|
3733
|
+
};
|
|
3734
|
+
};
|
|
3735
|
+
|
|
3560
3736
|
export declare type RequisitionProfile = {
|
|
3561
3737
|
id: string | number;
|
|
3562
3738
|
title: string;
|
|
@@ -3592,37 +3768,8 @@ export declare interface ResolvedStepAnswer {
|
|
|
3592
3768
|
cancelled?: boolean;
|
|
3593
3769
|
}
|
|
3594
3770
|
|
|
3595
|
-
export declare const savedDashboardConfigStore: {
|
|
3596
|
-
get(toolCallId: string): ChatDashboardConfig | undefined;
|
|
3597
|
-
set(toolCallId: string, config: ChatDashboardConfig): void;
|
|
3598
|
-
subscribe(listener: Listener): () => void;
|
|
3599
|
-
getSnapshot(): number;
|
|
3600
|
-
};
|
|
3601
|
-
|
|
3602
3771
|
declare type SetFormCardValueFormatter = <T = unknown>(entry: FormCardValueFormatterEntry<T>) => void;
|
|
3603
3772
|
|
|
3604
|
-
/**
|
|
3605
|
-
* Source object for message sources
|
|
3606
|
-
*/
|
|
3607
|
-
export declare type Source = {
|
|
3608
|
-
/**
|
|
3609
|
-
* Title of the source
|
|
3610
|
-
*/
|
|
3611
|
-
title: string;
|
|
3612
|
-
/**
|
|
3613
|
-
* Optional link URL
|
|
3614
|
-
*/
|
|
3615
|
-
link?: string;
|
|
3616
|
-
/**
|
|
3617
|
-
* Optional icon name (from @/icons/app)
|
|
3618
|
-
*/
|
|
3619
|
-
icon?: string;
|
|
3620
|
-
/**
|
|
3621
|
-
* Whether to open link in new tab
|
|
3622
|
-
*/
|
|
3623
|
-
targetBlank?: boolean;
|
|
3624
|
-
};
|
|
3625
|
-
|
|
3626
3773
|
export declare type SparklineDataPoint = {
|
|
3627
3774
|
value: number;
|
|
3628
3775
|
};
|
|
@@ -3676,6 +3823,37 @@ declare type TeamAvatarVariant = Extract<AvatarVariant, {
|
|
|
3676
3823
|
|
|
3677
3824
|
declare type TeamTagProps = ComponentProps<typeof F0TagTeam>;
|
|
3678
3825
|
|
|
3826
|
+
/** Props for the Thinking collapsible section. */
|
|
3827
|
+
export declare type ThinkingProps = {
|
|
3828
|
+
/** Pre-parsed step titles to show inside the collapsed group. */
|
|
3829
|
+
titles: string[];
|
|
3830
|
+
/** Section heading (defaults to "Thoughts" from i18n). */
|
|
3831
|
+
title?: string;
|
|
3832
|
+
/**
|
|
3833
|
+
* Whether the turn is still streaming. Locks the collapsible open (no
|
|
3834
|
+
* chevron, no user toggle) while true and auto-collapses on the
|
|
3835
|
+
* transition to false. After that, the user can toggle freely.
|
|
3836
|
+
*/
|
|
3837
|
+
inProgress?: boolean;
|
|
3838
|
+
/**
|
|
3839
|
+
* Whether the agent already started writing the response. When true,
|
|
3840
|
+
* every item renders as `completed` regardless of `inProgress`.
|
|
3841
|
+
*/
|
|
3842
|
+
isWriting?: boolean;
|
|
3843
|
+
};
|
|
3844
|
+
|
|
3845
|
+
export declare interface ThreadActionHandlers {
|
|
3846
|
+
onSelect: (threadId: string, title: string) => void;
|
|
3847
|
+
onPin: (id: string) => void;
|
|
3848
|
+
onUnpin: (id: string) => void;
|
|
3849
|
+
onDelete: (id: string) => void;
|
|
3850
|
+
}
|
|
3851
|
+
|
|
3852
|
+
export declare interface ThreadGroup {
|
|
3853
|
+
key: DateGroup;
|
|
3854
|
+
threads: ChatThread[];
|
|
3855
|
+
}
|
|
3856
|
+
|
|
3679
3857
|
declare type TranslationKey = Join<PathsToStringProps<typeof defaultTranslations>, ".">;
|
|
3680
3858
|
|
|
3681
3859
|
declare type TranslationShape<T> = {
|
|
@@ -3700,6 +3878,15 @@ export declare type UploadedFile = {
|
|
|
3700
3878
|
mimetype: string;
|
|
3701
3879
|
};
|
|
3702
3880
|
|
|
3881
|
+
/**
|
|
3882
|
+
* Read the AiChat context. Returns an inert fallback when no provider
|
|
3883
|
+
* is mounted — that case is intentional in `ApplicationFrame`, which
|
|
3884
|
+
* renders chat-aware components in both the AI-enabled tree and the
|
|
3885
|
+
* promotion-chat tree.
|
|
3886
|
+
*
|
|
3887
|
+
* Most consumers don't need to think about this — they're rendered
|
|
3888
|
+
* under `<F0AiChatProvider>` and receive the real context.
|
|
3889
|
+
*/
|
|
3703
3890
|
export declare function useAiChat(): AiChatProviderReturnValue;
|
|
3704
3891
|
|
|
3705
3892
|
export declare function useAiChatTranslations(): AiChatTranslations;
|
|
@@ -3711,6 +3898,40 @@ export declare function useAiChatTranslations(): AiChatTranslations;
|
|
|
3711
3898
|
*/
|
|
3712
3899
|
export declare function useCanvasEntity(type: string | undefined): CanvasEntityDefinition<any> | undefined;
|
|
3713
3900
|
|
|
3901
|
+
/**
|
|
3902
|
+
* Headless chat-history state manager. Pure UI logic — the caller injects
|
|
3903
|
+
* `fetchThreads` and `deleteThread` callbacks so this hook never embeds
|
|
3904
|
+
* URLs, auth headers or fetch wiring. Manages pinned threads in
|
|
3905
|
+
* localStorage and the threads list (loading/error/data).
|
|
3906
|
+
*/
|
|
3907
|
+
export declare function useChatHistory({ enabled, fetchThreads: fetchThreadsCb, deleteThread: deleteThreadCb, }: UseChatHistoryOptions): UseChatHistoryReturn;
|
|
3908
|
+
|
|
3909
|
+
declare type UseChatHistoryOptions = {
|
|
3910
|
+
/** When true, fetches threads on mount. Default: `false`. */
|
|
3911
|
+
enabled?: boolean;
|
|
3912
|
+
/**
|
|
3913
|
+
* Async callback that returns the list of threads. The host owns the
|
|
3914
|
+
* URL/auth/fetch — this hook only calls the callback and manages state.
|
|
3915
|
+
*/
|
|
3916
|
+
fetchThreads: () => Promise<ChatThread[]>;
|
|
3917
|
+
/**
|
|
3918
|
+
* Async callback that deletes a thread by id. Should throw or reject on
|
|
3919
|
+
* failure; the hook will then re-fetch to restore consistency.
|
|
3920
|
+
*/
|
|
3921
|
+
deleteThread: (id: string) => Promise<void>;
|
|
3922
|
+
};
|
|
3923
|
+
|
|
3924
|
+
declare type UseChatHistoryReturn = {
|
|
3925
|
+
threads: ChatThread[];
|
|
3926
|
+
isLoading: boolean;
|
|
3927
|
+
error: string | null;
|
|
3928
|
+
refetch: () => void;
|
|
3929
|
+
pinnedIds: Set<string>;
|
|
3930
|
+
pinThread: (id: string) => void;
|
|
3931
|
+
unpinThread: (id: string) => void;
|
|
3932
|
+
deleteThread: (id: string) => Promise<void>;
|
|
3933
|
+
};
|
|
3934
|
+
|
|
3714
3935
|
/**
|
|
3715
3936
|
* Returns a resolved formatter for the given `formName`.
|
|
3716
3937
|
* Matches registered formatters by specificity:
|
|
@@ -3726,6 +3947,20 @@ export declare function useI18n(): TranslationsType & {
|
|
|
3726
3947
|
t: (key: TranslationKey, args?: Record<string, string | number>) => string;
|
|
3727
3948
|
};
|
|
3728
3949
|
|
|
3950
|
+
export declare type UserBinaryPart = {
|
|
3951
|
+
type: "binary";
|
|
3952
|
+
url: string;
|
|
3953
|
+
filename: string;
|
|
3954
|
+
mimeType: string;
|
|
3955
|
+
};
|
|
3956
|
+
|
|
3957
|
+
export declare type UserReaction = "like" | "dislike";
|
|
3958
|
+
|
|
3959
|
+
export declare type UserTextPart = {
|
|
3960
|
+
type: "text";
|
|
3961
|
+
text: string;
|
|
3962
|
+
};
|
|
3963
|
+
|
|
3729
3964
|
/**
|
|
3730
3965
|
* Returns a setter to register value formatters used by FormCard.
|
|
3731
3966
|
*
|
|
@@ -3776,11 +4011,23 @@ declare interface WeekdaysProps {
|
|
|
3776
4011
|
}
|
|
3777
4012
|
|
|
3778
4013
|
/**
|
|
3779
|
-
*
|
|
4014
|
+
* A welcome-screen group rendered as an outline button in the welcome row.
|
|
4015
|
+
* Clicking the group opens a popover listing its `items`.
|
|
3780
4016
|
*/
|
|
3781
4017
|
export declare type WelcomeScreenSuggestion = {
|
|
3782
4018
|
icon: IconType;
|
|
3783
|
-
|
|
4019
|
+
label: string;
|
|
4020
|
+
items: WelcomeScreenSuggestionItem[];
|
|
4021
|
+
};
|
|
4022
|
+
|
|
4023
|
+
/**
|
|
4024
|
+
* A single sub-suggestion shown inside a welcome-screen group's popover.
|
|
4025
|
+
* The `title` is the label users see; `prompt` is what gets sent to the AI
|
|
4026
|
+
* when they click (falls back to `title` when omitted). They can diverge so
|
|
4027
|
+
* you can show a short, scannable title while sending a fully-formed prompt.
|
|
4028
|
+
*/
|
|
4029
|
+
export declare type WelcomeScreenSuggestionItem = {
|
|
4030
|
+
title: string;
|
|
3784
4031
|
prompt?: string;
|
|
3785
4032
|
};
|
|
3786
4033
|
|
|
@@ -3835,6 +4082,11 @@ declare module "gridstack" {
|
|
|
3835
4082
|
}
|
|
3836
4083
|
|
|
3837
4084
|
|
|
4085
|
+
declare namespace Calendar {
|
|
4086
|
+
var displayName: string;
|
|
4087
|
+
}
|
|
4088
|
+
|
|
4089
|
+
|
|
3838
4090
|
declare module "@tiptap/core" {
|
|
3839
4091
|
interface Commands<ReturnType> {
|
|
3840
4092
|
aiBlock: {
|
|
@@ -3884,11 +4136,6 @@ declare module "@tiptap/core" {
|
|
|
3884
4136
|
}
|
|
3885
4137
|
|
|
3886
4138
|
|
|
3887
|
-
declare namespace Calendar {
|
|
3888
|
-
var displayName: string;
|
|
3889
|
-
}
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
4139
|
declare namespace F0GraphNodeWrapperInner {
|
|
3893
4140
|
var displayName: string;
|
|
3894
4141
|
}
|