@aintela/chat 0.2.41 → 0.2.43

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,241 +1,244 @@
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 S, d as A, e as C, T as p, f as g, g as d, h as I, i as h, s as v, j as E } from "./serializer-uea8YsIP.js";
3
- import { A as u, a as T, C as L, M as x, b as P, S as f, i as M } from "./Memory-DjLZqgbF.js";
4
- import { C as U, C as y } from "./ClientMessage-EKgfuTp8.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 S, d as A, 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-uea8YsIP.js";
3
+ import { A as u, 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
5
  import { C as D, P as B } from "./Prompt-DZb7OaPp.js";
6
- import { A as F, a as b, b as k, 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 q, M as K, 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 Se, a as Ae, E as Ce, H as pe, I as ge, L as de, W as Ie } from "./httpArtifactService-DBKIvfSD.js";
8
- import { A as ve } from "./artifactHtmlHandler-CMQJf1cX.js";
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 Se, a as Ae, E as Ce, H as pe, I as ge, L as de, W as Ie } from "./httpArtifactService--6WV2FDW.js";
8
+ import { A as he } from "./artifactHtmlHandler-CMQJf1cX.js";
9
9
  import { H as me, d as ue, r as Te } from "./httpSessionService-CNzThf-T.js";
10
- import { APPBAR_V2_HEIGHT as xe, AgentActivityV2 as Pe, AiChat as fe, AiChatDrawer as Me, AiChatFloating as Re, AiChatFloatingV2 as Ue, AiChatProvider as ye, AiChatServiceContext as _e, AiChatV2Pane as De, AppBarV2 as Be, AppRailV2 as Ve, AppShellV2 as Fe, ArtifactRender as be, AskUserSheet as ke, BoxedPart as Ne, BrainIcon as He, ChartIcon as Ge, ChatIcon as Oe, ChatPane as We, ChatsHistoryV2 as we, CheckIcon as ze, ChevronIcon as Je, ChevronRightIcon as je, CloseIcon as qe, CodeIcon as Ke, ComposerIcon as Xe, CurrentMessage as Ye, DEFAULT_PART_RENDERERS as Qe, DashboardIcon as Ze, DataExplorerIcon as $e, DelayTextComponent as ea, EnvironmentProvider as aa, FileIcon as ta, FunctionPart as sa, GlobeIcon as na, HistoryIcon as oa, IDLE_TIMEOUT as ra, InertEnvironmentProvider as ia, JsxErrorBoundary as ca, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as la, LastPromptsV2 as Sa, LinearBackgroundProgress as Aa, LinearProgressBarWithMarkers as Ca, ListCheckIcon as pa, LiveJsxBlock as ga, LiveTsxConfigProvider as da, LlmResponseRender as Ia, LoadingDots as ha, LockClosedIcon as va, LockOpenIcon as Ea, MOBILE_NAV_DEFAULT as ma, MarkdownExtended as ua, MenuIcon as Ta, Message as La, MobileDrawerV2 as xa, PanelIcon as Pa, PauseIcon as fa, PinIcon as Ma, PlusIcon as Ra, PromptDateMarkers as Ua, PromptV2 as ya, RunProgressPanelV2 as _a, RunProgressStripV2 as Da, SearchIcon as Ba, SendIcon as Va, SessionStateManagerService as Fa, SparkleIcon as ba, Sparkline as ka, StopIcon as Na, Stopwatch as Ha, SubAgentBox as Ga, SubAgentBoxV2 as Oa, SuspendedPart as Wa, TableIcon as wa, TaskListV2 as za, TerminalIcon as Ja, TextPart as ja, ThoughtPart as qa, ToolIcon as Ka, TrashIcon as Xa, UiToolDispatcher as Ya, UsersIcon as Qa, V2_CHART_PALETTE as Za, WARNING_THRESHOLD as $a, WaitingPart as et, classifyPart as at, configureFriendlyMapping as tt, createAiChatEngine as st, createAiChatSessionStore as nt, createAiChatSessionStore as ot, createUiToolRegistry as rt, disposeSharedAiChatEngine as it, extendDefaultScope as ct, extendModuleRegistry as lt, getDefaultJsxScope as St, getFriendlyLabel as At, getSharedAiChatEngine as Ct, parseClientOutput as pt, parseContentBlocks as gt, parseUiArgs as dt, useAiChatServices as It, useAiChatSessionStore as ht, useEnvironment as vt, useEnvironmentOptional as Et, useLiveSession as mt, useLiveTsxMaxCharsForFull as ut, useResponsiveLayout as Tt, v2Card as Lt, v2Chip as xt, v2IconBtn as Pt, v2MonoMeta as ft, v2SectionLabel as Mt, v2Theme as Rt } from "./components.js";
11
- import { u as yt, a as _t, b as Dt, c as Bt } from "./useContainerWidth-CDv8UQyZ.js";
12
- import { A as Ft, a as bt, b as kt, G as Nt, d as Ht, c as Gt, e as Ot, f as Wt, g as wt, h as zt, i as Jt, j as jt, k as qt, l as Kt, m as Xt, n as Yt, o as Qt, p as Zt, q as $t, r as es, s as as, t as ts, u as ss, v as ns } from "./auth-ffNUief3.js";
13
- import { S as rs, c as is, a as cs, e as ls, b as Ss, f as As, i as Cs, d as ps, p as gs, g as ds, s as Is, k as hs, t as vs } from "./atMentions-C5Fs9Yab.js";
14
- import { u as ms } from "./useChatSessions-mnF6pUGm.js";
15
- import { Score as Ts } from "./interfaces.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 Sa, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as Aa, 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 ma, LockOpenIcon as ua, 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, UiToolDispatcher as Za, UsersIcon as $a, V2_CHART_PALETTE as et, WARNING_THRESHOLD as at, WaitingPart as tt, classifyPart as st, configureFriendlyMapping as nt, createAiChatEngine as ot, createAiChatSessionStore as rt, createAiChatSessionStore as it, createUiToolRegistry as ct, disposeSharedAiChatEngine as lt, extendDefaultScope as St, extendModuleRegistry as At, getDefaultJsxScope as Ct, getFriendlyLabel as pt, getSharedAiChatEngine as gt, parseClientOutput as dt, parseContentBlocks as It, parseUiArgs as Et, useAiChatServices as ht, useAiChatSessionStore as vt, useEnvironment as mt, useEnvironmentOptional as ut, useLiveSession as Tt, useLiveTsxMaxCharsForFull as Lt, useParkedAskUser as xt, useResponsiveLayout as Pt, v2Card as Ut, v2Chip as ft, v2IconBtn as Rt, v2MonoMeta as Mt, v2SectionLabel as yt, v2Theme as _t } from "./components.js";
11
+ import { u as Bt, a as Vt, b as kt, c as Ft } from "./useContainerWidth-CDv8UQyZ.js";
12
+ import { A as Nt, a as Ht, b as Gt, G as Ot, d as Wt, c as wt, e as zt, f as Jt, g as jt, h as Kt, i as qt, j as Xt, k as Yt, l as Qt, m as Zt, n as $t, o as es, p as as, q as ts, r as ss, s as ns, t as os, u as rs, v as is } from "./auth-xpQrzSI2.js";
13
+ import { S as ls, c as Ss, a as As, e as Cs, b as ps, f as gs, i as ds, d as Is, p as Es, g as hs, s as vs, k as ms, t as us } from "./atMentions-CJUmkOh9.js";
14
+ import { u as Ls } from "./useChatSessions-mnF6pUGm.js";
15
+ import { Score as Ps } from "./interfaces.js";
16
16
  export {
17
- Ft as ALLOWED_DOMAINS,
18
- bt as ALLOWED_EMAILS,
19
- F as ANALYTICS_AGENT_NAME,
17
+ Nt as ALLOWED_DOMAINS,
18
+ Ht as ALLOWED_EMAILS,
19
+ k as ANALYTICS_AGENT_NAME,
20
20
  xe as APPBAR_V2_HEIGHT,
21
- kt as AUTH_CONFIG,
21
+ Pe as ASK_USER_CANCELLED,
22
+ Gt as AUTH_CONFIG,
22
23
  u as Account,
23
- Pe as AgentActivityV2,
24
- b as AgentConfig,
24
+ Ue as AgentActivityV2,
25
+ F as AgentConfig,
25
26
  Se as AgentGatewayService,
26
27
  Ae as AgentGatewayWSAsync,
27
28
  T as AgentKind,
28
- k as AgentMode,
29
+ b as AgentMode,
29
30
  N as AgentType,
30
31
  fe as AiChat,
31
- Me as AiChatDrawer,
32
- Re as AiChatFloating,
33
- Ue as AiChatFloatingV2,
34
- ye as AiChatProvider,
35
- _e as AiChatServiceContext,
36
- De as AiChatV2Pane,
37
- Be as AppBarV2,
38
- Ve as AppRailV2,
32
+ Re as AiChatDrawer,
33
+ Me as AiChatFloating,
34
+ ye as AiChatFloatingV2,
35
+ _e as AiChatProvider,
36
+ De as AiChatServiceContext,
37
+ Be as AiChatV2Pane,
38
+ Ve as AppBarV2,
39
+ ke as AppRailV2,
39
40
  Fe as AppShellV2,
40
- ve as ArtifactHtmlHandler,
41
+ he as ArtifactHtmlHandler,
41
42
  be as ArtifactRender,
42
43
  H as ArtifactType,
43
- ke as AskUserSheet,
44
+ Ne as AskUserDialog,
45
+ He as AskUserSheet,
44
46
  G as AuthorType,
45
- Ne as BoxedPart,
46
- He as BrainIcon,
47
- Ge as ChartIcon,
47
+ Ge as BoxedPart,
48
+ Oe as BrainIcon,
49
+ We as ChartIcon,
48
50
  O as ChatAction,
49
51
  W as ChatEventType,
50
- Oe as ChatIcon,
52
+ we as ChatIcon,
51
53
  s as ChatMessageContent,
52
- We as ChatPane,
54
+ ze as ChatPane,
53
55
  L as ChatSessionUtils,
54
- we as ChatsHistoryV2,
55
- ze as CheckIcon,
56
- Je as ChevronIcon,
57
- je as ChevronRightIcon,
58
- U as ClientMessage,
56
+ Je as ChatsHistoryV2,
57
+ je as CheckIcon,
58
+ Ke as ChevronIcon,
59
+ qe as ChevronRightIcon,
60
+ M as ClientMessage,
59
61
  y as ClientMessageClass,
60
- qe as CloseIcon,
61
- Ke as CodeIcon,
62
- Xe as ComposerIcon,
62
+ Xe as CloseIcon,
63
+ Ye as CodeIcon,
64
+ Qe as ComposerIcon,
63
65
  D as ConnectionState,
64
- Ye as CurrentMessage,
65
- Qe as DEFAULT_PART_RENDERERS,
66
+ Ze as CurrentMessage,
67
+ $e as DEFAULT_PART_RENDERERS,
66
68
  w as DEV_SERVER_CONFIG,
67
- Ze as DashboardIcon,
68
- $e as DataExplorerIcon,
69
- ea as DelayTextComponent,
70
- aa as EnvironmentProvider,
69
+ ea as DashboardIcon,
70
+ aa as DataExplorerIcon,
71
+ ta as DelayTextComponent,
72
+ sa as EnvironmentProvider,
71
73
  Ce as EventBusService,
72
74
  z as EventType,
73
75
  J as EventTypeDescriptions,
74
- ta as FileIcon,
76
+ na as FileIcon,
75
77
  n as FunctionCallContent,
76
- sa as FunctionPart,
78
+ oa as FunctionPart,
77
79
  o as FunctionResultContent,
78
- Nt as GOOGLE_CLIENT_ID,
80
+ Ot as GOOGLE_CLIENT_ID,
79
81
  j as GetEventTypeFromDotNetName,
80
- q as GetEventTypeFromPythonName,
81
- na as GlobeIcon,
82
- oa as HistoryIcon,
82
+ K as GetEventTypeFromPythonName,
83
+ ra as GlobeIcon,
84
+ ia as HistoryIcon,
83
85
  pe as HttpArtifactService,
84
86
  me as HttpSessionService,
85
- ra as IDLE_TIMEOUT,
86
- ia as InertEnvironmentProvider,
87
+ ca as IDLE_TIMEOUT,
88
+ la as InertEnvironmentProvider,
87
89
  r as InteractionPartUtils,
88
90
  ge as InteractionService,
89
- ca as JsxErrorBoundary,
90
- la as LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL,
91
- Sa as LastPromptsV2,
92
- Aa as LinearBackgroundProgress,
93
- Ca as LinearProgressBarWithMarkers,
94
- pa as ListCheckIcon,
95
- ga as LiveJsxBlock,
96
- da as LiveTsxConfigProvider,
91
+ Sa as JsxErrorBoundary,
92
+ Aa as LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL,
93
+ Ca as LastPromptsV2,
94
+ pa as LinearBackgroundProgress,
95
+ ga as LinearProgressBarWithMarkers,
96
+ da as ListCheckIcon,
97
+ Ia as LiveJsxBlock,
98
+ Ea as LiveTsxConfigProvider,
97
99
  i as LlmEvent,
98
- Ia as LlmResponseRender,
99
- ha as LoadingDots,
100
+ ha as LlmResponseRender,
101
+ va as LoadingDots,
100
102
  de as LocalStorageService,
101
- va as LockClosedIcon,
102
- Ea as LockOpenIcon,
103
- ma as MOBILE_NAV_DEFAULT,
104
- ua as MarkdownExtended,
103
+ ma as LockClosedIcon,
104
+ ua as LockOpenIcon,
105
+ Ta as MOBILE_NAV_DEFAULT,
106
+ La as MarkdownExtended,
105
107
  x as MemoryContextLabels,
106
108
  P as MemoryContexts,
107
- Ta as MenuIcon,
108
- La as Message,
109
- xa as MobileDrawerV2,
110
- K as ModelConfig,
109
+ xa as MenuIcon,
110
+ Pa as Message,
111
+ Ua as MobileDrawerV2,
112
+ q as ModelConfig,
111
113
  X as ModelType,
112
- Pa as PanelIcon,
113
- fa as PauseIcon,
114
+ fa as PanelIcon,
115
+ Ra as PauseIcon,
114
116
  Ma as PinIcon,
115
- Ra as PlusIcon,
116
- Ua as PromptDateMarkers,
117
+ ya as PlusIcon,
118
+ _a as PromptDateMarkers,
117
119
  B as PromptUtils,
118
- ya as PromptV2,
120
+ Da as PromptV2,
119
121
  Y as ResponseType,
120
122
  Q as RunMode,
121
- _a as RunProgressPanelV2,
122
- Da as RunProgressStripV2,
123
- f as SUB_AGENT_TERMINAL_STATUSES,
124
- Ts as Score,
125
- Ba as SearchIcon,
126
- Va as SendIcon,
123
+ Ba as RunProgressPanelV2,
124
+ Va as RunProgressStripV2,
125
+ U as SUB_AGENT_TERMINAL_STATUSES,
126
+ Ps as Score,
127
+ ka as SearchIcon,
128
+ Fa as SendIcon,
127
129
  c as ServerEvent,
128
- Fa as SessionStateManagerService,
130
+ ba as SessionStateManagerService,
129
131
  Z as SkillLevel,
130
- rs as SortableTable,
131
- ba as SparkleIcon,
132
- ka as Sparkline,
133
- Na as StopIcon,
134
- Ha as Stopwatch,
132
+ ls as SortableTable,
133
+ Na as SparkleIcon,
134
+ Ha as Sparkline,
135
+ Ga as StopIcon,
136
+ Oa as Stopwatch,
135
137
  l as StreamingFunctionCallUpdateContent,
136
138
  S as StreamingReasoningContent,
137
139
  A as StreamingResponse,
138
140
  C as StreamingTextContent,
139
- Ga as SubAgentBox,
140
- Oa as SubAgentBoxV2,
141
- Wa as SuspendedPart,
142
- wa as TableIcon,
143
- za as TaskListV2,
144
- Ja as TerminalIcon,
141
+ Wa as SubAgentBox,
142
+ wa as SubAgentBoxV2,
143
+ za as SuspendedPart,
144
+ Ja as TableIcon,
145
+ ja as TaskListV2,
146
+ Ka as TerminalIcon,
145
147
  p as TextContent,
146
- ja as TextPart,
147
- qa as ThoughtPart,
148
- Ka as ToolIcon,
149
- Xa as TrashIcon,
150
- Ya as UiToolDispatcher,
151
- Qa as UsersIcon,
152
- Za as V2_CHART_PALETTE,
153
- $a as WARNING_THRESHOLD,
154
- et as WaitingPart,
148
+ qa as TextPart,
149
+ Xa as ThoughtPart,
150
+ Ya as ToolIcon,
151
+ Qa as TrashIcon,
152
+ Za as UiToolDispatcher,
153
+ $a as UsersIcon,
154
+ et as V2_CHART_PALETTE,
155
+ at as WARNING_THRESHOLD,
156
+ tt as WaitingPart,
155
157
  Ie as WebSocketConnecionV2,
156
- is as chipLocations,
157
- cs as chunkArray,
158
- at as classifyPart,
159
- tt as configureFriendlyMapping,
160
- st as createAiChatEngine,
161
- nt as createAiChatSessionStore,
162
- ot as createAiChatStore,
158
+ Ss as chipLocations,
159
+ As as chunkArray,
160
+ st as classifyPart,
161
+ nt as configureFriendlyMapping,
162
+ ot as createAiChatEngine,
163
+ rt as createAiChatSessionStore,
164
+ it as createAiChatStore,
163
165
  g as createEventSerializer,
164
166
  d as createStreamingResponseSerializer,
165
- rt as createUiToolRegistry,
166
- Ht as dateReviver,
167
- Gt as decodeBase64,
167
+ ct as createUiToolRegistry,
168
+ Wt as dateReviver,
169
+ wt as decodeBase64,
168
170
  ue as decodeSessionEvents,
169
- Ot as decodeUri,
170
- Wt as decodeUriFromPython,
171
+ zt as decodeUri,
172
+ Jt as decodeUriFromPython,
171
173
  I as deserializeEvent,
172
- h as deserializePayload,
173
- it as disposeSharedAiChatEngine,
174
- wt as encodeBase64,
175
- zt as encodeUri,
176
- ct as extendDefaultScope,
177
- lt as extendModuleRegistry,
178
- ls as extractInteractionId,
179
- Ss as extractLinkAction,
180
- As as fetchAtMentions,
181
- Jt as getAgentBaseUrl,
174
+ E as deserializePayload,
175
+ lt as disposeSharedAiChatEngine,
176
+ jt as encodeBase64,
177
+ Kt as encodeUri,
178
+ St as extendDefaultScope,
179
+ At as extendModuleRegistry,
180
+ Cs as extractInteractionId,
181
+ ps as extractLinkAction,
182
+ gs as fetchAtMentions,
183
+ qt as getAgentBaseUrl,
182
184
  $ as getAgentServerBaseUrl,
183
- jt as getArtifactsBaseUrl,
185
+ Xt as getArtifactsBaseUrl,
184
186
  ee as getConnectionStateColor,
185
- St as getDefaultJsxScope,
186
- qt as getDotNetBaseUrl,
187
+ Ct as getDefaultJsxScope,
188
+ Yt as getDotNetBaseUrl,
187
189
  ae as getEnvVar,
188
190
  te as getEnvironmentInfo,
189
- At as getFriendlyLabel,
190
- Kt as getIconByName,
191
+ pt as getFriendlyLabel,
192
+ Qt as getIconByName,
191
193
  se as getModelVendor,
192
194
  ne as getRandomUUID,
193
195
  oe as getServerBaseUrl,
194
196
  re as getServerClientBaseUrl,
195
- Ct as getSharedAiChatEngine,
196
- Xt as iconCategories,
197
- Yt as isBase64Encoded,
198
- Cs as isSectionStart,
197
+ gt as getSharedAiChatEngine,
198
+ Zt as iconCategories,
199
+ $t as isBase64Encoded,
200
+ ds as isSectionStart,
199
201
  ie as isServer,
200
- M as isSubAgentTerminalStatus,
201
- Qt as isUriEncoded,
202
- ps as isValidInteractionId,
203
- Zt as isValidUri,
204
- $t as materialIcons,
205
- gs as parseAndValidateArtifactUrl,
206
- es as parseArtifactFromJson,
207
- pt as parseClientOutput,
208
- gt as parseContentBlocks,
209
- ds as parseKnownNumbers,
210
- dt as parseUiArgs,
211
- as as parseUriParams,
202
+ f as isSubAgentTerminalStatus,
203
+ es as isUriEncoded,
204
+ Is as isValidInteractionId,
205
+ as as isValidUri,
206
+ ts as materialIcons,
207
+ Es as parseAndValidateArtifactUrl,
208
+ ss as parseArtifactFromJson,
209
+ dt as parseClientOutput,
210
+ It as parseContentBlocks,
211
+ hs as parseKnownNumbers,
212
+ Et as parseUiArgs,
213
+ ns as parseUriParams,
212
214
  Te as resolveAccessToken,
213
215
  ce as resolveApiUrl,
214
- v as sanitizeJsonString,
215
- ts as searchIcons,
216
- E as serializeEvent,
217
- ss as setEbiContextData,
218
- ns as setEbiContextSessionId,
219
- Is as splitBigLinesWithSpaces,
220
- hs as startsWithInteractionId,
221
- vs as tokenizeForHighlight,
222
- It as useAiChatServices,
223
- ht as useAiChatSessionStore,
224
- ms as useChatSessions,
225
- yt as useContainerRectangle,
226
- _t as useContainerWidth,
227
- vt as useEnvironment,
228
- Et as useEnvironmentOptional,
229
- Dt as useInterval,
230
- mt as useLiveSession,
231
- ut as useLiveTsxMaxCharsForFull,
232
- Bt as usePromptAssist,
233
- Tt as useResponsiveLayout,
234
- Lt as v2Card,
235
- xt as v2Chip,
236
- Pt as v2IconBtn,
237
- ft as v2MonoMeta,
238
- Mt as v2SectionLabel,
239
- Rt as v2Theme
216
+ h as sanitizeJsonString,
217
+ os as searchIcons,
218
+ v as serializeEvent,
219
+ rs as setEbiContextData,
220
+ is as setEbiContextSessionId,
221
+ vs as splitBigLinesWithSpaces,
222
+ ms as startsWithInteractionId,
223
+ us as tokenizeForHighlight,
224
+ ht as useAiChatServices,
225
+ vt as useAiChatSessionStore,
226
+ Ls as useChatSessions,
227
+ Bt as useContainerRectangle,
228
+ Vt as useContainerWidth,
229
+ mt as useEnvironment,
230
+ ut as useEnvironmentOptional,
231
+ kt as useInterval,
232
+ Tt as useLiveSession,
233
+ Lt as useLiveTsxMaxCharsForFull,
234
+ xt as useParkedAskUser,
235
+ Ft as usePromptAssist,
236
+ Pt as useResponsiveLayout,
237
+ Ut as v2Card,
238
+ ft as v2Chip,
239
+ Rt as v2IconBtn,
240
+ Mt as v2MonoMeta,
241
+ yt as v2SectionLabel,
242
+ _t as v2Theme
240
243
  };
