@aintela/chat 0.2.50 → 0.2.52

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/hooks.js CHANGED
@@ -1,4 +1,4 @@
1
- import { u as a, a as t, b as o, c as r } from "./useContainerWidth-CDv8UQyZ.js";
1
+ import { u as a, a as t, b as o, c as r } from "./useContainerWidth-B3t1ZTlo.js";
2
2
  import { u } from "./useChatSessions-sbBneRk9.js";
3
3
  export {
4
4
  u as useChatSessions,
package/dist/index.js CHANGED
@@ -1,26 +1,26 @@
1
1
  import "reflect-metadata";
2
- import { C as s, F as n, a as o, I as r, L as i, S as c, b as l, c as A, d as S, e as C, T as p, f as g, g as d, h as I, i as E, s as h, j as v } from "./serializer-DNt8QqNO.js";
3
- import { A as m, a as T, C as L, M as x, b as P, S as U, i as f } from "./Memory-DjLZqgbF.js";
4
- import { C as M, C as y } from "./ClientMessage-EKgfuTp8.js";
5
- import { C as D, P as B } from "./Prompt-DZb7OaPp.js";
2
+ import { C as s, F as n, a as o, I as r, L as i, S as c, b as l, c as A, d as S, e as p, T as C, f as g, g as d, h as I, i as h, s as E, j as v } from "./serializer-DNt8QqNO.js";
3
+ import { A as u, a as T, C as L, M as P, b as x, S as U, i as f } from "./Memory-DjLZqgbF.js";
4
+ import { C as R, C as y } from "./ClientMessage-EKgfuTp8.js";
5
+ import { C as _, P as B } from "./Prompt-DZb7OaPp.js";
6
6
  import { A as k, a as F, b, c as N, d as H, e as G, C as O, f as W, D as w, E as z, g as J, G as j, h as K, M as q, i as X, R as Y, j as Q, S as Z, l as $, m as ee, n as ae, o as te, p as se, q as ne, r as oe, s as re, t as ie, u as ce } from "./environmentUtils-CUVZ6Dq1.js";
7
- import { A as Ae, a as Se, E as Ce, H as pe, I as ge, L as de, W as Ie } from "./httpArtifactService-JtkC1T7n.js";
8
- import { A as he } from "./artifactHtmlHandler-CMQJf1cX.js";
9
- import { H as ue, d as me, r as Te } from "./httpSessionService-BDlqebW2.js";
10
- import { APPBAR_V2_HEIGHT as xe, ASK_USER_CANCELLED as Pe, AgentActivityV2 as Ue, AiChat as fe, AiChatDrawer as Re, AiChatFloating as Me, AiChatFloatingV2 as ye, AiChatProvider as _e, AiChatServiceContext as De, AiChatV2Pane as Be, AppBarV2 as Ve, AppRailV2 as ke, AppShellV2 as Fe, ArtifactRender as be, AskUserDialog as Ne, AskUserSheet as He, BoxedPart as Ge, BrainIcon as Oe, ChartIcon as We, ChatIcon as we, ChatPane as ze, ChatsHistoryV2 as Je, CheckIcon as je, ChevronIcon as Ke, ChevronRightIcon as qe, CloseIcon as Xe, CodeIcon as Ye, ComposerIcon as Qe, CurrentMessage as Ze, DEFAULT_PART_RENDERERS as $e, DashboardIcon as ea, DataExplorerIcon as aa, DelayTextComponent as ta, EnvironmentProvider as sa, FileIcon as na, FunctionPart as oa, GlobeIcon as ra, HistoryIcon as ia, IDLE_TIMEOUT as ca, InertEnvironmentProvider as la, JsxErrorBoundary as Aa, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as Sa, LastPromptsV2 as Ca, LinearBackgroundProgress as pa, LinearProgressBarWithMarkers as ga, ListCheckIcon as da, LiveJsxBlock as Ia, LiveTsxConfigProvider as Ea, LlmResponseRender as ha, LoadingDots as va, LockClosedIcon as ua, LockOpenIcon as ma, MOBILE_NAV_DEFAULT as Ta, MarkdownExtended as La, MenuIcon as xa, Message as Pa, MobileDrawerV2 as Ua, PanelIcon as fa, PauseIcon as Ra, PinIcon as Ma, PlusIcon as ya, PromptDateMarkers as _a, PromptV2 as Da, RunProgressPanelV2 as Ba, RunProgressStripV2 as Va, SearchIcon as ka, SendIcon as Fa, SessionStateManagerService as ba, SparkleIcon as Na, Sparkline as Ha, StopIcon as Ga, Stopwatch as Oa, SubAgentBox as Wa, SubAgentBoxV2 as wa, SuspendedPart as za, TableIcon as Ja, TaskListV2 as ja, TerminalIcon as Ka, TextPart as qa, ThoughtPart as Xa, ToolIcon as Ya, TrashIcon as Qa, TurnAwareButton as Za, UiToolDispatcher as $a, UsersIcon as et, V2_CHART_PALETTE as at, WARNING_THRESHOLD as tt, WaitingPart as st, classifyPart as nt, configureFriendlyMapping as ot, createAiChatEngine as rt, createAiChatSessionStore as it, createAiChatSessionStore as ct, createUiToolRegistry as lt, disposeSharedAiChatEngine as At, extendDefaultScope as St, extendModuleRegistry as Ct, getDefaultJsxScope as pt, getFriendlyLabel as gt, getSharedAiChatEngine as dt, parseClientOutput as It, parseContentBlocks as Et, parseUiArgs as ht, useAiChatServices as vt, useAiChatSessionStore as ut, useEnvironment as mt, useEnvironmentOptional as Tt, useLiveSession as Lt, useLiveTsxMaxCharsForFull as xt, useParkedAskUser as Pt, useResponsiveLayout as Ut, useTurnOpen as ft, v2Card as Rt, v2Chip as Mt, v2IconBtn as yt, v2MonoMeta as _t, v2SectionLabel as Dt, v2Theme as Bt } from "./components.js";
11
- import { u as kt, a as Ft, b as bt, c as Nt } from "./useContainerWidth-CDv8UQyZ.js";
12
- import { A as Gt, a as Ot, b as Wt, G as wt, d as zt, c as Jt, e as jt, f as Kt, g as qt, h as Xt, i as Yt, j as Qt, k as Zt, l as $t, m as es, n as as, o as ts, p as ss, q as ns, r as os, s as rs, t as is, u as cs, v as ls } from "./auth-xpQrzSI2.js";
13
- import { S as Ss, c as Cs, a as ps, e as gs, b as ds, f as Is, i as Es, d as hs, p as vs, g as us, s as ms, k as Ts, t as Ls } from "./atMentions-CJUmkOh9.js";
14
- import { u as Ps } from "./useChatSessions-sbBneRk9.js";
15
- import { Score as fs } from "./interfaces.js";
7
+ import { A as Ae, a as Se, E as pe, H as Ce, I as ge, L as de, W as Ie } from "./httpArtifactService-JtkC1T7n.js";
8
+ import { A as Ee } from "./artifactHtmlHandler-CMQJf1cX.js";
9
+ import { H as me, d as ue, r as Te } from "./httpSessionService-BDlqebW2.js";
10
+ import { APPBAR_V2_HEIGHT as Pe, ASK_USER_CANCELLED as xe, AgentActivityV2 as Ue, AiChat as fe, AiChatDrawer as Me, AiChatFloating as Re, AiChatFloatingV2 as ye, AiChatProvider as De, AiChatServiceContext as _e, AiChatV2Pane as Be, AppBarV2 as Ve, AppRailV2 as ke, AppShellV2 as Fe, ArtifactRender as be, AskUserDialog as Ne, AskUserSheet as He, BoxedPart as Ge, BrainIcon as Oe, ChartIcon as We, ChatIcon as we, ChatPane as ze, ChatsHistoryV2 as Je, CheckIcon as je, ChevronIcon as Ke, ChevronRightIcon as qe, CloseIcon as Xe, CodeIcon as Ye, ComposerIcon as Qe, CurrentMessage as Ze, DEFAULT_PART_RENDERERS as $e, DashboardIcon as ea, DataExplorerIcon as aa, DelayTextComponent as ta, EnvironmentProvider as sa, FileIcon as na, FunctionPart as oa, GlobeIcon as ra, HistoryIcon as ia, IDLE_TIMEOUT as ca, InertEnvironmentProvider as la, JsxErrorBoundary as Aa, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as Sa, LastPromptsV2 as pa, LinearBackgroundProgress as Ca, LinearProgressBarWithMarkers as ga, ListCheckIcon as da, LiveJsxBlock as Ia, LiveTsxConfigProvider as ha, LlmResponseRender as Ea, LoadingDots as va, LockClosedIcon as ma, LockOpenIcon as ua, MOBILE_NAV_DEFAULT as Ta, MarkdownExtended as La, MentionPickerPanel as Pa, MenuIcon as xa, Message as Ua, MobileDrawerV2 as fa, PanelIcon as Ma, PauseIcon as Ra, PinIcon as ya, PlusIcon as Da, PromptDateMarkers as _a, PromptGhostHint as Ba, PromptV2 as Va, RunProgressPanelV2 as ka, RunProgressStripV2 as Fa, SearchIcon as ba, SendIcon as Na, SessionStateManagerService as Ha, SparkleIcon as Ga, Sparkline as Oa, StopIcon as Wa, Stopwatch as wa, SubAgentBox as za, SubAgentBoxV2 as Ja, SuspendedPart as ja, TableIcon as Ka, TaskListV2 as qa, TerminalIcon as Xa, TextPart as Ya, ThoughtPart as Qa, ToolIcon as Za, TrashIcon as $a, TriggerDropdown as et, TurnAwareButton as at, UiToolDispatcher as tt, UsersIcon as st, V2_CHART_PALETTE as nt, WARNING_THRESHOLD as ot, WaitingPart as rt, classifyPart as it, configureFriendlyMapping as ct, createAiChatEngine as lt, createAiChatSessionStore as At, createAiChatSessionStore as St, createUiToolRegistry as pt, disposeSharedAiChatEngine as Ct, extendDefaultScope as gt, extendModuleRegistry as dt, getDefaultJsxScope as It, getFriendlyLabel as ht, getSharedAiChatEngine as Et, parseClientOutput as vt, parseContentBlocks as mt, parseUiArgs as ut, useAiChatServices as Tt, useAiChatSessionStore as Lt, useCoarsePointer as Pt, useEnvironment as xt, useEnvironmentOptional as Ut, useLiveSession as ft, useLiveTsxMaxCharsForFull as Mt, useParkedAskUser as Rt, useResponsiveLayout as yt, useTurnOpen as Dt, v2Card as _t, v2Chip as Bt, v2IconBtn as Vt, v2MonoMeta as kt, v2SectionLabel as Ft, v2Theme as bt } from "./components.js";
11
+ import { u as Ht, a as Gt, b as Ot, c as Wt } from "./useContainerWidth-B3t1ZTlo.js";
12
+ import { A as zt, a as Jt, b as jt, G as Kt, d as qt, c as Xt, e as Yt, f as Qt, g as Zt, h as $t, i as es, j as as, k as ts, l as ss, m as ns, n as os, o as rs, p as is, q as cs, r as ls, s as As, t as Ss, u as ps, v as Cs } from "./auth-DnA-Qvpi.js";
13
+ import { S as ds, a as Is, c as hs, b as Es, d as vs, e as ms, f as us, g as Ts, i as Ls, h as Ps, p as xs, j as Us, s as fs, m as Ms, t as Rs } from "./atMentions-BQ-FxbtK.js";
14
+ import { u as Ds } from "./useChatSessions-sbBneRk9.js";
15
+ import { Score as Bs } from "./interfaces.js";
16
16
  export {
17
- Gt as ALLOWED_DOMAINS,
18
- Ot as ALLOWED_EMAILS,
17
+ zt as ALLOWED_DOMAINS,
18
+ Jt as ALLOWED_EMAILS,
19
19
  k as ANALYTICS_AGENT_NAME,
20
- xe as APPBAR_V2_HEIGHT,
21
- Pe as ASK_USER_CANCELLED,
22
- Wt as AUTH_CONFIG,
23
- m as Account,
20
+ Pe as APPBAR_V2_HEIGHT,
21
+ xe as ASK_USER_CANCELLED,
22
+ jt as AUTH_CONFIG,
23
+ u as Account,
24
24
  Ue as AgentActivityV2,
25
25
  F as AgentConfig,
26
26
  Ae as AgentGatewayService,
@@ -29,16 +29,16 @@ export {
29
29
  b as AgentMode,
30
30
  N as AgentType,
31
31
  fe as AiChat,
32
- Re as AiChatDrawer,
33
- Me as AiChatFloating,
32
+ Me as AiChatDrawer,
33
+ Re as AiChatFloating,
34
34
  ye as AiChatFloatingV2,
35
- _e as AiChatProvider,
36
- De as AiChatServiceContext,
35
+ De as AiChatProvider,
36
+ _e as AiChatServiceContext,
37
37
  Be as AiChatV2Pane,
38
38
  Ve as AppBarV2,
39
39
  ke as AppRailV2,
40
40
  Fe as AppShellV2,
41
- he as ArtifactHtmlHandler,
41
+ Ee as ArtifactHtmlHandler,
42
42
  be as ArtifactRender,
43
43
  H as ArtifactType,
44
44
  Ne as AskUserDialog,
@@ -57,12 +57,12 @@ export {
57
57
  je as CheckIcon,
58
58
  Ke as ChevronIcon,
59
59
  qe as ChevronRightIcon,
60
- M as ClientMessage,
60
+ R as ClientMessage,
61
61
  y as ClientMessageClass,
62
62
  Xe as CloseIcon,
63
63
  Ye as CodeIcon,
64
64
  Qe as ComposerIcon,
65
- D as ConnectionState,
65
+ _ as ConnectionState,
66
66
  Ze as CurrentMessage,
67
67
  $e as DEFAULT_PART_RENDERERS,
68
68
  w as DEV_SERVER_CONFIG,
@@ -70,177 +70,183 @@ export {
70
70
  aa as DataExplorerIcon,
71
71
  ta as DelayTextComponent,
72
72
  sa as EnvironmentProvider,
73
- Ce as EventBusService,
73
+ pe as EventBusService,
74
74
  z as EventType,
75
75
  J as EventTypeDescriptions,
76
76
  na as FileIcon,
77
77
  n as FunctionCallContent,
78
78
  oa as FunctionPart,
79
79
  o as FunctionResultContent,
80
- wt as GOOGLE_CLIENT_ID,
80
+ Kt as GOOGLE_CLIENT_ID,
81
81
  j as GetEventTypeFromDotNetName,
82
82
  K as GetEventTypeFromPythonName,
83
83
  ra as GlobeIcon,
84
84
  ia as HistoryIcon,
85
- pe as HttpArtifactService,
86
- ue as HttpSessionService,
85
+ Ce as HttpArtifactService,
86
+ me as HttpSessionService,
87
87
  ca as IDLE_TIMEOUT,
88
88
  la as InertEnvironmentProvider,
89
89
  r as InteractionPartUtils,
90
90
  ge as InteractionService,
91
91
  Aa as JsxErrorBoundary,
92
92
  Sa as LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL,
93
- Ca as LastPromptsV2,
94
- pa as LinearBackgroundProgress,
93
+ pa as LastPromptsV2,
94
+ Ca as LinearBackgroundProgress,
95
95
  ga as LinearProgressBarWithMarkers,
96
96
  da as ListCheckIcon,
97
97
  Ia as LiveJsxBlock,
98
- Ea as LiveTsxConfigProvider,
98
+ ha as LiveTsxConfigProvider,
99
99
  i as LlmEvent,
100
- ha as LlmResponseRender,
100
+ Ea as LlmResponseRender,
101
101
  va as LoadingDots,
102
102
  de as LocalStorageService,
103
- ua as LockClosedIcon,
104
- ma as LockOpenIcon,
103
+ ma as LockClosedIcon,
104
+ ua as LockOpenIcon,
105
105
  Ta as MOBILE_NAV_DEFAULT,
106
106
  La as MarkdownExtended,
107
- x as MemoryContextLabels,
108
- P as MemoryContexts,
107
+ P as MemoryContextLabels,
108
+ x as MemoryContexts,
109
+ Pa as MentionPickerPanel,
109
110
  xa as MenuIcon,
110
- Pa as Message,
111
- Ua as MobileDrawerV2,
111
+ Ua as Message,
112
+ fa as MobileDrawerV2,
112
113
  q as ModelConfig,
113
114
  X as ModelType,
114
- fa as PanelIcon,
115
+ Ma as PanelIcon,
115
116
  Ra as PauseIcon,
116
- Ma as PinIcon,
117
- ya as PlusIcon,
117
+ ya as PinIcon,
118
+ Da as PlusIcon,
118
119
  _a as PromptDateMarkers,
120
+ Ba as PromptGhostHint,
119
121
  B as PromptUtils,
120
- Da as PromptV2,
122
+ Va as PromptV2,
121
123
  Y as ResponseType,
122
124
  Q as RunMode,
123
- Ba as RunProgressPanelV2,
124
- Va as RunProgressStripV2,
125
+ ka as RunProgressPanelV2,
126
+ Fa as RunProgressStripV2,
125
127
  U as SUB_AGENT_TERMINAL_STATUSES,
126
- fs as Score,
127
- ka as SearchIcon,
128
- Fa as SendIcon,
128
+ Bs as Score,
129
+ ba as SearchIcon,
130
+ Na as SendIcon,
129
131
  c as ServerEvent,
130
- ba as SessionStateManagerService,
132
+ Ha as SessionStateManagerService,
131
133
  Z as SkillLevel,
132
- Ss as SortableTable,
133
- Na as SparkleIcon,
134
- Ha as Sparkline,
135
- Ga as StopIcon,
136
- Oa as Stopwatch,
134
+ ds as SortableTable,
135
+ Ga as SparkleIcon,
136
+ Oa as Sparkline,
137
+ Wa as StopIcon,
138
+ wa as Stopwatch,
137
139
  l as StreamingFunctionCallUpdateContent,
138
140
  A as StreamingReasoningContent,
139
141
  S as StreamingResponse,
140
- C as StreamingTextContent,
141
- Wa as SubAgentBox,
142
- wa as SubAgentBoxV2,
143
- za as SuspendedPart,
144
- Ja as TableIcon,
145
- ja as TaskListV2,
146
- Ka as TerminalIcon,
147
- p as TextContent,
148
- qa as TextPart,
149
- Xa as ThoughtPart,
150
- Ya as ToolIcon,
151
- Qa as TrashIcon,
152
- Za as TurnAwareButton,
153
- $a as UiToolDispatcher,
154
- et as UsersIcon,
155
- at as V2_CHART_PALETTE,
156
- tt as WARNING_THRESHOLD,
157
- st as WaitingPart,
142
+ p as StreamingTextContent,
143
+ za as SubAgentBox,
144
+ Ja as SubAgentBoxV2,
145
+ ja as SuspendedPart,
146
+ Ka as TableIcon,
147
+ qa as TaskListV2,
148
+ Xa as TerminalIcon,
149
+ C as TextContent,
150
+ Ya as TextPart,
151
+ Qa as ThoughtPart,
152
+ Za as ToolIcon,
153
+ $a as TrashIcon,
154
+ et as TriggerDropdown,
155
+ at as TurnAwareButton,
156
+ tt as UiToolDispatcher,
157
+ st as UsersIcon,
158
+ nt as V2_CHART_PALETTE,
159
+ ot as WARNING_THRESHOLD,
160
+ rt as WaitingPart,
158
161
  Ie as WebSocketConnecionV2,
159
- Cs as chipLocations,
160
- ps as chunkArray,
161
- nt as classifyPart,
162
- ot as configureFriendlyMapping,
163
- rt as createAiChatEngine,
164
- it as createAiChatSessionStore,
165
- ct as createAiChatStore,
162
+ Is as applyTriggerInsertion,
163
+ hs as chipLocations,
164
+ Es as chunkArray,
165
+ it as classifyPart,
166
+ ct as configureFriendlyMapping,
167
+ lt as createAiChatEngine,
168
+ At as createAiChatSessionStore,
169
+ St as createAiChatStore,
166
170
  g as createEventSerializer,
167
171
  d as createStreamingResponseSerializer,
168
- lt as createUiToolRegistry,
169
- zt as dateReviver,
170
- Jt as decodeBase64,
171
- me as decodeSessionEvents,
172
- jt as decodeUri,
173
- Kt as decodeUriFromPython,
172
+ pt as createUiToolRegistry,
173
+ qt as dateReviver,
174
+ Xt as decodeBase64,
175
+ ue as decodeSessionEvents,
176
+ Yt as decodeUri,
177
+ Qt as decodeUriFromPython,
174
178
  I as deserializeEvent,
175
- E as deserializePayload,
176
- At as disposeSharedAiChatEngine,
177
- qt as encodeBase64,
178
- Xt as encodeUri,
179
- St as extendDefaultScope,
180
- Ct as extendModuleRegistry,
181
- gs as extractInteractionId,
182
- ds as extractLinkAction,
183
- Is as fetchAtMentions,
184
- Yt as getAgentBaseUrl,
179
+ h as deserializePayload,
180
+ vs as detectTrigger,
181
+ Ct as disposeSharedAiChatEngine,
182
+ Zt as encodeBase64,
183
+ $t as encodeUri,
184
+ gt as extendDefaultScope,
185
+ dt as extendModuleRegistry,
186
+ ms as extractInteractionId,
187
+ us as extractLinkAction,
188
+ Ts as fetchAtMentions,
189
+ es as getAgentBaseUrl,
185
190
  $ as getAgentServerBaseUrl,
186
- Qt as getArtifactsBaseUrl,
191
+ as as getArtifactsBaseUrl,
187
192
  ee as getConnectionStateColor,
188
- pt as getDefaultJsxScope,
189
- Zt as getDotNetBaseUrl,
193
+ It as getDefaultJsxScope,
194
+ ts as getDotNetBaseUrl,
190
195
  ae as getEnvVar,
191
196
  te as getEnvironmentInfo,
192
- gt as getFriendlyLabel,
193
- $t as getIconByName,
197
+ ht as getFriendlyLabel,
198
+ ss as getIconByName,
194
199
  se as getModelVendor,
195
200
  ne as getRandomUUID,
196
201
  oe as getServerBaseUrl,
197
202
  re as getServerClientBaseUrl,
198
- dt as getSharedAiChatEngine,
199
- es as iconCategories,
200
- as as isBase64Encoded,
201
- Es as isSectionStart,
203
+ Et as getSharedAiChatEngine,
204
+ ns as iconCategories,
205
+ os as isBase64Encoded,
206
+ Ls as isSectionStart,
202
207
  ie as isServer,
203
208
  f as isSubAgentTerminalStatus,
204
- ts as isUriEncoded,
205
- hs as isValidInteractionId,
206
- ss as isValidUri,
207
- ns as materialIcons,
208
- vs as parseAndValidateArtifactUrl,
209
- os as parseArtifactFromJson,
210
- It as parseClientOutput,
211
- Et as parseContentBlocks,
212
- us as parseKnownNumbers,
213
- ht as parseUiArgs,
214
- rs as parseUriParams,
209
+ rs as isUriEncoded,
210
+ Ps as isValidInteractionId,
211
+ is as isValidUri,
212
+ cs as materialIcons,
213
+ xs as parseAndValidateArtifactUrl,
214
+ ls as parseArtifactFromJson,
215
+ vt as parseClientOutput,
216
+ mt as parseContentBlocks,
217
+ Us as parseKnownNumbers,
218
+ ut as parseUiArgs,
219
+ As as parseUriParams,
215
220
  Te as resolveAccessToken,
216
221
  ce as resolveApiUrl,
217
- h as sanitizeJsonString,
218
- is as searchIcons,
222
+ E as sanitizeJsonString,
223
+ Ss as searchIcons,
219
224
  v as serializeEvent,
220
- cs as setEbiContextData,
221
- ls as setEbiContextSessionId,
222
- ms as splitBigLinesWithSpaces,
223
- Ts as startsWithInteractionId,
224
- Ls as tokenizeForHighlight,
225
- vt as useAiChatServices,
226
- ut as useAiChatSessionStore,
227
- Ps as useChatSessions,
228
- kt as useContainerRectangle,
229
- Ft as useContainerWidth,
230
- mt as useEnvironment,
231
- Tt as useEnvironmentOptional,
232
- bt as useInterval,
233
- Lt as useLiveSession,
234
- xt as useLiveTsxMaxCharsForFull,
235
- Pt as useParkedAskUser,
236
- Nt as usePromptAssist,
237
- Ut as useResponsiveLayout,
238
- ft as useTurnOpen,
239
- Rt as v2Card,
240
- Mt as v2Chip,
241
- yt as v2IconBtn,
242
- _t as v2MonoMeta,
243
- Dt as v2SectionLabel,
244
- Bt as v2Theme
225
+ ps as setEbiContextData,
226
+ Cs as setEbiContextSessionId,
227
+ fs as splitBigLinesWithSpaces,
228
+ Ms as startsWithInteractionId,
229
+ Rs as tokenizeForHighlight,
230
+ Tt as useAiChatServices,
231
+ Lt as useAiChatSessionStore,
232
+ Ds as useChatSessions,
233
+ Pt as useCoarsePointer,
234
+ Ht as useContainerRectangle,
235
+ Gt as useContainerWidth,
236
+ xt as useEnvironment,
237
+ Ut as useEnvironmentOptional,
238
+ Ot as useInterval,
239
+ ft as useLiveSession,
240
+ Mt as useLiveTsxMaxCharsForFull,
241
+ Rt as useParkedAskUser,
242
+ Wt as usePromptAssist,
243
+ yt as useResponsiveLayout,
244
+ Dt as useTurnOpen,
245
+ _t as v2Card,
246
+ Bt as v2Chip,
247
+ Vt as v2IconBtn,
248
+ kt as v2MonoMeta,
249
+ Ft as v2SectionLabel,
250
+ bt as v2Theme
245
251
  };
246
252
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,34 @@
1
+ import { AtMentionItem } from '../../utils/atMentions';
2
+ export interface MentionPickerPanelProps {
3
+ open: boolean;
4
+ /** The composer element the panel docks under — usually the bordered card, so the list aligns with its width. */
5
+ anchorEl: HTMLElement | null;
6
+ /**
7
+ * Optional element whose TOP edge the panel starts from instead of `anchorEl`'s bottom.
8
+ *
9
+ * The composers pass their footer row, whose top border IS the hairline inside the pill: the list then begins
10
+ * just under that line and takes the footer's space, rather than leaving a strip of hint text stranded above a
11
+ * full-height list. Horizontal placement still comes from `anchorEl`, so the panel keeps the card's width.
12
+ */
13
+ startAtTopOfEl?: HTMLElement | null;
14
+ items: AtMentionItem[];
15
+ loading?: boolean;
16
+ onSelect: (item: AtMentionItem) => void;
17
+ personLabel?: string;
18
+ locationLabel?: string;
19
+ /** Shown while the list is empty and nothing is in flight. */
20
+ emptyLabel?: string;
21
+ /**
22
+ * Ceiling on the panel's height, as a percentage of the dynamic viewport. Default 75 — enough that the list
23
+ * dominates the screen without running to the very edge, and short enough that whatever the host keeps down
24
+ * there (a tab bar, a keyboard accessory row) stays reachable.
25
+ */
26
+ maxHeightVh?: number;
27
+ /**
28
+ * Pixels to keep clear at the bottom, on top of `maxHeightVh`. Hosts with a FIXED bottom bar pass its height:
29
+ * the panel is `position: fixed` too, so without this it simply runs underneath and its last rows are
30
+ * unreachable. Default 0.
31
+ */
32
+ bottomInset?: number;
33
+ }
34
+ export declare function MentionPickerPanel({ open, anchorEl, startAtTopOfEl, items, loading, onSelect, personLabel, locationLabel, emptyLabel, maxHeightVh, bottomInset, }: MentionPickerPanelProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,11 @@
1
+ export interface PromptGhostHintProps {
2
+ /** Which cue to paint. */
3
+ kind: 'location' | 'person';
4
+ /** Accept: insert `@` at the caret and open the mention picker (usePromptAssist's `acceptHint`). */
5
+ onAccept: () => void;
6
+ /** Phone-sized host — shorter labels ("@ local" / "@ pessoa") so the ghost fits a 375px line. */
7
+ compact?: boolean;
8
+ /** Match the host textarea's font size so the phantom sits on the text baseline. */
9
+ fontSize?: number;
10
+ }
11
+ export declare function PromptGhostHint({ kind, onAccept, compact, fontSize }: PromptGhostHintProps): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,7 @@
1
1
  import { default as React } from 'react';
2
+ import { PromptTriggerItem } from '../../utils/promptTriggers';
2
3
  import { PromptAnalysis, PromptResolution, SuggestItem } from '../../services/httpPromptAssistService';
3
- /**
4
- * Autocomplete item returned by `onSlashQuery` / `onAtQuery`. The
5
- * `value` is spliced verbatim into the textarea, replacing the entire
6
- * trigger token (the `/` or `@` plus whatever the user had typed after
7
- * it). Hosts can return `@username`, `/summarize`, `@[Name](id123)` —
8
- * whatever serialization fits their downstream parsing.
9
- */
10
- export type PromptTriggerItem = {
11
- id: string;
12
- label: string;
13
- value: string;
14
- hint?: string;
15
- };
4
+ export type { PromptTriggerItem } from '../../utils/promptTriggers';
16
5
  interface PromptV2Props {
17
6
  forceMessage?: string | null;
18
7
  onHeightChange?: (newHeight: number) => void;
@@ -194,7 +183,14 @@ interface PromptV2Props {
194
183
  * date *rules* are language-independent (cat/offset/value), so only these display labels need locale.
195
184
  */
196
185
  datePresets?: string[];
186
+ /**
187
+ * How the `@` picker presents itself (issue #422).
188
+ * - `'auto'` (default) — a caret-anchored popover where there's a mouse; on a coarse pointer, a panel
189
+ * DOCKED under the composer (MentionPickerPanel). The popover wants to open below the caret, which on a
190
+ * phone is where the keyboard is.
191
+ * - `'popover'` / `'panel'` — force one, for hosts that know better than the media query.
192
+ */
193
+ mentionPicker?: 'auto' | 'popover' | 'panel';
197
194
  borderRadius?: number;
198
195
  }
199
196
  export declare const PromptV2: React.ForwardRefExoticComponent<PromptV2Props & React.RefAttributes<HTMLDivElement>>;
200
- export {};
@@ -0,0 +1,39 @@
1
+ import { SxProps, Theme } from '@mui/material/styles';
2
+ import { AtMentionItem } from '../../utils/atMentions';
3
+ export interface TriggerDropdownProps {
4
+ items: AtMentionItem[];
5
+ /** Index of the keyboard-highlighted row. Pass -1 where there is no keyboard (the touch panel). */
6
+ highlight: number;
7
+ onHighlight: (idx: number) => void;
8
+ onSelect: (item: AtMentionItem) => void;
9
+ /** Show the "Carregando…" row while the first fetch is in flight. */
10
+ loading?: boolean;
11
+ /** Section labels for the sectioned `@` dropdown (issue #112). */
12
+ personLabel?: string;
13
+ locationLabel?: string;
14
+ /**
15
+ * Touch metrics: 48px rows, 15px labels, a hairline between them. The caret-anchored popover stays compact
16
+ * (a mouse can hit a 26px row and screen space next to the caret is scarce); a finger cannot.
17
+ */
18
+ touch?: boolean;
19
+ /** Shown in place of the list when there is nothing to offer and nothing in flight. Omit to render nothing. */
20
+ emptyLabel?: string;
21
+ /** Layout overrides for the container — the docked panel uses this to fill its host box. */
22
+ sx?: SxProps<Theme>;
23
+ }
24
+ /**
25
+ * The dropdown body.
26
+ *
27
+ * Selection is split by pointer type, because the two have opposite requirements.
28
+ *
29
+ * MOUSE selects on pointerdown with `preventDefault()` — the one sequence that keeps the composer's textarea
30
+ * focused through the pick. A plain click blurs it first, and handling mousedown+touchstart together fires twice
31
+ * on WebKit.
32
+ *
33
+ * TOUCH must not do either of those. Selecting on pointerdown makes every scroll pick whatever row the finger
34
+ * happened to land on, and `preventDefault()` there cancels the browser's own scrolling for that gesture — so the
35
+ * list could not be swiped at all. Touch therefore selects on pointerUP, and only when the gesture stayed put:
36
+ * the browser fires `pointercancel` the moment it claims the gesture for scrolling, which is the authoritative
37
+ * "this was a scroll, not a tap" signal. The slop check is a belt-and-braces for a shaky finger.
38
+ */
39
+ export declare function TriggerDropdown({ items, highlight, onHighlight, onSelect, loading, personLabel, locationLabel, touch, emptyLabel, sx, }: TriggerDropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -19,6 +19,13 @@ export { AiChatV2Pane } from './AiChatV2Pane';
19
19
  export type { AiChatV2PaneProps } from './AiChatV2Pane';
20
20
  export { PromptV2 } from './PromptV2';
21
21
  export type { PromptTriggerItem } from './PromptV2';
22
+ export { TriggerDropdown } from './TriggerDropdown';
23
+ export type { TriggerDropdownProps } from './TriggerDropdown';
24
+ export { PromptGhostHint } from './PromptGhostHint';
25
+ export type { PromptGhostHintProps } from './PromptGhostHint';
26
+ export { MentionPickerPanel } from './MentionPickerPanel';
27
+ export type { MentionPickerPanelProps } from './MentionPickerPanel';
28
+ export { useCoarsePointer } from './useCoarsePointer';
22
29
  export { PromptDateMarkers } from './PromptDateMarkers';
23
30
  export type { PromptDateMarker } from './PromptDateMarkers';
24
31
  export { LastPromptsV2 } from './LastPromptsV2';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * True when the primary pointer is a finger (`(pointer: coarse)`), i.e. no hover, no Tab key, no physical caret
3
+ * control. Used by the prompt composers to decide the touch-appropriate affordance (issue #422): the ghost's
4
+ * keyboard badge, and whether the `@` picker opens as a full-screen sheet instead of a caret-anchored popover.
5
+ *
6
+ * Deliberately NOT a viewport breakpoint: a narrow desktop window still has a keyboard, and an iPad in landscape
7
+ * is wide but has neither Tab nor hover. Live (matchMedia listener) so an iPad that gains a Magic Keyboard, or a
8
+ * device emulation toggle in devtools, flips it without a reload.
9
+ */
10
+ export declare function useCoarsePointer(): boolean;
@@ -17,5 +17,7 @@ export { GOOGLE_CLIENT_ID, ALLOWED_DOMAINS, ALLOWED_EMAILS, AUTH_CONFIG } from '
17
17
  export { default as SortableTable } from './sortable-table';
18
18
  export { tokenizeForHighlight, chipLocations } from './promptHighlight';
19
19
  export type { HighlightToken } from './promptHighlight';
20
+ export { detectTrigger, applyTriggerInsertion } from './promptTriggers';
21
+ export type { TriggerChar, ActiveTrigger, TriggerInsertion } from './promptTriggers';
20
22
  export { fetchAtMentions, isSectionStart } from './atMentions';
21
23
  export type { AtMentionItem, MentionGroup, AtMentionFetchers, AtMentionOptions } from './atMentions';
@@ -0,0 +1,60 @@
1
+ /** The three characters a composer reacts to. */
2
+ export type TriggerChar = '/' | '@' | '#';
3
+ /**
4
+ * Autocomplete item returned by `onSlashQuery` / `onAtQuery` / `onAtPersonQuery`. The `value` is spliced verbatim
5
+ * into the textarea, replacing the whole trigger token (the `/` or `@` plus whatever the user typed after it).
6
+ * Hosts can return `@username`, `/summarize`, `@[Name](id123)` — whatever serialization fits their parsing.
7
+ *
8
+ * Two conventions give `value` extra behaviour on insert (see {@link applyTriggerInsertion}):
9
+ * - a `[bracketed placeholder]` is left SELECTED so the next keystroke overwrites it;
10
+ * - a value ENDING in `@` / `#` re-opens that picker instead of appending a trailing space.
11
+ */
12
+ export type PromptTriggerItem = {
13
+ id: string;
14
+ label: string;
15
+ value: string;
16
+ hint?: string;
17
+ };
18
+ /** The trigger token currently under the caret. `startIdx` is the index of the trigger char itself. */
19
+ export type ActiveTrigger = {
20
+ trigger: TriggerChar;
21
+ query: string;
22
+ /** Index of the trigger char within the draft. */
23
+ startIdx: number;
24
+ /** Current caret position — the end of the query. */
25
+ endIdx: number;
26
+ };
27
+ /**
28
+ * Walk back from the caret looking for the `/`, `@` or `#` that opens the current token.
29
+ *
30
+ * The trigger must LEAD its own token (start of string, or preceded by whitespace) — that is what stops us from
31
+ * matching the `/` in `http://…` or the `@` in `user@host`. Only `@` may carry spaces (up to
32
+ * {@link MAX_MENTION_SPACES}); a spaced `/`-command or `#`-token has already ended.
33
+ *
34
+ * A NON-BREAKING space (U+00A0) is always a hard boundary: hosts join the words of an inserted mention with one, so
35
+ * a finished "@São Paulo" must NOT re-open its own picker when the caret sits after it.
36
+ */
37
+ export declare function detectTrigger(value: string, caretPos: number): ActiveTrigger | null;
38
+ /** The result of splicing a picked item over its trigger token — the host applies it to its own draft state. */
39
+ export type TriggerInsertion = {
40
+ /** The new draft text. */
41
+ next: string;
42
+ /** Where the caret goes. Equal to `selectionEnd` unless a placeholder was left selected. */
43
+ selectionStart: number;
44
+ selectionEnd: number;
45
+ /** True when the inserted value ends in a trigger char — the host should re-run detection so that picker opens. */
46
+ reopenTrigger: boolean;
47
+ };
48
+ /**
49
+ * Splice `value` over the trigger token `[startIdx, endIdx)` of `draft`.
50
+ *
51
+ * Three shapes, chosen by what the value looks like (issue #422 — the `/` command templates need all three):
52
+ * 1. `"…pedido número [Codigo do Trip]"` → inserted as-is, the placeholder left SELECTED, no trailing space.
53
+ * 2. `"Busque vôos saindo de @"` → inserted as-is, caret at the end, `reopenTrigger` so the `@` picker
54
+ * opens straight away. A trailing space would break the token.
55
+ * 3. `"@(GRU) Guarulhos"` (everything else) → inserted plus ONE trailing space, caret after it.
56
+ */
57
+ export declare function applyTriggerInsertion(draft: string, trigger: {
58
+ startIdx: number;
59
+ endIdx: number;
60
+ }, value: string): TriggerInsertion;
@@ -0,0 +1 @@
1
+ export {};