@aintela/chat 0.11.0 → 0.12.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/components.js +5458 -5347
- package/dist/components.js.map +1 -1
- package/dist/index.js +148 -146
- package/dist/src/components/Library/markdownSafety.d.ts +7 -0
- package/dist/src/components/Library/markdownSafety.test.d.ts +1 -0
- package/dist/src/components/v2/PromptV2.d.ts +32 -0
- package/dist/src/components/v2/index.d.ts +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
|
-
import { A as s, a as n, b as r, c as o, d as i, C as c, e as l, f as A, E as p, g, F as S, h as d, G as C, I as h, i as u, j as E, L as T, M as R, k as I, R as P, l as v, S as L, m as D, n as m, o as _, p as x, q as y, T as f, r as M, s as O, t as U, u as
|
|
2
|
+
import { A as s, a as n, b as r, c as o, d as i, C as c, e as l, f as A, E as p, g, F as S, h as d, G as C, I as h, i as u, j as E, L as T, M as R, k as I, R as P, l as v, S as L, m as D, n as m, o as _, p as x, q as y, T as f, r as M, s as O, t as U, u as F, v as B, w as k, x as H, y as V, z as N } from "./serializer-DvfyE4_t.js";
|
|
3
3
|
import { C as G, C as w, D as W, a as z, i as K, b as J, c as X, d as j } from "./detachedRunModel-X59Pb5V-.js";
|
|
4
4
|
import { A as q, a as Z, M as Q, b as $ } from "./Memory-BUnmYGNv.js";
|
|
5
5
|
import { C as ae, P as te } from "./Prompt-DZb7OaPp.js";
|
|
6
6
|
import { A as ne, A as re, C as oe, D as ie, a as ce, E as le, H as Ae, I as pe, b as ge, L as Se, M as de, T as Ce, W as he, c as ue, d as Ee, r as Te, e as Re, s as Ie, t as Pe } from "./detachedRunActivity-CCrlilHK.js";
|
|
7
7
|
import { A as Le } from "./artifactHtmlHandler-CMQJf1cX.js";
|
|
8
8
|
import { H as me, d as _e, r as xe } from "./httpSessionService-BLiZMoLb.js";
|
|
9
|
-
import { APPBAR_HEIGHT as fe, APPBAR_HEIGHT as Me, ASK_USER_CANCELLED as Oe, ActivityLine as Ue, AgentActivity as
|
|
10
|
-
import { s as
|
|
11
|
-
import { A as
|
|
12
|
-
import { ALLOWED_DOMAINS as
|
|
13
|
-
import { P as
|
|
14
|
-
import { a as
|
|
15
|
-
import { u as
|
|
16
|
-
import { Score as
|
|
17
|
-
import { A as
|
|
9
|
+
import { APPBAR_HEIGHT as fe, APPBAR_HEIGHT as Me, ASK_USER_CANCELLED as Oe, ActivityLine as Ue, AgentActivity as Fe, AgentActivity as Be, AgentRunLabel as ke, AgentTyping as He, AiChat as Ve, AiChatDrawer as Ne, AiChatFloating as be, AiChatFloating as Ge, AiChatPane as we, AiChatProvider as We, AiChatServiceContext as ze, AiChatPane as Ke, AppBar as Je, AppBar as Xe, AppRail as je, AppRail as Ye, AppShell as qe, AppShell as Ze, ArtifactRender as Qe, AskUserDialog as $e, AskUserSheet as ea, AttachmentPreviewModal as aa, BillingLimitBanner as ta, BoxedPart as sa, BrainIcon as na, CHAT_VERBOSITY_LEVELS as ra, ChartIcon as oa, ChatAgentHeader as ia, ChatIcon as ca, ChatPane as la, ChatsHistory as Aa, ChatsHistory as pa, CheckIcon as ga, ChevronIcon as Sa, ChevronRightIcon as da, CloseIcon as Ca, CodeIcon as ha, ComposerIcon as ua, CurrentMessage as Ea, DEFAULT_ACTIVITY_RENDERER as Ta, DEFAULT_INTERACTION_ORIGIN_LABELS as Ra, DEFAULT_PART_RENDERERS as Ia, DashboardIcon as Pa, DataExplorerIcon as va, DelayTextComponent as La, DetachedRunBox as Da, DetachedRunBox as ma, DetachedRunTaskBox as _a, DetachedRunTranscript as xa, EnvironmentProvider as ya, FileIcon as fa, FunctionPart as Ma, GlobeIcon as Oa, HandoffDivider as Ua, HistoryIcon as Fa, InertEnvironmentProvider as Ba, InteractionOriginBadge as ka, JsxErrorBoundary as Ha, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as Va, LastPrompts as Na, LastPrompts as ba, LinearBackgroundProgress as Ga, LinearProgressBarWithMarkers as wa, ListCheckIcon as Wa, LiveJsxBlock as za, LiveTsxConfigProvider as Ka, LlmResponseRender as Ja, LoadingDots as Xa, LockClosedIcon as ja, LockOpenIcon as Ya, MOBILE_NAV_DEFAULT as qa, MarkdownExtended as Za, MentionPickerPanel as Qa, MenuIcon as $a, Message as et, MessageScopeProvider as at, MobileDrawer as tt, MobileDrawer as st, PanelIcon as nt, PaperclipIcon as rt, PauseIcon as ot, PenIcon as it, PersonaCard as ct, PinIcon as lt, PlusIcon as At, Prompt as pt, PromptDateMarkers as gt, PromptGhostHint as St, Prompt as dt, RotateIcon as Ct, RunProgressPanel as ht, RunProgressPanel as ut, RunProgressStrip as Et, RunProgressStrip as Tt, SearchIcon as Rt, SendIcon as It, SessionStateManagerService as Pt, SessionUsage as vt, SessionUsage as Lt, SharedSessionTranscript as Dt, SparkleIcon as mt, Sparkline as _t, StopIcon as xt, Stopwatch as yt, SuspendedPart as ft, TableIcon as Mt, TaskList as Ot, TaskList as Ut, TerminalIcon as Ft, TextPart as Bt, ThoughtPart as kt, ToolIcon as Ht, TrashIcon as Vt, TriggerDropdown as Nt, TurnAwareButton as bt, UiToolDispatcher as Gt, UndoIcon as wt, UsersIcon as Wt, V2_CHART_PALETTE as zt, WaitingPart as Kt, ZoomInIcon as Jt, ZoomOutIcon as Xt, acceptsFile as jt, activitySteps as Yt, agentFromKey as qt, bareToolName as Zt, canStreamDetachedRun as Qt, classifyPart as $t, configureFriendlyMapping as es, createAiChatEngine as as, createAiChatSessionStore as ts, createAiChatSessionStore as ss, createDetachedRunTranscriptEngine as ns, createSharedSessionTranscriptEngine as rs, createUiToolRegistry as os, detachedRunHeadline as is, disposeSharedAiChatEngine as cs, engineKeyFor as ls, extendDefaultScope as As, extendModuleRegistry as ps, formatFileSize as gs, getDefaultJsxScope as Ss, getFriendlyLabel as ds, getSharedAiChatEngine as Cs, handoffAt as hs, openDetachedRunTranscript as us, openSharedSessionTranscript as Es, parseClientOutput as Ts, parseContentBlocks as Rs, parseDetachedRunConclusion as Is, parseUiArgs as Ps, previousAgentKey as vs, registerContentTools as Ls, resolveChatAgent as Ds, slotEnterSx as ms, useAgentEngine as _s, useAiChatServices as xs, useAiChatSessionStore as ys, useChatReadOnly as fs, useCoarsePointer as Ms, useDetachedRunLiveActivity as Os, useDetachedRunResumeKey as Us, useDetachedRunTranscript as Fs, useEnvironment as Bs, useEnvironmentOptional as ks, useLiveTsxMaxCharsForFull as Hs, useMessageScope as Vs, useParkedAskUser as Ns, useResponsiveLayout as bs, useSharedSessionTranscript as Gs, useTurnOpen as ws, useVisualViewport as Ws, v2Card as zs, v2Chip as Ks, v2IconBtn as Js, v2MonoMeta as Xs, v2SectionLabel as js, v2Theme as Ys } from "./components.js";
|
|
10
|
+
import { s as Zs, u as Qs, a as $s, b as en, c as an } from "./useContainerWidth-C7u70yDY.js";
|
|
11
|
+
import { A as sn, D as nn, g as rn, b as on, c as cn, d as ln, e as An, f as pn, i as gn, r as Sn } from "./environmentUtils-VZNTCzEE.js";
|
|
12
|
+
import { ALLOWED_DOMAINS as Cn, ALLOWED_EMAILS as hn, AUTH_CONFIG as un, GOOGLE_CLIENT_ID as En, getAgentBaseUrl as Tn, getArtifactsBaseUrl as Rn, getDotNetBaseUrl as In, getIconByName as Pn, iconCategories as vn, materialIcons as Ln, searchIcons as Dn, setEbiContextData as mn, setEbiContextSessionId as _n } from "./utils.js";
|
|
13
|
+
import { P as yn, S as fn, c as Mn, a as On, e as Un, b as Fn, f as Bn, i as kn, d as Hn, p as Vn, s as Nn, h as bn, j as Gn, t as wn, k as Wn } from "./predictionRows-Damfwthh.js";
|
|
14
|
+
import { a as Kn, b as Jn, c as Xn, d as jn, f as Yn, p as qn } from "./promptTriggers-xwMJ5gRj.js";
|
|
15
|
+
import { u as Qn } from "./useChatSessions-BI3bHoOh.js";
|
|
16
|
+
import { Score as er } from "./interfaces.js";
|
|
17
|
+
import { A as tr, a as sr, P as nr, R as rr, b as or, c as ir, d as cr, V as lr, e as Ar, f as pr, g as gr, h as Sr, i as dr, j as Cr, k as hr, l as ur, p as Er, m as Tr, n as Rr, s as Ir, o as Pr, u as vr, q as Lr } from "./PersonaAvatar-tKaWpDeQ.js";
|
|
18
18
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
tr as AGENT_ROLES,
|
|
20
|
+
Cn as ALLOWED_DOMAINS,
|
|
21
|
+
hn as ALLOWED_EMAILS,
|
|
22
|
+
sn as ANALYTICS_AGENT_NAME,
|
|
23
23
|
fe as APPBAR_HEIGHT,
|
|
24
24
|
Me as APPBAR_V2_HEIGHT,
|
|
25
25
|
Oe as ASK_USER_CANCELLED,
|
|
26
|
-
|
|
26
|
+
un as AUTH_CONFIG,
|
|
27
27
|
q as Account,
|
|
28
28
|
Ue as ActivityLine,
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
Fe as AgentActivity,
|
|
30
|
+
Be as AgentActivityV2,
|
|
31
31
|
s as AgentConfig,
|
|
32
32
|
ne as AgentGatewayService,
|
|
33
33
|
re as AgentGatewayWSAsync,
|
|
@@ -57,7 +57,7 @@ export {
|
|
|
57
57
|
ea as AskUserSheet,
|
|
58
58
|
aa as AttachmentPreviewModal,
|
|
59
59
|
i as AuthorType,
|
|
60
|
-
|
|
60
|
+
sr as AvatarStack,
|
|
61
61
|
ta as BillingLimitBanner,
|
|
62
62
|
sa as BoxedPart,
|
|
63
63
|
na as BrainIcon,
|
|
@@ -87,7 +87,7 @@ export {
|
|
|
87
87
|
Ia as DEFAULT_PART_RENDERERS,
|
|
88
88
|
W as DETACHED_RUN_SETTLED_STATUSES,
|
|
89
89
|
z as DETACHED_RUN_TERMINAL_STATUSES,
|
|
90
|
-
|
|
90
|
+
nn as DEV_SERVER_CONFIG,
|
|
91
91
|
Pa as DashboardIcon,
|
|
92
92
|
va as DataExplorerIcon,
|
|
93
93
|
La as DelayTextComponent,
|
|
@@ -105,15 +105,15 @@ export {
|
|
|
105
105
|
S as FunctionCallContent,
|
|
106
106
|
Ma as FunctionPart,
|
|
107
107
|
d as FunctionResultContent,
|
|
108
|
-
|
|
108
|
+
En as GOOGLE_CLIENT_ID,
|
|
109
109
|
C as GetEventTypeFromDotNetName,
|
|
110
110
|
Oa as GlobeIcon,
|
|
111
111
|
Ua as HandoffDivider,
|
|
112
|
-
|
|
112
|
+
Fa as HistoryIcon,
|
|
113
113
|
Ae as HttpArtifactService,
|
|
114
114
|
me as HttpSessionService,
|
|
115
115
|
pe as IDLE_TIMEOUT,
|
|
116
|
-
|
|
116
|
+
Ba as InertEnvironmentProvider,
|
|
117
117
|
ka as InteractionOriginBadge,
|
|
118
118
|
h as InteractionOriginContent,
|
|
119
119
|
u as InteractionPartUtils,
|
|
@@ -147,12 +147,12 @@ export {
|
|
|
147
147
|
st as MobileDrawerV2,
|
|
148
148
|
R as ModelConfig,
|
|
149
149
|
I as ModelType,
|
|
150
|
-
|
|
150
|
+
yn as PERSON_OR_PLACE_LEAD_ROWS,
|
|
151
151
|
nt as PanelIcon,
|
|
152
152
|
rt as PaperclipIcon,
|
|
153
153
|
ot as PauseIcon,
|
|
154
154
|
it as PenIcon,
|
|
155
|
-
|
|
155
|
+
nr as PersonaAvatar,
|
|
156
156
|
ct as PersonaCard,
|
|
157
157
|
lt as PinIcon,
|
|
158
158
|
At as PlusIcon,
|
|
@@ -161,10 +161,10 @@ export {
|
|
|
161
161
|
St as PromptGhostHint,
|
|
162
162
|
te as PromptUtils,
|
|
163
163
|
dt as PromptV2,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
rr as ROLE_COLOR,
|
|
165
|
+
or as ROLE_DESC,
|
|
166
|
+
ir as ROLE_LABEL,
|
|
167
|
+
cr as ROLE_OF,
|
|
168
168
|
P as ResponseType,
|
|
169
169
|
Ct as RotateIcon,
|
|
170
170
|
v as RunMode,
|
|
@@ -172,7 +172,7 @@ export {
|
|
|
172
172
|
ut as RunProgressPanelV2,
|
|
173
173
|
Et as RunProgressStrip,
|
|
174
174
|
Tt as RunProgressStripV2,
|
|
175
|
-
|
|
175
|
+
er as Score,
|
|
176
176
|
Rt as SearchIcon,
|
|
177
177
|
It as SendIcon,
|
|
178
178
|
L as ServerEvent,
|
|
@@ -181,7 +181,7 @@ export {
|
|
|
181
181
|
Lt as SessionUsagePanel,
|
|
182
182
|
Dt as SharedSessionTranscript,
|
|
183
183
|
D as SkillLevel,
|
|
184
|
-
|
|
184
|
+
fn as SortableTable,
|
|
185
185
|
mt as SparkleIcon,
|
|
186
186
|
_t as Sparkline,
|
|
187
187
|
xt as StopIcon,
|
|
@@ -195,9 +195,9 @@ export {
|
|
|
195
195
|
Mt as TableIcon,
|
|
196
196
|
Ot as TaskList,
|
|
197
197
|
Ut as TaskListV2,
|
|
198
|
-
|
|
198
|
+
Ft as TerminalIcon,
|
|
199
199
|
f as TextContent,
|
|
200
|
-
|
|
200
|
+
Bt as TextPart,
|
|
201
201
|
kt as ThoughtPart,
|
|
202
202
|
Ht as ToolIcon,
|
|
203
203
|
Vt as TrashIcon,
|
|
@@ -207,142 +207,144 @@ export {
|
|
|
207
207
|
wt as UndoIcon,
|
|
208
208
|
Wt as UsersIcon,
|
|
209
209
|
zt as V2_CHART_PALETTE,
|
|
210
|
-
|
|
210
|
+
lr as VOICE_RULES,
|
|
211
211
|
he as WARNING_THRESHOLD,
|
|
212
212
|
Kt as WaitingPart,
|
|
213
213
|
ue as WebSocketConnecionV2,
|
|
214
214
|
Jt as ZoomInIcon,
|
|
215
215
|
Xt as ZoomOutIcon,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
Zt as
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
$t as
|
|
231
|
-
es as
|
|
232
|
-
as as
|
|
233
|
-
ts as
|
|
234
|
-
ss as
|
|
216
|
+
jt as acceptsFile,
|
|
217
|
+
Kn as activatePlaceholder,
|
|
218
|
+
Yt as activitySteps,
|
|
219
|
+
Jn as advanceToPlaceholder,
|
|
220
|
+
qt as agentFromKey,
|
|
221
|
+
Xn as applyTriggerInsertion,
|
|
222
|
+
Ar as article,
|
|
223
|
+
pr as articleFor,
|
|
224
|
+
gr as autonomousAgent,
|
|
225
|
+
Sr as avatarAlt,
|
|
226
|
+
Zt as bareToolName,
|
|
227
|
+
Qt as canStreamDetachedRun,
|
|
228
|
+
Mn as chipLocations,
|
|
229
|
+
On as chunkArray,
|
|
230
|
+
$t as classifyPart,
|
|
231
|
+
es as configureFriendlyMapping,
|
|
232
|
+
as as createAiChatEngine,
|
|
233
|
+
ts as createAiChatSessionStore,
|
|
234
|
+
ss as createAiChatStore,
|
|
235
|
+
ns as createDetachedRunTranscriptEngine,
|
|
235
236
|
M as createEventSerializer,
|
|
236
|
-
|
|
237
|
+
rs as createSharedSessionTranscriptEngine,
|
|
237
238
|
Ee as createSseParser,
|
|
238
239
|
O as createStreamingResponseSerializer,
|
|
239
|
-
|
|
240
|
+
os as createUiToolRegistry,
|
|
240
241
|
_e as decodeSessionEvents,
|
|
241
242
|
U as deserializeEvent,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
243
|
+
F as deserializePayload,
|
|
244
|
+
is as detachedRunHeadline,
|
|
245
|
+
jn as detectTrigger,
|
|
246
|
+
cs as disposeSharedAiChatEngine,
|
|
247
|
+
ls as engineKeyFor,
|
|
248
|
+
As as extendDefaultScope,
|
|
249
|
+
ps as extendModuleRegistry,
|
|
250
|
+
Un as extractInteractionId,
|
|
251
|
+
Fn as extractLinkAction,
|
|
252
|
+
Bn as fetchAtMentions,
|
|
253
|
+
dr as findPersona,
|
|
254
|
+
Yn as findPlaceholder,
|
|
255
|
+
gs as formatFileSize,
|
|
256
|
+
Tn as getAgentBaseUrl,
|
|
257
|
+
rn as getAgentServerBaseUrl,
|
|
258
|
+
Rn as getArtifactsBaseUrl,
|
|
259
|
+
B as getConnectionStateColor,
|
|
260
|
+
Ss as getDefaultJsxScope,
|
|
261
|
+
In as getDotNetBaseUrl,
|
|
262
|
+
on as getEnvVar,
|
|
263
|
+
cn as getEnvironmentInfo,
|
|
264
|
+
ds as getFriendlyLabel,
|
|
265
|
+
Pn as getIconByName,
|
|
264
266
|
k as getModelVendor,
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
267
|
+
Cr as getPersonaCatalog,
|
|
268
|
+
ln as getRandomUUID,
|
|
269
|
+
An as getServerBaseUrl,
|
|
270
|
+
pn as getServerClientBaseUrl,
|
|
271
|
+
Cs as getSharedAiChatEngine,
|
|
272
|
+
hr as greeting,
|
|
273
|
+
hs as handoffAt,
|
|
274
|
+
vn as iconCategories,
|
|
275
|
+
ur as isAgentRole,
|
|
274
276
|
K as isDetachedRunActiveStatus,
|
|
275
277
|
J as isDetachedRunSettledStatus,
|
|
276
278
|
X as isDetachedRunTerminalStatus,
|
|
277
279
|
j as isDetachedRunWaitingForInput,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
280
|
+
kn as isSectionStart,
|
|
281
|
+
gn as isServer,
|
|
282
|
+
Hn as isValidInteractionId,
|
|
283
|
+
Ln as materialIcons,
|
|
284
|
+
us as openDetachedRunTranscript,
|
|
285
|
+
Es as openSharedSessionTranscript,
|
|
286
|
+
Ts as parseClientOutput,
|
|
287
|
+
Rs as parseContentBlocks,
|
|
288
|
+
Is as parseDetachedRunConclusion,
|
|
289
|
+
Ps as parseUiArgs,
|
|
290
|
+
Er as personaFromDto,
|
|
291
|
+
Tr as personaGreeting,
|
|
292
|
+
Rr as personaTail,
|
|
293
|
+
Vn as placeCaret,
|
|
294
|
+
qn as placeholderAt,
|
|
295
|
+
vs as previousAgentKey,
|
|
294
296
|
Te as readDetachedRunActivity,
|
|
295
297
|
Re as reduceInteraction,
|
|
296
|
-
|
|
298
|
+
Ls as registerContentTools,
|
|
297
299
|
xe as resolveAccessToken,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
+
Sn as resolveApiUrl,
|
|
301
|
+
Ds as resolveChatAgent,
|
|
300
302
|
H as sanitizeJsonString,
|
|
301
|
-
|
|
303
|
+
Dn as searchIcons,
|
|
302
304
|
V as serializeEvent,
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
mn as setEbiContextData,
|
|
306
|
+
_n as setEbiContextSessionId,
|
|
307
|
+
Ir as setPersonaCatalog,
|
|
308
|
+
Zs as slotDatesFor,
|
|
309
|
+
ms as slotEnterSx,
|
|
310
|
+
Nn as splitBigLinesWithSpaces,
|
|
311
|
+
bn as startsWithInteractionId,
|
|
310
312
|
Ie as streamDetachedRunFrames,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
+
Pr as suggestionOrder,
|
|
314
|
+
Gn as swallowNextClick,
|
|
313
315
|
Pe as toDetachedRunFollowError,
|
|
314
316
|
N as toInteractionOrigin,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
317
|
+
wn as toPredictionRows,
|
|
318
|
+
Wn as tokenizeForHighlight,
|
|
319
|
+
_s as useAgentEngine,
|
|
320
|
+
xs as useAiChatServices,
|
|
321
|
+
ys as useAiChatSessionStore,
|
|
322
|
+
fs as useChatReadOnly,
|
|
323
|
+
Qn as useChatSessions,
|
|
324
|
+
Ms as useCoarsePointer,
|
|
325
|
+
Qs as useContainerRectangle,
|
|
326
|
+
Os as useDetachedRunLiveActivity,
|
|
327
|
+
Us as useDetachedRunResumeKey,
|
|
328
|
+
Fs as useDetachedRunTranscript,
|
|
329
|
+
Bs as useEnvironment,
|
|
330
|
+
ks as useEnvironmentOptional,
|
|
331
|
+
$s as useInterval,
|
|
332
|
+
Hs as useLiveTsxMaxCharsForFull,
|
|
333
|
+
Vs as useMessageScope,
|
|
334
|
+
Ns as useParkedAskUser,
|
|
335
|
+
vr as usePersona,
|
|
336
|
+
Lr as usePersonaCatalog,
|
|
337
|
+
en as usePromptAssist,
|
|
338
|
+
bs as useResponsiveLayout,
|
|
339
|
+
Gs as useSharedSessionTranscript,
|
|
340
|
+
an as useStickyHighlight,
|
|
341
|
+
ws as useTurnOpen,
|
|
342
|
+
Ws as useVisualViewport,
|
|
343
|
+
zs as v2Card,
|
|
344
|
+
Ks as v2Chip,
|
|
345
|
+
Js as v2IconBtn,
|
|
346
|
+
Xs as v2MonoMeta,
|
|
347
|
+
js as v2SectionLabel,
|
|
348
|
+
Ys as v2Theme
|
|
347
349
|
};
|
|
348
350
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Options as SanitizeSchema } from 'rehype-sanitize';
|
|
2
|
+
import { defaultUrlTransform, Options as MarkdownOptions } from 'react-markdown';
|
|
3
|
+
export declare const markdownSanitizeSchema: SanitizeSchema;
|
|
4
|
+
/** rehype plugins for chat markdown: raw HTML parsed, THEN sanitized. Order matters — sanitize must run last. */
|
|
5
|
+
export declare const markdownRehypePlugins: NonNullable<MarkdownOptions['rehypePlugins']>;
|
|
6
|
+
/** URL transform for chat markdown — react-markdown's safe default. */
|
|
7
|
+
export declare const markdownUrlTransform: typeof defaultUrlTransform;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,6 +11,14 @@ export type { PromptTriggerItem } from '../../utils/promptTriggers';
|
|
|
11
11
|
* for "diagnostics" keeps it memorable. The same chord hides it again.
|
|
12
12
|
*/
|
|
13
13
|
export declare const CONFIG_UNLOCK_SHORTCUT = "Ctrl+Alt+Meta+D";
|
|
14
|
+
/**
|
|
15
|
+
* Whether `file` matches one of `accepted` — the native `accept` grammar: an exact MIME type, a `type/*` wildcard, or a
|
|
16
|
+
* `.ext` extension (case-insensitive). Extensions matter: browsers report an empty or generic type for many office
|
|
17
|
+
* files (a .csv is often `""` or `application/vnd.ms-excel`), so a MIME-only check would refuse them.
|
|
18
|
+
*/
|
|
19
|
+
export declare function acceptsFile(file: Pick<File, 'name' | 'type'>, accepted: readonly string[]): boolean;
|
|
20
|
+
/** "12 KB", "1,4 MB" — the size line under a staged file's name. */
|
|
21
|
+
export declare function formatFileSize(bytes: number): string;
|
|
14
22
|
interface PromptV2Props {
|
|
15
23
|
forceMessage?: string | null;
|
|
16
24
|
onHeightChange?: (newHeight: number) => void;
|
|
@@ -43,6 +51,30 @@ interface PromptV2Props {
|
|
|
43
51
|
* to spend a slot on it.
|
|
44
52
|
*/
|
|
45
53
|
showAttachmentButton?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Which files the composer takes — from a drop, the paperclip picker and a paste. MIME types (wildcards allowed,
|
|
56
|
+
* `image/*`) and file extensions (`.xlsx`), as the native `accept` attribute spells them. Default `['image/*']`,
|
|
57
|
+
* today's behaviour.
|
|
58
|
+
*
|
|
59
|
+
* Every accepted file waits in the attachment row until the user sends — an image as a thumbnail, any other file
|
|
60
|
+
* as an icon + name + size — so picking a file never sends anything by itself and the user can still type.
|
|
61
|
+
* Images go out with the message. Other files go to `onSendFiles` at send time — the message itself only carries
|
|
62
|
+
* images, so a spreadsheet or a document needs the host to decide where it goes. Accepting a non-image type
|
|
63
|
+
* without `onSendFiles` ignores those files.
|
|
64
|
+
*/
|
|
65
|
+
acceptedFileTypes?: string[];
|
|
66
|
+
/**
|
|
67
|
+
* Called on send with the staged non-image files and the typed text, BEFORE the message goes out. The host puts
|
|
68
|
+
* the files where they belong (uploads them to its API) and returns the text to send — typically the user's text
|
|
69
|
+
* plus a line saying what was attached — or nothing to send the typed text as is. A rejection aborts the send and
|
|
70
|
+
* hands the draft and every attachment back (the host reports why).
|
|
71
|
+
*/
|
|
72
|
+
onSendFiles?: (files: File[], text: string) => Promise<string | void>;
|
|
73
|
+
/**
|
|
74
|
+
* The hint over the pill while files are dragged over it. Default "Solte a imagem para anexar"; a host that takes
|
|
75
|
+
* other files says so ("Solte a planilha ou a imagem").
|
|
76
|
+
*/
|
|
77
|
+
dropHint?: string;
|
|
46
78
|
/**
|
|
47
79
|
* Placeholder text for the textarea. Defaults to the data-explorer
|
|
48
80
|
* phrasing ("Pergunte sobre seus dados…"); hosts in other domains
|
|
@@ -17,7 +17,7 @@ export type { ResponsiveLayout } from './useResponsiveLayout';
|
|
|
17
17
|
export { AiChatFloating, AiChatFloating as AiChatFloatingV2 } from './AiChatFloating';
|
|
18
18
|
export { AiChatV2Pane as AiChatPane, AiChatV2Pane } from './AiChatV2Pane';
|
|
19
19
|
export type { AiChatV2PaneProps as AiChatPaneProps, AiChatV2PaneProps } from './AiChatV2Pane';
|
|
20
|
-
export { PromptV2 as Prompt, PromptV2 } from './PromptV2';
|
|
20
|
+
export { PromptV2 as Prompt, PromptV2, acceptsFile, formatFileSize } from './PromptV2';
|
|
21
21
|
export type { PromptTriggerItem } from './PromptV2';
|
|
22
22
|
export { TriggerDropdown } from './TriggerDropdown';
|
|
23
23
|
export type { TriggerDropdownProps, DropdownItem, DropdownRowKind } from './TriggerDropdown';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aintela/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -80,7 +80,8 @@
|
|
|
80
80
|
"README.md"
|
|
81
81
|
],
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"json-schema-to-typescript": "^15.0.0"
|
|
83
|
+
"json-schema-to-typescript": "^15.0.0",
|
|
84
|
+
"rehype-sanitize": "^6.0.0"
|
|
84
85
|
},
|
|
85
86
|
"scripts": {
|
|
86
87
|
"build": "vite build",
|