@aintela/chat 0.14.5 → 0.14.7
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 +1499 -1475
- package/dist/components.js.map +1 -1
- package/dist/{detachedRunActivity-Cf-RPK9j.js → detachedRunActivity-Dw1Far2p.js} +83 -54
- package/dist/detachedRunActivity-Dw1Far2p.js.map +1 -0
- package/dist/hooks.js +1 -1
- package/dist/{httpSessionService-B2wgAfly.js → httpSessionService-BCe4DpgA.js} +2 -2
- package/dist/{httpSessionService-B2wgAfly.js.map → httpSessionService-BCe4DpgA.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/models.js +1 -1
- package/dist/{serializer-CdIQS0hy.js → serializer-Dagz_6VT.js} +95 -94
- package/dist/serializer-Dagz_6VT.js.map +1 -0
- package/dist/services.js +2 -2
- package/dist/src/components/AiChat/ChatPane/askUserInlineOutage.test.d.ts +1 -0
- package/dist/src/components/AiChat/sessionStateManagerService.d.ts +8 -0
- package/dist/src/models/ServerEvent.d.ts +8 -1
- package/dist/src/services/eventBusService.d.ts +6 -0
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +14 -0
- package/dist/src/services/servers/gatewayRewindLost.test.d.ts +1 -0
- package/dist/tests/fakes/fakeWebSocket.d.ts +3 -1
- package/dist/{useChatSessions-BVpCsm8u.js → useChatSessions-BgfeYkcc.js} +2 -2
- package/dist/{useChatSessions-BVpCsm8u.js.map → useChatSessions-BgfeYkcc.js.map} +1 -1
- package/package.json +1 -1
- package/dist/detachedRunActivity-Cf-RPK9j.js.map +0 -1
- package/dist/serializer-CdIQS0hy.js.map +0 -1
package/dist/hooks.js
CHANGED
|
@@ -3,7 +3,7 @@ var Q = (t, e, n) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var f = (t, e) => P(t, "name", { value: e, configurable: !0 });
|
|
4
4
|
var _ = (t, e, n) => Q(t, typeof e != "symbol" ? e + "" : e, n);
|
|
5
5
|
import "reflect-metadata";
|
|
6
|
-
import { r as z, S as G, E as h, I as q, z as K, Q as Y } from "./serializer-
|
|
6
|
+
import { r as z, S as G, E as h, I as q, z as K, Q as Y } from "./serializer-Dagz_6VT.js";
|
|
7
7
|
function J(t) {
|
|
8
8
|
if (t === null || typeof t != "object") return t;
|
|
9
9
|
const e = t;
|
|
@@ -330,4 +330,4 @@ export {
|
|
|
330
330
|
te as d,
|
|
331
331
|
ne as r
|
|
332
332
|
};
|
|
333
|
-
//# sourceMappingURL=httpSessionService-
|
|
333
|
+
//# sourceMappingURL=httpSessionService-BCe4DpgA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpSessionService-B2wgAfly.js","sources":["../src/services/sessionEventDecoder.ts","../src/services/accessTokenProvider.ts","../src/services/httpSessionService.ts"],"sourcesContent":["import { ServerEvent } from '../models/ServerEvent';\nimport { InteractionOriginContent, LlmEvent, QueuedMessageContent } from '../models/semanticKernelModel/models';\nimport { createEventSerializer } from '../models/semanticKernelModel/serializer';\nimport { EventType } from '../models/enums';\nimport { toInteractionOrigin, type Interaction, type InteractionOrigin } from '../models/Interaction';\nimport type { InteractionPart } from '../models/InteractionPart';\nimport type { Artifact } from '../models/Artifact';\n\n/**\n * Strip the persistence-only `$type: \"MongoDbEvent\"` marker from the wire\n * object before handing it to typedjson. The server's session-detail endpoint\n * returns base-class `Event` instances (not `MongoDbEvent`), but downstream\n * resources that come through other code paths sometimes carry that marker;\n * leaving it in confuses typedjson because it isn't registered in\n * `KNOWN_CONTENT_TYPES`.\n */\nfunction stripMongoDbDiscriminator(raw: unknown): unknown {\n if (raw === null || typeof raw !== 'object') return raw;\n const obj = raw as Record<string, unknown>;\n if (obj['$type'] === 'MongoDbEvent') {\n const { ['$type']: _drop, ...rest } = obj;\n return rest;\n }\n return obj;\n}\n\nfunction firstUserText(events: LlmEvent[]): string | undefined {\n for (const e of events) {\n if (e.role?.label?.toLowerCase() !== 'user') continue;\n const item = e.content?.items?.find(p => 'text' in p && typeof (p as Record<string, unknown>).text === 'string');\n if (item) return (item as { text?: string }).text;\n }\n return undefined;\n}\n\n/**\n * Where the turn came from (AIA Issue 1548): the `InteractionOriginContent` item the server keeps beside a user\n * message whose origin is not `user`. Resolved by typedjson through the same `$type` discriminator as\n * `UserUiContent`, so it arrives as its own class.\n */\nfunction userTurnOrigin(events: LlmEvent[]): InteractionOrigin | undefined {\n for (const e of events) {\n if (e.role?.label?.toLowerCase() !== 'user') continue;\n const item = e.content?.items?.find((p): p is InteractionOriginContent => p instanceof InteractionOriginContent);\n if (item) return toInteractionOrigin(item.origin);\n }\n return undefined;\n}\n\n/**\n * The reply this turn's question continues (AIA Issue 1651): the `QueuedMessageContent` item the server keeps beside a\n * user message the user queued while that reply was being given.\n */\nfunction continuedInteractionId(events: LlmEvent[]): string | undefined {\n for (const e of events) {\n if (e.role?.label?.toLowerCase() !== 'user') continue;\n const item = e.content?.items?.find((p): p is QueuedMessageContent => p instanceof QueuedMessageContent);\n if (item?.continuesInteractionId) return item.continuesInteractionId;\n }\n return undefined;\n}\n\n// The .NET semantic-kernel metadata key that carries the model's reasoning\n// trace on persisted (consolidated) events. typedjson drops `metadata` on\n// KernelContent-derived items (it's undecorated), so the reasoning only\n// survives on the RAW wire object — we read it from there.\nconst REASONING_METADATA_KEY = 'ChatResponseMessage.ReasoningContent';\n// Its companion: the headlines the server derived from that reasoning, a JSON array of strings (reasoning-trace\n// localization). Stamped by the agents server's HeadliningChatCompletionService on the same message.\nconst HEADLINES_METADATA_KEY = 'ChatResponseMessage.ReasoningHeadlines';\n\nfunction extractHeadlines(rawEvent: unknown): string[] | undefined {\n const content = (rawEvent as { content?: Record<string, any> })?.content;\n if (!content) return undefined;\n const raw = content.metadata?.[HEADLINES_METADATA_KEY]\n ?? (content.items ?? []).map((i: any) => i?.metadata?.[HEADLINES_METADATA_KEY]).find((v: unknown) => typeof v === 'string');\n if (typeof raw !== 'string' || !raw.trim()) return undefined;\n try {\n const parsed = JSON.parse(raw);\n return Array.isArray(parsed) ? parsed.filter((h): h is string => typeof h === 'string' && h.length > 0) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Pull the reasoning trace out of a raw wire event. The server duplicates it\n * onto the message `content.metadata` and onto each text item's `metadata`;\n * prefer the event-level copy, fall back to the first item that carries one.\n */\nfunction extractReasoning(rawEvent: unknown): string | undefined {\n const content = (rawEvent as { content?: Record<string, any> })?.content;\n if (!content) return undefined;\n const fromContent = content.metadata?.[REASONING_METADATA_KEY];\n if (typeof fromContent === 'string' && fromContent.trim()) return fromContent.trim();\n for (const item of content.items ?? []) {\n const r = item?.metadata?.[REASONING_METADATA_KEY];\n if (typeof r === 'string' && r.trim()) return r.trim();\n }\n return undefined;\n}\n\nfunction isFunctionCallType(t: EventType): boolean {\n return t === EventType.FunctionCall || t === EventType.PartialFunctionCall;\n}\n\n/**\n * Fold a FunctionResponse part onto the call part it answers, mirroring the\n * final state a live `merge` would have reached for that call: the call's\n * parsed `args`/`name`/`start` are preserved and the response's\n * `response`/`status`/`end` are layered on. eventType flips to\n * FunctionResponse, which is the completed-call shape the UI renders.\n */\nfunction foldResponseIntoCall(call: InteractionPart, response: InteractionPart): InteractionPart {\n return {\n ...call,\n eventType: EventType.FunctionResponse,\n functionDetails: {\n id: call.functionDetails!.id,\n name: response.functionDetails?.name ?? call.functionDetails!.name,\n args: call.functionDetails!.args ?? response.functionDetails?.args,\n text: call.functionDetails!.text,\n response: response.functionDetails?.response,\n status: response.functionDetails?.status ?? 'Done',\n start: call.functionDetails!.start,\n end: response.functionDetails?.end ?? call.functionDetails!.end,\n silent: call.functionDetails!.silent,\n },\n };\n}\n\n/**\n * Rebuilds the `Interaction[]` the chat UI renders from the historical event\n * log returned by <c>GET /sessions/{id}</c>.\n *\n * Unlike the live turn loop, this does NOT route events through\n * `InteractionService.merge`. The merge pipeline (and its `FlatParts` step) is\n * built for the *live* stream, where each event carries a single content item\n * arriving incrementally; it flattens every event down to one part. The\n * *persisted* log is different: the server stores consolidated blocks where a\n * single event's `content.items` holds many parts at once — e.g. a text\n * preamble plus several FunctionCalls. Running those through `merge` collapsed\n * each event to one part and silently dropped the rest (every function call in\n * a multi-item event disappeared on replay).\n *\n * This restore path instead reads *every* item as its own `InteractionPart`\n * (via `ServerEvent.parseFromTypedEvent`, which already maps one part per\n * item) and only applies the one piece of merge logic replay genuinely needs:\n * folding each FunctionResponse onto the call it answers, keyed by `callId`.\n * No copy-on-write cloning, no event-bus side effects, no streaming-append.\n */\nexport function decodeSessionEvents(rawEvents: unknown[]): Interaction[] {\n const serializer = createEventSerializer();\n\n // Parse + group by interactionId, preserving first-seen order so the\n // rendered timeline mirrors the wire-log order. Keep the typed LlmEvent\n // alongside the mapped ServerEvent — the former carries the role label\n // used to derive the interaction's question.\n const order: string[] = [];\n const grouped = new Map<string, { llm: LlmEvent[]; server: ServerEvent[]; raw: unknown[] }>();\n for (const raw of rawEvents) {\n const stripped = stripMongoDbDiscriminator(raw);\n const llmEvent = serializer.parse(stripped as Record<string, unknown>);\n if (!llmEvent) continue;\n const serverEvent = ServerEvent.parseFromTypedEvent(llmEvent);\n if (!serverEvent) continue;\n\n const key = serverEvent.interactionId ?? '__root__';\n let bucket = grouped.get(key);\n if (!bucket) {\n bucket = { llm: [], server: [], raw: [] };\n grouped.set(key, bucket);\n order.push(key);\n }\n bucket.llm.push(llmEvent);\n bucket.server.push(serverEvent);\n // Keep the stripped raw object — typedjson drops the item `metadata`\n // that holds the reasoning trace, so we recover it from here.\n bucket.raw.push(stripped);\n }\n\n const interactions: Interaction[] = [];\n // Replies the agent went on giving under a queued message — drawn with a note when nothing of them shows.\n const continuedBelow = new Set<string>();\n for (const interactionId of order) {\n const { llm, server, raw } = grouped.get(interactionId)!;\n\n const parts: InteractionPart[] = [];\n const artifactData: Artifact[] = [];\n // callId → index in `parts` of the (possibly already folded) call part.\n const callIndex = new Map<string, number>();\n\n const pushPart = (part: InteractionPart) => {\n const stamped: InteractionPart = {\n ...part,\n id: `${parts.length + 1}-${interactionId}`,\n partial: false,\n };\n parts.push(stamped);\n return parts.length - 1;\n };\n\n for (let i = 0; i < server.length; i++) {\n const event = server[i];\n\n // `user` events are the question (captured below as\n // interactionQuestion), and `system` events are injected context\n // (schema, instructions) — neither renders as a chat part. The\n // live turn loop never feeds these through merge either; only the\n // persisted log co-locates them under the turn's interactionId.\n const role = llm[i].role?.label?.toLowerCase();\n if (role === 'user' || role === 'system') {\n // The user/system text isn't a chat part (the question is captured as\n // interactionQuestion via firstUserText). But a user turn may carry a client-only\n // UI representation — a UserUiContent that ServerEvent mapped to a UserAnswer part —\n // which must re-hydrate on reload. Push those; drop everything else on this event.\n if (role === 'user') {\n for (const part of event.parts) {\n if (part.eventType === EventType.UserAnswer) pushPart(part);\n }\n }\n continue;\n }\n\n // Artifacts: dedupe by id, last write wins (same as the live merge).\n if (event.llmArtifacts && event.llmArtifacts.length > 0) {\n for (const llmArtifact of event.llmArtifacts) {\n const artifact = llmArtifact.toArtifact();\n const i = artifactData.findIndex(a => a.id === artifact.id);\n if (i === -1) artifactData.push(artifact);\n else artifactData[i] = artifact;\n }\n }\n\n // The model's reasoning trace for this step lives in the event's\n // metadata (dropped by typedjson — read from raw). It rides the\n // event's text item, so attach it to the first text part: a\n // non-empty answer keeps its body and carries the trace in the\n // thinking strip; an empty \"thinking-only\" step becomes a Thought.\n const reasoning = extractReasoning(raw[i]);\n let reasoningUsed = false;\n\n for (const part of event.parts) {\n const callId = part.functionDetails?.id;\n\n // A response folds onto its matching call rather than becoming\n // a separate part.\n if (part.eventType === EventType.FunctionResponse && callId && callIndex.has(callId)) {\n const idx = callIndex.get(callId)!;\n parts[idx] = foldResponseIntoCall(parts[idx], part);\n continue;\n }\n\n // A client-only output sibling folds its payload onto the call it belongs to\n // (never a separate part). This is the persisted/replay counterpart of the live\n // StreamingFinalFunctionResultContent.clientOutput; a uiTool renderer reads it.\n if (part.eventType === EventType.FunctionClientOutput && callId) {\n if (callIndex.has(callId)) {\n const idx = callIndex.get(callId)!;\n const prev = parts[idx];\n parts[idx] = {\n ...prev,\n functionDetails: {\n ...prev.functionDetails!,\n clientOutput: part.functionDetails?.clientOutput,\n },\n };\n }\n // No matching call (shouldn't happen — the call precedes its Tool message):\n // drop it rather than render a standalone part.\n continue;\n }\n\n // A repeated full call for an id we've already seen (e.g. a\n // full FunctionCall following a PartialFunctionCall) updates the\n // existing part in place instead of duplicating it.\n if (isFunctionCallType(part.eventType) && callId && callIndex.has(callId)) {\n const idx = callIndex.get(callId)!;\n const prev = parts[idx];\n parts[idx] = {\n ...prev,\n eventType: part.eventType,\n functionDetails: { ...prev.functionDetails!, ...part.functionDetails! },\n };\n continue;\n }\n\n if (part.eventType === EventType.Text) {\n const hasText = !!part.text && part.text.length > 0;\n const attachReasoning = !!reasoning && !reasoningUsed;\n\n // Empty text with no reasoning to carry is a bare\n // placeholder — the consolidated log emits these alongside\n // function calls; dropping them keeps the timeline clean.\n if (!hasText && !attachReasoning && !part.thoughtDetails) {\n continue;\n }\n\n if (attachReasoning) {\n pushPart({\n ...part,\n eventType: hasText ? EventType.Text : EventType.Thought,\n thoughtDetails: { text: reasoning!, headlines: extractHeadlines(raw[i]) },\n // A step with no answer text BECOMES the thought, and\n // `ThoughtPart` renders `part.text` (via\n // getPartTextContent) — leaving it empty drew the\n // \"Pensou por 12s\" header over a blank window. The live\n // path already sets both (see `createFromThought`); this\n // is the same part rebuilt from Session.Events, so it has\n // to agree. When there IS answer text the part stays a\n // Text and keeps it — the reasoning rides the strip.\n text: hasText ? part.text : reasoning!,\n });\n reasoningUsed = true;\n continue;\n }\n\n pushPart(part);\n continue;\n }\n\n const idx = pushPart(part);\n if (isFunctionCallType(part.eventType) && callId) {\n callIndex.set(callId, idx);\n }\n }\n\n // Reasoning with no text item to ride on (rare) — surface it so\n // the trace isn't silently lost.\n if (reasoning && !reasoningUsed) {\n pushPart({\n id: '', author: event.author, eventType: EventType.Thought,\n created: event.created, partial: false,\n mustPush: false, textAppendable: false,\n thoughtDetails: { text: reasoning, headlines: extractHeadlines(raw[i]) },\n // Both, for the same reason as above: the renderer reads `text`.\n text: reasoning,\n });\n }\n }\n\n const functionMap = new Map<string, InteractionPart>();\n for (const [callId, idx] of callIndex) functionMap.set(callId, parts[idx]);\n const origin = userTurnOrigin(llm);\n const continues = continuedInteractionId(llm);\n if (continues) continuedBelow.add(continues);\n\n interactions.push({\n created: server[0]?.created ?? new Date(),\n interactionId,\n artifactData,\n partial: false,\n turn_complete: true,\n parts,\n version: server.length,\n functionMap,\n interactionQuestion: firstUserText(llm) ?? '',\n ...(origin && { origin }),\n });\n }\n\n for (const interaction of interactions)\n if (continuedBelow.has(interaction.interactionId)) interaction.continuedBelow = true;\n\n return interactions;\n}\n","/**\n * A bearer-token source for the library's HTTP clients: either a fixed token\n * string (legacy behavior) or a callback resolved on EVERY request, so a\n * long-lived service always sends the freshest JWT (sign-in, silent refresh,\n * guest→real promotion) instead of the one captured at construction.\n */\nexport type AccessTokenProvider = string | (() => string | undefined);\n\n/** The current token for `provider` (empty string when a callback yields none). */\nexport function resolveAccessToken(provider: AccessTokenProvider): string {\n return (typeof provider === 'function' ? provider() : provider) ?? '';\n}\n","import { ChatSession, Customer, decodeSessionEvents, Interaction, ISessionService } from \"..\";\nimport { resolveAccessToken, type AccessTokenProvider } from \"./accessTokenProvider\";\n\n/**\n * Wire shape returned by `GET /sessions` and the `.header` of `GET /sessions/{id}`.\n * Mirrors `Envision.SemanticKernel.Models.Session.SessionHeader` on the C#\n * side after the default camelCase rename ASP.NET Core applies on serialize.\n */\ninterface SessionHeaderWire {\n id: string;\n created?: string | null;\n updatedAt?: string | null;\n user?: ChatSession['user'];\n customer?: ChatSession['customer'];\n overview?: string | null;\n agentType?: ChatSession['agentType'];\n agentId?: string | null;\n userDescription?: string | null;\n lastQuestion?: string | null;\n activityCount?: number;\n lastGeneratedOverview?: string | null;\n artifacts?: string[];\n}\n\ninterface SessionDetailWire {\n header: SessionHeaderWire;\n events: unknown[];\n lastSequence?: number;\n}\n\nfunction headerToChatSession(h: SessionHeaderWire, interactions: Interaction[] = []): ChatSession {\n return {\n id: h.id,\n browserScopeId: h.id,\n fullyLoaded: interactions.length > 0,\n interactions,\n artifacts: h.artifacts ?? [],\n overview: h.overview ?? '',\n agentType: h.agentType as ChatSession['agentType'],\n agentId: h.agentId ?? undefined,\n userDescription: h.userDescription ?? undefined,\n lastQuestion: h.lastQuestion ?? undefined,\n customer: h.customer ?? null,\n activityCount: h.activityCount ?? 0,\n user: h.user as ChatSession['user'],\n lastGeneratedOverview: h.lastGeneratedOverview ? new Date(h.lastGeneratedOverview) : null,\n sessionRunMode: 'normal' as ChatSession['sessionRunMode'],\n created: h.created ? new Date(h.created) : undefined,\n updatedAt: h.updatedAt ? new Date(h.updatedAt) : undefined,\n } as ChatSession;\n}\n\n/**\n * Minimal ISessionService over the WSServer's REST `/sessions` endpoints.\n *\n * Reads from the unified `Sessions` collection. The list endpoint returns\n * header projections; the detail endpoint returns header + the raw\n * `LlmEvent[]` log which we replay through `decodeSessionEvents` to rebuild\n * the chat UI's `Interaction[]`. Mutation methods are no-ops — write paths\n * are exercised by the live agent turn loop and the WS connection, not by\n * REST calls from the picker.\n */\nexport class HttpSessionService implements ISessionService {\n private serverBaseUrl: string;\n private accessToken: AccessTokenProvider;\n\n constructor(serverBaseUrl: string, accessToken: AccessTokenProvider) {\n this.serverBaseUrl = serverBaseUrl.replace(/\\/$/, '');\n this.accessToken = accessToken;\n }\n\n private get headers(): HeadersInit {\n return {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${resolveAccessToken(this.accessToken)}`,\n };\n }\n\n async getAllSessions(): Promise<ChatSession[]> {\n const r = await fetch(`${this.serverBaseUrl}/sessions?top=50`, {\n headers: this.headers,\n });\n if (!r.ok) throw new Error(`getAllSessions HTTP ${r.status}`);\n const headers = (await r.json()) as SessionHeaderWire[];\n return headers.map(h => headerToChatSession(h));\n }\n\n async retrieveSession(sessionId: string): Promise<ChatSession | null> {\n const r = await fetch(`${this.serverBaseUrl}/sessions/${sessionId}`, {\n headers: this.headers,\n });\n if (r.status === 404) return null;\n if (!r.ok) throw new Error(`retrieveSession HTTP ${r.status}`);\n const detail = (await r.json()) as SessionDetailWire;\n const interactions = decodeSessionEvents(detail.events ?? []);\n // The decoder doesn't know the sessionId — stamp it now so downstream\n // consumers (artifact loaders, debugging surfaces) can correlate back.\n for (const it of interactions) it.sessionId = detail.header.id;\n const session = headerToChatSession(detail.header, interactions);\n if (typeof detail.lastSequence === 'number') session.lastSequence = detail.lastSequence;\n return session;\n }\n\n async getLastUsedSession(): Promise<ChatSession | null> {\n const all = await this.getAllSessions();\n return all[0] ?? null;\n }\n\n // — Most write paths are inert: after the dual-collection collapse the\n // server populates Session UI-header fields automatically during the turn.\n // The two exceptions are rename (`patchSession` → PATCH /Session/Overview)\n // and delete (`removeSession` → DELETE /Session/{id}), which are driven by\n // the picker UI and have no WS-side equivalent. —\n\n async removeSession(sessionId: string): Promise<void> {\n const r = await fetch(`${this.serverBaseUrl}/Session/${encodeURIComponent(sessionId)}`, {\n method: 'DELETE',\n headers: this.headers,\n });\n if (!r.ok) throw new Error(`removeSession HTTP ${r.status}`);\n }\n async createSession(_sessionId: string, _agentName: string, _customer?: Customer): Promise<ChatSession | null> { return null; }\n async createAgentSession(): Promise<any> { return { sessionId: null }; }\n async closeSession(_sessionId: string): Promise<void> { /* no-op */ }\n async generateOverviewForCurrentSession(_sys: string, _model: string): Promise<string | null> { return null; }\n async storeSession(session: ChatSession): Promise<any> { return { data: session }; }\n async patchSession(sessionId: string, partial: Partial<ChatSession>): Promise<void> {\n // SessionController.PatchOverview binds sessionId/overview from the\n // query string (no body, no route params). Anything else on `partial`\n // has no server-side endpoint yet — ignore it instead of guessing.\n if (partial.overview == null) return;\n const url =\n `${this.serverBaseUrl}/Session/Overview` +\n `?sessionId=${encodeURIComponent(sessionId)}` +\n `&overview=${encodeURIComponent(partial.overview)}`;\n const r = await fetch(url, { method: 'PATCH', headers: this.headers });\n if (!r.ok) throw new Error(`patchSession HTTP ${r.status}`);\n }\n delayedPatchActiveSession(_partial: Partial<ChatSession>): void { /* no-op */ }\n\n async patchActiveSession(_partial: Partial<ChatSession>): Promise<ChatSession | null> {\n return Promise.resolve(null);\n }\n async getLlmSessionInformation(): Promise<any> { return { id: null, instructionSummaries: [] }; }\n transformIntoInstances(session: ChatSession): ChatSession { return session; }\n}\n"],"names":["stripMongoDbDiscriminator","raw","obj","_drop","rest","__name","firstUserText","events","e","_b","_a","item","_d","_c","p","userTurnOrigin","InteractionOriginContent","toInteractionOrigin","continuedInteractionId","QueuedMessageContent","REASONING_METADATA_KEY","HEADLINES_METADATA_KEY","extractHeadlines","rawEvent","content","i","v","parsed","h","extractReasoning","fromContent","isFunctionCallType","EventType","foldResponseIntoCall","call","response","_e","decodeSessionEvents","rawEvents","serializer","createEventSerializer","order","grouped","stripped","llmEvent","serverEvent","ServerEvent","key","bucket","interactions","continuedBelow","interactionId","llm","server","parts","artifactData","callIndex","pushPart","part","stamped","event","role","llmArtifact","artifact","a","reasoning","reasoningUsed","callId","idx","prev","hasText","attachReasoning","functionMap","origin","continues","interaction","resolveAccessToken","provider","headerToChatSession","_HttpSessionService","serverBaseUrl","accessToken","__publicField","r","sessionId","detail","it","session","_sessionId","_agentName","_customer","_sys","_model","partial","url","_partial","HttpSessionService"],"mappings":";;;;;;AAgBA,SAASA,EAA0BC,GAAuB;AACtD,MAAIA,MAAQ,QAAQ,OAAOA,KAAQ,SAAU,QAAOA;AACpD,QAAMC,IAAMD;AACZ,MAAIC,EAAI,UAAa,gBAAgB;AACjC,UAAM,EAAE,CAAC,OAAO,GAAGC,GAAO,GAAGC,MAASF;AACtC,WAAOE;AAAA,EACX;AACA,SAAOF;AACX;AARSG,EAAAL,GAAA;AAUT,SAASM,EAAcC,GAAwC;;AAC3D,aAAWC,KAAKD,GAAQ;AACpB,UAAIE,KAAAC,IAAAF,EAAE,SAAF,gBAAAE,EAAQ,UAAR,gBAAAD,EAA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wC;AAAE,WAAO;AAAA,EAAM;AAAA,EAC7G,MAAM,aAAaL,GAAoC;AAAE,WAAO,EAAE,MAAMA,EAAA;AAAA,EAAW;AAAA,EACnF,MAAM,aAAaH,GAAmBS,GAA8C;AAIhF,QAAIA,EAAQ,YAAY,KAAM;AAC9B,UAAMC,IACF,GAAG,KAAK,aAAa,+BACP,mBAAmBV,CAAS,CAAC,aAC9B,mBAAmBS,EAAQ,QAAQ,CAAC,IAC/CV,IAAI,MAAM,MAAMW,GAAK,EAAE,QAAQ,SAAS,SAAS,KAAK,SAAS;AACrE,QAAI,CAACX,EAAE,GAAI,OAAM,IAAI,MAAM,qBAAqBA,EAAE,MAAM,EAAE;AAAA,EAC9D;AAAA,EACA,0BAA0BY,GAAsC;AAAA,EAAc;AAAA,EAE9E,MAAM,mBAAmBA,GAA6D;AAClF,WAAO,QAAQ,QAAQ,IAAI;AAAA,EAC/B;AAAA,EACA,MAAM,2BAAyC;AAAE,WAAO,EAAE,IAAI,MAAM,sBAAsB,CAAA,EAAC;AAAA,EAAK;AAAA,EAChG,uBAAuBR,GAAmC;AAAE,WAAOA;AAAA,EAAS;AAChF;AAnF2DlF,EAAA0E,GAAA;AAApD,IAAMiB,IAANjB;"}
|
|
1
|
+
{"version":3,"file":"httpSessionService-BCe4DpgA.js","sources":["../src/services/sessionEventDecoder.ts","../src/services/accessTokenProvider.ts","../src/services/httpSessionService.ts"],"sourcesContent":["import { ServerEvent } from '../models/ServerEvent';\nimport { InteractionOriginContent, LlmEvent, QueuedMessageContent } from '../models/semanticKernelModel/models';\nimport { createEventSerializer } from '../models/semanticKernelModel/serializer';\nimport { EventType } from '../models/enums';\nimport { toInteractionOrigin, type Interaction, type InteractionOrigin } from '../models/Interaction';\nimport type { InteractionPart } from '../models/InteractionPart';\nimport type { Artifact } from '../models/Artifact';\n\n/**\n * Strip the persistence-only `$type: \"MongoDbEvent\"` marker from the wire\n * object before handing it to typedjson. The server's session-detail endpoint\n * returns base-class `Event` instances (not `MongoDbEvent`), but downstream\n * resources that come through other code paths sometimes carry that marker;\n * leaving it in confuses typedjson because it isn't registered in\n * `KNOWN_CONTENT_TYPES`.\n */\nfunction stripMongoDbDiscriminator(raw: unknown): unknown {\n if (raw === null || typeof raw !== 'object') return raw;\n const obj = raw as Record<string, unknown>;\n if (obj['$type'] === 'MongoDbEvent') {\n const { ['$type']: _drop, ...rest } = obj;\n return rest;\n }\n return obj;\n}\n\nfunction firstUserText(events: LlmEvent[]): string | undefined {\n for (const e of events) {\n if (e.role?.label?.toLowerCase() !== 'user') continue;\n const item = e.content?.items?.find(p => 'text' in p && typeof (p as Record<string, unknown>).text === 'string');\n if (item) return (item as { text?: string }).text;\n }\n return undefined;\n}\n\n/**\n * Where the turn came from (AIA Issue 1548): the `InteractionOriginContent` item the server keeps beside a user\n * message whose origin is not `user`. Resolved by typedjson through the same `$type` discriminator as\n * `UserUiContent`, so it arrives as its own class.\n */\nfunction userTurnOrigin(events: LlmEvent[]): InteractionOrigin | undefined {\n for (const e of events) {\n if (e.role?.label?.toLowerCase() !== 'user') continue;\n const item = e.content?.items?.find((p): p is InteractionOriginContent => p instanceof InteractionOriginContent);\n if (item) return toInteractionOrigin(item.origin);\n }\n return undefined;\n}\n\n/**\n * The reply this turn's question continues (AIA Issue 1651): the `QueuedMessageContent` item the server keeps beside a\n * user message the user queued while that reply was being given.\n */\nfunction continuedInteractionId(events: LlmEvent[]): string | undefined {\n for (const e of events) {\n if (e.role?.label?.toLowerCase() !== 'user') continue;\n const item = e.content?.items?.find((p): p is QueuedMessageContent => p instanceof QueuedMessageContent);\n if (item?.continuesInteractionId) return item.continuesInteractionId;\n }\n return undefined;\n}\n\n// The .NET semantic-kernel metadata key that carries the model's reasoning\n// trace on persisted (consolidated) events. typedjson drops `metadata` on\n// KernelContent-derived items (it's undecorated), so the reasoning only\n// survives on the RAW wire object — we read it from there.\nconst REASONING_METADATA_KEY = 'ChatResponseMessage.ReasoningContent';\n// Its companion: the headlines the server derived from that reasoning, a JSON array of strings (reasoning-trace\n// localization). Stamped by the agents server's HeadliningChatCompletionService on the same message.\nconst HEADLINES_METADATA_KEY = 'ChatResponseMessage.ReasoningHeadlines';\n\nfunction extractHeadlines(rawEvent: unknown): string[] | undefined {\n const content = (rawEvent as { content?: Record<string, any> })?.content;\n if (!content) return undefined;\n const raw = content.metadata?.[HEADLINES_METADATA_KEY]\n ?? (content.items ?? []).map((i: any) => i?.metadata?.[HEADLINES_METADATA_KEY]).find((v: unknown) => typeof v === 'string');\n if (typeof raw !== 'string' || !raw.trim()) return undefined;\n try {\n const parsed = JSON.parse(raw);\n return Array.isArray(parsed) ? parsed.filter((h): h is string => typeof h === 'string' && h.length > 0) : undefined;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Pull the reasoning trace out of a raw wire event. The server duplicates it\n * onto the message `content.metadata` and onto each text item's `metadata`;\n * prefer the event-level copy, fall back to the first item that carries one.\n */\nfunction extractReasoning(rawEvent: unknown): string | undefined {\n const content = (rawEvent as { content?: Record<string, any> })?.content;\n if (!content) return undefined;\n const fromContent = content.metadata?.[REASONING_METADATA_KEY];\n if (typeof fromContent === 'string' && fromContent.trim()) return fromContent.trim();\n for (const item of content.items ?? []) {\n const r = item?.metadata?.[REASONING_METADATA_KEY];\n if (typeof r === 'string' && r.trim()) return r.trim();\n }\n return undefined;\n}\n\nfunction isFunctionCallType(t: EventType): boolean {\n return t === EventType.FunctionCall || t === EventType.PartialFunctionCall;\n}\n\n/**\n * Fold a FunctionResponse part onto the call part it answers, mirroring the\n * final state a live `merge` would have reached for that call: the call's\n * parsed `args`/`name`/`start` are preserved and the response's\n * `response`/`status`/`end` are layered on. eventType flips to\n * FunctionResponse, which is the completed-call shape the UI renders.\n */\nfunction foldResponseIntoCall(call: InteractionPart, response: InteractionPart): InteractionPart {\n return {\n ...call,\n eventType: EventType.FunctionResponse,\n functionDetails: {\n id: call.functionDetails!.id,\n name: response.functionDetails?.name ?? call.functionDetails!.name,\n args: call.functionDetails!.args ?? response.functionDetails?.args,\n text: call.functionDetails!.text,\n response: response.functionDetails?.response,\n status: response.functionDetails?.status ?? 'Done',\n start: call.functionDetails!.start,\n end: response.functionDetails?.end ?? call.functionDetails!.end,\n silent: call.functionDetails!.silent,\n },\n };\n}\n\n/**\n * Rebuilds the `Interaction[]` the chat UI renders from the historical event\n * log returned by <c>GET /sessions/{id}</c>.\n *\n * Unlike the live turn loop, this does NOT route events through\n * `InteractionService.merge`. The merge pipeline (and its `FlatParts` step) is\n * built for the *live* stream, where each event carries a single content item\n * arriving incrementally; it flattens every event down to one part. The\n * *persisted* log is different: the server stores consolidated blocks where a\n * single event's `content.items` holds many parts at once — e.g. a text\n * preamble plus several FunctionCalls. Running those through `merge` collapsed\n * each event to one part and silently dropped the rest (every function call in\n * a multi-item event disappeared on replay).\n *\n * This restore path instead reads *every* item as its own `InteractionPart`\n * (via `ServerEvent.parseFromTypedEvent`, which already maps one part per\n * item) and only applies the one piece of merge logic replay genuinely needs:\n * folding each FunctionResponse onto the call it answers, keyed by `callId`.\n * No copy-on-write cloning, no event-bus side effects, no streaming-append.\n */\nexport function decodeSessionEvents(rawEvents: unknown[]): Interaction[] {\n const serializer = createEventSerializer();\n\n // Parse + group by interactionId, preserving first-seen order so the\n // rendered timeline mirrors the wire-log order. Keep the typed LlmEvent\n // alongside the mapped ServerEvent — the former carries the role label\n // used to derive the interaction's question.\n const order: string[] = [];\n const grouped = new Map<string, { llm: LlmEvent[]; server: ServerEvent[]; raw: unknown[] }>();\n for (const raw of rawEvents) {\n const stripped = stripMongoDbDiscriminator(raw);\n const llmEvent = serializer.parse(stripped as Record<string, unknown>);\n if (!llmEvent) continue;\n const serverEvent = ServerEvent.parseFromTypedEvent(llmEvent);\n if (!serverEvent) continue;\n\n const key = serverEvent.interactionId ?? '__root__';\n let bucket = grouped.get(key);\n if (!bucket) {\n bucket = { llm: [], server: [], raw: [] };\n grouped.set(key, bucket);\n order.push(key);\n }\n bucket.llm.push(llmEvent);\n bucket.server.push(serverEvent);\n // Keep the stripped raw object — typedjson drops the item `metadata`\n // that holds the reasoning trace, so we recover it from here.\n bucket.raw.push(stripped);\n }\n\n const interactions: Interaction[] = [];\n // Replies the agent went on giving under a queued message — drawn with a note when nothing of them shows.\n const continuedBelow = new Set<string>();\n for (const interactionId of order) {\n const { llm, server, raw } = grouped.get(interactionId)!;\n\n const parts: InteractionPart[] = [];\n const artifactData: Artifact[] = [];\n // callId → index in `parts` of the (possibly already folded) call part.\n const callIndex = new Map<string, number>();\n\n const pushPart = (part: InteractionPart) => {\n const stamped: InteractionPart = {\n ...part,\n id: `${parts.length + 1}-${interactionId}`,\n partial: false,\n };\n parts.push(stamped);\n return parts.length - 1;\n };\n\n for (let i = 0; i < server.length; i++) {\n const event = server[i];\n\n // `user` events are the question (captured below as\n // interactionQuestion), and `system` events are injected context\n // (schema, instructions) — neither renders as a chat part. The\n // live turn loop never feeds these through merge either; only the\n // persisted log co-locates them under the turn's interactionId.\n const role = llm[i].role?.label?.toLowerCase();\n if (role === 'user' || role === 'system') {\n // The user/system text isn't a chat part (the question is captured as\n // interactionQuestion via firstUserText). But a user turn may carry a client-only\n // UI representation — a UserUiContent that ServerEvent mapped to a UserAnswer part —\n // which must re-hydrate on reload. Push those; drop everything else on this event.\n if (role === 'user') {\n for (const part of event.parts) {\n if (part.eventType === EventType.UserAnswer) pushPart(part);\n }\n }\n continue;\n }\n\n // Artifacts: dedupe by id, last write wins (same as the live merge).\n if (event.llmArtifacts && event.llmArtifacts.length > 0) {\n for (const llmArtifact of event.llmArtifacts) {\n const artifact = llmArtifact.toArtifact();\n const i = artifactData.findIndex(a => a.id === artifact.id);\n if (i === -1) artifactData.push(artifact);\n else artifactData[i] = artifact;\n }\n }\n\n // The model's reasoning trace for this step lives in the event's\n // metadata (dropped by typedjson — read from raw). It rides the\n // event's text item, so attach it to the first text part: a\n // non-empty answer keeps its body and carries the trace in the\n // thinking strip; an empty \"thinking-only\" step becomes a Thought.\n const reasoning = extractReasoning(raw[i]);\n let reasoningUsed = false;\n\n for (const part of event.parts) {\n const callId = part.functionDetails?.id;\n\n // A response folds onto its matching call rather than becoming\n // a separate part.\n if (part.eventType === EventType.FunctionResponse && callId && callIndex.has(callId)) {\n const idx = callIndex.get(callId)!;\n parts[idx] = foldResponseIntoCall(parts[idx], part);\n continue;\n }\n\n // A client-only output sibling folds its payload onto the call it belongs to\n // (never a separate part). This is the persisted/replay counterpart of the live\n // StreamingFinalFunctionResultContent.clientOutput; a uiTool renderer reads it.\n if (part.eventType === EventType.FunctionClientOutput && callId) {\n if (callIndex.has(callId)) {\n const idx = callIndex.get(callId)!;\n const prev = parts[idx];\n parts[idx] = {\n ...prev,\n functionDetails: {\n ...prev.functionDetails!,\n clientOutput: part.functionDetails?.clientOutput,\n },\n };\n }\n // No matching call (shouldn't happen — the call precedes its Tool message):\n // drop it rather than render a standalone part.\n continue;\n }\n\n // A repeated full call for an id we've already seen (e.g. a\n // full FunctionCall following a PartialFunctionCall) updates the\n // existing part in place instead of duplicating it.\n if (isFunctionCallType(part.eventType) && callId && callIndex.has(callId)) {\n const idx = callIndex.get(callId)!;\n const prev = parts[idx];\n parts[idx] = {\n ...prev,\n eventType: part.eventType,\n functionDetails: { ...prev.functionDetails!, ...part.functionDetails! },\n };\n continue;\n }\n\n if (part.eventType === EventType.Text) {\n const hasText = !!part.text && part.text.length > 0;\n const attachReasoning = !!reasoning && !reasoningUsed;\n\n // Empty text with no reasoning to carry is a bare\n // placeholder — the consolidated log emits these alongside\n // function calls; dropping them keeps the timeline clean.\n if (!hasText && !attachReasoning && !part.thoughtDetails) {\n continue;\n }\n\n if (attachReasoning) {\n pushPart({\n ...part,\n eventType: hasText ? EventType.Text : EventType.Thought,\n thoughtDetails: { text: reasoning!, headlines: extractHeadlines(raw[i]) },\n // A step with no answer text BECOMES the thought, and\n // `ThoughtPart` renders `part.text` (via\n // getPartTextContent) — leaving it empty drew the\n // \"Pensou por 12s\" header over a blank window. The live\n // path already sets both (see `createFromThought`); this\n // is the same part rebuilt from Session.Events, so it has\n // to agree. When there IS answer text the part stays a\n // Text and keeps it — the reasoning rides the strip.\n text: hasText ? part.text : reasoning!,\n });\n reasoningUsed = true;\n continue;\n }\n\n pushPart(part);\n continue;\n }\n\n const idx = pushPart(part);\n if (isFunctionCallType(part.eventType) && callId) {\n callIndex.set(callId, idx);\n }\n }\n\n // Reasoning with no text item to ride on (rare) — surface it so\n // the trace isn't silently lost.\n if (reasoning && !reasoningUsed) {\n pushPart({\n id: '', author: event.author, eventType: EventType.Thought,\n created: event.created, partial: false,\n mustPush: false, textAppendable: false,\n thoughtDetails: { text: reasoning, headlines: extractHeadlines(raw[i]) },\n // Both, for the same reason as above: the renderer reads `text`.\n text: reasoning,\n });\n }\n }\n\n const functionMap = new Map<string, InteractionPart>();\n for (const [callId, idx] of callIndex) functionMap.set(callId, parts[idx]);\n const origin = userTurnOrigin(llm);\n const continues = continuedInteractionId(llm);\n if (continues) continuedBelow.add(continues);\n\n interactions.push({\n created: server[0]?.created ?? new Date(),\n interactionId,\n artifactData,\n partial: false,\n turn_complete: true,\n parts,\n version: server.length,\n functionMap,\n interactionQuestion: firstUserText(llm) ?? '',\n ...(origin && { origin }),\n });\n }\n\n for (const interaction of interactions)\n if (continuedBelow.has(interaction.interactionId)) interaction.continuedBelow = true;\n\n return interactions;\n}\n","/**\n * A bearer-token source for the library's HTTP clients: either a fixed token\n * string (legacy behavior) or a callback resolved on EVERY request, so a\n * long-lived service always sends the freshest JWT (sign-in, silent refresh,\n * guest→real promotion) instead of the one captured at construction.\n */\nexport type AccessTokenProvider = string | (() => string | undefined);\n\n/** The current token for `provider` (empty string when a callback yields none). */\nexport function resolveAccessToken(provider: AccessTokenProvider): string {\n return (typeof provider === 'function' ? provider() : provider) ?? '';\n}\n","import { ChatSession, Customer, decodeSessionEvents, Interaction, ISessionService } from \"..\";\nimport { resolveAccessToken, type AccessTokenProvider } from \"./accessTokenProvider\";\n\n/**\n * Wire shape returned by `GET /sessions` and the `.header` of `GET /sessions/{id}`.\n * Mirrors `Envision.SemanticKernel.Models.Session.SessionHeader` on the C#\n * side after the default camelCase rename ASP.NET Core applies on serialize.\n */\ninterface SessionHeaderWire {\n id: string;\n created?: string | null;\n updatedAt?: string | null;\n user?: ChatSession['user'];\n customer?: ChatSession['customer'];\n overview?: string | null;\n agentType?: ChatSession['agentType'];\n agentId?: string | null;\n userDescription?: string | null;\n lastQuestion?: string | null;\n activityCount?: number;\n lastGeneratedOverview?: string | null;\n artifacts?: string[];\n}\n\ninterface SessionDetailWire {\n header: SessionHeaderWire;\n events: unknown[];\n lastSequence?: number;\n}\n\nfunction headerToChatSession(h: SessionHeaderWire, interactions: Interaction[] = []): ChatSession {\n return {\n id: h.id,\n browserScopeId: h.id,\n fullyLoaded: interactions.length > 0,\n interactions,\n artifacts: h.artifacts ?? [],\n overview: h.overview ?? '',\n agentType: h.agentType as ChatSession['agentType'],\n agentId: h.agentId ?? undefined,\n userDescription: h.userDescription ?? undefined,\n lastQuestion: h.lastQuestion ?? undefined,\n customer: h.customer ?? null,\n activityCount: h.activityCount ?? 0,\n user: h.user as ChatSession['user'],\n lastGeneratedOverview: h.lastGeneratedOverview ? new Date(h.lastGeneratedOverview) : null,\n sessionRunMode: 'normal' as ChatSession['sessionRunMode'],\n created: h.created ? new Date(h.created) : undefined,\n updatedAt: h.updatedAt ? new Date(h.updatedAt) : undefined,\n } as ChatSession;\n}\n\n/**\n * Minimal ISessionService over the WSServer's REST `/sessions` endpoints.\n *\n * Reads from the unified `Sessions` collection. The list endpoint returns\n * header projections; the detail endpoint returns header + the raw\n * `LlmEvent[]` log which we replay through `decodeSessionEvents` to rebuild\n * the chat UI's `Interaction[]`. Mutation methods are no-ops — write paths\n * are exercised by the live agent turn loop and the WS connection, not by\n * REST calls from the picker.\n */\nexport class HttpSessionService implements ISessionService {\n private serverBaseUrl: string;\n private accessToken: AccessTokenProvider;\n\n constructor(serverBaseUrl: string, accessToken: AccessTokenProvider) {\n this.serverBaseUrl = serverBaseUrl.replace(/\\/$/, '');\n this.accessToken = accessToken;\n }\n\n private get headers(): HeadersInit {\n return {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${resolveAccessToken(this.accessToken)}`,\n };\n }\n\n async getAllSessions(): Promise<ChatSession[]> {\n const r = await fetch(`${this.serverBaseUrl}/sessions?top=50`, {\n headers: this.headers,\n });\n if (!r.ok) throw new Error(`getAllSessions HTTP ${r.status}`);\n const headers = (await r.json()) as SessionHeaderWire[];\n return headers.map(h => headerToChatSession(h));\n }\n\n async retrieveSession(sessionId: string): Promise<ChatSession | null> {\n const r = await fetch(`${this.serverBaseUrl}/sessions/${sessionId}`, {\n headers: this.headers,\n });\n if (r.status === 404) return null;\n if (!r.ok) throw new Error(`retrieveSession HTTP ${r.status}`);\n const detail = (await r.json()) as SessionDetailWire;\n const interactions = decodeSessionEvents(detail.events ?? []);\n // The decoder doesn't know the sessionId — stamp it now so downstream\n // consumers (artifact loaders, debugging surfaces) can correlate back.\n for (const it of interactions) it.sessionId = detail.header.id;\n const session = headerToChatSession(detail.header, interactions);\n if (typeof detail.lastSequence === 'number') session.lastSequence = detail.lastSequence;\n return session;\n }\n\n async getLastUsedSession(): Promise<ChatSession | null> {\n const all = await this.getAllSessions();\n return all[0] ?? null;\n }\n\n // — Most write paths are inert: after the dual-collection collapse the\n // server populates Session UI-header fields automatically during the turn.\n // The two exceptions are rename (`patchSession` → PATCH /Session/Overview)\n // and delete (`removeSession` → DELETE /Session/{id}), which are driven by\n // the picker UI and have no WS-side equivalent. —\n\n async removeSession(sessionId: string): Promise<void> {\n const r = await fetch(`${this.serverBaseUrl}/Session/${encodeURIComponent(sessionId)}`, {\n method: 'DELETE',\n headers: this.headers,\n });\n if (!r.ok) throw new Error(`removeSession HTTP ${r.status}`);\n }\n async createSession(_sessionId: string, _agentName: string, _customer?: Customer): Promise<ChatSession | null> { return null; }\n async createAgentSession(): Promise<any> { return { sessionId: null }; }\n async closeSession(_sessionId: string): Promise<void> { /* no-op */ }\n async generateOverviewForCurrentSession(_sys: string, _model: string): Promise<string | null> { return null; }\n async storeSession(session: ChatSession): Promise<any> { return { data: session }; }\n async patchSession(sessionId: string, partial: Partial<ChatSession>): Promise<void> {\n // SessionController.PatchOverview binds sessionId/overview from the\n // query string (no body, no route params). Anything else on `partial`\n // has no server-side endpoint yet — ignore it instead of guessing.\n if (partial.overview == null) return;\n const url =\n `${this.serverBaseUrl}/Session/Overview` +\n `?sessionId=${encodeURIComponent(sessionId)}` +\n `&overview=${encodeURIComponent(partial.overview)}`;\n const r = await fetch(url, { method: 'PATCH', headers: this.headers });\n if (!r.ok) throw new Error(`patchSession HTTP ${r.status}`);\n }\n delayedPatchActiveSession(_partial: Partial<ChatSession>): void { /* no-op */ }\n\n async patchActiveSession(_partial: Partial<ChatSession>): Promise<ChatSession | null> {\n return Promise.resolve(null);\n }\n async getLlmSessionInformation(): Promise<any> { return { id: null, instructionSummaries: [] }; }\n transformIntoInstances(session: ChatSession): ChatSession { return session; }\n}\n"],"names":["stripMongoDbDiscriminator","raw","obj","_drop","rest","__name","firstUserText","events","e","_b","_a","item","_d","_c","p","userTurnOrigin","InteractionOriginContent","toInteractionOrigin","continuedInteractionId","QueuedMessageContent","REASONING_METADATA_KEY","HEADLINES_METADATA_KEY","extractHeadlines","rawEvent","content","i","v","parsed","h","extractReasoning","fromContent","isFunctionCallType","EventType","foldResponseIntoCall","call","response","_e","decodeSessionEvents","rawEvents","serializer","createEventSerializer","order","grouped","stripped","llmEvent","serverEvent","ServerEvent","key","bucket","interactions","continuedBelow","interactionId","llm","server","parts","artifactData","callIndex","pushPart","part","stamped","event","role","llmArtifact","artifact","a","reasoning","reasoningUsed","callId","idx","prev","hasText","attachReasoning","functionMap","origin","continues","interaction","resolveAccessToken","provider","headerToChatSession","_HttpSessionService","serverBaseUrl","accessToken","__publicField","r","sessionId","detail","it","session","_sessionId","_agentName","_customer","_sys","_model","partial","url","_partial","HttpSessionService"],"mappings":";;;;;;AAgBA,SAASA,EAA0BC,GAAuB;A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l, f as A, E as p, g, F as S, h as C, G as d, I as h, i as u, j as E, L as T, M as R, k as I, R as P, l as L, S as D, m as v, n as m, o as _, p as x, q as y, T as f, r as F, s as M, t as B, u as O, v as U, w as k, x as H, y as V, z as N } from "./serializer-
|
|
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, F as S, h as C, G as d, I as h, i as u, j as E, L as T, M as R, k as I, R as P, l as L, S as D, m as v, n as m, o as _, p as x, q as y, T as f, r as F, s as M, t as B, u as O, v as U, w as k, x as H, y as V, z as N } from "./serializer-Dagz_6VT.js";
|
|
3
3
|
import { C as w, C as G, 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 q, a as Z, 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 ge, L as Se, M as Ce, T as de, W as he, c as ue, d as Ee, r as Te, e as Re, s as Ie, t as Pe } from "./detachedRunActivity-
|
|
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 ge, L as Se, M as Ce, T as de, W as he, c as ue, d as Ee, r as Te, e as Re, s as Ie, t as Pe } from "./detachedRunActivity-Dw1Far2p.js";
|
|
7
7
|
import { A as De } from "./artifactHtmlHandler-CMQJf1cX.js";
|
|
8
|
-
import { H as me, d as _e, r as xe } from "./httpSessionService-
|
|
8
|
+
import { H as me, d as _e, r as xe } from "./httpSessionService-BCe4DpgA.js";
|
|
9
9
|
import { APPBAR_HEIGHT as fe, APPBAR_HEIGHT as Fe, ASK_USER_CANCELLED as Me, ActivityLine as Be, AgentActivity as Oe, AgentActivity as Ue, AgentRunLabel as ke, AgentTyping as He, AiChat as Ve, AiChatDrawer as Ne, AiChatFloating as be, AiChatFloating as we, AiChatPane as Ge, AiChatProvider as We, AiChatServiceContext as ze, AiChatPane as Ke, AppBar as Je, AppBar as Xe, AppRail as Ye, AppRail as je, AppShell as qe, AppShell as Ze, ArtifactRender as Qe, AskUserDialog as $e, AskUserSheet as ea, AttachmentPreviewModal as aa, BillingLimitBanner as ta, BoxedPart as sa, BrainIcon as na, CHAT_VERBOSITY_LEVELS as ra, ChartIcon as oa, ChatAgentHeader as ia, ChatBoxContext as ca, ChatIcon as la, ChatPane as Aa, ChatsHistory as pa, ChatsHistory as ga, CheckIcon as Sa, ChevronIcon as Ca, ChevronRightIcon as da, CloseIcon as ha, CodeIcon as ua, ComposerIcon as Ea, CurrentMessage as Ta, DEFAULT_ACTIVITY_RENDERER as Ra, DEFAULT_INTERACTION_ORIGIN_LABELS as Ia, DEFAULT_PART_RENDERERS as Pa, DashboardIcon as La, DataExplorerIcon as Da, DelayTextComponent as va, DetachedRunBox as ma, DetachedRunBox as _a, DetachedRunTaskBox as xa, DetachedRunTranscript as ya, EnvironmentProvider as fa, FAILED_FRIENDLY_LABEL as Fa, FileIcon as Ma, FunctionPart as Ba, GlobeIcon as Oa, HandoffDivider as Ua, HistoryIcon as ka, InertEnvironmentProvider as Ha, InteractionOriginBadge as Va, JsxErrorBoundary as Na, LIVE_TSX_DEFAULT_MAX_CHARS_FOR_FULL as ba, LastPrompts as wa, LastPrompts as Ga, LinearBackgroundProgress as Wa, LinearProgressBarWithMarkers as za, ListCheckIcon as Ka, LiveJsxBlock as Ja, LiveTsxConfigProvider as Xa, LlmResponseRender as Ya, LoadingDots as ja, LockClosedIcon as qa, LockOpenIcon as Za, 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, PanelIcon as ot, PaperclipIcon as it, PauseIcon as ct, PenIcon as lt, PersonaCard as At, PinIcon as pt, PlusIcon as gt, Prompt as St, PromptDateMarkers as Ct, PromptGhostHint as dt, Prompt as ht, RotateIcon as ut, RunProgressPanel as Et, RunProgressPanel as Tt, RunProgressStrip as Rt, RunProgressStrip as It, SearchIcon as Pt, SendIcon as Lt, SessionStateManagerService as Dt, SessionUsage as vt, SessionUsage as mt, SharedSessionTranscript as _t, SparkleIcon as xt, Sparkline as yt, StopIcon as ft, Stopwatch as Ft, SuspendedPart as Mt, TableIcon as Bt, TaskList as Ot, TaskList as Ut, TerminalIcon as kt, TextPart as Ht, ThoughtPart as Vt, ToolIcon as Nt, TrashIcon as bt, TriggerDropdown as wt, TurnAwareButton as Gt, UiToolDispatcher as Wt, UndoIcon as zt, UsersIcon as Kt, V2_CHART_PALETTE as Jt, WaitingPart as Xt, ZoomInIcon as Yt, ZoomOutIcon as jt, acceptsFile as qt, activitySteps as Zt, agentFromKey as Qt, bareToolName as $t, canStreamDetachedRun as es, classifyPart as as, configureFriendlyMapping as ts, configureToolOutcome as ss, createAiChatEngine as ns, createAiChatSessionStore as rs, createAiChatSessionStore as os, createChatBoxStore as is, createDetachedRunTranscriptEngine as cs, createSharedSessionTranscriptEngine as ls, createUiToolRegistry as As, detachedRunHeadline as ps, disposeSharedAiChatEngine as gs, engineKeyFor as Ss, extendDefaultScope as Cs, extendModuleRegistry as ds, formatFileSize as hs, getDefaultJsxScope as us, getFriendlyLabel as Es, getSharedAiChatEngine as Ts, handoffAt as Rs, itemsThatFit as Is, openDetachedRunTranscript as Ps, openSharedSessionTranscript as Ls, parseClientOutput as Ds, parseContentBlocks as vs, parseDetachedRunConclusion as ms, parseUiArgs as _s, previousAgentKey as xs, registerContentTools as ys, resolveChatAgent as fs, slotEnterSx as Fs, useAgentEngine as Ms, useAiChatServices as Bs, useAiChatSessionStore as Os, useChatBoxHeight as Us, useChatReadOnly as ks, useCoarsePointer as Hs, useDetachedRunLiveActivity as Vs, useDetachedRunResumeKey as Ns, useDetachedRunTranscript as bs, useEnvironment as ws, useEnvironmentOptional as Gs, useFirstDrawBudget as Ws, useLiveTsxMaxCharsForFull as zs, useMessageScope as Ks, useParkedAskUser as Js, useResponsiveLayout as Xs, useSharedSessionTranscript as Ys, useTurnOpen as js, useVisualViewport as qs, v2Card as Zs, v2Chip as Qs, v2IconBtn as $s, v2MonoMeta as en, v2SectionLabel as an, v2Theme as tn } from "./components.js";
|
|
10
10
|
import { s as nn, u as rn, a as on, b as cn, c as ln } from "./useContainerWidth-C7u70yDY.js";
|
|
11
11
|
import { A as pn, D as gn, g as Sn, b as Cn, c as dn, d as hn, e as un, f as En, i as Tn, r as Rn } from "./environmentUtils-VZNTCzEE.js";
|
|
12
12
|
import { ALLOWED_DOMAINS as Pn, ALLOWED_EMAILS as Ln, AUTH_CONFIG as Dn, GOOGLE_CLIENT_ID as vn, getAgentBaseUrl as mn, getArtifactsBaseUrl as _n, getDotNetBaseUrl as xn, getIconByName as yn, iconCategories as fn, materialIcons as Fn, searchIcons as Mn, setEbiContextData as Bn, setEbiContextSessionId as On } from "./utils.js";
|
|
13
13
|
import { P as kn, S as Hn, c as Vn, a as Nn, e as bn, b as wn, f as Gn, i as Wn, d as zn, p as Kn, s as Jn, h as Xn, j as Yn, t as jn, k as qn } from "./predictionRows-Damfwthh.js";
|
|
14
14
|
import { a as Qn, b as $n, c as er, d as ar, f as tr, p as sr } from "./promptTriggers-xwMJ5gRj.js";
|
|
15
|
-
import { u as rr } from "./useChatSessions-
|
|
15
|
+
import { u as rr } from "./useChatSessions-BgfeYkcc.js";
|
|
16
16
|
import { Score as ir } from "./interfaces.js";
|
|
17
17
|
import { A as lr, a as Ar, P as pr, R as gr, b as Sr, c as Cr, d as dr, V as hr, e as ur, f as Er, g as Tr, h as Rr, i as Ir, j as Pr, k as Lr, l as Dr, p as vr, m as mr, n as _r, s as xr, o as yr, u as fr, q as Fr } from "./PersonaAvatar-tKaWpDeQ.js";
|
|
18
18
|
export {
|
package/dist/models.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as a, a as s, b as n, c as o, d as i, C as r, e as C, f as l, E as S, g as c, F as g, h as T, G as p, I as E, i as d, j as m, L as u, M as A, k as R, R as v, l as y, S as M, m as D, n as h, o as x, p as f, q as z, T as I, r as U, s as F, t as L, u as _, v as N, w as b, x as P, y as k, z as G } from "./serializer-
|
|
1
|
+
import { A as a, a as s, b as n, c as o, d as i, C as r, e as C, f as l, E as S, g as c, F as g, h as T, G as p, I as E, i as d, j as m, L as u, M as A, k as R, R as v, l as y, S as M, m as D, n as h, o as x, p as f, q as z, T as I, r as U, s as F, t as L, u as _, v as N, w as b, x as P, y as k, z as G } from "./serializer-Dagz_6VT.js";
|
|
2
2
|
import { C as O, C as j, D as q, a as w, i as J, b as K, c as V, d as W } from "./detachedRunModel-X59Pb5V-.js";
|
|
3
3
|
import { A as Q, a as X, M as Y, b as Z } from "./Memory-BUnmYGNv.js";
|
|
4
4
|
import { C as ee, P as te } from "./Prompt-DZb7OaPp.js";
|