@aintela/chat 0.2.39 → 0.2.40

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.
Files changed (26) hide show
  1. package/dist/components.js +5872 -5681
  2. package/dist/components.js.map +1 -1
  3. package/dist/hooks.js +1 -1
  4. package/dist/{httpArtifactService-BpRwcTJp.js → httpArtifactService-BqcorW_s.js} +57 -56
  5. package/dist/{httpArtifactService-BpRwcTJp.js.map → httpArtifactService-BqcorW_s.js.map} +1 -1
  6. package/dist/{httpSessionService-M1IKQIQK.js → httpSessionService-CNzThf-T.js} +85 -80
  7. package/dist/httpSessionService-CNzThf-T.js.map +1 -0
  8. package/dist/index.js +190 -183
  9. package/dist/services.js +7 -6
  10. package/dist/src/components/AiChat/AiChatContext.d.ts +8 -0
  11. package/dist/src/components/AiChat/AiChatTypes.d.ts +29 -0
  12. package/dist/src/components/AiChat/ChatPane/AskUserSheet.d.ts +21 -9
  13. package/dist/src/components/AiChat/ChatPane/CurrentMessage.d.ts +2 -2
  14. package/dist/src/components/AiChat/aiChatEngine.d.ts +89 -0
  15. package/dist/src/components/AiChat/aiChatEngine.test.d.ts +1 -0
  16. package/dist/src/components/AiChat/useLiveSession.d.ts +52 -0
  17. package/dist/src/components/index.d.ts +6 -0
  18. package/dist/src/services/accessTokenProvider.d.ts +9 -0
  19. package/dist/src/services/httpArtifactService.d.ts +2 -1
  20. package/dist/src/services/httpPromptAssistService.d.ts +2 -7
  21. package/dist/src/services/httpSessionService.d.ts +2 -1
  22. package/dist/src/services/index.d.ts +2 -0
  23. package/dist/{useChatSessions-C-XVE-h3.js → useChatSessions-mnF6pUGm.js} +2 -2
  24. package/dist/{useChatSessions-C-XVE-h3.js.map → useChatSessions-mnF6pUGm.js.map} +1 -1
  25. package/package.json +1 -1
  26. package/dist/httpSessionService-M1IKQIQK.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,234 +1,241 @@
1
1
  import "reflect-metadata";
2
- import { C as s, F as o, a as n, I as r, L as i, S as c, b as l, c as S, d as p, e as A, T as C, f as d, g, h as I, i as v, s as E, j as h } from "./serializer-uea8YsIP.js";
3
- import { A as T, a as u, C as L, M as x, b as P, S as f, i as R } from "./Memory-DjLZqgbF.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 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
4
  import { C as U, 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 oe, r as ne, s as re, t as ie, u as ce } from "./environmentUtils-CUVZ6Dq1.js";
