@frontera-sdk/chat-ui 1.50.40
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/LICENSE +202 -0
- package/README.md +348 -0
- package/dist/af-DK_CjRn6-OPBHDTNZ.js +197 -0
- package/dist/agent-picker.d.ts +38 -0
- package/dist/agent-picker.js +8 -0
- package/dist/as-BPtSu6VN-O4ZZEAJG.js +11 -0
- package/dist/be-CrQ0smca-5HIE5K27.js +11 -0
- package/dist/bg-CrQqGwni-3IRVPZQ7.js +11 -0
- package/dist/bn-NCLZcWHi-XOZJFNIB.js +11 -0
- package/dist/ca-SUf6Y2Om-V6F2EBCA.js +38 -0
- package/dist/capture-NO5ZIGP6.js +1652 -0
- package/dist/chat.css +3555 -0
- package/dist/chat.d.ts +161 -0
- package/dist/chat.js +60498 -0
- package/dist/chunk-2KEBRV3W.js +191 -0
- package/dist/chunk-6BPHEBCF.js +639 -0
- package/dist/chunk-6HYPVNVA.js +25 -0
- package/dist/chunk-7ADM3CKD.js +10 -0
- package/dist/chunk-AFVU5VT6.js +5601 -0
- package/dist/chunk-BEJ3HQG4.js +93 -0
- package/dist/chunk-CCVPZVFK.js +28 -0
- package/dist/chunk-DGDHKMDB.js +10 -0
- package/dist/chunk-FXKXDR5K.js +2166 -0
- package/dist/chunk-GTQH7MPF.js +129 -0
- package/dist/chunk-I7SXWUAN.js +1258 -0
- package/dist/chunk-IQRPGFLI.js +234 -0
- package/dist/chunk-IXDM5R55.js +23 -0
- package/dist/chunk-JD6ETTXC.js +178 -0
- package/dist/chunk-OP4MLJDA.js +215 -0
- package/dist/chunk-PQZ2CS26.js +2315 -0
- package/dist/chunk-PR4QN5HX.js +38 -0
- package/dist/chunk-PUIVKDV5.js +271 -0
- package/dist/chunk-QSSFBZAS.js +6914 -0
- package/dist/chunk-RAKKA3WU.js +5896 -0
- package/dist/chunk-RB2Y4NYC.js +681 -0
- package/dist/chunk-VDZH5Z3K.js +72 -0
- package/dist/chunk-WMN6BPPS.js +49 -0
- package/dist/chunk-WO6DJLFE.js +10857 -0
- package/dist/chunk-X5E2DJVO.js +47634 -0
- package/dist/chunk-XJFTVKLW.js +2687 -0
- package/dist/chunk-ZS6PXIZP.js +187 -0
- package/dist/client.d.ts +89 -0
- package/dist/client.js +20 -0
- package/dist/composer.d.ts +23 -0
- package/dist/composer.js +89 -0
- package/dist/cop-C3sk0IUo-CIZA2H43.js +11 -0
- package/dist/credential.d.ts +75 -0
- package/dist/credential.js +3 -0
- package/dist/cs-CmAteokq-HAKEQPB4.js +17 -0
- package/dist/cu-CBUlrW6Y-QTZ6ZLA4.js +32 -0
- package/dist/cy-BBPa6z2x-MX6DGDNW.js +11 -0
- package/dist/da-CCDXfXtG-5YEOHMG3.js +11 -0
- package/dist/de-1901-CWoAOigE-63QFSF2A.js +11 -0
- package/dist/de-1996-BL6awyxG-R2PHKMAB.js +11 -0
- package/dist/de-ch-1901-hVThVHVb-JSDB53OZ.js +11 -0
- package/dist/el-monoton-D3aKqTz2-2V4OOFBB.js +11 -0
- package/dist/el-polyton-ogVWcTzh-3U7NGQMT.js +11 -0
- package/dist/en-gb-B7Al27b_-UKCBQFSU.js +21 -0
- package/dist/es-DcaaHPU_-NOBXSOZK.js +11 -0
- package/dist/esm-MHF25KDL.js +3 -0
- package/dist/et-B_spaleu-5UAYIW62.js +11 -0
- package/dist/eu-Ctv_kq9Z-V5DREOPN.js +11 -0
- package/dist/fi-RW5VB8Yp-YSXBK7LW.js +11 -0
- package/dist/fr-BC2onEz9-7KH5T76G.js +11 -0
- package/dist/frame.d.ts +59 -0
- package/dist/frame.js +111 -0
- package/dist/fur-AC12wySk-4PD2Y72H.js +11 -0
- package/dist/ga-Cn6LkudM-RRAAJT3N.js +58 -0
- package/dist/gl-DZGc-K_G-KYSXXTCY.js +11 -0
- package/dist/grc-DOlGgO8T-2HXBZVJ5.js +11 -0
- package/dist/gu-Bjl0l-cf-4CFSVZHZ.js +11 -0
- package/dist/header.d.ts +78 -0
- package/dist/header.js +18 -0
- package/dist/hi-DsAaTPCC-KMCFBWK7.js +11 -0
- package/dist/hr-DT1SBBes-X2TIX6EI.js +11 -0
- package/dist/hsb-DC_ITc1e-PXLERA7R.js +46 -0
- package/dist/hu-DVk7Y_ka-PJPVU54B.js +11 -0
- package/dist/hy-e995ysyO-MZBRFX52.js +11 -0
- package/dist/ia-Cr4TJH0c-D3O2FHGP.js +22 -0
- package/dist/id-DifDyWg9-MZ2BGHWI.js +58 -0
- package/dist/is-BT8UVRze-CZZCKEFI.js +11 -0
- package/dist/it-Bt_Meacx-T4Y5JYV6.js +11 -0
- package/dist/ka-jyoLzyDE-ES6EXZLW.js +11 -0
- package/dist/kmr-Cfwhwuff-TSW2R2KS.js +11 -0
- package/dist/kn-C6Lov-DP-B4BL47CE.js +11 -0
- package/dist/la-DuvHjUWw-6K7TFU6X.js +11 -0
- package/dist/la-x-classic-yTyAOQEt-YWTKMM2L.js +11 -0
- package/dist/la-x-liturgic-CXeQb4FY-B772L5E7.js +11 -0
- package/dist/lib-3ZKX25RJ.js +4511 -0
- package/dist/lt-BBe8DlDF-4YINVOZR.js +11 -0
- package/dist/lv-Q2BBHnzp-TMVQ3MX2.js +11 -0
- package/dist/message.d.ts +64 -0
- package/dist/message.js +18 -0
- package/dist/ml-2xLVYkVY-NGZLAPIN.js +11 -0
- package/dist/mn-cyrl-lHM4n0oC-DGBYYUT3.js +11 -0
- package/dist/mn-cyrl-x-lmc-3aetruI8-QHJABMOO.js +11 -0
- package/dist/mr-CjWJPVmH-X5UHV65O.js +11 -0
- package/dist/mul-ethi-D_CMSMEq-H7UMQSOQ.js +11 -0
- package/dist/nb-DI8u59ch-J4CAVI4Y.js +122 -0
- package/dist/new-session-Dw7JOgzu.d.ts +141 -0
- package/dist/new-session.d.ts +4 -0
- package/dist/new-session.js +10 -0
- package/dist/nl-BHQJ6Gvn-7BH55RA7.js +52 -0
- package/dist/nn-ntZvarUK-KKNCHHJ4.js +122 -0
- package/dist/no-B8ItS0F3-3ZXIRJ6U.js +120 -0
- package/dist/oauth-callback.d.ts +35 -0
- package/dist/oauth-callback.js +18 -0
- package/dist/oc-P_i3-xLA-XZM6E5YZ.js +11 -0
- package/dist/or-50rxpoq4-5VELAFMJ.js +11 -0
- package/dist/pa-C54UG8eN-WEJPMZ6Z.js +11 -0
- package/dist/parts.d.ts +49 -0
- package/dist/parts.js +106 -0
- package/dist/pdf-cover-thumbnail-inner-4N2Q5AAG.js +36 -0
- package/dist/pdf-deck-view-inner-FZVLAEQR.js +575 -0
- package/dist/pdf-document-view-inner-6DF54JWK.js +585 -0
- package/dist/pdf-viewer-inner-GPES3KG2.js +256 -0
- package/dist/pending-cards.d.ts +26 -0
- package/dist/pending-cards.js +9 -0
- package/dist/pi-B9cgjyG1-GD5ASDDU.js +11 -0
- package/dist/pl-9fg-ESVt-UMX7MCJM.js +32 -0
- package/dist/platform.css +4013 -0
- package/dist/pms-BRGfm5gS-SSE3AUW5.js +11 -0
- package/dist/pt-Cum2_NUC-W35JYVR4.js +11 -0
- package/dist/rm-C0MIK9N4-IWL4YTNT.js +11 -0
- package/dist/ro-0fmdH0HA-46WUTOYH.js +11 -0
- package/dist/ru-v4l-ayaq-BUGK6XCN.js +196 -0
- package/dist/sa-CKY9c_Vq-4KIJOI5Y.js +11 -0
- package/dist/sh-cyrl-BpCRFOmq-DSLQ4UY2.js +128 -0
- package/dist/sh-latn-sRy4Tuaj-UNQOR63V.js +128 -0
- package/dist/sk-_iOeDNrQ-NCTQKH25.js +17 -0
- package/dist/sl-DpiklF-D-6GG5TDVN.js +11 -0
- package/dist/sr-cyrl-Dpzrbd0W-4Q5226YJ.js +142 -0
- package/dist/sv-CFm5y56M-VTWNPZ7I.js +11 -0
- package/dist/ta-BcghgTbD-NRT35DW6.js +11 -0
- package/dist/te-B5Spl2Jk-5VE6CLN4.js +11 -0
- package/dist/th-DWX5iPSo-N5GMOQOP.js +11 -0
- package/dist/theme.d.ts +49 -0
- package/dist/theme.js +3 -0
- package/dist/tk-BMbKB10q-HGWWY5L3.js +11 -0
- package/dist/tr-CIHIuzqc-6ISBNYLV.js +11 -0
- package/dist/types-BDqLaBfH.d.ts +60 -0
- package/dist/uk-Dir3oxLs-YQ3QZRI4.js +11 -0
- package/dist/univer-workbook-BSSUE5TG.css +3555 -0
- package/dist/univer-workbook-N5IIN7CH.js +290849 -0
- package/dist/vega-chart-block-NQADYNWQ.js +2857 -0
- package/dist/zh-latn-pinyin-BdYb-Ey_-RB542AHF.js +11 -0
- package/package.json +137 -0
- package/src/styles.css +996 -0
package/dist/chat.d.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { StartChatRequest } from '@frontera-sdk/chat/types';
|
|
3
|
+
import { ChatCredentialProps } from './credential.js';
|
|
4
|
+
import { M as ModelModes, S as Shortcut } from './new-session-Dw7JOgzu.js';
|
|
5
|
+
import { FronteraChatTheme } from './theme.js';
|
|
6
|
+
import '@frontera-sdk/core/client';
|
|
7
|
+
import './types-BDqLaBfH.js';
|
|
8
|
+
import 'zod';
|
|
9
|
+
|
|
10
|
+
type FronteraChatProps = ChatCredentialProps & FronteraChatOwnProps;
|
|
11
|
+
interface FronteraChatOwnProps {
|
|
12
|
+
/** Continue an existing conversation; omit to start a new one. */
|
|
13
|
+
conversationId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Which agent to talk to. Ignored when the credential fixes the agent.
|
|
16
|
+
*
|
|
17
|
+
* Passing it PINS the choice and hides the picker: a host that names an
|
|
18
|
+
* agent has already decided. Leave it unset to let the person choose from
|
|
19
|
+
* whatever the token can reach.
|
|
20
|
+
*/
|
|
21
|
+
agentName?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Offer an agent picker when the credential reaches more than one.
|
|
24
|
+
*
|
|
25
|
+
* On by default, and a no-op for a token minted from an agent key — that
|
|
26
|
+
* names exactly one agent, so there is nothing to choose between.
|
|
27
|
+
*/
|
|
28
|
+
agentPicker?: boolean;
|
|
29
|
+
/** Agent UUID — lets the composer offer that agent's apps and mentions. */
|
|
30
|
+
agentId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Model modes the picker offers, keyed by mode name. Omit to hide the
|
|
33
|
+
* picker — an embedded chat whose token fixes the model has nothing to
|
|
34
|
+
* choose between.
|
|
35
|
+
*/
|
|
36
|
+
modes?: ModelModes;
|
|
37
|
+
modelMode?: string;
|
|
38
|
+
defaultMode?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Offer the approval-mode selector — how much the agent may do unattended.
|
|
41
|
+
*
|
|
42
|
+
* ON by default. It is the most consequential control in the composer, and a
|
|
43
|
+
* conversation where the person cannot see or change how much runs without
|
|
44
|
+
* them is the wrong default for a surface their own users sit in front of.
|
|
45
|
+
*
|
|
46
|
+
* `full` ("run without approval") additionally needs the `approval-mode`
|
|
47
|
+
* capability on the token, and is hidden without it: the service refuses it
|
|
48
|
+
* either way, and an option that gets reverted teaches nothing. Enabling
|
|
49
|
+
* this prop with no capability still offers `ask` and `auto`, which tighten
|
|
50
|
+
* the gate and need no permission.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* Accept file attachments — the composer's paperclip, and dropping a file
|
|
54
|
+
* anywhere on the conversation.
|
|
55
|
+
*
|
|
56
|
+
* On by default. Off makes the whole surface inert rather than only hiding
|
|
57
|
+
* the button: a drop zone that silently swallows a file is worse than one
|
|
58
|
+
* that never lit up.
|
|
59
|
+
*/
|
|
60
|
+
fileUpload?: boolean;
|
|
61
|
+
approvalSelector?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Offer the plugins button — the composer's entry to connecting one's own
|
|
64
|
+
* accounts before asking, rather than being told mid-turn.
|
|
65
|
+
*
|
|
66
|
+
* Requires `connectRedirectUri`, for the same reason the connect card does:
|
|
67
|
+
* the callback is a page you host.
|
|
68
|
+
*/
|
|
69
|
+
appsButton?: boolean;
|
|
70
|
+
/** Shown above each reply. */
|
|
71
|
+
agentLabel?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The leading control in the mobile header — your own session list.
|
|
74
|
+
*
|
|
75
|
+
* Under 768px the conversation fills the screen, so the platform puts a
|
|
76
|
+
* hamburger at the head of its bar for the session list behind it. That list
|
|
77
|
+
* is the host's: its conversations, its routing, its naming. Pass the button
|
|
78
|
+
* and it lands in the same slot; omit it and the title takes the row rather
|
|
79
|
+
* than sharing it with a control that opens nothing.
|
|
80
|
+
*
|
|
81
|
+
* Ignored above 768px, where a host draws its own chrome beside the chat.
|
|
82
|
+
*/
|
|
83
|
+
mobileMenu?: React.ReactNode;
|
|
84
|
+
/** Extra fields on every send: modelMode, reasoningEffort, … */
|
|
85
|
+
body?: Partial<Omit<StartChatRequest, 'messages' | 'conversationId'>>;
|
|
86
|
+
/**
|
|
87
|
+
* Show the conversation header: agent, title, and the summary control.
|
|
88
|
+
*
|
|
89
|
+
* Appears only once a conversation exists — before that it would caption an
|
|
90
|
+
* empty thread with nothing true to say.
|
|
91
|
+
*/
|
|
92
|
+
header?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* The artifact pane, and the header control that opens it.
|
|
95
|
+
*
|
|
96
|
+
* On by default now that the package ships the pane itself: artifacts,
|
|
97
|
+
* spreadsheets, charts, canvases, generated images and sources, each in the
|
|
98
|
+
* platform's own viewer. Turn it off for a surface that should stay a single
|
|
99
|
+
* column — a narrow widget, or a host that lists the conversation's
|
|
100
|
+
* artifacts in its own chrome.
|
|
101
|
+
*/
|
|
102
|
+
sidePanel?: boolean;
|
|
103
|
+
/** Colours, radius and type. */
|
|
104
|
+
theme?: FronteraChatTheme;
|
|
105
|
+
/**
|
|
106
|
+
* Dark mode. Omit to follow the operating system.
|
|
107
|
+
*
|
|
108
|
+
* The platform's dark theme is driven by a `dark` class on an ancestor, and
|
|
109
|
+
* every `dark:` utility in the copied components compiles against it. The
|
|
110
|
+
* platform puts that class on `<html>`; a host page embedding this component
|
|
111
|
+
* has no reason to, so the component carries it itself.
|
|
112
|
+
*
|
|
113
|
+
* Pass `true`/`false` to pin it — an application with its own theme toggle
|
|
114
|
+
* wants the chat to follow ITS switch, not the OS's.
|
|
115
|
+
*/
|
|
116
|
+
dark?: boolean;
|
|
117
|
+
className?: string;
|
|
118
|
+
placeholder?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Replaces the new-session prompt entirely.
|
|
121
|
+
*
|
|
122
|
+
* Left unset, an empty conversation shows the platform's greeting and its
|
|
123
|
+
* suggested actions — an empty scroll area is a blank page, and a blank page
|
|
124
|
+
* is the easiest thing in the world to close.
|
|
125
|
+
*/
|
|
126
|
+
empty?: React.ReactNode;
|
|
127
|
+
/** Replace or extend the suggested actions. */
|
|
128
|
+
/**
|
|
129
|
+
* Starter cards on the empty state — "Create a presentation", and friends.
|
|
130
|
+
*
|
|
131
|
+
* OFF by default, and that is a judgement about honesty rather than taste.
|
|
132
|
+
* Each card promises an artifact the agent can only produce with a computer
|
|
133
|
+
* and the artifacts plugin; offered to an agent without them, the card is an
|
|
134
|
+
* invitation to a dead end. The platform can assume its agents are equipped.
|
|
135
|
+
* An embedded chat cannot.
|
|
136
|
+
*
|
|
137
|
+
* Pass your own, worded for what YOUR agent does. `DEFAULT_SHORTCUTS` is
|
|
138
|
+
* exported for the document-producing case.
|
|
139
|
+
*/
|
|
140
|
+
shortcuts?: Shortcut[];
|
|
141
|
+
/**
|
|
142
|
+
* Your OAuth callback page, for tools that need the user's OWN account.
|
|
143
|
+
*
|
|
144
|
+
* Set it and a `needs_connect` pause renders a Connect button that runs the
|
|
145
|
+
* whole flow. Leave it unset and the card says what is missing instead:
|
|
146
|
+
* there is no sensible default, because the callback has to be a page you
|
|
147
|
+
* host and have registered with your own OAuth client.
|
|
148
|
+
*/
|
|
149
|
+
connectRedirectUri?: string;
|
|
150
|
+
/** Origin the callback posts from, when it differs from the redirect's. */
|
|
151
|
+
connectOrigin?: string;
|
|
152
|
+
/** Fired when a run starts, carrying the ids needed to cancel or resume. */
|
|
153
|
+
onStart?: (info: {
|
|
154
|
+
conversationId: string;
|
|
155
|
+
runId: string;
|
|
156
|
+
}) => void;
|
|
157
|
+
onError?: (error: Error) => void;
|
|
158
|
+
}
|
|
159
|
+
declare function FronteraChat({ conversationId: initialConversationId, agentName: pinnedAgentName, agentPicker, agentId, modes, modelMode, defaultMode, fileUpload, approvalSelector, appsButton, agentLabel, mobileMenu, body, header, sidePanel, theme, dark: darkProp, className, placeholder, empty, shortcuts, connectRedirectUri, connectOrigin, onStart, onError, ...credentialProps }: FronteraChatProps): react.JSX.Element;
|
|
160
|
+
|
|
161
|
+
export { FronteraChat, type FronteraChatOwnProps, type FronteraChatProps };
|