@aintela/chat 0.8.0 → 0.9.0

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 (27) hide show
  1. package/dist/components.js +8370 -8215
  2. package/dist/components.js.map +1 -1
  3. package/dist/{detachedRunActivity-RNg1JDDW.js → detachedRunActivity-jHa9SDv1.js} +194 -192
  4. package/dist/{detachedRunActivity-RNg1JDDW.js.map → detachedRunActivity-jHa9SDv1.js.map} +1 -1
  5. package/dist/hooks.js +1 -1
  6. package/dist/{httpSessionService-DLdoBZRW.js → httpSessionService-BIkDesYB.js} +32 -31
  7. package/dist/{httpSessionService-DLdoBZRW.js.map → httpSessionService-BIkDesYB.js.map} +1 -1
  8. package/dist/index.js +182 -177
  9. package/dist/services.js +2 -2
  10. package/dist/src/components/AiChat/AiChatContext.d.ts +9 -0
  11. package/dist/src/components/AiChat/AiChatTypes.d.ts +6 -0
  12. package/dist/src/components/AiChat/ChatPane/ChatTurn.d.ts +33 -0
  13. package/dist/src/components/AiChat/ChatPane/CurrentMessage.d.ts +6 -4
  14. package/dist/src/components/AiChat/ChatPane/parts/ReadOnlyGuard.d.ts +9 -0
  15. package/dist/src/components/AiChat/ChatPane/parts/uiPartStage.d.ts +15 -10
  16. package/dist/src/components/AiChat/ChatPane/parts/uiToolRegistry.d.ts +6 -0
  17. package/dist/src/components/AiChat/ChatPane/turnCommitKeepsUiTools.test.d.ts +1 -0
  18. package/dist/src/components/LlmResponseRender/EnvironmentContext.d.ts +7 -0
  19. package/dist/src/components/index.d.ts +1 -1
  20. package/dist/src/components/v2/SharedSessionTranscript.d.ts +76 -0
  21. package/dist/src/components/v2/index.d.ts +2 -0
  22. package/dist/src/models/ChatSession.d.ts +6 -0
  23. package/dist/src/services/detachedRun/DetachedRunFramesTransport.d.ts +11 -0
  24. package/dist/src/services/detachedRun/streamDetachedRunFrames.d.ts +7 -0
  25. package/dist/{useChatSessions-DwqgYo79.js → useChatSessions-CyFKVtkk.js} +2 -2
  26. package/dist/{useChatSessions-DwqgYo79.js.map → useChatSessions-CyFKVtkk.js.map} +1 -1
  27. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
1
  import "reflect-metadata";
2
- import { A as s, a as n, b as r, c as o, d as i, C as c, e as l, f as A, E as p, g as S, F as g, h as C, G as d, I as E, i as h, j as u, L as R, M as I, k as T, R as P, l as v, S as L, m as D, n as m, o as _, p as x, q as y, T as M, r as f, s as O, t as U, u as B, v as F, w as k, x as H, y as V, z as N } from "./serializer-DvR3nOcf.js";
2
+ import { A as s, a as n, b as r, c as o, d as i, C as c, e as l, f as A, E as p, g as S, F as g, h as d, G as C, I as E, i as h, j as u, L as T, M as R, k as I, R as P, l as v, S as L, m as D, n as m, o as _, p as y, q as x, T as M, r as O, s as f, t as U, u as B, v as F, w as k, x as H, y as V, z as N } from "./serializer-DvR3nOcf.js";
3
3
  import { C as G, C as w, D as W, a as z, i as K, b as J, c as X, d as Y } from "./detachedRunModel-X59Pb5V-.js";
4
4
  import { A as Z, a as q, M as Q, b as $ } from "./Memory-BUnmYGNv.js";
5
5
  import { C as ae, P as te } from "./Prompt-DZb7OaPp.js";
6
- import { A as ne, A as re, C as oe, D as ie, a as ce, E as le, H as Ae, I as pe, b as Se, L as ge, M as Ce, T as de, W as Ee, c as he, d as ue, r as Re, e as Ie, s as Te, t as Pe } from "./detachedRunActivity-RNg1JDDW.js";
6
+ import { A as ne, A as re, C as oe, D as ie, a as ce, E as le, H as Ae, I as pe, b as Se, L as ge, M as de, T as Ce, W as Ee, c as he, d as ue, r as Te, e as Re, s as Ie, t as Pe } from "./detachedRunActivity-jHa9SDv1.js";
7
7
  import { A as Le } from "./artifactHtmlHandler-CMQJf1cX.js";