7
- import { A as Se, a as pe, E as Ae, H as Ce, I as de, L as ge, W as Ie } from "./httpArtifactService-BpRwcTJp.js";
8
- import { A as Ee } from "./artifactHtmlHandler-CMQJf1cX.js";
9
- import { H as me, d as Te } from "./httpSessionService-M1IKQIQK.js";
10
- import { APPBAR_V2_HEIGHT as Le, AgentActivityV2 as xe, AiChat as Pe, AiChatDrawer as fe, AiChatFloating as Re, AiChatFloatingV2 as Me, AiChatProvider as Ue, AiChatServiceContext as ye, AiChatV2Pane as _e, AppBarV2 as De, AppRailV2 as Be, AppShellV2 as Ve, ArtifactRender as Fe, BoxedPart as be, BrainIcon as ke, ChartIcon as Ne, ChatIcon as He, ChatPane as Ge, ChatsHistoryV2 as Oe, CheckIcon as We, ChevronIcon as we, ChevronRightIcon as ze, CloseIcon as Je, CodeIcon as je, ComposerIcon as qe, DEFAULT_PART_RENDERERS as Ke, DashboardIcon as Xe, DataExplorerIcon as Ye, DelayTextComponent as Qe, EnvironmentProvider as Ze, FileIcon as $e, FunctionPart as ea, GlobeIcon as aa, HistoryIcon as ta, IDLE_TIMEOUT as sa, InertEnvironmentProvider as oa, JsxErrorBoundary as na, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as ra, LastPromptsV2 as ia, LinearBackgroundProgress as ca, LinearProgressBarWithMarkers as la, ListCheckIcon as Sa, LiveJsxBlock as pa, LiveTsxConfigProvider as Aa, LlmResponseRender as Ca, LoadingDots as da, LockClosedIcon as ga, LockOpenIcon as Ia, MOBILE_NAV_DEFAULT as va, MarkdownExtended as Ea, MenuIcon as ha, Message as ma, MobileDrawerV2 as Ta, PanelIcon as ua, PauseIcon as La, PinIcon as xa, PlusIcon as Pa, PromptDateMarkers as fa, PromptV2 as Ra, RunProgressPanelV2 as Ma, RunProgressStripV2 as Ua, SearchIcon as ya, SendIcon as _a, SessionStateManagerService as Da, SparkleIcon as Ba, Sparkline as Va, StopIcon as Fa, Stopwatch as ba, SubAgentBox as ka, SubAgentBoxV2 as Na, SuspendedPart as Ha, TableIcon as Ga, TaskListV2 as Oa, TerminalIcon as Wa, TextPart as wa, ThoughtPart as za, ToolIcon as Ja, TrashIcon as ja, UiToolDispatcher as qa, UsersIcon as Ka, V2_CHART_PALETTE as Xa, WARNING_THRESHOLD as Ya, WaitingPart as Qa, classifyPart as Za, configureFriendlyMapping as $a, createAiChatSessionStore as et, createAiChatSessionStore as at, createUiToolRegistry as tt, extendDefaultScope as st, extendModuleRegistry as ot, getDefaultJsxScope as nt, getFriendlyLabel as rt, parseClientOutput as it, parseContentBlocks as ct, parseUiArgs as lt, useAiChatServices as St, useAiChatSessionStore as pt, useEnvironment as At, useEnvironmentOptional as Ct, useLiveTsxMaxCharsForFull as dt, useResponsiveLayout as gt, v2Card as It, v2Chip as vt, v2IconBtn as Et, v2MonoMeta as ht, v2SectionLabel as mt, v2Theme as Tt } from "./components.js";
11
- import { u as Lt, a as xt, b as Pt, c as ft } from "./useContainerWidth-CDv8UQyZ.js";
12
- import { A as Mt, a as Ut, b as yt, G as _t, d as Dt, c as Bt, e as Vt, f as Ft, g as bt, h as kt, i as Nt, j as Ht, k as Gt, l as Ot, m as Wt, n as wt, o as zt, p as Jt, q as jt, r as qt, s as Kt, t as Xt, u as Yt, v as Qt } from "./auth-ffNUief3.js";
13
- import { S as $t, c as es, a as as, e as ts, b as ss, f as os, i as ns, d as rs, p as is, g as cs, s as ls, k as Ss, t as ps } from "./atMentions-C5Fs9Yab.js";
14
- import { u as Cs } from "./useChatSessions-C-XVE-h3.js";
15
- import { Score as gs } from "./interfaces.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-BqcorW_s.js";
8
+ import { A as ve } from "./artifactHtmlHandler-CMQJf1cX.js";
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";
16
16
  export {
17
- Mt as ALLOWED_DOMAINS,
18
- Ut as ALLOWED_EMAILS,
17
+ Ft as ALLOWED_DOMAINS,
18
+ bt as ALLOWED_EMAILS,
19
19
  F as ANALYTICS_AGENT_NAME,
20
- Le as APPBAR_V2_HEIGHT,
21
- yt as AUTH_CONFIG,
22
- T as Account,
23
- xe as AgentActivityV2,
20
+ xe as APPBAR_V2_HEIGHT,
21
+ kt as AUTH_CONFIG,
22
+ u as Account,
23
+ Pe as AgentActivityV2,
24
24
  b as AgentConfig,
25
25
  Se as AgentGatewayService,
26
- pe as AgentGatewayWSAsync,
27
- u as AgentKind,
26
+ Ae as AgentGatewayWSAsync,
27
+ T as AgentKind,
28
28
  k as AgentMode,
29
29
  N as AgentType,
30
- Pe as AiChat,
31
- fe as AiChatDrawer,
30
+ fe as AiChat,
31
+ Me as AiChatDrawer,
32
32
  Re as AiChatFloating,
33
- Me as AiChatFloatingV2,
34
- Ue as AiChatProvider,
35
- ye as AiChatServiceContext,
36
- _e as AiChatV2Pane,
37
- De as AppBarV2,
38
- Be as AppRailV2,
39
- Ve as AppShellV2,
40
- Ee as ArtifactHtmlHandler,
41
- Fe as ArtifactRender,
33
+ Ue as AiChatFloatingV2,
34
+ ye as AiChatProvider,
35
+ _e as AiChatServiceContext,
36
+ De as AiChatV2Pane,
37
+ Be as AppBarV2,
38
+ Ve as AppRailV2,
39
+ Fe as AppShellV2,
40
+ ve as ArtifactHtmlHandler,
41
+ be as ArtifactRender,
42
42
  H as ArtifactType,
43
+ ke as AskUserSheet,
43
44
  G as AuthorType,
44
- be as BoxedPart,
45
- ke as BrainIcon,
46
- Ne as ChartIcon,
45
+ Ne as BoxedPart,
46
+ He as BrainIcon,
47
+ Ge as ChartIcon,
47
48
  O as ChatAction,
48
49
  W as ChatEventType,
49
- He as ChatIcon,
50
+ Oe as ChatIcon,
50
51
  s as ChatMessageContent,
51
- Ge as ChatPane,
52
+ We as ChatPane,
52
53
  L as ChatSessionUtils,
53
- Oe as ChatsHistoryV2,
54
- We as CheckIcon,
55
- we as ChevronIcon,
56
- ze as ChevronRightIcon,
54
+ we as ChatsHistoryV2,
55
+ ze as CheckIcon,
56
+ Je as ChevronIcon,
57
+ je as ChevronRightIcon,
57
58
  U as ClientMessage,
58
59
  y as ClientMessageClass,
59
- Je as CloseIcon,
60
- je as CodeIcon,
61
- qe as ComposerIcon,
60
+ qe as CloseIcon,
61
+ Ke as CodeIcon,
62
+ Xe as ComposerIcon,
62
63
  D as ConnectionState,
63
- Ke as DEFAULT_PART_RENDERERS,
64
+ Ye as CurrentMessage,
65
+ Qe as DEFAULT_PART_RENDERERS,
64
66
  w as DEV_SERVER_CONFIG,
65
- Xe as DashboardIcon,
66
- Ye as DataExplorerIcon,
67
- Qe as DelayTextComponent,
68
- Ze as EnvironmentProvider,
69
- Ae as EventBusService,
67
+ Ze as DashboardIcon,
68
+ $e as DataExplorerIcon,
69
+ ea as DelayTextComponent,
70
+ aa as EnvironmentProvider,
71
+ Ce as EventBusService,
70
72
  z as EventType,
71
73
  J as EventTypeDescriptions,
72
- $e as FileIcon,
73
- o as FunctionCallContent,
74
- ea as FunctionPart,
75
- n as FunctionResultContent,
76
- _t as GOOGLE_CLIENT_ID,
74
+ ta as FileIcon,
75
+ n as FunctionCallContent,
76
+ sa as FunctionPart,
77
+ o as FunctionResultContent,
78
+ Nt as GOOGLE_CLIENT_ID,
77
79
  j as GetEventTypeFromDotNetName,
78
80
  q as GetEventTypeFromPythonName,
79
- aa as GlobeIcon,
80
- ta as HistoryIcon,
81
- Ce as HttpArtifactService,
81
+ na as GlobeIcon,
82
+ oa as HistoryIcon,
83
+ pe as HttpArtifactService,
82
84
  me as HttpSessionService,
83
- sa as IDLE_TIMEOUT,
84
- oa as InertEnvironmentProvider,
85
+ ra as IDLE_TIMEOUT,
86
+ ia as InertEnvironmentProvider,
85
87
  r as InteractionPartUtils,
86
- de as InteractionService,
87
- na as JsxErrorBoundary,
88
- ra as LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL,
89
- ia as LastPromptsV2,
90
- ca as LinearBackgroundProgress,
91
- la as LinearProgressBarWithMarkers,
92
- Sa as ListCheckIcon,
93
- pa as LiveJsxBlock,
94
- Aa as LiveTsxConfigProvider,
88
+ 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,
95
97
  i as LlmEvent,
96
- Ca as LlmResponseRender,
97
- da as LoadingDots,
98
- ge as LocalStorageService,
99
- ga as LockClosedIcon,
100
- Ia as LockOpenIcon,
101
- va as MOBILE_NAV_DEFAULT,
102
- Ea as MarkdownExtended,
98
+ Ia as LlmResponseRender,
99
+ ha as LoadingDots,
100
+ de as LocalStorageService,
101
+ va as LockClosedIcon,
102
+ Ea as LockOpenIcon,
103
+ ma as MOBILE_NAV_DEFAULT,
104
+ ua as MarkdownExtended,
103
105
  x as MemoryContextLabels,
104
106
  P as MemoryContexts,
105
- ha as MenuIcon,
106
- ma as Message,
107
- Ta as MobileDrawerV2,
107
+ Ta as MenuIcon,
108
+ La as Message,
109
+ xa as MobileDrawerV2,
108
110
  K as ModelConfig,
109
111
  X as ModelType,
110
- ua as PanelIcon,
111
- La as PauseIcon,
112
- xa as PinIcon,
113
- Pa as PlusIcon,
114
- fa as PromptDateMarkers,
112
+ Pa as PanelIcon,
113
+ fa as PauseIcon,
114
+ Ma as PinIcon,
115
+ Ra as PlusIcon,
116
+ Ua as PromptDateMarkers,
115
117
  B as PromptUtils,
116
- Ra as PromptV2,
118
+ ya as PromptV2,
117
119
  Y as ResponseType,
118
120
  Q as RunMode,
119
- Ma as RunProgressPanelV2,
120
- Ua as RunProgressStripV2,
121
+ _a as RunProgressPanelV2,
122
+ Da as RunProgressStripV2,
121
123
  f as SUB_AGENT_TERMINAL_STATUSES,
122
- gs as Score,
123
- ya as SearchIcon,
124
- _a as SendIcon,
124
+ Ts as Score,
125
+ Ba as SearchIcon,
126
+ Va as SendIcon,
125
127
  c as ServerEvent,
126
- Da as SessionStateManagerService,
128
+ Fa as SessionStateManagerService,
127
129
  Z as SkillLevel,
128
- $t as SortableTable,
129
- Ba as SparkleIcon,
130
- Va as Sparkline,
131
- Fa as StopIcon,
132
- ba as Stopwatch,
130
+ rs as SortableTable,
131
+ ba as SparkleIcon,
132
+ ka as Sparkline,
133
+ Na as StopIcon,
134
+ Ha as Stopwatch,
133
135
  l as StreamingFunctionCallUpdateContent,
134
136
  S as StreamingReasoningContent,
135
- p as StreamingResponse,
136
- A as StreamingTextContent,
137
- ka as SubAgentBox,
138
- Na as SubAgentBoxV2,
139
- Ha as SuspendedPart,
140
- Ga as TableIcon,
141
- Oa as TaskListV2,
142
- Wa as TerminalIcon,
143
- C as TextContent,
144
- wa as TextPart,
145
- za as ThoughtPart,
146
- Ja as ToolIcon,
147
- ja as TrashIcon,
148
- qa as UiToolDispatcher,
149
- Ka as UsersIcon,
150
- Xa as V2_CHART_PALETTE,
151
- Ya as WARNING_THRESHOLD,
152
- Qa as WaitingPart,
137
+ A as StreamingResponse,
138
+ 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,
145
+ 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,
153
155
  Ie as WebSocketConnecionV2,
154
- es as chipLocations,
155
- as as chunkArray,
156
- Za as classifyPart,
157
- $a as configureFriendlyMapping,
158
- et as createAiChatSessionStore,
159
- at as createAiChatStore,
160
- d as createEventSerializer,
161
- g as createStreamingResponseSerializer,
162
- tt as createUiToolRegistry,
163
- Dt as dateReviver,
164
- Bt as decodeBase64,
165
- Te as decodeSessionEvents,
166
- Vt as decodeUri,
167
- Ft as decodeUriFromPython,
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,
163
+ g as createEventSerializer,
164
+ d as createStreamingResponseSerializer,
165
+ rt as createUiToolRegistry,
166
+ Ht as dateReviver,
167
+ Gt as decodeBase64,
168
+ ue as decodeSessionEvents,
169
+ Ot as decodeUri,
170
+ Wt as decodeUriFromPython,
168
171
  I as deserializeEvent,
169
- v as deserializePayload,
170
- bt as encodeBase64,
171
- kt as encodeUri,
172
- st as extendDefaultScope,
173
- ot as extendModuleRegistry,
174
- ts as extractInteractionId,
175
- ss as extractLinkAction,
176
- os as fetchAtMentions,
177
- Nt as getAgentBaseUrl,
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,
178
182
  $ as getAgentServerBaseUrl,
179
- Ht as getArtifactsBaseUrl,
183
+ jt as getArtifactsBaseUrl,
180
184
  ee as getConnectionStateColor,
181
- nt as getDefaultJsxScope,
182
- Gt as getDotNetBaseUrl,
185
+ St as getDefaultJsxScope,
186
+ qt as getDotNetBaseUrl,
183
187
  ae as getEnvVar,
184
188
  te as getEnvironmentInfo,
185
- rt as getFriendlyLabel,
186
- Ot as getIconByName,
189
+ At as getFriendlyLabel,
190
+ Kt as getIconByName,
187
191
  se as getModelVendor,
188
- oe as getRandomUUID,
189
- ne as getServerBaseUrl,
192
+ ne as getRandomUUID,
193
+ oe as getServerBaseUrl,
190
194
  re as getServerClientBaseUrl,
191
- Wt as iconCategories,
192
- wt as isBase64Encoded,
193
- ns as isSectionStart,
195
+ Ct as getSharedAiChatEngine,
196
+ Xt as iconCategories,
197
+ Yt as isBase64Encoded,
198
+ Cs as isSectionStart,
194
199
  ie as isServer,
195
- R as isSubAgentTerminalStatus,
196
- zt as isUriEncoded,
197
- rs as isValidInteractionId,
198
- Jt as isValidUri,
199
- jt as materialIcons,
200
- is as parseAndValidateArtifactUrl,
201
- qt as parseArtifactFromJson,
202
- it as parseClientOutput,
203
- ct as parseContentBlocks,
204
- cs as parseKnownNumbers,
205
- lt as parseUiArgs,
206
- Kt as parseUriParams,
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,
212
+ Te as resolveAccessToken,
207
213
  ce as resolveApiUrl,
208
- E as sanitizeJsonString,
209
- Xt as searchIcons,
210
- h as serializeEvent,
211
- Yt as setEbiContextData,
212
- Qt as setEbiContextSessionId,
213
- ls as splitBigLinesWithSpaces,
214
- Ss as startsWithInteractionId,
215
- ps as tokenizeForHighlight,
216
- St as useAiChatServices,
217
- pt as useAiChatSessionStore,
218
- Cs as useChatSessions,
219
- Lt as useContainerRectangle,
220
- xt as useContainerWidth,
221
- At as useEnvironment,
222
- Ct as useEnvironmentOptional,
223
- Pt as useInterval,
224
- dt as useLiveTsxMaxCharsForFull,
225
- ft as usePromptAssist,
226
- gt as useResponsiveLayout,
227
- It as v2Card,
228
- vt as v2Chip,
229
- Et as v2IconBtn,
230
- ht as v2MonoMeta,
231
- mt as v2SectionLabel,
232
- Tt as v2Theme
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
233
240
  };
