@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/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 B, v as F, w as k, x as H, y as V, z as N } from "./serializer-DvfyE4_t.js";
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 Be, AgentActivity as Fe, 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 Ba, InertEnvironmentProvider as Fa, 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 Bt, TextPart as Ft, 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, activitySteps as jt, agentFromKey as Yt, bareToolName as qt, canStreamDetachedRun as Zt, classifyPart as Qt, configureFriendlyMapping as $t, createAiChatEngine as es, createAiChatSessionStore as as, createAiChatSessionStore as ts, createDetachedRunTranscriptEngine as ss, createSharedSessionTranscriptEngine as ns, createUiToolRegistry as rs, detachedRunHeadline as os, disposeSharedAiChatEngine as is, engineKeyFor as cs, extendDefaultScope as ls, extendModuleRegistry as As, getDefaultJsxScope as ps, getFriendlyLabel as gs, getSharedAiChatEngine as Ss, handoffAt as ds, openDetachedRunTranscript as Cs, openSharedSessionTranscript as hs, parseClientOutput as us, parseContentBlocks as Es, parseDetachedRunConclusion as Ts, parseUiArgs as Rs, previousAgentKey as Is, registerContentTools as Ps, resolveChatAgent as vs, slotEnterSx as Ls, useAgentEngine as Ds, useAiChatServices as ms, useAiChatSessionStore as _s, useChatReadOnly as xs, useCoarsePointer as ys, useDetachedRunLiveActivity as fs, useDetachedRunResumeKey as Ms, useDetachedRunTranscript as Os, useEnvironment as Us, useEnvironmentOptional as Bs, useLiveTsxMaxCharsForFull as Fs, useMessageScope as ks, useParkedAskUser as Hs, useResponsiveLayout as Vs, useSharedSessionTranscript as Ns, useTurnOpen as bs, useVisualViewport as Gs, v2Card as ws, v2Chip as Ws, v2IconBtn as zs, v2MonoMeta as Ks, v2SectionLabel as Js, v2Theme as Xs } from "./components.js";
10
- import { s as Ys, u as qs, a as Zs, b as Qs, c as $s } from "./useContainerWidth-C7u70yDY.js";
11
- import { A as an, D as tn, g as sn, b as nn, c as rn, d as on, e as cn, f as ln, i as An, r as pn } from "./environmentUtils-VZNTCzEE.js";
12
- import { ALLOWED_DOMAINS as Sn, ALLOWED_EMAILS as dn, AUTH_CONFIG as Cn, GOOGLE_CLIENT_ID as hn, getAgentBaseUrl as un, getArtifactsBaseUrl as En, getDotNetBaseUrl as Tn, getIconByName as Rn, iconCategories as In, materialIcons as Pn, searchIcons as vn, setEbiContextData as Ln, setEbiContextSessionId as Dn } from "./utils.js";
13
- import { P as _n, S as xn, c as yn, a as fn, e as Mn, b as On, f as Un, i as Bn, d as Fn, p as kn, s as Hn, h as Vn, j as Nn, t as bn, k as Gn } from "./predictionRows-Damfwthh.js";
14
- import { a as Wn, b as zn, c as Kn, d as Jn, f as Xn, p as jn } from "./promptTriggers-xwMJ5gRj.js";
15
- import { u as qn } from "./useChatSessions-BI3bHoOh.js";
16
- import { Score as Qn } from "./interfaces.js";
17
- import { A as er, a as ar, P as tr, R as sr, b as nr, c as rr, d as or, V as ir, e as cr, f as lr, g as Ar, h as pr, i as gr, j as Sr, k as dr, l as Cr, p as hr, m as ur, n as Er, s as Tr, o as Rr, u as Ir, q as Pr } from "./PersonaAvatar-tKaWpDeQ.js";
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
- er as AGENT_ROLES,
20
- Sn as ALLOWED_DOMAINS,
21
- dn as ALLOWED_EMAILS,
22
- an as ANALYTICS_AGENT_NAME,
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
- Cn as AUTH_CONFIG,
26
+ un as AUTH_CONFIG,
27
27
  q as Account,
28
28
  Ue as ActivityLine,
29
- Be as AgentActivity,
30
- Fe as AgentActivityV2,
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
- ar as AvatarStack,
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
- tn as DEV_SERVER_CONFIG,
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
- hn as GOOGLE_CLIENT_ID,
108
+ En as GOOGLE_CLIENT_ID,
109
109
  C as GetEventTypeFromDotNetName,
110
110
  Oa as GlobeIcon,
111
111
  Ua as HandoffDivider,
112
- Ba as HistoryIcon,
112
+ Fa as HistoryIcon,
113
113
  Ae as HttpArtifactService,
114
114
  me as HttpSessionService,
115
115
  pe as IDLE_TIMEOUT,
116
- Fa as InertEnvironmentProvider,
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
- _n as PERSON_OR_PLACE_LEAD_ROWS,
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
- tr as PersonaAvatar,
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
- sr as ROLE_COLOR,
165
- nr as ROLE_DESC,
166
- rr as ROLE_LABEL,
167
- or as ROLE_OF,
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
- Qn as Score,
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
- xn as SortableTable,
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
- Bt as TerminalIcon,
198
+ Ft as TerminalIcon,
199
199
  f as TextContent,