8
- import { H as me, d as _e, r as xe } from "./httpSessionService-DLdoBZRW.js";
9
- import { AGENT_ROLES as Me, APPBAR_HEIGHT as fe, APPBAR_HEIGHT as Oe, ASK_USER_CANCELLED as Ue, ActivityLine as Be, AgentActivity as Fe, AgentActivity as ke, AgentRunLabel as He, AgentTyping as Ve, AiChat as Ne, AiChatDrawer as be, AiChatFloating as Ge, AiChatFloating as we, AiChatPane as We, AiChatProvider as ze, AiChatServiceContext as Ke, AiChatPane as Je, AppBar as Xe, AppBar as Ye, AppRail as je, AppRail as Ze, AppShell as qe, AppShell as Qe, ArtifactRender as $e, AskUserDialog as ea, AskUserSheet as aa, AttachmentPreviewModal as ta, AvatarStack as sa, BillingLimitBanner as na, BoxedPart as ra, BrainIcon as oa, CHAT_VERBOSITY_LEVELS as ia, ChartIcon as ca, ChatAgentHeader as la, ChatIcon as Aa, ChatPane as pa, ChatsHistory as Sa, ChatsHistory as ga, CheckIcon as Ca, ChevronIcon as da, ChevronRightIcon as Ea, CloseIcon as ha, CodeIcon as ua, ComposerIcon as Ra, CurrentMessage as Ia, DEFAULT_ACTIVITY_RENDERER as Ta, DEFAULT_INTERACTION_ORIGIN_LABELS as Pa, DEFAULT_PART_RENDERERS as va, DashboardIcon as La, DataExplorerIcon as Da, DelayTextComponent as ma, DetachedRunBox as _a, DetachedRunBox as xa, DetachedRunTaskBox as ya, DetachedRunTranscript as Ma, EnvironmentProvider as fa, FileIcon as Oa, FunctionPart as Ua, GlobeIcon as Ba, HandoffDivider as Fa, HistoryIcon as ka, InertEnvironmentProvider as Ha, InteractionOriginBadge as Va, JsxErrorBoundary as Na, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as ba, LastPrompts as Ga, LastPrompts as wa, LinearBackgroundProgress as Wa, LinearProgressBarWithMarkers as za, ListCheckIcon as Ka, LiveJsxBlock as Ja, LiveTsxConfigProvider as Xa, LlmResponseRender as Ya, LoadingDots as ja, LockClosedIcon as Za, LockOpenIcon as qa, MOBILE_NAV_DEFAULT as Qa, MarkdownExtended as $a, MentionPickerPanel as et, MenuIcon as at, Message as tt, MessageScopeProvider as st, MobileDrawer as nt, MobileDrawer as rt, PERSONAS as ot, PERSONA_BY_ID as it, PanelIcon as ct, PaperclipIcon as lt, PauseIcon as At, PenIcon as pt, PersonaAvatar as St, PersonaCard as gt, PinIcon as Ct, PlusIcon as dt, Prompt as Et, PromptDateMarkers as ht, PromptGhostHint as ut, Prompt as Rt, ROLE_COLOR as It, ROLE_DESC as Tt, ROLE_LABEL as Pt, ROLE_OF as vt, RotateIcon as Lt, RunProgressPanel as Dt, RunProgressPanel as mt, RunProgressStrip as _t, RunProgressStrip as xt, SearchIcon as yt, SendIcon as Mt, SessionStateManagerService as ft, SessionUsage as Ot, SessionUsage as Ut, SparkleIcon as Bt, Sparkline as Ft, StopIcon as kt, Stopwatch as Ht, SuspendedPart as Vt, TableIcon as Nt, TaskList as bt, TaskList as Gt, TerminalIcon as wt, TextPart as Wt, ThoughtPart as zt, ToolIcon as Kt, TrashIcon as Jt, TriggerDropdown as Xt, TurnAwareButton as Yt, UiToolDispatcher as jt, UndoIcon as Zt, UsersIcon as qt, V2_CHART_PALETTE as Qt, VOICE_RULES as $t, WaitingPart as es, ZoomInIcon as as, ZoomOutIcon as ts, activitySteps as ss, agentFromKey as ns, article as rs, articleFor as os, autonomousAgent as is, avatarAlt as cs, bareToolName as ls, canStreamDetachedRun as As, classifyPart as ps, configureFriendlyMapping as Ss, createAiChatEngine as gs, createAiChatSessionStore as Cs, createAiChatSessionStore as ds, createDetachedRunTranscriptEngine as Es, createUiToolRegistry as hs, detachedRunHeadline as us, disposeSharedAiChatEngine as Rs, engineKeyFor as Is, extendDefaultScope as Ts, extendModuleRegistry as Ps, getDefaultJsxScope as vs, getFriendlyLabel as Ls, getSharedAiChatEngine as Ds, greeting as ms, handoffAt as _s, isAgentRole as xs, openDetachedRunTranscript as ys, parseClientOutput as Ms, parseContentBlocks as fs, parseDetachedRunConclusion as Os, parseUiArgs as Us, personaGreeting as Bs, personaTail as Fs, previousAgentKey as ks, registerContentTools as Hs, resolveChatAgent as Vs, slotEnterSx as Ns, useAgentEngine as bs, useAiChatServices as Gs, useAiChatSessionStore as ws, useCoarsePointer as Ws, useDetachedRunLiveActivity as zs, useDetachedRunResumeKey as Ks, useDetachedRunTranscript as Js, useEnvironment as Xs, useEnvironmentOptional as Ys, useLiveTsxMaxCharsForFull as js, useMessageScope as Zs, useParkedAskUser as qs, useResponsiveLayout as Qs, useTurnOpen as $s, useVisualViewport as en, v2Card as an, v2Chip as tn, v2IconBtn as sn, v2MonoMeta as nn, v2SectionLabel as rn, v2Theme as on } from "./components.js";
10
- import { s as ln, u as An, a as pn, b as Sn, c as gn } from "./useContainerWidth-C7u70yDY.js";
11
- import { A as dn, D as En, g as hn, b as un, c as Rn, d as In, e as Tn, f as Pn, i as vn, r as Ln } from "./environmentUtils-VZNTCzEE.js";
12
- import { ALLOWED_DOMAINS as mn, ALLOWED_EMAILS as _n, AUTH_CONFIG as xn, GOOGLE_CLIENT_ID as yn, getAgentBaseUrl as Mn, getArtifactsBaseUrl as fn, getDotNetBaseUrl as On, getIconByName as Un, iconCategories as Bn, materialIcons as Fn, searchIcons as kn, setEbiContextData as Hn, setEbiContextSessionId as Vn } from "./utils.js";
13
- import { P as bn, S as Gn, c as wn, a as Wn, e as zn, b as Kn, f as Jn, i as Xn, d as Yn, p as jn, s as Zn, h as qn, j as Qn, t as $n, k as er } from "./predictionRows-Damfwthh.js";
14
- import { a as tr, b as sr, c as nr, d as rr, f as or, p as ir } from "./promptTriggers-xwMJ5gRj.js";
15
- import { u as lr } from "./useChatSessions-DwqgYo79.js";
16
- import { Score as pr } from "./interfaces.js";
8
+ import { H as me, d as _e, r as ye } from "./httpSessionService-BIkDesYB.js";
9
+ import { AGENT_ROLES as Me, APPBAR_HEIGHT as Oe, APPBAR_HEIGHT as fe, ASK_USER_CANCELLED as Ue, ActivityLine as Be, AgentActivity as Fe, AgentActivity as ke, AgentRunLabel as He, AgentTyping as Ve, AiChat as Ne, AiChatDrawer as be, AiChatFloating as Ge, AiChatFloating as we, AiChatPane as We, AiChatProvider as ze, AiChatServiceContext as Ke, AiChatPane as Je, AppBar as Xe, AppBar as Ye, AppRail as je, AppRail as Ze, AppShell as qe, AppShell as Qe, ArtifactRender as $e, AskUserDialog as ea, AskUserSheet as aa, AttachmentPreviewModal as ta, AvatarStack as sa, BillingLimitBanner as na, BoxedPart as ra, BrainIcon as oa, CHAT_VERBOSITY_LEVELS as ia, ChartIcon as ca, ChatAgentHeader as la, ChatIcon as Aa, ChatPane as pa, ChatsHistory as Sa, ChatsHistory as ga, CheckIcon as da, ChevronIcon as Ca, ChevronRightIcon as Ea, CloseIcon as ha, CodeIcon as ua, ComposerIcon as Ta, CurrentMessage as Ra, DEFAULT_ACTIVITY_RENDERER as Ia, DEFAULT_INTERACTION_ORIGIN_LABELS as Pa, DEFAULT_PART_RENDERERS as va, DashboardIcon as La, DataExplorerIcon as Da, DelayTextComponent as ma, DetachedRunBox as _a, DetachedRunBox as ya, DetachedRunTaskBox as xa, DetachedRunTranscript as Ma, EnvironmentProvider as Oa, FileIcon as fa, FunctionPart as Ua, GlobeIcon as Ba, HandoffDivider as Fa, HistoryIcon as ka, InertEnvironmentProvider as Ha, InteractionOriginBadge as Va, JsxErrorBoundary as Na, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as ba, LastPrompts as Ga, LastPrompts as wa, LinearBackgroundProgress as Wa, LinearProgressBarWithMarkers as za, ListCheckIcon as Ka, LiveJsxBlock as Ja, LiveTsxConfigProvider as Xa, LlmResponseRender as Ya, LoadingDots as ja, LockClosedIcon as Za, LockOpenIcon as qa, MOBILE_NAV_DEFAULT as Qa, MarkdownExtended as $a, MentionPickerPanel as et, MenuIcon as at, Message as tt, MessageScopeProvider as st, MobileDrawer as nt, MobileDrawer as rt, PERSONAS as ot, PERSONA_BY_ID as it, PanelIcon as ct, PaperclipIcon as lt, PauseIcon as At, PenIcon as pt, PersonaAvatar as St, PersonaCard as gt, PinIcon as dt, PlusIcon as Ct, Prompt as Et, PromptDateMarkers as ht, PromptGhostHint as ut, Prompt as Tt, ROLE_COLOR as Rt, ROLE_DESC as It, ROLE_LABEL as Pt, ROLE_OF as vt, RotateIcon as Lt, RunProgressPanel as Dt, RunProgressPanel as mt, RunProgressStrip as _t, RunProgressStrip as yt, SearchIcon as xt, SendIcon as Mt, SessionStateManagerService as Ot, SessionUsage as ft, SessionUsage as Ut, SharedSessionTranscript as Bt, SparkleIcon as Ft, Sparkline as kt, StopIcon as Ht, Stopwatch as Vt, SuspendedPart as Nt, TableIcon as bt, TaskList as Gt, TaskList as wt, TerminalIcon as Wt, TextPart as zt, ThoughtPart as Kt, ToolIcon as Jt, TrashIcon as Xt, TriggerDropdown as Yt, TurnAwareButton as jt, UiToolDispatcher as Zt, UndoIcon as qt, UsersIcon as Qt, V2_CHART_PALETTE as $t, VOICE_RULES as es, WaitingPart as as, ZoomInIcon as ts, ZoomOutIcon as ss, activitySteps as ns, agentFromKey as rs, article as os, articleFor as is, autonomousAgent as cs, avatarAlt as ls, bareToolName as As, canStreamDetachedRun as ps, classifyPart as Ss, configureFriendlyMapping as gs, createAiChatEngine as ds, createAiChatSessionStore as Cs, createAiChatSessionStore as Es, createDetachedRunTranscriptEngine as hs, createSharedSessionTranscriptEngine as us, createUiToolRegistry as Ts, detachedRunHeadline as Rs, disposeSharedAiChatEngine as Is, engineKeyFor as Ps, extendDefaultScope as vs, extendModuleRegistry as Ls, getDefaultJsxScope as Ds, getFriendlyLabel as ms, getSharedAiChatEngine as _s, greeting as ys, handoffAt as xs, isAgentRole as Ms, openDetachedRunTranscript as Os, openSharedSessionTranscript as fs, parseClientOutput as Us, parseContentBlocks as Bs, parseDetachedRunConclusion as Fs, parseUiArgs as ks, personaGreeting as Hs, personaTail as Vs, previousAgentKey as Ns, registerContentTools as bs, resolveChatAgent as Gs, slotEnterSx as ws, useAgentEngine as Ws, useAiChatServices as zs, useAiChatSessionStore as Ks, useChatReadOnly as Js, useCoarsePointer as Xs, useDetachedRunLiveActivity as Ys, useDetachedRunResumeKey as js, useDetachedRunTranscript as Zs, useEnvironment as qs, useEnvironmentOptional as Qs, useLiveTsxMaxCharsForFull as $s, useMessageScope as en, useParkedAskUser as an, useResponsiveLayout as tn, useSharedSessionTranscript as sn, useTurnOpen as nn, useVisualViewport as rn, v2Card as on, v2Chip as cn, v2IconBtn as ln, v2MonoMeta as An, v2SectionLabel as pn, v2Theme as Sn } from "./components.js";
10
+ import { s as dn, u as Cn, a as En, b as hn, c as un } from "./useContainerWidth-C7u70yDY.js";
11
+ import { A as Rn, D as In, g as Pn, b as vn, c as Ln, d as Dn, e as mn, f as _n, i as yn, r as xn } from "./environmentUtils-VZNTCzEE.js";
12
+ import { ALLOWED_DOMAINS as On, ALLOWED_EMAILS as fn, AUTH_CONFIG as Un, GOOGLE_CLIENT_ID as Bn, getAgentBaseUrl as Fn, getArtifactsBaseUrl as kn, getDotNetBaseUrl as Hn, getIconByName as Vn, iconCategories as Nn, materialIcons as bn, searchIcons as Gn, setEbiContextData as wn, setEbiContextSessionId as Wn } from "./utils.js";
13
+ import { P as Kn, S as Jn, c as Xn, a as Yn, e as jn, b as Zn, f as qn, i as Qn, d as $n, p as er, s as ar, h as tr, j as sr, t as nr, k as rr } from "./predictionRows-Damfwthh.js";
14
+ import { a as ir, b as cr, c as lr, d as Ar, f as pr, p as Sr } from "./promptTriggers-xwMJ5gRj.js";
15
+ import { u as dr } from "./useChatSessions-CyFKVtkk.js";
16
+ import { Score as Er } from "./interfaces.js";
17
17
  export {
18
18
  Me as AGENT_ROLES,
19
- mn as ALLOWED_DOMAINS,
20
- _n as ALLOWED_EMAILS,
21
- dn as ANALYTICS_AGENT_NAME,
22
- fe as APPBAR_HEIGHT,
23
- Oe as APPBAR_V2_HEIGHT,
19
+ On as ALLOWED_DOMAINS,
20
+ fn as ALLOWED_EMAILS,
21
+ Rn as ANALYTICS_AGENT_NAME,
22
+ Oe as APPBAR_HEIGHT,
23
+ fe as APPBAR_V2_HEIGHT,
24
24
  Ue as ASK_USER_CANCELLED,
25
- xn as AUTH_CONFIG,
25
+ Un as AUTH_CONFIG,
26
26
  Z as Account,
27
27
  Be as ActivityLine,
28
28
  Fe as AgentActivity,
@@ -70,42 +70,42 @@ export {
70
70
  pa as ChatPane,
71
71
  Sa as ChatsHistory,
72
72
  ga as ChatsHistoryV2,
73
- Ca as CheckIcon,
74
- da as ChevronIcon,
73
+ da as CheckIcon,
74
+ Ca as ChevronIcon,
75
75
  Ea as ChevronRightIcon,
76
76
  G as ClientMessage,
77
77
  w as ClientMessageClass,
78
78
  ha as CloseIcon,
79
79
  ua as CodeIcon,
80
- Ra as ComposerIcon,
80
+ Ta as ComposerIcon,
81
81
  ae as ConnectionState,
82
82
  oe as ConnectionSupervisor,
83
- Ia as CurrentMessage,
84
- Ta as DEFAULT_ACTIVITY_RENDERER,
83
+ Ra as CurrentMessage,
84
+ Ia as DEFAULT_ACTIVITY_RENDERER,
85
85
  Pa as DEFAULT_INTERACTION_ORIGIN_LABELS,
86
86
  va as DEFAULT_PART_RENDERERS,
87
87
  W as DETACHED_RUN_SETTLED_STATUSES,
88
88
  z as DETACHED_RUN_TERMINAL_STATUSES,
89
- En as DEV_SERVER_CONFIG,
89
+ In as DEV_SERVER_CONFIG,
90
90
  La as DashboardIcon,
91
91
  Da as DataExplorerIcon,
92
92
  ma as DelayTextComponent,
93
93
  _a as DetachedRunBox,
94
- xa as DetachedRunBoxV2,
94
+ ya as DetachedRunBoxV2,
95
95
  ie as DetachedRunFramesHttpError,
96
96
  ce as DetachedRunFramesTransport,
97
- ya as DetachedRunTaskBox,
97
+ xa as DetachedRunTaskBox,
98
98
  Ma as DetachedRunTranscript,
99
- fa as EnvironmentProvider,
99
+ Oa as EnvironmentProvider,
100
100
  le as EventBusService,
101
101
  p as EventType,
102
102
  S as EventTypeDescriptions,
103
- Oa as FileIcon,
103
+ fa as FileIcon,
104
104
  g as FunctionCallContent,
105
105
  Ua as FunctionPart,
106
- C as FunctionResultContent,
107
- yn as GOOGLE_CLIENT_ID,
108
- d as GetEventTypeFromDotNetName,
106
+ d as FunctionResultContent,
107
+ Bn as GOOGLE_CLIENT_ID,
108
+ C as GetEventTypeFromDotNetName,
109
109
  Ba as GlobeIcon,
110
110
  Fa as HandoffDivider,
111
111
  ka as HistoryIcon,
@@ -127,13 +127,13 @@ export {
127
127
  Ka as ListCheckIcon,
128
128
  Ja as LiveJsxBlock,
129
129
  Xa as LiveTsxConfigProvider,
130
- R as LlmEvent,
130
+ T as LlmEvent,
131
131
  Ya as LlmResponseRender,
132
132
  ja as LoadingDots,
133
133
  ge as LocalStorageService,
134
134
  Za as LockClosedIcon,
135
135
  qa as LockOpenIcon,
136
- Ce as MAX_CHAR_PER_TEXT_PART,
136
+ de as MAX_CHAR_PER_TEXT_PART,
137
137
  Qa as MOBILE_NAV_DEFAULT,
138
138
  $a as MarkdownExtended,
139
139
  Q as MemoryContextLabels,
@@ -144,26 +144,26 @@ export {
144
144
  st as MessageScopeProvider,
145
145
  nt as MobileDrawer,
146
146
  rt as MobileDrawerV2,
147
- I as ModelConfig,
148
- T as ModelType,
147
+ R as ModelConfig,
148
+ I as ModelType,
149
149
  ot as PERSONAS,
150
150
  it as PERSONA_BY_ID,
151
- bn as PERSON_OR_PLACE_LEAD_ROWS,
151
+ Kn as PERSON_OR_PLACE_LEAD_ROWS,
152
152
  ct as PanelIcon,
153
153
  lt as PaperclipIcon,
154
154
  At as PauseIcon,
155
155
  pt as PenIcon,
156
156
  St as PersonaAvatar,
157
157
  gt as PersonaCard,
158
- Ct as PinIcon,
159
- dt as PlusIcon,
158
+ dt as PinIcon,
159
+ Ct as PlusIcon,
160
160
  Et as Prompt,
161
161
  ht as PromptDateMarkers,
162
162
  ut as PromptGhostHint,
163
163
  te as PromptUtils,
164
- Rt as PromptV2,
165
- It as ROLE_COLOR,
166
- Tt as ROLE_DESC,
164
+ Tt as PromptV2,
165
+ Rt as ROLE_COLOR,
166
+ It as ROLE_DESC,
167
167
  Pt as ROLE_LABEL,
168
168
  vt as ROLE_OF,
169
169
  P as ResponseType,
@@ -172,166 +172,171 @@ export {
172
172
  Dt as RunProgressPanel,
173
173
  mt as RunProgressPanelV2,
174
174
  _t as RunProgressStrip,
175
- xt as RunProgressStripV2,
176
- pr as Score,
177
- yt as SearchIcon,
175
+ yt as RunProgressStripV2,
176
+ Er as Score,
177
+ xt as SearchIcon,
178
178
  Mt as SendIcon,
179
179
  L as ServerEvent,
180
- ft as SessionStateManagerService,
181
- Ot as SessionUsage,
180
+ Ot as SessionStateManagerService,
181
+ ft as SessionUsage,
182
182
  Ut as SessionUsagePanel,
183
+ Bt as SharedSessionTranscript,
183
184
  D as SkillLevel,
184
- Gn as SortableTable,
185
- Bt as SparkleIcon,
186
- Ft as Sparkline,
187
- kt as StopIcon,
188
- Ht as Stopwatch,
185
+ Jn as SortableTable,
186
+ Ft as SparkleIcon,
187
+ kt as Sparkline,
188
+ Ht as StopIcon,
189
+ Vt as Stopwatch,
189
190
  m as StreamingFunctionCallUpdateContent,
190
191
  _ as StreamingReasoningContent,
191
- x as StreamingResponse,
192
- y as StreamingTextContent,
193
- Vt as SuspendedPart,
194
- de as TODO_LIST_UPDATED_EVENT,
195
- Nt as TableIcon,
196
- bt as TaskList,
197
- Gt as TaskListV2,
198
- wt as TerminalIcon,
192
+ y as StreamingResponse,
193
+ x as StreamingTextContent,
194
+ Nt as SuspendedPart,
195
+ Ce as TODO_LIST_UPDATED_EVENT,
196
+ bt as TableIcon,
197
+ Gt as TaskList,
198
+ wt as TaskListV2,
199
+ Wt as TerminalIcon,
199
200
  M as TextContent,
200
- Wt as TextPart,
201
- zt as ThoughtPart,
202
- Kt as ToolIcon,
203
- Jt as TrashIcon,
204
- Xt as TriggerDropdown,
205
- Yt as TurnAwareButton,
206
- jt as UiToolDispatcher,
207
- Zt as UndoIcon,
208
- qt as UsersIcon,
209
- Qt as V2_CHART_PALETTE,
210
- $t as VOICE_RULES,
201
+ zt as TextPart,
202
+ Kt as ThoughtPart,
203
+ Jt as ToolIcon,
204
+ Xt as TrashIcon,
205
+ Yt as TriggerDropdown,
206
+ jt as TurnAwareButton,
207
+ Zt as UiToolDispatcher,
208
+ qt as UndoIcon,
209
+ Qt as UsersIcon,
210
+ $t as V2_CHART_PALETTE,
211
+ es as VOICE_RULES,
211
212
  Ee as WARNING_THRESHOLD,
212
- es as WaitingPart,
213
+ as as WaitingPart,
213
214
  he as WebSocketConnecionV2,
214
- as as ZoomInIcon,
215
- ts as ZoomOutIcon,
216
- tr as activatePlaceholder,
217
- ss as activitySteps,
218
- sr as advanceToPlaceholder,
219
- ns as agentFromKey,
220
- nr as applyTriggerInsertion,
221
- rs as article,
222
- os as articleFor,
223
- is as autonomousAgent,
224
- cs as avatarAlt,
225
- ls as bareToolName,
226
- As as canStreamDetachedRun,
227
- wn as chipLocations,
228
- Wn as chunkArray,
229
- ps as classifyPart,
230
- Ss as configureFriendlyMapping,
231
- gs as createAiChatEngine,
215
+ ts as ZoomInIcon,
216
+ ss as ZoomOutIcon,
217
+ ir as activatePlaceholder,
218
+ ns as activitySteps,
219
+ cr as advanceToPlaceholder,
220
+ rs as agentFromKey,
221
+ lr as applyTriggerInsertion,
222
+ os as article,
223
+ is as articleFor,
224
+ cs as autonomousAgent,
225
+ ls as avatarAlt,
226
+ As as bareToolName,
227
+ ps as canStreamDetachedRun,
228
+ Xn as chipLocations,
229
+ Yn as chunkArray,
230
+ Ss as classifyPart,
231
+ gs as configureFriendlyMapping,
232
+ ds as createAiChatEngine,
232
233
  Cs as createAiChatSessionStore,
233
- ds as createAiChatStore,
234
- Es as createDetachedRunTranscriptEngine,
235
- f as createEventSerializer,
234
+ Es as createAiChatStore,
235
+ hs as createDetachedRunTranscriptEngine,
236
+ O as createEventSerializer,
237
+ us as createSharedSessionTranscriptEngine,
236
238
  ue as createSseParser,
237
- O as createStreamingResponseSerializer,
238
- hs as createUiToolRegistry,
239
+ f as createStreamingResponseSerializer,
240
+ Ts as createUiToolRegistry,
239
241
  _e as decodeSessionEvents,
240
242
  U as deserializeEvent,
241
243
  B as deserializePayload,
242
- us as detachedRunHeadline,
243
- rr as detectTrigger,
244
- Rs as disposeSharedAiChatEngine,
245
- Is as engineKeyFor,
246
- Ts as extendDefaultScope,
247
- Ps as extendModuleRegistry,
248
- zn as extractInteractionId,
249
- Kn as extractLinkAction,
250
- Jn as fetchAtMentions,
251
- or as findPlaceholder,
252
- Mn as getAgentBaseUrl,
253
- hn as getAgentServerBaseUrl,
254
- fn as getArtifactsBaseUrl,
244
+ Rs as detachedRunHeadline,
245
+ Ar as detectTrigger,
246
+ Is as disposeSharedAiChatEngine,
247
+ Ps as engineKeyFor,
248
+ vs as extendDefaultScope,
249
+ Ls as extendModuleRegistry,
250
+ jn as extractInteractionId,
251
+ Zn as extractLinkAction,
252
+ qn as fetchAtMentions,
253
+ pr as findPlaceholder,
254
+ Fn as getAgentBaseUrl,
255
+ Pn as getAgentServerBaseUrl,
256
+ kn as getArtifactsBaseUrl,
255
257
  F as getConnectionStateColor,
256
- vs as getDefaultJsxScope,
257
- On as getDotNetBaseUrl,
258
- un as getEnvVar,
259
- Rn as getEnvironmentInfo,
260
- Ls as getFriendlyLabel,
261
- Un as getIconByName,
258
+ Ds as getDefaultJsxScope,
259
+ Hn as getDotNetBaseUrl,
260
+ vn as getEnvVar,
261
+ Ln as getEnvironmentInfo,
262
+ ms as getFriendlyLabel,
263
+ Vn as getIconByName,
262
264
  k as getModelVendor,
263
- In as getRandomUUID,
264
- Tn as getServerBaseUrl,
265
- Pn as getServerClientBaseUrl,
266
- Ds as getSharedAiChatEngine,
267
- ms as greeting,
268
- _s as handoffAt,
269
- Bn as iconCategories,
270
- xs as isAgentRole,
265
+ Dn as getRandomUUID,
266
+ mn as getServerBaseUrl,
267
+ _n as getServerClientBaseUrl,
268
+ _s as getSharedAiChatEngine,
269
+ ys as greeting,
270
+ xs as handoffAt,
271
+ Nn as iconCategories,
272
+ Ms as isAgentRole,
271
273
  K as isDetachedRunActiveStatus,
272
274
  J as isDetachedRunSettledStatus,
273
275
  X as isDetachedRunTerminalStatus,
274
276
  Y as isDetachedRunWaitingForInput,
275
- Xn as isSectionStart,
276
- vn as isServer,
277
- Yn as isValidInteractionId,
278
- Fn as materialIcons,
279
- ys as openDetachedRunTranscript,
280
- Ms as parseClientOutput,
281
- fs as parseContentBlocks,
282
- Os as parseDetachedRunConclusion,
283
- Us as parseUiArgs,
284
- Bs as personaGreeting,
285
- Fs as personaTail,
286
- jn as placeCaret,
287
- ir as placeholderAt,
288
- ks as previousAgentKey,
289
- Re as readDetachedRunActivity,
290
- Ie as reduceInteraction,
291
- Hs as registerContentTools,
292
- xe as resolveAccessToken,
293
- Ln as resolveApiUrl,
294
- Vs as resolveChatAgent,
277
+ Qn as isSectionStart,
278
+ yn as isServer,
279
+ $n as isValidInteractionId,
280
+ bn as materialIcons,
281
+ Os as openDetachedRunTranscript,
282
+ fs as openSharedSessionTranscript,
283
+ Us as parseClientOutput,
284
+ Bs as parseContentBlocks,
285
+ Fs as parseDetachedRunConclusion,
286
+ ks as parseUiArgs,
287
+ Hs as personaGreeting,
288
+ Vs as personaTail,
289
+ er as placeCaret,
290
+ Sr as placeholderAt,
291
+ Ns as previousAgentKey,
292
+ Te as readDetachedRunActivity,
293
+ Re as reduceInteraction,
294
+ bs as registerContentTools,
295
+ ye as resolveAccessToken,
296
+ xn as resolveApiUrl,
297
+ Gs as resolveChatAgent,
295
298
  H as sanitizeJsonString,
296
- kn as searchIcons,
299
+ Gn as searchIcons,
297
300
  V as serializeEvent,
298
- Hn as setEbiContextData,
299
- Vn as setEbiContextSessionId,
300
- ln as slotDatesFor,
301
- Ns as slotEnterSx,
302
- Zn as splitBigLinesWithSpaces,
303
- qn as startsWithInteractionId,
304
- Te as streamDetachedRunFrames,
305
- Qn as swallowNextClick,
301
+ wn as setEbiContextData,
302
+ Wn as setEbiContextSessionId,
303
+ dn as slotDatesFor,
304
+ ws as slotEnterSx,
305
+ ar as splitBigLinesWithSpaces,
306
+ tr as startsWithInteractionId,
307
+ Ie as streamDetachedRunFrames,
308
+ sr as swallowNextClick,
306
309
  Pe as toDetachedRunFollowError,
307
310
  N as toInteractionOrigin,
308
- $n as toPredictionRows,
309
- er as tokenizeForHighlight,
310
- bs as useAgentEngine,
311
- Gs as useAiChatServices,
312
- ws as useAiChatSessionStore,
313
- lr as useChatSessions,
314
- Ws as useCoarsePointer,
315
- An as useContainerRectangle,
316
- zs as useDetachedRunLiveActivity,
317
- Ks as useDetachedRunResumeKey,
318
- Js as useDetachedRunTranscript,
319
- Xs as useEnvironment,
320
- Ys as useEnvironmentOptional,
321
- pn as useInterval,
322
- js as useLiveTsxMaxCharsForFull,
323
- Zs as useMessageScope,
324
- qs as useParkedAskUser,
325
- Sn as usePromptAssist,
326
- Qs as useResponsiveLayout,
327
- gn as useStickyHighlight,
328
- $s as useTurnOpen,
329
- en as useVisualViewport,
330
- an as v2Card,
331
- tn as v2Chip,
332
- sn as v2IconBtn,
333
- nn as v2MonoMeta,
334
- rn as v2SectionLabel,
335
- on as v2Theme
311
+ nr as toPredictionRows,
312
+ rr as tokenizeForHighlight,
313
+ Ws as useAgentEngine,
314
+ zs as useAiChatServices,
315
+ Ks as useAiChatSessionStore,
316
+ Js as useChatReadOnly,
317
+ dr as useChatSessions,
318
+ Xs as useCoarsePointer,
319
+ Cn as useContainerRectangle,
320
+ Ys as useDetachedRunLiveActivity,
321
+ js as useDetachedRunResumeKey,
322
+ Zs as useDetachedRunTranscript,
323
+ qs as useEnvironment,
324
+ Qs as useEnvironmentOptional,
325
+ En as useInterval,
326
+ $s as useLiveTsxMaxCharsForFull,
327
+ en as useMessageScope,
328
+ an as useParkedAskUser,
329
+ hn as usePromptAssist,
330
+ tn as useResponsiveLayout,
331
+ sn as useSharedSessionTranscript,
332
+ un as useStickyHighlight,
333
+ nn as useTurnOpen,
334
+ rn as useVisualViewport,
335
+ on as v2Card,
336
+ cn as v2Chip,
337
+ ln as v2IconBtn,
338
+ An as v2MonoMeta,
339
+ pn as v2SectionLabel,
340
+ Sn as v2Theme
336
341
  };
337
342
  //# sourceMappingURL=index.js.map
package/dist/services.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as r, A as s, D as t, a as c, E as o, H as n, b as i, L as A, M as S, T as d, c as v, d as E, r as T, e as D, s as m, t as H } from "./detachedRunActivity-RNg1JDDW.js";
1
+ import { A as r, A as s, D as t, a as c, E as o, H as n, b as i, L as A, M as S, T as d, c as v, d as E, r as T, e as D, s as m, t as H } from "./detachedRunActivity-jHa9SDv1.js";
2
2
  import { A as p } from "./artifactHtmlHandler-CMQJf1cX.js";
3
- import { H as _, d as l, r as f } from "./httpSessionService-DLdoBZRW.js";
3
+ import { H as _, d as l, r as f } from "./httpSessionService-BIkDesYB.js";
4
4
  export {
5
5
  r as AgentGatewayService,
6
6
  s as AgentGatewayWSAsync,
@@ -33,6 +33,8 @@ export interface AiChatContextState {
33
33
  showSessionInfo: boolean;
34
34
  showConnectionState: boolean;
35
35
  hidePromptInput: boolean;
36
+ /** The chat sends nothing — see `AiChatBaseProps.readOnly`. */
37
+ readOnly?: boolean;
36
38
  /** DEVELOPMENT ONLY — a key that paints the phantom ghost at the caret (see PromptAssistOptions.debugGhostKey). */
37
39
  promptGhostDebugKey?: string;
38
40
  /**
@@ -116,4 +118,11 @@ export interface AiChatContextState {
116
118
  }
117
119
  export declare const AiChatServiceContext: import('react').Context<AiChatContextState | undefined>;
118
120
  export declare const useAiChatServices: () => AiChatContextState;
121
+ /**
122
+ * Whether the chat around this component is READ-ONLY (`<AiChat readOnly>`, AIA Issue 1587) — a transcript the
123
+ * signed-in person may watch but not act in. A UI tool component reads it to hide the buttons that would send (a
124
+ * flight's "selecionar", a seat map's "confirmar") while keeping what only browses (fares, photos, the map).
125
+ * False outside any chat.
126
+ */
127
+ export declare function useChatReadOnly(): boolean;
119
128
  export declare function useAiChatSessionStore<T>(selector: (state: AiChatState) => T): T;
@@ -182,6 +182,12 @@ export interface AiChatBaseProps extends AiChatStyleProps {
182
182
  * a pure transcript. Defaults to `false`.
183
183
  */
184
184
  hidePromptInput?: boolean;
185
+ /**
186
+ * A transcript someone else owns (a shared conversation, AIA Issue 1587): the chat sends NOTHING. UI tools get
187
+ * `ctx.readOnly` (and `useChatReadOnly()`) so they can hide their commit buttons, ask-user cards are drawn
188
+ * inert, and `sendMessage` / answers are refused. Defaults to `false`.
189
+ */
190
+ readOnly?: boolean;
185
191
  /**
186
192
  * DEVELOPMENT ONLY. A single character (the demo pages use `|`) that the composer swallows and answers with
187
193
  * the phantom "@ …" ghost at the caret — location on the first press, person on the next — so the ghost can
@@ -0,0 +1,33 @@
1
+ import { default as React } from 'react';
2
+ import { SxProps, Theme } from '@mui/material/styles';
3
+ import { Interaction } from '../../../models/Interaction';
4
+ export interface ChatTurnProps {
5
+ message: Interaction;
6
+ /** The turn is still streaming. Flipping this is a prop change on the SAME element — never a remount. */
7
+ live: boolean;
8
+ onLinkClicked?: (link: string, content: string | null) => void;
9
+ /** The box once the turn has settled. */
10
+ settledSx?: SxProps<Theme>;
11
+ /** A rule under a settled turn. */
12
+ divider?: boolean;
13
+ }
14
+ /**
15
+ * One turn of the conversation, live or settled, as ONE element (AIA Issue 1599).
16
+ *
17
+ * The live turn and the history used to be drawn by two different components — `CurrentMessage`
18
+ * after the list and `Message` inside it, the history additionally under an `InertEnvironmentProvider`.
19
+ * Committing a turn therefore unmounted the live element and mounted a new one for the same
20
+ * interaction, and every component inside remounted with it: a UI tool that fetches on mount (the
21
+ * attach_document card's preview) went back through its spinner as the turn ended — the "blink".
22
+ * UiPartStage keeps a tool's identity WITHIN a MessageAgent; this keeps the MessageAgent itself.
23
+ *
24
+ * So every wrapper here renders in both states and only its props change: the box's sx, the inert
25
+ * switch, the scope's `live`. Keep it that way — a wrapper that appears or disappears with `live`
26
+ * (or a different element type per state) brings the remount back. Callers must render the live turn
27
+ * in the SAME keyed array as the history, keyed by interactionId, or React will not match the two.
28
+ *
29
+ * Settled turns are inert: their live-TSX side-effect hooks (`useDashboardPad`, …) dead-end, so a
30
+ * session reload replays the history visually only. The live turn keeps the real environment.
31
+ */
32
+ export declare const ChatTurn: React.FC<ChatTurnProps>;
33
+ export default ChatTurn;
@@ -3,10 +3,12 @@ export interface CurrentMessageProps {
3
3
  onLinkClicked?: (link: string, content: string | null) => void;
4
4
  }
5
5
  /**
6
- * The turn being streamed. Everything else it needs — the message, whether the
7
- * turn is open, the host's friendly mode — it reads from the store and the
8
- * services context; the only input is where links go. (It used to take the
9
- * artifact service, the bus, a ref map and friendlyMode, and read none of them.)
6
+ * The turn being streamed, standalone — for a host that draws a live turn outside a ChatPane.
7
+ * Everything it needs — the message, whether the turn is open, the host's friendly mode — it reads
8
+ * from the store and the services context; the only input is where links go.
9
+ *
10
+ * ChatPane does NOT use this: it renders the live turn as a `ChatTurn` in the same keyed list as the
11
+ * history, so the turn keeps its components when it settles (AIA Issue 1599).
10
12
  */
11
13
  export declare const CurrentMessage: React.FC<CurrentMessageProps>;
12
14
  export default CurrentMessage;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ /**
3
+ * Draws its children non-interactive: `inert` (no click, no focus, no keyboard), dimmed a little so it reads as
4
+ * something to look at. For what a read-only chat (AIA Issue 1587) must show but never let anyone act on — a
5
+ * question the conversation's owner is being asked. Set through a ref: React 18 does not know the attribute.
6
+ */
7
+ export declare function ReadOnlyGuard({ children }: {
8
+ children: React.ReactNode;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { InteractionPart } from '../../../../models/InteractionPart';
3
3
  /**
4
- * Single-owner rendering for slot-placed UI tool parts (issue #325).
4
+ * Single-owner rendering for UI tool parts (issue #325; every finished UI part since AIA Issue 1599).
5
5
  *
6
6
  * A UI render tool's component used to render in TWO possible React subtrees: at its
7
7
  * stream position (MessageAgent's part list) the moment its result folded in, and later
@@ -31,10 +31,10 @@ export declare class UiPartStage {
31
31
  private claims;
32
32
  private seq;
33
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).
34
+ * Stage keys this stage's MessageAgent is rendering through a portal on the CURRENT
35
+ * render pass (see `stageKeyOf`). LlmResponseRender looks a slot id up here to decide
36
+ * between rendering an anchor (the part is staged — adopt its container) and the legacy
37
+ * direct render (the part was filtered out of the positional list, or there is no stage).
38
38
  */
39
39
  stagedKeys: ReadonlySet<string>;
40
40
  setStagedKeys(keys: Iterable<string>): void;
@@ -47,12 +47,17 @@ export declare class UiPartStage {
47
47
  }
48
48
  export declare const UiPartStageContext: React.Context<UiPartStage | null>;
49
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).
50
+ * The key a part is staged under, or undefined when the stage does not manage it: every
51
+ * UI-flagged function part (or ask-user part) whose RESULT has landed (status Done).
52
+ *
53
+ * A part with a SlotId is keyed by it, so a `{{Component:<slotId>}}` slot in the text can
54
+ * adopt it. A part WITHOUT one is staged too, under its call id (AIA Issue 1599): its
55
+ * positional spot sits inside the message's part groups, and the grouping changes shape
56
+ * when the turn closes (`groupParts(onGoing)`), which moved an unslotted tool into a new
57
+ * wrapper — a remount, and a refetch for a tool that loads on mount. Rendered through the
58
+ * stage, only its anchor moves. The `call:` prefix keeps the two key spaces apart.
54
59
  */
55
- export declare function stagedSlotIdOf(part: InteractionPart): string | undefined;
60
+ export declare function stageKeyOf(part: InteractionPart): string | undefined;
56
61
  /** Renders a staged part into its stable container. Call from the OWNING MessageAgent only. */
57
62
  export declare function renderStagedPart(stage: UiPartStage, key: string, child: React.ReactNode): React.ReactNode;
58
63
  /**