241
244
  //# 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-DBKIvfSD.js";
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--6WV2FDW.js";
2
2
  import { A as v } from "./artifactHtmlHandler-CMQJf1cX.js";
3
3
  import { H, d as f, r as p } from "./httpSessionService-CNzThf-T.js";
4
4
  export {
@@ -0,0 +1,36 @@
1
+ import { default as React } from 'react';
2
+ import { DialogProps } from '@mui/material/Dialog';
3
+ /**
4
+ * Modal surface for a PARKED human-input prompt — ask_user (questionnaire) or askauth (sign-in) — for
5
+ * pages that are NOT a conversation.
6
+ *
7
+ * <p><b>Why not the sheet.</b> {@link AskUserSheet} slides up from a composer at the bottom of a
8
+ * transcript: the gesture says "the conversation you were reading now wants a word". A workspace page
9
+ * where the agent works beside the content (obtapp's policy-import review, which renders no transcript
10
+ * at all) has no composer to rise from, so the same card just appears pinned to an arbitrary edge —
11
+ * easy to miss on exactly the pages where nothing else is animating to draw the eye. A dialog says the
12
+ * same thing in the idiom those pages already speak.</p>
13
+ *
14
+ * <p><b>Minimize, not just close.</b> Answering can need the page underneath — which policy the agent is
15
+ * asking about, what the source excerpt says — and a modal hides it. Minimizing parks the prompt as a
16
+ * floating chip so the page is usable and the question is still one click away. Closing is a different
17
+ * verb: it answers with the cancel sentinel, releasing the agent's turn without an answer.</p>
18
+ *
19
+ * <p>The prompt itself is the very same {@link AskUserDispatcher} the sheet and the transcript draw, so
20
+ * host-registered ask-user components (AskCreateAccount, add_passengers, …) work here unchanged.</p>
21
+ */
22
+ export interface AskUserDialogProps {
23
+ /** Heading above the prompt. Defaults to a neutral English label; hosts localize it. */
24
+ title?: React.ReactNode;
25
+ /** Dialog width. Defaults to `'sm'`. */
26
+ maxWidth?: DialogProps['maxWidth'];
27
+ /**
28
+ * Offer the minimize affordance. Default `true`. Pass `false` when the answer cannot depend on
29
+ * anything behind the dialog and you want the question to stay in the way until it is dealt with.
30
+ */
31
+ minimizable?: boolean;
32
+ /** Label of the restore chip while minimized. Defaults to an English label; hosts localize it. */
33
+ minimizedLabel?: string;
34
+ }
35
+ declare const AskUserDialog: React.FC<AskUserDialogProps>;
36
+ export default AskUserDialog;
@@ -29,6 +29,10 @@ import { default as React } from 'react';
29
29
  * just above a composer of that height, so `ChatPane` doesn't need to repeat
30
30
  * the wrapper. The `Slide` anchors to the bottom edge either way, so the
31
31
  * "slide up" reads the same however it's docked.
32
+ *
33
+ * A sheet only reads as a sheet when there is something for it to slide up FROM. On a page with no
34
+ * composer and no transcript — a workspace where the agent works beside the content — use
35
+ * {@link AskUserDialog} instead; it draws the same prompt through the same {@link useParkedAskUser}.
32
36
  */
33
37
  export interface AskUserSheetProps {
34
38
  /** Height of the composer to dock above, in px. Omit to stay positioning-agnostic. */
@@ -0,0 +1,67 @@
1
+ import { default as React } from 'react';
2
+ import { InteractionPart } from '../../../../models/InteractionPart';
3
+ /**
4
+ * Single-owner rendering for slot-placed UI tool parts (issue #325).
5
+ *
6
+ * A UI render tool's component used to render in TWO possible React subtrees: at its
7
+ * stream position (MessageAgent's part list) the moment its result folded in, and later
8
+ * INSIDE the text part (LlmResponseRender) once the model wrote its `{{Component:<slotId>}}`
9
+ * token. Moving an element between subtrees destroys React identity — the component
10
+ * unmounted/remounted on the hand-off, and flapped when the two token matchers disagreed
11
+ * mid-stream (suppressed positionally while no slot block existed yet).
12
+ *
13
+ * The stage removes the second owner. Each slotted UI part is rendered exactly ONCE, by
14
+ * the owning MessageAgent, through a `createPortal` into a stable DETACHED container
15
+ * element keyed by SlotId. The positional spot and the text slot render `UiPartAnchor`s —
16
+ * empty divs that CLAIM the container; the stage appends the container's DOM node under
17
+ * the winning anchor (slot beats positional). Only the DOM node moves — React's tree
18
+ * never changes shape around the component — so identity is preserved and remounts are
19
+ * impossible by construction:
20
+ *
21
+ * - the positional anchor always exists while the part does, so there is never a
22
+ * "suppressed but not yet slotted" gap (the mid-stream flicker), and
23
+ * - the slot anchor merely re-parents the same DOM node when the token settles into a
24
+ * renderable slot (the hand-off), with zero unmount/remount.
25
+ */
26
+ /** Anchor priorities: the slot placement wins over the positional fallback. */
27
+ export declare const UI_PART_ANCHOR_POSITIONAL = 1;
28
+ export declare const UI_PART_ANCHOR_SLOT = 2;
29
+ export declare class UiPartStage {
30
+ private containers;
31
+ private claims;
32
+ private seq;
33
+ /**
34
+ * Slot ids this stage's MessageAgent is rendering through a portal on the CURRENT
35
+ * render pass. LlmResponseRender consults it to decide between rendering an anchor
36
+ * (the part is staged — adopt its container) and the legacy direct render (the part
37
+ * was filtered out of the positional list, or there is no stage at all).
38
+ */
39
+ stagedKeys: ReadonlySet<string>;
40
+ setStagedKeys(keys: Iterable<string>): void;
41
+ /** The stable detached container a slotted part renders into. Created once per key. */
42
+ container(key: string): HTMLElement;
43
+ claim(key: string, token: symbol, el: HTMLElement, priority: number): void;
44
+ release(key: string, token: symbol): void;
45
+ /** Attach the container under the best current claimant (highest priority, then latest). */
46
+ private place;
47
+ }
48
+ export declare const UiPartStageContext: React.Context<UiPartStage | null>;
49
+ /**
50
+ * The SlotId a part is staged under, or undefined when the stage does not manage it.
51
+ * Mirrors the (pre-stage) `suppressSlottedUiParts` eligibility rule exactly: a UI-flagged
52
+ * function part (or ask-user part) whose RESULT has landed (status Done — the SlotId rides
53
+ * the result, so earlier states can't be referenced by a token anyway).
54
+ */
55
+ export declare function stagedSlotIdOf(part: InteractionPart): string | undefined;
56
+ /** Renders a staged part into its stable container. Call from the OWNING MessageAgent only. */
57
+ export declare function renderStagedPart(stage: UiPartStage, key: string, child: React.ReactNode): React.ReactNode;
58
+ /**
59
+ * An adoption point for a staged part's container. Renders an empty div and claims the
60
+ * container for it; the stage moves the container's DOM node under the highest-priority
61
+ * live anchor. Unclaims on unmount (the container then falls back to the other anchor —
62
+ * it is never destroyed here, so the portal's subtree keeps living untouched).
63
+ */
64
+ export declare const UiPartAnchor: React.FC<{
65
+ slotKey: string;
66
+ priority: number;
67
+ }>;
@@ -0,0 +1,39 @@
1
+ import { InteractionPart } from '../../../models/InteractionPart';
2
+ import { Interaction } from '../../../models/Interaction';
3
+ /** What the sentinel answer says when the user dismisses a parked prompt instead of answering it. */
4
+ export declare const ASK_USER_CANCELLED = "Prompt cancelado";
5
+ export interface ParkedAskUser {
6
+ /**
7
+ * The ask-user part currently PARKED and unanswered — `null` when nothing is waiting on the user.
8
+ * This is the "is a question pending" signal a surface opens on.
9
+ */
10
+ parked: InteractionPart | null;
11
+ /**
12
+ * What to draw: `parked`, or the last parked part once it is answered. A surface with an exit
13
+ * transition (a sliding sheet, a fading dialog) would otherwise empty out before it finished
14
+ * closing.
15
+ */
16
+ toRender: InteractionPart | null;
17
+ /** Tool-call id of {@link toRender} — what an answer or a cancel is keyed by. */
18
+ callId?: string;
19
+ /** The message {@link toRender} belongs to, needed by `AskUserDispatcher` for its render context. */
20
+ currentMessage: Interaction | null;
21
+ /**
22
+ * The turn is still open. While a prompt is parked no tokens stream, so the transcript's trailing
23
+ * "…" dots vanish — surfaces use this to keep a live cue that the agent is still waiting.
24
+ */
25
+ turnOpen: boolean;
26
+ /** Answer the parked call with the cancel sentinel, releasing the turn without an answer. */
27
+ cancel: () => void;
28
+ }
29
+ /**
30
+ * Finds the PARKED human-input prompt — ask_user (questionnaire) or askauth (sign-in) — for whichever
31
+ * surface wants to present it, and hands back everything needed to draw and release it.
32
+ *
33
+ * <p>Extracted from {@link AskUserSheet} so the same detection drives every surface: the in-chat bottom
34
+ * sheet, a host-docked sheet over a wider area (issue #235), and {@link AskUserDialog} for pages that
35
+ * have no composer to slide up from. Duplicating this in a host is what you want to avoid — "which part
36
+ * is parked" is subtle (see the streaming-args guard below) and drifts the moment the server changes how
37
+ * it flags an ask-user call.</p>
38
+ */
39
+ export declare function useParkedAskUser(): ParkedAskUser;
@@ -19,6 +19,11 @@ export { default as Message } from './AiChat/ChatPane/Message';
19
19
  export { default as SubAgentBox } from './AiChat/ChatPane/SubAgentBox';
20
20
  export type { SubAgentBoxProps } from './AiChat/ChatPane/SubAgentBox';
21
21
  export { default as AskUserSheet } from './AiChat/ChatPane/AskUserSheet';
22
+ export type { AskUserSheetProps } from './AiChat/ChatPane/AskUserSheet';
23
+ export { default as AskUserDialog } from './AiChat/ChatPane/AskUserDialog';
24
+ export type { AskUserDialogProps } from './AiChat/ChatPane/AskUserDialog';
25
+ export { useParkedAskUser, ASK_USER_CANCELLED } from './AiChat/ChatPane/useParkedAskUser';
26
+ export type { ParkedAskUser } from './AiChat/ChatPane/useParkedAskUser';
22
27
  export { configureFriendlyMapping, getFriendlyLabel } from './AiChat/ChatPane/friendlyToolConfig';
23
28
  export type { FriendlyState, FriendlyToolEntry } from './AiChat/ChatPane/friendlyToolConfig';
24
29
  export { classifyPart, DEFAULT_PART_RENDERERS, TextPart, ThoughtPart, FunctionPart, WaitingPart, SuspendedPart, BoxedPart, UiToolDispatcher, } from './AiChat/ChatPane/parts';
@@ -72,4 +72,11 @@ export interface IWebSocketConnection {
72
72
  disconnect: () => void;
73
73
  closeStream: () => void;
74
74
  isConnected: () => boolean;
75
+ /**
76
+ * Deliver the user's answer to a parked human-in-the-loop tool call (ask_user / askauth).
77
+ * Optional so an alternative transport (the demo's fake gateway, a test double) is a valid
78
+ * IWebSocketConnection without it — `AgentGatewayWSAsync` reports 'queued' when it is absent
79
+ * rather than throwing, which is what a socket that cannot deliver right now already means.
80
+ */
81
+ answerHumanTool?: (toolCallId: string, answer: string) => 'sent' | 'queued';
75
82
  }
@@ -37,7 +37,13 @@ export declare class AgentGatewayWSAsync extends AgentGatewayService {
37
37
  finalResponse(interactionId: string, agentInteraction: Interaction, author: string): Promise<void>;
38
38
  stopStream(closeTurn?: boolean): void;
39
39
  suspend(): Promise<boolean>;
40
- /** Forwards a parked-tool answer; 'queued' means the socket was down and it will flush on reconnect. */
40
+ /**
41
+ * Forwards a parked-tool answer; 'queued' means the socket was down and it will flush on reconnect.
42
+ *
43
+ * Feature-detected rather than cast: a host may supply any `IWebSocketConnection` (the demo's fake
44
+ * gateway does), and a hard cast turned "this transport doesn't deliver answers" into a TypeError
45
+ * thrown from a click handler — with the answer lost either way.
46
+ */
41
47
  answerHumanTool(toolCallId: string, answer: string): 'sent' | 'queued';
42
48
  cancelSuspend(): Promise<void>;
43
49
  check(): Promise<boolean>;