@aintela/chat 0.2.56 → 0.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.js +6585 -6093
- package/dist/components.js.map +1 -1
- package/dist/index.js +150 -145
- package/dist/src/components/AiChat/AiChatContext.d.ts +7 -0
- package/dist/src/components/AiChat/AiChatTypes.d.ts +34 -0
- package/dist/src/components/AiChat/ChatPane/MessageAgent.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/askUserInline.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +7 -0
- package/dist/src/components/v2/AttachmentPreviewModal.d.ts +21 -0
- package/dist/src/components/v2/icons.d.ts +5 -0
- package/package.json +1 -1
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 p, e as S, T as C, f as d, g, h, i as
|
|
3
|
-
import { A 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 A, d as p, e as S, T as C, f as d, g, 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 M, C as y } from "./ClientMessage-EKgfuTp8.js";
|
|
5
5
|
import { C as _, P as B } from "./Prompt-DZb7OaPp.js";
|
|
6
|
-
import { A as V, 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
|
|
7
|
-
import { A as Ae, a as pe, E as Se, H as Ce, I as de, L as ge, W as
|
|
6
|
+
import { A as V, 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 Z, j as Y, S as Q, 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 pe, E as Se, H as Ce, I as de, L as ge, W as Ie } from "./httpArtifactService-JtkC1T7n.js";
|
|
8
8
|
import { A as Ee } from "./artifactHtmlHandler-CMQJf1cX.js";
|
|
9
|
-
import { H as
|
|
10
|
-
import { APPBAR_V2_HEIGHT as Pe, ASK_USER_CANCELLED as xe, AgentActivityV2 as Ue, AiChat as fe, AiChatDrawer as
|
|
11
|
-
import { u as
|
|
12
|
-
import { A as
|
|
13
|
-
import { S as
|
|
14
|
-
import { u as
|
|
15
|
-
import { Score as
|
|
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 Re, AiChatFloating as Me, AiChatFloatingV2 as ye, AiChatProvider as De, AiChatServiceContext as _e, AiChatV2Pane as Be, AppBarV2 as ke, AppRailV2 as Ve, 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 Ze, ComposerIcon as Ye, CurrentMessage as Qe, 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 pa, LastPromptsV2 as Sa, LinearBackgroundProgress as Ca, LinearProgressBarWithMarkers as da, ListCheckIcon as ga, 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 Ra, PauseIcon as Ma, PenIcon as ya, PinIcon as Da, PlusIcon as _a, PromptDateMarkers as Ba, PromptGhostHint as ka, PromptV2 as Va, RotateIcon as Fa, RunProgressPanelV2 as ba, RunProgressStripV2 as Na, SearchIcon as Ha, SendIcon as Ga, SessionStateManagerService as Oa, SparkleIcon as Wa, Sparkline as wa, StopIcon as za, Stopwatch as Ja, SubAgentBox as ja, SubAgentBoxV2 as Ka, SuspendedPart as qa, TableIcon as Xa, TaskListV2 as Za, TerminalIcon as Ya, TextPart as Qa, ThoughtPart as $a, ToolIcon as et, TrashIcon as at, TriggerDropdown as tt, TurnAwareButton as st, UiToolDispatcher as nt, UndoIcon as ot, UsersIcon as rt, V2_CHART_PALETTE as it, WARNING_THRESHOLD as ct, WaitingPart as lt, ZoomInIcon as At, ZoomOutIcon as pt, classifyPart as St, configureFriendlyMapping as Ct, createAiChatEngine as dt, createAiChatSessionStore as gt, createAiChatSessionStore as It, createUiToolRegistry as ht, disposeSharedAiChatEngine as Et, extendDefaultScope as vt, extendModuleRegistry as mt, getDefaultJsxScope as ut, getFriendlyLabel as Tt, getSharedAiChatEngine as Lt, parseClientOutput as Pt, parseContentBlocks as xt, parseUiArgs as Ut, useAiChatServices as ft, useAiChatSessionStore as Rt, useCoarsePointer as Mt, useEnvironment as yt, useEnvironmentOptional as Dt, useLiveSession as _t, useLiveTsxMaxCharsForFull as Bt, useParkedAskUser as kt, useResponsiveLayout as Vt, useTurnOpen as Ft, v2Card as bt, v2Chip as Nt, v2IconBtn as Ht, v2MonoMeta as Gt, v2SectionLabel as Ot, v2Theme as Wt } from "./components.js";
|
|
11
|
+
import { u as zt, a as Jt, b as jt, c as Kt } from "./useContainerWidth-B3t1ZTlo.js";
|
|
12
|
+
import { A as Xt, a as Zt, b as Yt, G as Qt, d as $t, c as es, e as as, f as ts, g as ss, h as ns, i as os, j as rs, k as is, l as cs, m as ls, n as As, o as ps, p as Ss, q as Cs, r as ds, s as gs, t as Is, u as hs, v as Es } from "./auth-lluJZyQO.js";
|
|
13
|
+
import { S as ms, a as us, b as Ts, c as Ls, d as Ps, e as xs, f as Us, g as fs, h as Rs, i as Ms, j as ys, k as Ds, l as _s, p as Bs, m as ks, n as Vs, o as Fs, s as bs, t as Ns, u as Hs } from "./atMentions-C0dza8DD.js";
|
|
14
|
+
import { u as Os } from "./useChatSessions-sbBneRk9.js";
|
|
15
|
+
import { Score as ws } from "./interfaces.js";
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Xt as ALLOWED_DOMAINS,
|
|
18
|
+
Zt as ALLOWED_EMAILS,
|
|
19
19
|
V as ANALYTICS_AGENT_NAME,
|
|
20
20
|
Pe as APPBAR_V2_HEIGHT,
|
|
21
21
|
xe as ASK_USER_CANCELLED,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
Yt as AUTH_CONFIG,
|
|
23
|
+
u as Account,
|
|
24
24
|
Ue as AgentActivityV2,
|
|
25
25
|
F as AgentConfig,
|
|
26
26
|
Ae as AgentGatewayService,
|
|
@@ -29,8 +29,8 @@ export {
|
|
|
29
29
|
b as AgentMode,
|
|
30
30
|
N as AgentType,
|
|
31
31
|
fe as AiChat,
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
Re as AiChatDrawer,
|
|
33
|
+
Me as AiChatFloating,
|
|
34
34
|
ye as AiChatFloatingV2,
|
|
35
35
|
De as AiChatProvider,
|
|
36
36
|
_e as AiChatServiceContext,
|
|
@@ -57,13 +57,13 @@ export {
|
|
|
57
57
|
je as CheckIcon,
|
|
58
58
|
Ke as ChevronIcon,
|
|
59
59
|
qe as ChevronRightIcon,
|
|
60
|
-
|
|
60
|
+
M as ClientMessage,
|
|
61
61
|
y as ClientMessageClass,
|
|
62
62
|
Xe as CloseIcon,
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
Ze as CodeIcon,
|
|
64
|
+
Ye as ComposerIcon,
|
|
65
65
|
_ as ConnectionState,
|
|
66
|
-
|
|
66
|
+
Qe as CurrentMessage,
|
|
67
67
|
$e as DEFAULT_PART_RENDERERS,
|
|
68
68
|
w as DEV_SERVER_CONFIG,
|
|
69
69
|
ea as DashboardIcon,
|
|
@@ -77,13 +77,13 @@ export {
|
|
|
77
77
|
n as FunctionCallContent,
|
|
78
78
|
oa as FunctionPart,
|
|
79
79
|
o as FunctionResultContent,
|
|
80
|
-
|
|
80
|
+
Qt 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
85
|
Ce as HttpArtifactService,
|
|
86
|
-
|
|
86
|
+
me as HttpSessionService,
|
|
87
87
|
ca as IDLE_TIMEOUT,
|
|
88
88
|
la as InertEnvironmentProvider,
|
|
89
89
|
r as InteractionPartUtils,
|
|
@@ -94,14 +94,14 @@ export {
|
|
|
94
94
|
Ca as LinearBackgroundProgress,
|
|
95
95
|
da as LinearProgressBarWithMarkers,
|
|
96
96
|
ga as ListCheckIcon,
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
Ia as LiveJsxBlock,
|
|
98
|
+
ha as LiveTsxConfigProvider,
|
|
99
99
|
i as LlmEvent,
|
|
100
100
|
Ea as LlmResponseRender,
|
|
101
101
|
va as LoadingDots,
|
|
102
102
|
ge as LocalStorageService,
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
ma as LockClosedIcon,
|
|
104
|
+
ua as LockOpenIcon,
|
|
105
105
|
Ta as MOBILE_NAV_DEFAULT,
|
|
106
106
|
La as MarkdownExtended,
|
|
107
107
|
P as MemoryContextLabels,
|
|
@@ -112,146 +112,151 @@ export {
|
|
|
112
112
|
fa as MobileDrawerV2,
|
|
113
113
|
q as ModelConfig,
|
|
114
114
|
X as ModelType,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
ya as
|
|
118
|
-
Da as
|
|
119
|
-
_a as
|
|
120
|
-
Ba as
|
|
115
|
+
Ra as PanelIcon,
|
|
116
|
+
Ma as PauseIcon,
|
|
117
|
+
ya as PenIcon,
|
|
118
|
+
Da as PinIcon,
|
|
119
|
+
_a as PlusIcon,
|
|
120
|
+
Ba as PromptDateMarkers,
|
|
121
|
+
ka as PromptGhostHint,
|
|
121
122
|
B as PromptUtils,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
Va as PromptV2,
|
|
124
|
+
Z as ResponseType,
|
|
125
|
+
Fa as RotateIcon,
|
|
126
|
+
Y as RunMode,
|
|
127
|
+
ba as RunProgressPanelV2,
|
|
128
|
+
Na as RunProgressStripV2,
|
|
127
129
|
U as SUB_AGENT_TERMINAL_STATUSES,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
ws as Score,
|
|
131
|
+
Ha as SearchIcon,
|
|
132
|
+
Ga as SendIcon,
|
|
131
133
|
c as ServerEvent,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
Oa as SessionStateManagerService,
|
|
135
|
+
Q as SkillLevel,
|
|
136
|
+
ms as SortableTable,
|
|
137
|
+
Wa as SparkleIcon,
|
|
138
|
+
wa as Sparkline,
|
|
139
|
+
za as StopIcon,
|
|
140
|
+
Ja as Stopwatch,
|
|
139
141
|
l as StreamingFunctionCallUpdateContent,
|
|
140
142
|
A as StreamingReasoningContent,
|
|
141
143
|
p as StreamingResponse,
|
|
142
144
|
S as StreamingTextContent,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
ja as SubAgentBox,
|
|
146
|
+
Ka as SubAgentBoxV2,
|
|
147
|
+
qa as SuspendedPart,
|
|
148
|
+
Xa as TableIcon,
|
|
149
|
+
Za as TaskListV2,
|
|
150
|
+
Ya as TerminalIcon,
|
|
149
151
|
C as TextContent,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
152
|
+
Qa as TextPart,
|
|
153
|
+
$a as ThoughtPart,
|
|
154
|
+
et as ToolIcon,
|
|
155
|
+
at as TrashIcon,
|
|
156
|
+
tt as TriggerDropdown,
|
|
157
|
+
st as TurnAwareButton,
|
|
158
|
+
nt as UiToolDispatcher,
|
|
159
|
+
ot as UndoIcon,
|
|
160
|
+
rt as UsersIcon,
|
|
161
|
+
it as V2_CHART_PALETTE,
|
|
162
|
+
ct as WARNING_THRESHOLD,
|
|
163
|
+
lt as WaitingPart,
|
|
164
|
+
Ie as WebSocketConnecionV2,
|
|
165
|
+
At as ZoomInIcon,
|
|
166
|
+
pt as ZoomOutIcon,
|
|
167
|
+
us as activatePlaceholder,
|
|
168
|
+
Ts as advanceToPlaceholder,
|
|
169
|
+
Ls as applyTriggerInsertion,
|
|
170
|
+
Ps as chipLocations,
|
|
171
|
+
xs as chunkArray,
|
|
172
|
+
St as classifyPart,
|
|
173
|
+
Ct as configureFriendlyMapping,
|
|
174
|
+
dt as createAiChatEngine,
|
|
175
|
+
gt as createAiChatSessionStore,
|
|
176
|
+
It as createAiChatStore,
|
|
172
177
|
d as createEventSerializer,
|
|
173
178
|
g as createStreamingResponseSerializer,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
179
|
+
ht as createUiToolRegistry,
|
|
180
|
+
$t as dateReviver,
|
|
181
|
+
es as decodeBase64,
|
|
182
|
+
ue as decodeSessionEvents,
|
|
183
|
+
as as decodeUri,
|
|
184
|
+
ts as decodeUriFromPython,
|
|
185
|
+
I as deserializeEvent,
|
|
186
|
+
h as deserializePayload,
|
|
187
|
+
Us as detectTrigger,
|
|
188
|
+
Et as disposeSharedAiChatEngine,
|
|
189
|
+
ss as encodeBase64,
|
|
190
|
+
ns as encodeUri,
|
|
191
|
+
vt as extendDefaultScope,
|
|
192
|
+
mt as extendModuleRegistry,
|
|
193
|
+
fs as extractInteractionId,
|
|
194
|
+
Rs as extractLinkAction,
|
|
195
|
+
Ms as fetchAtMentions,
|
|
196
|
+
ys as findPlaceholder,
|
|
197
|
+
os as getAgentBaseUrl,
|
|
193
198
|
$ as getAgentServerBaseUrl,
|
|
194
|
-
|
|
199
|
+
rs as getArtifactsBaseUrl,
|
|
195
200
|
ee as getConnectionStateColor,
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
ut as getDefaultJsxScope,
|
|
202
|
+
is as getDotNetBaseUrl,
|
|
198
203
|
ae as getEnvVar,
|
|
199
204
|
te as getEnvironmentInfo,
|
|
200
|
-
|
|
201
|
-
|
|
205
|
+
Tt as getFriendlyLabel,
|
|
206
|
+
cs as getIconByName,
|
|
202
207
|
se as getModelVendor,
|
|
203
208
|
ne as getRandomUUID,
|
|
204
209
|
oe as getServerBaseUrl,
|
|
205
210
|
re as getServerClientBaseUrl,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
Lt as getSharedAiChatEngine,
|
|
212
|
+
ls as iconCategories,
|
|
213
|
+
As as isBase64Encoded,
|
|
214
|
+
Ds as isSectionStart,
|
|
210
215
|
ie as isServer,
|
|
211
216
|
f as isSubAgentTerminalStatus,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
217
|
+
ps as isUriEncoded,
|
|
218
|
+
_s as isValidInteractionId,
|
|
219
|
+
Ss as isValidUri,
|
|
220
|
+
Cs as materialIcons,
|
|
221
|
+
Bs as parseAndValidateArtifactUrl,
|
|
222
|
+
ds as parseArtifactFromJson,
|
|
223
|
+
Pt as parseClientOutput,
|
|
224
|
+
xt as parseContentBlocks,
|
|
225
|
+
ks as parseKnownNumbers,
|
|
226
|
+
Ut as parseUiArgs,
|
|
227
|
+
gs as parseUriParams,
|
|
228
|
+
Vs as placeCaret,
|
|
229
|
+
Fs as placeholderAt,
|
|
225
230
|
Te as resolveAccessToken,
|
|
226
231
|
ce as resolveApiUrl,
|
|
227
232
|
E as sanitizeJsonString,
|
|
228
|
-
|
|
233
|
+
Is as searchIcons,
|
|
229
234
|
v as serializeEvent,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
235
|
+
hs as setEbiContextData,
|
|
236
|
+
Es as setEbiContextSessionId,
|
|
237
|
+
bs as splitBigLinesWithSpaces,
|
|
238
|
+
Ns as startsWithInteractionId,
|
|
239
|
+
Hs as tokenizeForHighlight,
|
|
240
|
+
ft as useAiChatServices,
|
|
241
|
+
Rt as useAiChatSessionStore,
|
|
242
|
+
Os as useChatSessions,
|
|
243
|
+
Mt as useCoarsePointer,
|
|
244
|
+
zt as useContainerRectangle,
|
|
245
|
+
Jt as useContainerWidth,
|
|
246
|
+
yt as useEnvironment,
|
|
247
|
+
Dt as useEnvironmentOptional,
|
|
248
|
+
jt as useInterval,
|
|
249
|
+
_t as useLiveSession,
|
|
250
|
+
Bt as useLiveTsxMaxCharsForFull,
|
|
251
|
+
kt as useParkedAskUser,
|
|
252
|
+
Kt as usePromptAssist,
|
|
253
|
+
Vt as useResponsiveLayout,
|
|
254
|
+
Ft as useTurnOpen,
|
|
255
|
+
bt as v2Card,
|
|
256
|
+
Nt as v2Chip,
|
|
257
|
+
Ht as v2IconBtn,
|
|
258
|
+
Gt as v2MonoMeta,
|
|
259
|
+
Ot as v2SectionLabel,
|
|
260
|
+
Wt as v2Theme
|
|
256
261
|
};
|
|
257
262
|
//# sourceMappingURL=index.js.map
|
|
@@ -40,6 +40,13 @@ export interface AiChatContextState {
|
|
|
40
40
|
* drawn twice (issue #235).
|
|
41
41
|
*/
|
|
42
42
|
autoRenderAskUserSheet: boolean;
|
|
43
|
+
/** Where a parked ask-user prompt is presented — docked sheet, or inline in the transcript. */
|
|
44
|
+
askUserPresentation: 'sheet' | 'inline';
|
|
45
|
+
/** Host chrome around the inline question (see {@link askUserPresentation}). */
|
|
46
|
+
askUserInlineContainer?: ComponentType<{
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
toolName?: string;
|
|
49
|
+
}>;
|
|
43
50
|
setShowToolCalls: (show: boolean) => void;
|
|
44
51
|
friendlyMode: boolean;
|
|
45
52
|
setFriendlyMode: (enabled: boolean) => void;
|
|
@@ -168,6 +168,40 @@ export interface AiChatProps extends AiChatStyleProps {
|
|
|
168
168
|
* such hosts can drop it into their own positioned wrapper.
|
|
169
169
|
*/
|
|
170
170
|
autoRenderAskUserSheet?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* WHERE a parked ask_user / askauth prompt is presented. Same tool call, same park, same
|
|
173
|
+
* answer — only the format changes.
|
|
174
|
+
*
|
|
175
|
+
* <p>`'sheet'` (default) is the docked {@link AskUserSheet}: it slides up over the conversation,
|
|
176
|
+
* above the composer. `'inline'` draws the question IN THE TURN instead — the parked part stops
|
|
177
|
+
* being suppressed in the transcript and renders at its own position, after the tool call that
|
|
178
|
+
* asked and above the turn's trailing "…" dots, like any other part. That is the shape a phone
|
|
179
|
+
* needs: a sheet there opens to 400px over a transcript that has none to spare, and it carries a
|
|
180
|
+
* grabber, a collapse and a close for a call the server has PARKED and that must be answered
|
|
181
|
+
* rather than dismissed.</p>
|
|
182
|
+
*
|
|
183
|
+
* <p>Because it is the part's own position, the answered summary later replaces the question
|
|
184
|
+
* exactly where the question stood — nothing moves, and the transcript is never scrolled to
|
|
185
|
+
* reveal anything.</p>
|
|
186
|
+
*
|
|
187
|
+
* <p>The two are mutually exclusive by construction: `'inline'` suppresses ChatPane's sheet
|
|
188
|
+
* whatever {@link autoRenderAskUserSheet} says. A host that also docks its OWN
|
|
189
|
+
* {@link AskUserSheet} must stop doing so when it asks for `'inline'`, or the same question is
|
|
190
|
+
* on screen twice.</p>
|
|
191
|
+
*/
|
|
192
|
+
askUserPresentation?: 'sheet' | 'inline';
|
|
193
|
+
/**
|
|
194
|
+
* Chrome around the inline question — the host's card. Receives the rendered question face as
|
|
195
|
+
* `children` and the asking tool's name (already stripped of the connector's plugin qualifier).
|
|
196
|
+
* Given one, the question face is drawn `embedded`, so the card's border and padding are the
|
|
197
|
+
* only ones. Optional: with none, the question renders with its own default chrome. Ignored
|
|
198
|
+
* unless {@link askUserPresentation} is `'inline'`, and never applied inside a sheet or dialog,
|
|
199
|
+
* which own their chrome already.
|
|
200
|
+
*/
|
|
201
|
+
askUserInlineContainer?: React.ComponentType<{
|
|
202
|
+
children: React.ReactNode;
|
|
203
|
+
toolName?: string;
|
|
204
|
+
}>;
|
|
171
205
|
friendlyMode?: boolean;
|
|
172
206
|
/**
|
|
173
207
|
* Per-part renderer overrides. Map a `PartKind` ('text' | 'thought' |
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Interaction } from '../../../models/Interaction';
|
|
3
|
+
import { InteractionPart } from '../../../models/InteractionPart';
|
|
4
|
+
export declare function hideUnfinishedUiParts(parts: InteractionPart[], onGoing: boolean,
|
|
5
|
+
/**
|
|
6
|
+
* `askUserPresentation === 'inline'`: the parked question has no other surface, so it must stay in
|
|
7
|
+
* the stream and render HERE, at its own position in the turn. See the filter below.
|
|
8
|
+
*/
|
|
9
|
+
keepParkedAskUser?: boolean): InteractionPart[];
|
|
3
10
|
interface MessageAgentProps {
|
|
4
11
|
message: Interaction;
|
|
5
12
|
onGoing: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -26,6 +26,13 @@ export declare const isAskUser: (name?: string | null) => boolean;
|
|
|
26
26
|
* bare `askauth`; live LLM connectors qualify it as `{Plugin}-askauth` / `{Plugin}_askauth`.
|
|
27
27
|
*/
|
|
28
28
|
export declare const isAskAuth: (name?: string | null) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The tool name as a HUMAN should read it. Live LLM connectors qualify the SDK's built-ins with the
|
|
31
|
+
* plugin that carries them — `HumanInteractionTool-ask_user` — which is an implementation detail of
|
|
32
|
+
* the connector, and a mouthful in a 360px header. Host-registered names (`ask_for_reason`) are
|
|
33
|
+
* already what their author called them and pass through untouched.
|
|
34
|
+
*/
|
|
35
|
+
export declare const askUserDisplayName: (name?: string | null) => string | undefined;
|
|
29
36
|
/** Built-in ask-user component names (the server's [KernelUIComponent] values for the SDK tools). */
|
|
30
37
|
export declare const ASK_USER_COMPONENT = "AskUserPart";
|
|
31
38
|
export declare const ASK_AUTH_COMPONENT = "AskAuthPart";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** The attachment shape PromptV2 keeps in its local state. */
|
|
3
|
+
export type PromptAttachment = {
|
|
4
|
+
id: string;
|
|
5
|
+
dataUrl: string;
|
|
6
|
+
mimeType: string;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
interface AttachmentPreviewModalProps {
|
|
10
|
+
/** The attachment being previewed, or null when the lightbox is closed. */
|
|
11
|
+
attachment: PromptAttachment | null;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Called when the user applies their edits. The parent replaces the
|
|
15
|
+
* stored attachment so the edited bitmap is what gets sent — the
|
|
16
|
+
* mime type may change (see `ENCODABLE` below).
|
|
17
|
+
*/
|
|
18
|
+
onApply: (id: string, dataUrl: string, mimeType: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const AttachmentPreviewModal: React.FC<AttachmentPreviewModalProps>;
|
|
21
|
+
export default AttachmentPreviewModal;
|
|
@@ -24,6 +24,11 @@ export declare const PauseIcon: (p: IconProps) => React.ReactElement<any, string
|
|
|
24
24
|
export declare const StopIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
25
25
|
export declare const HistoryIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
26
26
|
export declare const MenuIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
export declare const PenIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
28
|
+
export declare const RotateIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
29
|
+
export declare const UndoIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
30
|
+
export declare const ZoomInIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
31
|
+
export declare const ZoomOutIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
27
32
|
export declare const FileIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
28
33
|
export declare const TerminalIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
29
34
|
export declare const CodeIcon: (p: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|