@aintela/chat 0.11.1 → 0.12.1
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 +5529 -5474
- package/dist/components.js.map +1 -1
- package/dist/index.js +148 -146
- package/dist/src/components/LlmResponseRender/LiveJsxBlock.d.ts +8 -0
- package/dist/src/components/LlmResponseRender/LlmResponseRender.d.ts +10 -5
- package/dist/src/components/LlmResponseRender/noInPageEval.test.d.ts +1 -0
- package/dist/src/components/LlmResponseRender/parseBlocks.d.ts +19 -21
- package/dist/src/components/v2/PromptV2.d.ts +32 -0
- package/dist/src/components/v2/index.d.ts +1 -1
- package/package.json +1 -1
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
|
|
@@ -51,5 +51,13 @@ export declare class JsxErrorBoundary extends React.Component<{
|
|
|
51
51
|
componentDidCatch(error: Error, info: React.ErrorInfo): void;
|
|
52
52
|
render(): React.ReactNode;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Runs `code` with `new Function` in the window that mounts it, and renders the component it returns.
|
|
56
|
+
*
|
|
57
|
+
* ⚠️ `code` is model-written. Mount this ONLY inside a sandboxed, opaque-origin frame (`<iframe sandbox="allow-scripts">`
|
|
58
|
+
* without `allow-same-origin`) — never in a page that holds a session, where the code could read the token and post it
|
|
59
|
+
* anywhere (AIA-Travel/AIA Issues 1604 and 1752). The obtapp does exactly that for `present_tsx`. Nothing in this
|
|
60
|
+
* library mounts it: assistant markdown renders code fences as code.
|
|
61
|
+
*/
|
|
54
62
|
declare const LiveJsxBlock: React.FC<LiveJsxBlockProps>;
|
|
55
63
|
export default LiveJsxBlock;
|
|
@@ -2,11 +2,11 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { Interaction } from '../../models/Interaction';
|
|
3
3
|
import { EventBusService } from '../../services/eventBusService';
|
|
4
4
|
interface LlmResponseRenderProps {
|
|
5
|
-
/** Full LLM response in markdown
|
|
5
|
+
/** Full LLM response in markdown. Code fences of any language render as code, never live. */
|
|
6
6
|
content: string;
|
|
7
7
|
sessionId: string;
|
|
8
8
|
partial: boolean;
|
|
9
|
-
/**
|
|
9
|
+
/** @deprecated Ignored: nothing in the message is evaluated, so there is no scope to extend. */
|
|
10
10
|
scope?: Record<string, unknown>;
|
|
11
11
|
eventBusService?: EventBusService;
|
|
12
12
|
onLinkClicked: (link: string, content: string | null) => void;
|
|
@@ -17,10 +17,15 @@ interface LlmResponseRenderProps {
|
|
|
17
17
|
friendlyMode?: boolean;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Renders an LLM markdown response
|
|
20
|
+
* Renders an LLM markdown response.
|
|
21
21
|
*
|
|
22
|
-
* Regular markdown
|
|
23
|
-
*
|
|
22
|
+
* Regular markdown, and every fenced code block → MarkdownExtended (sanitized, syntax-highlighted)
|
|
23
|
+
* `{{Component:<slotId>}}` lines → the matching UI tool part, placed here
|
|
24
|
+
*
|
|
25
|
+
* A ```tsx / ```jsx / ```livetsx fence is shown as CODE. Nothing in an assistant message is ever evaluated in this
|
|
26
|
+
* window: it is model output, and the host page holds the user's session (AIA-Travel/AIA Issue 1752). Model-written
|
|
27
|
+
* UI reaches the screen only as a UI tool, and a host that runs such code does so in a sandboxed frame of its own
|
|
28
|
+
* (`LiveJsxBlock` evaluates in whatever window mounts it — mount it only inside one).
|
|
24
29
|
*
|
|
25
30
|
* Usage:
|
|
26
31
|
* <LlmResponseRender content={llmResponse} sessionId={sessionId} />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
export type ContentBlock = {
|
|
2
|
+
/**
|
|
3
|
+
* `markdown` and `slot` are the only kinds emitted. `liveTsx` is kept in the union for source compatibility and
|
|
4
|
+
* is never produced: a ```tsx / ```jsx / ```livetsx fence is model output, and the chat renders it as CODE, never
|
|
5
|
+
* as a live component in the host page (AIA-Travel/AIA Issue 1752). A host that wants model-written UI renders it
|
|
6
|
+
* from a UI tool (`present_tsx`) in a sandboxed, opaque-origin frame of its own.
|
|
7
|
+
*/
|
|
2
8
|
type: 'liveTsx' | 'markdown' | 'slot';
|
|
3
9
|
content?: string;
|
|
10
|
+
/** @deprecated Only ever set on `liveTsx` blocks, which are no longer emitted. */
|
|
4
11
|
code?: string;
|
|
5
12
|
/** For `slot` blocks: the SlotId from a UI tool's result, matched to a
|
|
6
13
|
* `{{Component:<slotId>}}` token in the assistant text. */
|
|
7
14
|
slotId?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Per-block lifecycle state. False once a closed liveTsx fence has
|
|
10
|
-
* been parsed out of the chat text (the sidecar's build succeeded
|
|
11
|
-
* and the compiled JS is safe to mount). True for a "loading"
|
|
12
|
-
* marker without a paired closing fence, and for the trailing
|
|
13
|
-
* unclosed fence at the end of streaming text.
|
|
14
|
-
*/
|
|
15
|
+
/** @deprecated Only ever set on `liveTsx` blocks, which are no longer emitted. */
|
|
15
16
|
partial?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* 0..1 progress hint for partial liveTsx blocks. Derived from the
|
|
18
|
-
* count of <i data-lt-tick></i> markers the server emits into the
|
|
19
|
-
* chat text every `STRIDE` chars of TSX body received (see
|
|
20
|
-
* `LiveTsxProgressStride` in JsxLiveStreamProcessor.cs). Mapped to
|
|
21
|
-
* `MAX_CHARS_FOR_FULL` and clamped to 1. Consumed by
|
|
22
|
-
* `GeneratingVisualization` to fill the placeholder's bar buckets.
|
|
23
|
-
*/
|
|
17
|
+
/** @deprecated Only ever set on `liveTsx` blocks, which are no longer emitted. */
|
|
24
18
|
progress?: number;
|
|
19
|
+
/** @deprecated Only ever set on `liveTsx` blocks, which are no longer emitted. */
|
|
25
20
|
bytes?: number;
|
|
26
21
|
};
|
|
22
|
+
/** Kept for source compatibility with hosts that pass it to `parseContentBlocks`; nothing reads it any more. */
|
|
27
23
|
export declare const DEFAULT_MAX_CHARS_FOR_FULL = 2000;
|
|
28
24
|
/**
|
|
29
25
|
* Splits a markdown string into sequential content blocks:
|
|
30
|
-
* - 'markdown' — regular content
|
|
31
|
-
*
|
|
26
|
+
* - 'markdown' — regular content: prose, headings, and EVERY fenced code block, ```tsx / ```jsx / ```livetsx
|
|
27
|
+
* included (they render as highlighted code; see `ContentBlock.type`)
|
|
28
|
+
* - 'slot' — a `{{Component:<slotId>}}` line, where the matching UI tool part is placed
|
|
29
|
+
*
|
|
30
|
+
* A fence still streaming (no closing ``` yet) is left to remark, which runs an unclosed fence to the end of the
|
|
31
|
+
* text: the code typed so far shows as code, and nothing of it is evaluated.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
* the partial code is still emitted as a 'liveTsx' block so it goes through
|
|
35
|
-
* LiveJsxBlock (and skeleton detection) instead of the markdown renderer.
|
|
33
|
+
* `options` is accepted for source compatibility and ignored.
|
|
36
34
|
*/
|
|
37
|
-
export declare function parseContentBlocks(text: string,
|
|
35
|
+
export declare function parseContentBlocks(text: string, _options?: {
|
|
38
36
|
maxCharsForFull?: number;
|
|
39
37
|
}): ContentBlock[];
|
|
@@ -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';
|