234
241
  //# sourceMappingURL=index.js.map
package/dist/services.js CHANGED
@@ -1,16 +1,17 @@
1
- import { A as a, a as r, E as s, H as o, I as c, L as n, W as i } from "./httpArtifactService-BpRwcTJp.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-BqcorW_s.js";
2
2
  import { A as v } from "./artifactHtmlHandler-CMQJf1cX.js";
3
- import { H, d as f } from "./httpSessionService-M1IKQIQK.js";
3
+ import { H, d as f, r as p } from "./httpSessionService-CNzThf-T.js";
4
4
  export {
5
- a as AgentGatewayService,
6
- r as AgentGatewayWSAsync,
5
+ t as AgentGatewayService,
6
+ s as AgentGatewayWSAsync,
7
7
  v as ArtifactHtmlHandler,
8
- s as EventBusService,
8
+ r as EventBusService,
9
9
  o as HttpArtifactService,
10
10
  H as HttpSessionService,
11
11
  c as InteractionService,
12
12
  n as LocalStorageService,
13
13
  i as WebSocketConnecionV2,
14
- f as decodeSessionEvents
14
+ f as decodeSessionEvents,
15
+ p as resolveAccessToken
15
16
  };
16
17
  //# sourceMappingURL=services.js.map
@@ -32,6 +32,14 @@ export interface AiChatContextState {
32
32
  compactPrompt: boolean;
33
33
  showConnectionState: boolean;
34
34
  hidePromptInput: boolean;
35
+ /**
36
+ * Whether ChatPane docks its own {@link AskUserSheet} above the composer.
37
+ * Defaults to `true` (the in-chat behaviour). Hosts that render the sheet
38
+ * themselves — e.g. obtapp's operations page, which docks it over the chat
39
+ * AND the trip panel above a host-owned PromptV2 — pass `false` so it isn't
40
+ * drawn twice (issue #235).
41
+ */
42
+ autoRenderAskUserSheet: boolean;
35
43
  setShowToolCalls: (show: boolean) => void;
36
44
  friendlyMode: boolean;
37
45
  setFriendlyMode: (enabled: boolean) => void;
@@ -11,6 +11,7 @@ import { AgentGatewayService, GatewaySendMessageOptions } from '../../services/s
11
11
  import { INotificationPort } from '../../interfaces/INotificationPort';
12
12
  import { IWebSocketConnection } from '../../services/WebSocketConnection/webSocketConnection';
13
13
  import { SendMessageResponse } from '../../models/SendMessageResponse';
14
+ import { AiChatEngine } from './aiChatEngine';
14
15
  import { PartRendererMap, UiToolRegistry } from './ChatPane/parts';
15
16
  /**
16
17
  * A rich UI representation for a user turn. Pass it to
@@ -90,8 +91,26 @@ export interface AiChatProps extends AiChatStyleProps {
90
91
  agentContext: AgentContext;
91
92
  serverBaseUrl: string;
92
93
  user: User;
94
+ /**
95
+ * Live source of the authenticated user (see {@link AiChatEngineConfig.getUser}).
96
+ * Only used when the provider builds its OWN engine (no `engine` prop): the
97
+ * WS dial and HTTP clients then read the freshest token through it instead
98
+ * of the `user` snapshot. When adopting an engine, pass it to
99
+ * {@link useLiveSession}'s config instead.
100
+ */
101
+ getUser?: () => User | undefined;
93
102
  sessionService?: ISessionService;
94
103
  sessionId?: string;
104
+ /**
105
+ * A pre-built (typically SHARED) engine to ADOPT instead of building one
106
+ * (issue #236). Obtain it from {@link useLiveSession}. When provided, this
107
+ * `<AiChat>` renders the chat UI + wires callbacks over that engine but does
108
+ * NOT open/close the socket itself — the engine's owner drives the session
109
+ * lifecycle (so a home-page warm-up survives the hop to the operations page
110
+ * on the very same socket). When omitted, `<AiChat>` builds and owns its own
111
+ * engine exactly as before.
112
+ */
113
+ engine?: AiChatEngine;
95
114
  /**
96
115
  * If `true`, the provider opens a live WebSocket and creates a fresh
97
116
  * server-side session on mount when no `sessionId` is supplied.
@@ -139,6 +158,16 @@ export interface AiChatProps extends AiChatStyleProps {
139
158
  * a pure transcript. Defaults to `false`.
140
159
  */
141
160
  hidePromptInput?: boolean;
161
+ /**
162
+ * Whether ChatPane auto-docks the built-in {@link AskUserSheet} (the parked
163
+ * ask_user / askauth bottom sheet) above its composer. Defaults to `true`.
164
+ * Hosts that render `AskUserSheet` themselves — e.g. positioning it over a
165
+ * wider area than the chat pane (obtapp's operations page docks it over the
166
+ * chat AND the trip panel, above a host-owned PromptV2) — pass `false` so
167
+ * the sheet isn't drawn in two places (issue #235). The sheet is exported so
168
+ * such hosts can drop it into their own positioned wrapper.
169
+ */
170
+ autoRenderAskUserSheet?: boolean;
142
171
  friendlyMode?: boolean;
143
172
  /**
144
173
  * Per-part renderer overrides. Map a `PartKind` ('text' | 'thought' |
@@ -1,8 +1,4 @@
1
1
  import { default as React } from 'react';
2
- interface AskUserSheetProps {
3
- /** Height of the composer below, so the sheet docks just above it. */
4
- promptHeight: number;
5
- }
6
2
  /**
7
3
  * Pane-scoped bottom sheet for a PARKED human-input prompt — ask_user (questionnaire) or askauth
8
4
  * (sign-in). Both park a turn awaiting the user; this surfaces whichever is pending in the docked drawer.
@@ -10,17 +6,33 @@ interface AskUserSheetProps {
10
6
  * A turn blocked on ask_user goes idle (no tokens stream), so the trailing
11
7
  * "..." waiting dots disappear and the inline transcript form reads as a
12
8
  * finished turn. This sheet keeps the question unmistakably "your turn": it
13
- * docks just above the composer, slides up while the turn waits, and leaves
14
- * the conversation visible/scrollable behind it. The moment the user answers,
15
- * the tool result lands (functionDetails.status -> 'Done'), the sheet retracts,
16
- * and the answered prompt renders inline in the transcript (MessageAgent
17
- * suppresses the parked one inline so it's never in two places).
9
+ * slides up while the turn waits and leaves the conversation visible/scrollable
10
+ * behind it. The moment the user answers, the tool result lands
11
+ * (functionDetails.status -> 'Done'), the sheet retracts, and the answered
12
+ * prompt renders inline in the transcript (MessageAgent suppresses the parked
13
+ * one inline so it's never in two places).
18
14
  *
19
15
  * Layout is a flex column: the form scrolls in the middle, and an indeterminate
20
16
  * `turnOpen` line is GLUED to the bottom edge OUTSIDE the scroll — the moving
21
17
  * cue that the turn is still alive and waiting (replacing the "..." dots that
22
18
  * vanish while parked). It renders the very same <AskUserPart> used inline —
23
19
  * no duplicated form logic — with `embedded` to drop its own card chrome.
20
+ *
21
+ * POSITIONING IS THE CALLER'S JOB BY DEFAULT (issue #235). With no
22
+ * `promptHeight`, the component renders only the sliding card (visuals +
23
+ * internal layout) and carries no `position` / offset / z-index, so it can be
24
+ * docked anywhere by wrapping it in a positioned Box — which is what obtapp's
25
+ * operations page does to span the chat AND the trip panel above its host-owned
26
+ * PromptV2.
27
+ *
28
+ * Pass `promptHeight` for the common in-chat case and the sheet docks itself
29
+ * just above a composer of that height, so `ChatPane` doesn't need to repeat
30
+ * the wrapper. The `Slide` anchors to the bottom edge either way, so the
31
+ * "slide up" reads the same however it's docked.
24
32
  */
33
+ export interface AskUserSheetProps {
34
+ /** Height of the composer to dock above, in px. Omit to stay positioning-agnostic. */
35
+ promptHeight?: number;
36
+ }
25
37
  declare const AskUserSheet: React.FC<AskUserSheetProps>;
26
38
  export default AskUserSheet;
@@ -1,12 +1,12 @@
1
1
  import { default as React } from 'react';
2
2
  import { IArtifactService } from '../../../services/interfaces/artifactService';
3
3
  import { EventBusService } from '../../../services/eventBusService';
4
- interface CurrentMessage {
4
+ export interface CurrentMessage {
5
5
  onLinkClicked: (link: string, content: string | null) => void;
6
6
  messagesRef: React.RefObject<Map<string, HTMLDivElement>>;
7
7
  artifactService: IArtifactService;
8
8
  eventBusService: EventBusService;
9
9
  friendlyMode?: boolean;
10
10
  }
11
- declare const CurrentMessage: React.FC<CurrentMessage>;
11
+ export declare const CurrentMessage: React.FC<CurrentMessage>;
12
12
  export default CurrentMessage;