200
- Ft as TextPart,
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
- ir as VOICE_RULES,
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
- Wn as activatePlaceholder,
217
- jt as activitySteps,
218
- zn as advanceToPlaceholder,
219
- Yt as agentFromKey,
220
- Kn as applyTriggerInsertion,
221
- cr as article,
222
- lr as articleFor,
223
- Ar as autonomousAgent,
224
- pr as avatarAlt,
225
- qt as bareToolName,
226
- Zt as canStreamDetachedRun,
227
- yn as chipLocations,
228
- fn as chunkArray,
229
- Qt as classifyPart,
230
- $t as configureFriendlyMapping,
231
- es as createAiChatEngine,
232
- as as createAiChatSessionStore,
233
- ts as createAiChatStore,
234
- ss as createDetachedRunTranscriptEngine,
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
- ns as createSharedSessionTranscriptEngine,
237
+ rs as createSharedSessionTranscriptEngine,
237
238
  Ee as createSseParser,
238
239
  O as createStreamingResponseSerializer,
239
- rs as createUiToolRegistry,
240
+ os as createUiToolRegistry,
240
241
  _e as decodeSessionEvents,
241
242
  U as deserializeEvent,
242
- B as deserializePayload,
243
- os as detachedRunHeadline,
244
- Jn as detectTrigger,
245
- is as disposeSharedAiChatEngine,
246
- cs as engineKeyFor,
247
- ls as extendDefaultScope,
248
- As as extendModuleRegistry,
249
- Mn as extractInteractionId,
250
- On as extractLinkAction,
251
- Un as fetchAtMentions,
252
- gr as findPersona,
253
- Xn as findPlaceholder,
254
- un as getAgentBaseUrl,
255
- sn as getAgentServerBaseUrl,
256
- En as getArtifactsBaseUrl,
257
- F as getConnectionStateColor,
258
- ps as getDefaultJsxScope,
259
- Tn as getDotNetBaseUrl,
260
- nn as getEnvVar,
261
- rn as getEnvironmentInfo,
262
- gs as getFriendlyLabel,
263
- Rn as getIconByName,
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
- Sr as getPersonaCatalog,
266
- on as getRandomUUID,
267
- cn as getServerBaseUrl,
268
- ln as getServerClientBaseUrl,
269
- Ss as getSharedAiChatEngine,
270
- dr as greeting,
271
- ds as handoffAt,
272
- In as iconCategories,
273
- Cr as isAgentRole,
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
- Bn as isSectionStart,
279
- An as isServer,
280
- Fn as isValidInteractionId,
281
- Pn as materialIcons,
282
- Cs as openDetachedRunTranscript,
283
- hs as openSharedSessionTranscript,
284
- us as parseClientOutput,
285
- Es as parseContentBlocks,
286
- Ts as parseDetachedRunConclusion,
287
- Rs as parseUiArgs,
288
- hr as personaFromDto,
289
- ur as personaGreeting,
290
- Er as personaTail,
291
- kn as placeCaret,
292
- jn as placeholderAt,
293
- Is as previousAgentKey,
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
- Ps as registerContentTools,
298
+ Ls as registerContentTools,
297
299
  xe as resolveAccessToken,
298
- pn as resolveApiUrl,
299
- vs as resolveChatAgent,
300
+ Sn as resolveApiUrl,
301
+ Ds as resolveChatAgent,
300
302
  H as sanitizeJsonString,
301
- vn as searchIcons,
303
+ Dn as searchIcons,
302
304
  V as serializeEvent,
303
- Ln as setEbiContextData,
304
- Dn as setEbiContextSessionId,
305
- Tr as setPersonaCatalog,
306
- Ys as slotDatesFor,
307
- Ls as slotEnterSx,
308
- Hn as splitBigLinesWithSpaces,
309
- Vn as startsWithInteractionId,
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
- Rr as suggestionOrder,
312
- Nn as swallowNextClick,
313
+ Pr as suggestionOrder,
314
+ Gn as swallowNextClick,
313
315
  Pe as toDetachedRunFollowError,
314
316
  N as toInteractionOrigin,
315
- bn as toPredictionRows,
316
- Gn as tokenizeForHighlight,
317
- Ds as useAgentEngine,
318
- ms as useAiChatServices,
319
- _s as useAiChatSessionStore,
320
- xs as useChatReadOnly,
321
- qn as useChatSessions,
322
- ys as useCoarsePointer,
323
- qs as useContainerRectangle,
324
- fs as useDetachedRunLiveActivity,
325
- Ms as useDetachedRunResumeKey,
326
- Os as useDetachedRunTranscript,
327
- Us as useEnvironment,
328
- Bs as useEnvironmentOptional,
329
- Zs as useInterval,
330
- Fs as useLiveTsxMaxCharsForFull,
331
- ks as useMessageScope,
332
- Hs as useParkedAskUser,
333
- Ir as usePersona,
334
- Pr as usePersonaCatalog,
335
- Qs as usePromptAssist,
336
- Vs as useResponsiveLayout,
337
- Ns as useSharedSessionTranscript,
338
- $s as useStickyHighlight,
339
- bs as useTurnOpen,
340
- Gs as useVisualViewport,
341
- ws as v2Card,
342
- Ws as v2Chip,
343
- zs as v2IconBtn,
344
- Ks as v2MonoMeta,
345
- Js as v2SectionLabel,
346
- Xs as v2Theme
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;
@@ -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.11.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",