@aintela/chat 0.3.1 → 0.3.3
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/{atMentions-CnHuJKhX.js → atMentions-BhAwZTm1.js} +45 -34
- package/dist/atMentions-BhAwZTm1.js.map +1 -0
- package/dist/components.js +4366 -4313
- package/dist/components.js.map +1 -1
- package/dist/{httpArtifactService-Ba9xFy1E.js → httpArtifactService-qcYDyDh_.js} +5 -2
- package/dist/{httpArtifactService-Ba9xFy1E.js.map → httpArtifactService-qcYDyDh_.js.map} +1 -1
- package/dist/index.js +91 -89
- package/dist/services.js +1 -1
- package/dist/src/components/v2/PromptV2.d.ts +26 -0
- package/dist/src/components/v2/index.d.ts +2 -0
- package/dist/src/components/v2/useVisualViewport.d.ts +20 -0
- package/dist/src/models/Notification.d.ts +11 -0
- package/dist/src/models/index.d.ts +1 -1
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/swallowNextClick.d.ts +16 -0
- package/dist/utils.js +22 -21
- package/package.json +1 -1
- package/dist/atMentions-CnHuJKhX.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
|
-
import { A as s, a as n, b as o, c as r, d as i, C as c, e as l, f as A, E as p, g, F as S, h as C, G as I, I as h, L as d, M as
|
|
2
|
+
import { A as s, a as n, b as o, c as r, d as i, C as c, e as l, f as A, E as p, g, F as S, h as C, G as I, I as h, L as d, M as u, i as E, R as P, j as T, S as v, k as m, l as L, m as R, n as x, o as M, T as y, p as f, q as D, r as _, s as k, t as B, u as U, v as V, w as b } from "./serializer-D2W42bdT.js";
|
|
3
3
|
import { C as H, C as N } from "./ClientMessage-DUby3KyC.js";
|
|
4
4
|
import { A as O, a as w, M as W, b as z, S as J, i as K } from "./Memory-CjrYSkzB.js";
|
|
5
|
-
import { C as
|
|
6
|
-
import { A as Y, a as Q, E as $, H as ee, I as ae, L as te, W as se } from "./httpArtifactService-
|
|
5
|
+
import { C as q, P as X } from "./Prompt-DZb7OaPp.js";
|
|
6
|
+
import { A as Y, a as Q, E as $, H as ee, I as ae, L as te, W as se } from "./httpArtifactService-qcYDyDh_.js";
|
|
7
7
|
import { A as oe } from "./artifactHtmlHandler-CMQJf1cX.js";
|
|
8
8
|
import { H as ie, d as ce, r as le } from "./httpSessionService-DXlT2vxT.js";
|
|
9
|
-
import { APPBAR_HEIGHT as pe, APPBAR_HEIGHT as ge, ASK_USER_CANCELLED as Se, AgentActivity as Ce, AgentActivity as Ie, AiChat as he, AiChatDrawer as de, AiChatFloating as
|
|
10
|
-
import { u as
|
|
11
|
-
import { A as
|
|
12
|
-
import { ALLOWED_DOMAINS as
|
|
13
|
-
import { S as
|
|
14
|
-
import { u as
|
|
15
|
-
import { Score as
|
|
9
|
+
import { APPBAR_HEIGHT as pe, APPBAR_HEIGHT as ge, ASK_USER_CANCELLED as Se, AgentActivity as Ce, AgentActivity as Ie, AiChat as he, AiChatDrawer as de, AiChatFloating as ue, AiChatFloating as Ee, AiChatPane as Pe, AiChatProvider as Te, AiChatServiceContext as ve, AiChatPane as me, AppBar as Le, AppBar as Re, AppRail as xe, AppRail as Me, AppShell as ye, AppShell as fe, ArtifactRender as De, AskUserDialog as _e, AskUserSheet as ke, BoxedPart as Be, BrainIcon as Ue, ChartIcon as Ve, ChatIcon as be, ChatPane as Fe, ChatsHistory as He, ChatsHistory as Ne, CheckIcon as Ge, ChevronIcon as Oe, ChevronRightIcon as we, CloseIcon as We, CodeIcon as ze, ComposerIcon as Je, CurrentMessage as Ke, DEFAULT_PART_RENDERERS as je, DashboardIcon as qe, DataExplorerIcon as Xe, DelayTextComponent as Ze, EnvironmentProvider as Ye, FileIcon as Qe, FunctionPart as $e, GlobeIcon as ea, HistoryIcon as aa, IDLE_TIMEOUT as ta, InertEnvironmentProvider as sa, JsxErrorBoundary as na, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as oa, LastPrompts as ra, LastPrompts as ia, LinearBackgroundProgress as ca, LinearProgressBarWithMarkers as la, ListCheckIcon as Aa, LiveJsxBlock as pa, LiveTsxConfigProvider as ga, LlmResponseRender as Sa, LoadingDots as Ca, LockClosedIcon as Ia, LockOpenIcon as ha, MOBILE_NAV_DEFAULT as da, MarkdownExtended as ua, MentionPickerPanel as Ea, MenuIcon as Pa, Message as Ta, MobileDrawer as va, MobileDrawer as ma, PanelIcon as La, PaperclipIcon as Ra, PauseIcon as xa, PenIcon as Ma, PinIcon as ya, PlusIcon as fa, Prompt as Da, PromptDateMarkers as _a, PromptGhostHint as ka, Prompt as Ba, RotateIcon as Ua, RunProgressPanel as Va, RunProgressPanel as ba, RunProgressStrip as Fa, RunProgressStrip as Ha, SearchIcon as Na, SendIcon as Ga, SessionStateManagerService as Oa, SparkleIcon as wa, Sparkline as Wa, StopIcon as za, Stopwatch as Ja, SubAgentBox as Ka, SubAgentBox as ja, SuspendedPart as qa, TableIcon as Xa, TaskList as Za, TaskList as Ya, TerminalIcon as Qa, TextPart as $a, ThoughtPart as et, ToolIcon as at, TrashIcon as tt, TriggerDropdown as st, TurnAwareButton as nt, UiToolDispatcher as ot, UndoIcon as rt, UsersIcon as it, V2_CHART_PALETTE as ct, WARNING_THRESHOLD as lt, WaitingPart as At, ZoomInIcon as pt, ZoomOutIcon as gt, classifyPart as St, configureFriendlyMapping as Ct, createAiChatEngine as It, createAiChatSessionStore as ht, createAiChatSessionStore as dt, createUiToolRegistry as ut, disposeSharedAiChatEngine as Et, engineKeyFor as Pt, extendDefaultScope as Tt, extendModuleRegistry as vt, getDefaultJsxScope as mt, getFriendlyLabel as Lt, getSharedAiChatEngine as Rt, parseClientOutput as xt, parseContentBlocks as Mt, parseUiArgs as yt, useAgentEngine as ft, useAiChatServices as Dt, useAiChatSessionStore as _t, useCoarsePointer as kt, useEnvironment as Bt, useEnvironmentOptional as Ut, useLiveTsxMaxCharsForFull as Vt, useParkedAskUser as bt, useResponsiveLayout as Ft, useTurnOpen as Ht, useVisualViewport as Nt, v2Card as Gt, v2Chip as Ot, v2IconBtn as wt, v2MonoMeta as Wt, v2SectionLabel as zt, v2Theme as Jt } from "./components.js";
|
|
10
|
+
import { u as jt, a as qt, b as Xt } from "./useContainerWidth-B40_i-NW.js";
|
|
11
|
+
import { A as Yt, D as Qt, g as $t, b as es, c as as, d as ts, e as ss, f as ns, i as os, r as rs } from "./environmentUtils-VZNTCzEE.js";
|
|
12
|
+
import { ALLOWED_DOMAINS as cs, ALLOWED_EMAILS as ls, AUTH_CONFIG as As, GOOGLE_CLIENT_ID as ps, getAgentBaseUrl as gs, getArtifactsBaseUrl as Ss, getDotNetBaseUrl as Cs, getIconByName as Is, iconCategories as hs, materialIcons as ds, searchIcons as us, setEbiContextData as Es, setEbiContextSessionId as Ps } from "./utils.js";
|
|
13
|
+
import { S as vs, a as ms, b as Ls, c as Rs, d as xs, e as Ms, f as ys, g as fs, h as Ds, i as _s, j as ks, k as Bs, l as Us, p as Vs, m as bs, s as Fs, o as Hs, q as Ns, t as Gs } from "./atMentions-BhAwZTm1.js";
|
|
14
|
+
import { u as ws } from "./useChatSessions-1AAvAdPW.js";
|
|
15
|
+
import { Score as zs } from "./interfaces.js";
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
cs as ALLOWED_DOMAINS,
|
|
18
|
+
ls as ALLOWED_EMAILS,
|
|
19
|
+
Yt as ANALYTICS_AGENT_NAME,
|
|
20
20
|
pe as APPBAR_HEIGHT,
|
|
21
21
|
ge as APPBAR_V2_HEIGHT,
|
|
22
22
|
Se as ASK_USER_CANCELLED,
|
|
23
|
-
|
|
23
|
+
As as AUTH_CONFIG,
|
|
24
24
|
O as Account,
|
|
25
25
|
Ce as AgentActivity,
|
|
26
26
|
Ie as AgentActivityV2,
|
|
@@ -32,9 +32,9 @@ export {
|
|
|
32
32
|
o as AgentType,
|
|
33
33
|
he as AiChat,
|
|
34
34
|
de as AiChatDrawer,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
ue as AiChatFloating,
|
|
36
|
+
Ee as AiChatFloatingV2,
|
|
37
|
+
Pe as AiChatPane,
|
|
38
38
|
Te as AiChatProvider,
|
|
39
39
|
ve as AiChatServiceContext,
|
|
40
40
|
me as AiChatV2Pane,
|
|
@@ -48,10 +48,10 @@ export {
|
|
|
48
48
|
De as ArtifactRender,
|
|
49
49
|
r as ArtifactType,
|
|
50
50
|
_e as AskUserDialog,
|
|
51
|
-
|
|
51
|
+
ke as AskUserSheet,
|
|
52
52
|
i as AuthorType,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
Be as BoxedPart,
|
|
54
|
+
Ue as BrainIcon,
|
|
55
55
|
Ve as ChartIcon,
|
|
56
56
|
c as ChatAction,
|
|
57
57
|
l as ChatEventType,
|
|
@@ -68,13 +68,13 @@ export {
|
|
|
68
68
|
We as CloseIcon,
|
|
69
69
|
ze as CodeIcon,
|
|
70
70
|
Je as ComposerIcon,
|
|
71
|
-
|
|
71
|
+
q as ConnectionState,
|
|
72
72
|
Ke as CurrentMessage,
|
|
73
73
|
je as DEFAULT_PART_RENDERERS,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
Qt as DEV_SERVER_CONFIG,
|
|
75
|
+
qe as DashboardIcon,
|
|
76
|
+
Xe as DataExplorerIcon,
|
|
77
|
+
Ze as DelayTextComponent,
|
|
78
78
|
Ye as EnvironmentProvider,
|
|
79
79
|
$ as EventBusService,
|
|
80
80
|
p as EventType,
|
|
@@ -83,7 +83,7 @@ export {
|
|
|
83
83
|
S as FunctionCallContent,
|
|
84
84
|
$e as FunctionPart,
|
|
85
85
|
C as FunctionResultContent,
|
|
86
|
-
|
|
86
|
+
ps as GOOGLE_CLIENT_ID,
|
|
87
87
|
I as GetEventTypeFromDotNetName,
|
|
88
88
|
ea as GlobeIcon,
|
|
89
89
|
aa as HistoryIcon,
|
|
@@ -109,16 +109,16 @@ export {
|
|
|
109
109
|
Ia as LockClosedIcon,
|
|
110
110
|
ha as LockOpenIcon,
|
|
111
111
|
da as MOBILE_NAV_DEFAULT,
|
|
112
|
-
|
|
112
|
+
ua as MarkdownExtended,
|
|
113
113
|
W as MemoryContextLabels,
|
|
114
114
|
z as MemoryContexts,
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
Ea as MentionPickerPanel,
|
|
116
|
+
Pa as MenuIcon,
|
|
117
117
|
Ta as Message,
|
|
118
118
|
va as MobileDrawer,
|
|
119
119
|
ma as MobileDrawerV2,
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
u as ModelConfig,
|
|
121
|
+
E as ModelType,
|
|
122
122
|
La as PanelIcon,
|
|
123
123
|
Ra as PaperclipIcon,
|
|
124
124
|
xa as PauseIcon,
|
|
@@ -127,24 +127,24 @@ export {
|
|
|
127
127
|
fa as PlusIcon,
|
|
128
128
|
Da as Prompt,
|
|
129
129
|
_a as PromptDateMarkers,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
ka as PromptGhostHint,
|
|
131
|
+
X as PromptUtils,
|
|
132
|
+
Ba as PromptV2,
|
|
133
|
+
P as ResponseType,
|
|
134
|
+
Ua as RotateIcon,
|
|
135
135
|
T as RunMode,
|
|
136
136
|
Va as RunProgressPanel,
|
|
137
137
|
ba as RunProgressPanelV2,
|
|
138
138
|
Fa as RunProgressStrip,
|
|
139
139
|
Ha as RunProgressStripV2,
|
|
140
140
|
J as SUB_AGENT_TERMINAL_STATUSES,
|
|
141
|
-
|
|
141
|
+
zs as Score,
|
|
142
142
|
Na as SearchIcon,
|
|
143
143
|
Ga as SendIcon,
|
|
144
144
|
v as ServerEvent,
|
|
145
145
|
Oa as SessionStateManagerService,
|
|
146
146
|
m as SkillLevel,
|
|
147
|
-
|
|
147
|
+
vs as SortableTable,
|
|
148
148
|
wa as SparkleIcon,
|
|
149
149
|
Wa as Sparkline,
|
|
150
150
|
za as StopIcon,
|
|
@@ -155,9 +155,9 @@ export {
|
|
|
155
155
|
M as StreamingTextContent,
|
|
156
156
|
Ka as SubAgentBox,
|
|
157
157
|
ja as SubAgentBoxV2,
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
qa as SuspendedPart,
|
|
159
|
+
Xa as TableIcon,
|
|
160
|
+
Za as TaskList,
|
|
161
161
|
Ya as TaskListV2,
|
|
162
162
|
Qa as TerminalIcon,
|
|
163
163
|
y as TextContent,
|
|
@@ -176,11 +176,11 @@ export {
|
|
|
176
176
|
se as WebSocketConnecionV2,
|
|
177
177
|
pt as ZoomInIcon,
|
|
178
178
|
gt as ZoomOutIcon,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
ms as activatePlaceholder,
|
|
180
|
+
Ls as advanceToPlaceholder,
|
|
181
|
+
Rs as applyTriggerInsertion,
|
|
182
|
+
xs as chipLocations,
|
|
183
|
+
Ms as chunkArray,
|
|
184
184
|
St as classifyPart,
|
|
185
185
|
Ct as configureFriendlyMapping,
|
|
186
186
|
It as createAiChatEngine,
|
|
@@ -188,74 +188,76 @@ export {
|
|
|
188
188
|
dt as createAiChatStore,
|
|
189
189
|
f as createEventSerializer,
|
|
190
190
|
D as createStreamingResponseSerializer,
|
|
191
|
-
|
|
191
|
+
ut as createUiToolRegistry,
|
|
192
192
|
ce as decodeSessionEvents,
|
|
193
193
|
_ as deserializeEvent,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
k as deserializePayload,
|
|
195
|
+
ys as detectTrigger,
|
|
196
|
+
Et as disposeSharedAiChatEngine,
|
|
197
|
+
Pt as engineKeyFor,
|
|
198
198
|
Tt as extendDefaultScope,
|
|
199
199
|
vt as extendModuleRegistry,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
200
|
+
fs as extractInteractionId,
|
|
201
|
+
Ds as extractLinkAction,
|
|
202
|
+
_s as fetchAtMentions,
|
|
203
|
+
ks as findPlaceholder,
|
|
204
|
+
gs as getAgentBaseUrl,
|
|
205
|
+
$t as getAgentServerBaseUrl,
|
|
206
|
+
Ss as getArtifactsBaseUrl,
|
|
207
|
+
B as getConnectionStateColor,
|
|
208
208
|
mt as getDefaultJsxScope,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
Cs as getDotNetBaseUrl,
|
|
210
|
+
es as getEnvVar,
|
|
211
|
+
as as getEnvironmentInfo,
|
|
212
212
|
Lt as getFriendlyLabel,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
Is as getIconByName,
|
|
214
|
+
U as getModelVendor,
|
|
215
|
+
ts as getRandomUUID,
|
|
216
|
+
ss as getServerBaseUrl,
|
|
217
|
+
ns as getServerClientBaseUrl,
|
|
218
218
|
Rt as getSharedAiChatEngine,
|
|
219
|
-
|
|
219
|
+
hs as iconCategories,
|
|
220
220
|
Bs as isSectionStart,
|
|
221
|
-
|
|
221
|
+
os as isServer,
|
|
222
222
|
K as isSubAgentTerminalStatus,
|
|
223
223
|
Us as isValidInteractionId,
|
|
224
|
-
|
|
224
|
+
ds as materialIcons,
|
|
225
225
|
xt as parseClientOutput,
|
|
226
226
|
Mt as parseContentBlocks,
|
|
227
227
|
yt as parseUiArgs,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
Vs as placeCaret,
|
|
229
|
+
bs as placeholderAt,
|
|
230
230
|
le as resolveAccessToken,
|
|
231
|
-
|
|
231
|
+
rs as resolveApiUrl,
|
|
232
232
|
V as sanitizeJsonString,
|
|
233
|
-
|
|
233
|
+
us as searchIcons,
|
|
234
234
|
b as serializeEvent,
|
|
235
235
|
Es as setEbiContextData,
|
|
236
236
|
Ps as setEbiContextSessionId,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
Fs as splitBigLinesWithSpaces,
|
|
238
|
+
Hs as startsWithInteractionId,
|
|
239
|
+
Ns as swallowNextClick,
|
|
240
|
+
Gs as tokenizeForHighlight,
|
|
240
241
|
ft as useAgentEngine,
|
|
241
242
|
Dt as useAiChatServices,
|
|
242
243
|
_t as useAiChatSessionStore,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
ws as useChatSessions,
|
|
245
|
+
kt as useCoarsePointer,
|
|
246
|
+
jt as useContainerRectangle,
|
|
247
|
+
Bt as useEnvironment,
|
|
248
|
+
Ut as useEnvironmentOptional,
|
|
249
|
+
qt as useInterval,
|
|
249
250
|
Vt as useLiveTsxMaxCharsForFull,
|
|
250
251
|
bt as useParkedAskUser,
|
|
251
252
|
Xt as usePromptAssist,
|
|
252
253
|
Ft as useResponsiveLayout,
|
|
253
254
|
Ht as useTurnOpen,
|
|
254
|
-
Nt as
|
|
255
|
-
Gt as
|
|
256
|
-
Ot as
|
|
257
|
-
wt as
|
|
258
|
-
Wt as
|
|
259
|
-
zt as
|
|
255
|
+
Nt as useVisualViewport,
|
|
256
|
+
Gt as v2Card,
|
|
257
|
+
Ot as v2Chip,
|
|
258
|
+
wt as v2IconBtn,
|
|
259
|
+
Wt as v2MonoMeta,
|
|
260
|
+
zt as v2SectionLabel,
|
|
261
|
+
Jt as v2Theme
|
|
260
262
|
};
|
|
261
263
|
//# sourceMappingURL=index.js.map
|
package/dist/services.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as t, a as s, E as r, H as o, I as c, L as n, W as i } from "./httpArtifactService-
|
|
1
|
+
import { A as t, a as s, E as r, H as o, I as c, L as n, W as i } from "./httpArtifactService-qcYDyDh_.js";
|
|
2
2
|
import { A as v } from "./artifactHtmlHandler-CMQJf1cX.js";
|
|
3
3
|
import { H, d as f, r as p } from "./httpSessionService-DXlT2vxT.js";
|
|
4
4
|
export {
|
|
@@ -90,6 +90,20 @@ interface PromptV2Props {
|
|
|
90
90
|
* styling stays the responsibility of the component's own `sx`.
|
|
91
91
|
*/
|
|
92
92
|
sendButtonProps?: Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
93
|
+
/**
|
|
94
|
+
* How the send (and the suspended "continue") button reads.
|
|
95
|
+
*
|
|
96
|
+
* - `'label'` — the filled `Enviar ↵` chip.
|
|
97
|
+
* - `'icon'` — the paper-plane glyph alone. What a narrow surface wants: the
|
|
98
|
+
* chip costs ~90px of a phone's action row, and `↵` is a promise a
|
|
99
|
+
* touch keyboard does not keep.
|
|
100
|
+
* - `'auto'` (default) — `'icon'` on a coarse pointer or a dark theme,
|
|
101
|
+
* `'label'` otherwise. Preserves the behaviour from before this prop
|
|
102
|
+
* existed, which keyed off the theme mode alone.
|
|
103
|
+
*
|
|
104
|
+
* The connecting state is a spinner in every variant.
|
|
105
|
+
*/
|
|
106
|
+
sendButtonVariant?: 'auto' | 'icon' | 'label';
|
|
93
107
|
/**
|
|
94
108
|
* Allow submitting with an empty textarea. Defaults to `true`.
|
|
95
109
|
*
|
|
@@ -206,6 +220,18 @@ interface PromptV2Props {
|
|
|
206
220
|
* - `'popover'` / `'panel'` — force one, for hosts that know better than the media query.
|
|
207
221
|
*/
|
|
208
222
|
mentionPicker?: 'auto' | 'popover' | 'panel';
|
|
223
|
+
/**
|
|
224
|
+
* Where the `#` date picker opens — the calendar's twin of `mentionPicker`, and for the same
|
|
225
|
+
* reason: caret-anchored means "right under the keyboard" on a phone, and a calendar is much
|
|
226
|
+
* taller than a mention row, so it loses that fight badly.
|
|
227
|
+
* - `'auto'` (default) — caret-anchored where there's a mouse, screen-centered on a coarse pointer.
|
|
228
|
+
* - `'popover'` / `'center'` — force one.
|
|
229
|
+
*
|
|
230
|
+
* Centered is modal-looking (a scrim) but is NOT a focus trap: the textarea keeps focus and the
|
|
231
|
+
* caret, so the picked date splices in exactly where `#` was typed. Tapping the scrim or pressing
|
|
232
|
+
* Escape dismisses it, leaving the `#` as plain text.
|
|
233
|
+
*/
|
|
234
|
+
datePicker?: 'auto' | 'popover' | 'center';
|
|
209
235
|
/** Chip tint for unfilled `[template placeholders]` (#447). Falls back to `slashColor`, then `hashColor`. */
|
|
210
236
|
placeholderColor?: string;
|
|
211
237
|
/**
|
|
@@ -26,6 +26,8 @@ export type { PromptGhostHintProps } from './PromptGhostHint';
|
|
|
26
26
|
export { MentionPickerPanel } from './MentionPickerPanel';
|
|
27
27
|
export type { MentionPickerPanelProps } from './MentionPickerPanel';
|
|
28
28
|
export { useCoarsePointer } from './useCoarsePointer';
|
|
29
|
+
export { useVisualViewport } from './useVisualViewport';
|
|
30
|
+
export type { VisualViewportRect } from './useVisualViewport';
|
|
29
31
|
export { PromptDateMarkers } from './PromptDateMarkers';
|
|
30
32
|
export type { PromptDateMarker } from './PromptDateMarkers';
|
|
31
33
|
export { LastPromptsV2 as LastPrompts, LastPromptsV2 } from './LastPromptsV2';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** The part of the page a keyboard is NOT covering, in client (fixed-position) coordinates. */
|
|
2
|
+
export interface VisualViewportRect {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The live visual viewport — the rectangle actually visible to the user, which is what a surface meant to be
|
|
10
|
+
* "centred on screen" has to centre inside.
|
|
11
|
+
*
|
|
12
|
+
* `position: fixed; inset: 0` is centred on the LAYOUT viewport, and with a keyboard up the two are different
|
|
13
|
+
* rectangles: the layout viewport still spans the area behind the keyboard, so anything centred in it drifts
|
|
14
|
+
* down under the keys — the taller the surface (a calendar is ~340px), the more of it disappears. In a Capacitor
|
|
15
|
+
* WebView with `KeyboardResize.Native` the frame does shrink, but measurably NOT to the visible area (29px of
|
|
16
|
+
* page stayed behind the keyboard on an iPhone 15), so even there the frame is the wrong rectangle to trust.
|
|
17
|
+
*
|
|
18
|
+
* Only subscribes while `active`, so the ordinary desktop case adds no listeners.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useVisualViewport(active: boolean): VisualViewportRect;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
export type NotificationType = 'info' | 'warning' | 'error';
|
|
2
|
+
/**
|
|
3
|
+
* A stable identity for the notifications the library raises on its own, so a host can recognise one
|
|
4
|
+
* without matching its (pt-BR, and freely reworded) `message`.
|
|
5
|
+
*
|
|
6
|
+
* - `connection-restarting` — a working socket dropped and the gateway is redialling. Hosts that draw
|
|
7
|
+
* their own connection affordance suppress this one; see `AgentGatewayWSAsync`'s `everConnected`
|
|
8
|
+
* gate for why it is not raised on the initial dial.
|
|
9
|
+
*/
|
|
10
|
+
export type NotificationKind = 'connection-restarting';
|
|
2
11
|
export interface BasicNotification {
|
|
3
12
|
type: NotificationType;
|
|
4
13
|
message: string;
|
|
5
14
|
details?: string;
|
|
15
|
+
/** Set on library-raised notifications. Absent on anything a host pushes through the port. */
|
|
16
|
+
kind?: NotificationKind;
|
|
6
17
|
}
|
|
7
18
|
export interface EnvironmentNotification extends BasicNotification {
|
|
8
19
|
id: string;
|
|
@@ -26,7 +26,7 @@ export { PromptUtils } from './Prompt';
|
|
|
26
26
|
export type { EndMessageData } from './EndMessageData';
|
|
27
27
|
export type { LlmSession, LlmCreateSessionResponse } from './LlmSession';
|
|
28
28
|
export type { ServerResponse } from './serverReponse';
|
|
29
|
-
export type { BasicNotification, EnvironmentNotification } from './Notification';
|
|
29
|
+
export type { BasicNotification, EnvironmentNotification, NotificationKind, NotificationType } from './Notification';
|
|
30
30
|
export { MemoryContexts, MemoryContextLabels } from './Memory';
|
|
31
31
|
export type { SemanticMemory, SemanticMemoryInput, SemanticMemorySearchOptions } from './Memory';
|
|
32
32
|
export type { FunctionDetails, ThoughtDetails, TextDetails, ErrorDetails, ToolEventDetails, ExecutableCodeDetails, CodeExecutionResultDetails, } from './ServerEvent';
|
|
@@ -14,6 +14,7 @@ export { default as SortableTable } from './sortable-table';
|
|
|
14
14
|
export { tokenizeForHighlight, chipLocations } from './promptHighlight';
|
|
15
15
|
export type { HighlightToken } from './promptHighlight';
|
|
16
16
|
export { placeCaret } from './placeCaret';
|
|
17
|
+
export { swallowNextClick } from './swallowNextClick';
|
|
17
18
|
export { detectTrigger, applyTriggerInsertion, findPlaceholder, placeholderAt, activatePlaceholder, advanceToPlaceholder, } from './promptTriggers';
|
|
18
19
|
export type { TriggerChar, ActiveTrigger, TriggerInsertion, TemplatePlaceholder } from './promptTriggers';
|
|
19
20
|
export { fetchAtMentions, isSectionStart } from './atMentions';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Eat the compatibility `click` that follows a `pointerdown`/`touchend` you have already acted on.
|
|
3
|
+
*
|
|
4
|
+
* A touch that lands on a control which then unmounts (or opens something over the spot) leaves the
|
|
5
|
+
* browser's synthesised click to fall on **whatever is now under the finger** — that is how picking a
|
|
6
|
+
* location once sent the prompt, the send button having slid under the tap. The same click is also
|
|
7
|
+
* what a `<ClickAwayListener>` sees as "the user clicked outside", so a surface opened during
|
|
8
|
+
* `pointerdown` is closed again microseconds later by the click of the very gesture that opened it.
|
|
9
|
+
*
|
|
10
|
+
* Cancelling `pointerdown` would suppress the compatibility events, but on touch that also kills
|
|
11
|
+
* scrolling — so the click is intercepted instead.
|
|
12
|
+
*
|
|
13
|
+
* Capture phase, so it never reaches the target (or a document-level away-listener); self-removing,
|
|
14
|
+
* and time-boxed in case no click arrives at all (the browser is not obliged to send one).
|
|
15
|
+
*/
|
|
16
|
+
export declare function swallowNextClick(): void;
|
package/dist/utils.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var u = Object.defineProperty;
|
|
2
2
|
var a = (e, t) => u(e, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { a as c, b as s } from "./environmentUtils-VZNTCzEE.js";
|
|
4
|
-
import { A as
|
|
5
|
-
import { S as Y, a as Z, b as j, c as
|
|
6
|
-
const m = "https://agent.tripapi.com.br", p = "http://localagent:8000", S = /* @__PURE__ */ a((e) => new URLSearchParams(e.location.search).get("local") === "true" ? p : c() ?? m, "getAgentBaseUrl"), f = "https://storage.googleapis.com/aibi_artifacts_bucket", I = /* @__PURE__ */ a(() => f, "getArtifactsBaseUrl"),
|
|
7
|
-
function
|
|
4
|
+
import { A as k, D as U, g as x, c as M, d as V, e as G, f as R, i as H, r as W } from "./environmentUtils-VZNTCzEE.js";
|
|
5
|
+
import { S as Y, a as Z, b as j, c as q, d as z, e as Q, f as $, g as J, h as X, i as ee, j as te, k as oe, l as ae, p as re, m as ie, s as ne, o as se, q as le, t as ce } from "./atMentions-BhAwZTm1.js";
|
|
6
|
+
const m = "https://agent.tripapi.com.br", p = "http://localagent:8000", S = /* @__PURE__ */ a((e) => new URLSearchParams(e.location.search).get("local") === "true" ? p : c() ?? m, "getAgentBaseUrl"), f = "https://storage.googleapis.com/aibi_artifacts_bucket", I = /* @__PURE__ */ a(() => f, "getArtifactsBaseUrl"), n = {}, h = (n == null ? void 0 : n.VITE_CADDY) == "true";
|
|
7
|
+
function w() {
|
|
8
8
|
const e = h ? "http://wsserver.localhost" : "http://localhost:8000";
|
|
9
9
|
if (typeof window < "u" && (window != null && window.location)) {
|
|
10
10
|
const t = window.location.host.toLowerCase();
|
|
@@ -12,11 +12,11 @@ function F() {
|
|
|
12
12
|
}
|
|
13
13
|
return typeof process < "u" && process.env && (process.env.AGENT_BASE_URL || process.env.DOTNET_API_URL) || e;
|
|
14
14
|
}
|
|
15
|
-
a(
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
}, "setEbiContextData"),
|
|
15
|
+
a(w, "getDotNetBaseUrl");
|
|
16
|
+
const F = /* @__PURE__ */ a((e, t, r = null, d = null) => {
|
|
17
|
+
const i = e.customElements.get("ebi-context-data");
|
|
18
|
+
i && (i.user = t, i.context = r || null, i.sessionId = d);
|
|
19
|
+
}, "setEbiContextData"), v = /* @__PURE__ */ a((e) => {
|
|
20
20
|
const t = window.customElements.get("ebi-context-data");
|
|
21
21
|
t && (t.sessionId = e);
|
|
22
22
|
}, "setEbiContextSessionId");
|
|
@@ -300,17 +300,17 @@ const B = ((l = s("ALLOWED_EMAILS")) == null ? void 0 : l.split(",")) ?? [], N =
|
|
|
300
300
|
export {
|
|
301
301
|
T as ALLOWED_DOMAINS,
|
|
302
302
|
B as ALLOWED_EMAILS,
|
|
303
|
-
|
|
303
|
+
k as ANALYTICS_AGENT_NAME,
|
|
304
304
|
N as AUTH_CONFIG,
|
|
305
|
-
|
|
305
|
+
U as DEV_SERVER_CONFIG,
|
|
306
306
|
y as GOOGLE_CLIENT_ID,
|
|
307
307
|
Y as SortableTable,
|
|
308
308
|
Z as activatePlaceholder,
|
|
309
309
|
j as advanceToPlaceholder,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
310
|
+
q as applyTriggerInsertion,
|
|
311
|
+
z as chipLocations,
|
|
312
|
+
Q as chunkArray,
|
|
313
|
+
$ as detectTrigger,
|
|
314
314
|
J as extractInteractionId,
|
|
315
315
|
X as extractLinkAction,
|
|
316
316
|
ee as fetchAtMentions,
|
|
@@ -318,7 +318,7 @@ export {
|
|
|
318
318
|
S as getAgentBaseUrl,
|
|
319
319
|
x as getAgentServerBaseUrl,
|
|
320
320
|
I as getArtifactsBaseUrl,
|
|
321
|
-
|
|
321
|
+
w as getDotNetBaseUrl,
|
|
322
322
|
s as getEnvVar,
|
|
323
323
|
M as getEnvironmentInfo,
|
|
324
324
|
O as getIconByName,
|
|
@@ -331,13 +331,14 @@ export {
|
|
|
331
331
|
ae as isValidInteractionId,
|
|
332
332
|
o as materialIcons,
|
|
333
333
|
re as placeCaret,
|
|
334
|
-
|
|
334
|
+
ie as placeholderAt,
|
|
335
335
|
W as resolveApiUrl,
|
|
336
336
|
b as searchIcons,
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
337
|
+
F as setEbiContextData,
|
|
338
|
+
v as setEbiContextSessionId,
|
|
339
|
+
ne as splitBigLinesWithSpaces,
|
|
340
340
|
se as startsWithInteractionId,
|
|
341
|
-
le as
|
|
341
|
+
le as swallowNextClick,
|
|
342
|
+
ce as tokenizeForHighlight
|
|
342
343
|
};
|
|
343
344
|
//# sourceMappingURL=utils.js.map
|