@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/{atMentions-C5Fs9Yab.js → atMentions-CJUmkOh9.js} +9 -9
- package/dist/{atMentions-C5Fs9Yab.js.map → atMentions-CJUmkOh9.js.map} +1 -1
- package/dist/{auth-ffNUief3.js → auth-xpQrzSI2.js} +2 -2
- package/dist/{auth-ffNUief3.js.map → auth-xpQrzSI2.js.map} +1 -1
- package/dist/components.js +6338 -6131
- package/dist/components.js.map +1 -1
- package/dist/{httpArtifactService-DBKIvfSD.js → httpArtifactService--6WV2FDW.js} +133 -125
- package/dist/{httpArtifactService-DBKIvfSD.js.map → httpArtifactService--6WV2FDW.js.map} +1 -1
- package/dist/index.js +178 -175
- package/dist/services.js +1 -1
- package/dist/src/components/AiChat/ChatPane/AskUserDialog.d.ts +36 -0
- package/dist/src/components/AiChat/ChatPane/AskUserSheet.d.ts +4 -0
- package/dist/src/components/AiChat/ChatPane/parts/uiPartStage.d.ts +67 -0
- package/dist/src/components/AiChat/ChatPane/useParkedAskUser.d.ts +39 -0
- package/dist/src/components/LlmResponseRender/parseBlocks.test.d.ts +1 -0
- package/dist/src/components/index.d.ts +5 -0
- package/dist/src/services/WebSocketConnection/webSocketConnection.d.ts +7 -0
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +7 -1
- package/dist/utils.js +2 -2
- package/package.json +1 -1
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
|
|
3
|
-
import { A as u, a as T, C as L, M as x, b as P, S as
|
|
4
|
-
import { C as
|
|
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
|
|
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
|
|
8
|
-
import { A as
|
|
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,
|
|
11
|
-
import { u as
|
|
12
|
-
import { A as
|
|
13
|
-
import { S as
|
|
14
|
-
import { u as
|
|
15
|
-
import { Score as
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
Nt as ALLOWED_DOMAINS,
|
|
18
|
+
Ht as ALLOWED_EMAILS,
|
|
19
|
+
k as ANALYTICS_AGENT_NAME,
|
|
20
20
|
xe as APPBAR_V2_HEIGHT,
|
|
21
|
-
|
|
21
|
+
Pe as ASK_USER_CANCELLED,
|
|
22
|
+
Gt as AUTH_CONFIG,
|
|
22
23
|
u as Account,
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
Ue as AgentActivityV2,
|
|
25
|
+
F as AgentConfig,
|
|
25
26
|
Se as AgentGatewayService,
|
|
26
27
|
Ae as AgentGatewayWSAsync,
|
|
27
28
|
T as AgentKind,
|
|
28
|
-
|
|
29
|
+
b as AgentMode,
|
|
29
30
|
N as AgentType,
|
|
30
31
|
fe as AiChat,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
41
|
+
he as ArtifactHtmlHandler,
|
|
41
42
|
be as ArtifactRender,
|
|
42
43
|
H as ArtifactType,
|
|
43
|
-
|
|
44
|
+
Ne as AskUserDialog,
|
|
45
|
+
He as AskUserSheet,
|
|
44
46
|
G as AuthorType,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
Ge as BoxedPart,
|
|
48
|
+
Oe as BrainIcon,
|
|
49
|
+
We as ChartIcon,
|
|
48
50
|
O as ChatAction,
|
|
49
51
|
W as ChatEventType,
|
|
50
|
-
|
|
52
|
+
we as ChatIcon,
|
|
51
53
|
s as ChatMessageContent,
|
|
52
|
-
|
|
54
|
+
ze as ChatPane,
|
|
53
55
|
L as ChatSessionUtils,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
Xe as CloseIcon,
|
|
63
|
+
Ye as CodeIcon,
|
|
64
|
+
Qe as ComposerIcon,
|
|
63
65
|
D as ConnectionState,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
Ze as CurrentMessage,
|
|
67
|
+
$e as DEFAULT_PART_RENDERERS,
|
|
66
68
|
w as DEV_SERVER_CONFIG,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
76
|
+
na as FileIcon,
|
|
75
77
|
n as FunctionCallContent,
|
|
76
|
-
|
|
78
|
+
oa as FunctionPart,
|
|
77
79
|
o as FunctionResultContent,
|
|
78
|
-
|
|
80
|
+
Ot as GOOGLE_CLIENT_ID,
|
|
79
81
|
j as GetEventTypeFromDotNetName,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
K as GetEventTypeFromPythonName,
|
|
83
|
+
ra as GlobeIcon,
|
|
84
|
+
ia as HistoryIcon,
|
|
83
85
|
pe as HttpArtifactService,
|
|
84
86
|
me as HttpSessionService,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
ca as IDLE_TIMEOUT,
|
|
88
|
+
la as InertEnvironmentProvider,
|
|
87
89
|
r as InteractionPartUtils,
|
|
88
90
|
ge as InteractionService,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
99
|
-
|
|
100
|
+
ha as LlmResponseRender,
|
|
101
|
+
va as LoadingDots,
|
|
100
102
|
de as LocalStorageService,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
xa as MenuIcon,
|
|
110
|
+
Pa as Message,
|
|
111
|
+
Ua as MobileDrawerV2,
|
|
112
|
+
q as ModelConfig,
|
|
111
113
|
X as ModelType,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
fa as PanelIcon,
|
|
115
|
+
Ra as PauseIcon,
|
|
114
116
|
Ma as PinIcon,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
ya as PlusIcon,
|
|
118
|
+
_a as PromptDateMarkers,
|
|
117
119
|
B as PromptUtils,
|
|
118
|
-
|
|
120
|
+
Da as PromptV2,
|
|
119
121
|
Y as ResponseType,
|
|
120
122
|
Q as RunMode,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
130
|
+
ba as SessionStateManagerService,
|
|
129
131
|
Z as SkillLevel,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
ct as createUiToolRegistry,
|
|
168
|
+
Wt as dateReviver,
|
|
169
|
+
wt as decodeBase64,
|
|
168
170
|
ue as decodeSessionEvents,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
zt as decodeUri,
|
|
172
|
+
Jt as decodeUriFromPython,
|
|
171
173
|
I as deserializeEvent,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
185
|
+
Xt as getArtifactsBaseUrl,
|
|
184
186
|
ee as getConnectionStateColor,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
Ct as getDefaultJsxScope,
|
|
188
|
+
Yt as getDotNetBaseUrl,
|
|
187
189
|
ae as getEnvVar,
|
|
188
190
|
te as getEnvironmentInfo,
|
|
189
|
-
|
|
190
|
-
|
|
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
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
gt as getSharedAiChatEngine,
|
|
198
|
+
Zt as iconCategories,
|
|
199
|
+
$t as isBase64Encoded,
|
|
200
|
+
ds as isSectionStart,
|
|
199
201
|
ie as isServer,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
Mt as
|
|
239
|
-
|
|
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
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
-
/**
|
|
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>;
|