@aintela/chat 0.4.37 → 0.5.1
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 +7213 -6950
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/httpArtifactService-EEhF_mp9.js +1744 -0
- package/dist/httpArtifactService-EEhF_mp9.js.map +1 -0
- package/dist/{httpSessionService-CUujaUo6.js → httpSessionService-wBby4ggl.js} +51 -53
- package/dist/httpSessionService-wBby4ggl.js.map +1 -0
- package/dist/index.js +248 -240
- package/dist/models.js +1 -1
- package/dist/{serializer-DX-yGa_k.js → serializer-CC-nM3ig.js} +497 -498
- package/dist/serializer-CC-nM3ig.js.map +1 -0
- package/dist/services.js +12 -10
- package/dist/src/components/AiChat/AiChatContext.d.ts +4 -0
- package/dist/src/components/AiChat/AiChatTypes.d.ts +8 -0
- package/dist/src/components/AiChat/ChatPane/CrossfadeSlot.d.ts +24 -0
- package/dist/src/components/AiChat/ChatPane/CurrentMessage.d.ts +9 -9
- package/dist/src/components/AiChat/ChatPane/Message.d.ts +1 -3
- package/dist/src/components/AiChat/ChatPane/MessageAgent.d.ts +9 -8
- package/dist/src/components/AiChat/ChatPane/MessageScope.d.ts +32 -0
- package/dist/src/components/AiChat/ChatPane/MessageUser.d.ts +0 -1
- package/dist/src/components/AiChat/ChatPane/StickyQuestionHeader.d.ts +0 -1
- package/dist/src/components/AiChat/ChatPane/groupParts.d.ts +34 -0
- package/dist/src/components/AiChat/ChatPane/messageAgentVerbosity.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/ActivityLine.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/parts/ConnectionOutagePart.d.ts +9 -0
- package/dist/src/components/AiChat/ChatPane/parts/connectionOutagePart.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/index.d.ts +4 -1
- package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +25 -5
- package/dist/src/components/AiChat/ChatPane/reasoningHeadlines.d.ts +4 -9
- package/dist/src/components/AiChat/ChatPane/verbosity.d.ts +57 -0
- package/dist/src/components/AiChat/sessionStateManagerService.d.ts +36 -35
- package/dist/src/components/AiChat/stateConfiguration.d.ts +18 -0
- package/dist/src/components/index.d.ts +10 -4
- package/dist/src/components/v2/VerbositySlider.d.ts +12 -0
- package/dist/src/interfaces/index.d.ts +0 -1
- package/dist/src/models/Interaction.d.ts +0 -9
- package/dist/src/models/InteractionPart.d.ts +4 -3
- package/dist/src/models/Notification.d.ts +7 -1
- package/dist/src/models/ServerEvent.d.ts +4 -0
- package/dist/src/models/index.d.ts +1 -1
- package/dist/src/services/WebSocketConnection/WebSocketConnectionV2.d.ts +28 -108
- package/dist/src/services/WebSocketConnection/closeCodes.d.ts +24 -0
- package/dist/src/services/WebSocketConnection/streamStats.d.ts +41 -0
- package/dist/src/services/WebSocketConnection/streamStats.test.d.ts +1 -0
- package/dist/src/services/WebSocketConnection/webSocketConnection.d.ts +15 -12
- package/dist/src/services/eventBusService.d.ts +28 -67
- package/dist/src/services/index.d.ts +2 -1
- package/dist/src/services/interaction/reduceInteraction.d.ts +28 -0
- package/dist/src/services/interactionService.d.ts +15 -32
- package/dist/src/services/interactionService.invariants.test.d.ts +1 -0
- package/dist/src/services/servers/AgentGatewayService.d.ts +3 -182
- package/dist/src/services/servers/AgentGatewayWSAsync.d.ts +145 -46
- package/dist/src/services/servers/connectionSupervisor.d.ts +173 -0
- package/dist/src/services/servers/connectionSupervisor.test.d.ts +1 -0
- package/dist/src/services/servers/connectionSupervisor.wire.test.d.ts +0 -0
- package/dist/src/services/servers/gatewayErrorClosesTurn.test.d.ts +1 -0
- package/dist/src/services/servers/gatewayFixes.test.d.ts +1 -0
- package/dist/src/services/servers/throttledEmit.test.d.ts +1 -0
- package/dist/src/services/servers/throttledEmitter.d.ts +38 -0
- package/dist/src/services/streamPipeline.characterization.test.d.ts +1 -0
- package/dist/src/services/wire/decodeFrame.d.ts +21 -0
- package/dist/src/services/wire/decodeFrame.test.d.ts +1 -0
- package/dist/tests/bench/streamPipeline.bench.d.ts +1 -0
- package/dist/tests/fakes/fakeRawWebSocket.d.ts +2 -0
- package/dist/tests/fakes/fakeWebSocket.d.ts +4 -3
- package/dist/tests/fakes/makeGateway.d.ts +7 -0
- package/dist/tests/wire/journey.d.ts +47 -0
- package/dist/{useChatSessions-BXYvvd4S.js → useChatSessions-C6sYF4U6.js} +2 -2
- package/dist/{useChatSessions-BXYvvd4S.js.map → useChatSessions-C6sYF4U6.js.map} +1 -1
- package/package.json +2 -1
- package/dist/httpArtifactService-GdGsaFKS.js +0 -1979
- package/dist/httpArtifactService-GdGsaFKS.js.map +0 -1
- package/dist/httpSessionService-CUujaUo6.js.map +0 -1
- package/dist/serializer-DX-yGa_k.js.map +0 -1
- package/dist/src/interfaces/IHeartbeatPort.d.ts +0 -4
- /package/dist/src/components/AiChat/{sessionStateManagerService.idle.test.d.ts → ChatPane/crossfadeSlot.test.d.ts} +0 -0
- /package/dist/src/{services/interactionServiceGrouping.test.d.ts → components/AiChat/ChatPane/groupParts.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer-CC-nM3ig.js","sources":["../src/models/enums.ts","../src/models/InteractionPart.ts","../src/models/semanticKernelModel/models.ts","../src/models/ServerEvent.ts","../src/models/semanticKernelModel/serializer.ts"],"sourcesContent":["import type { ConnectionState } from \"./connectionState\";\nimport type { Theme } from \"@mui/material/styles\";\nimport PsychologyIcon from '@mui/icons-material/Psychology';\nimport FlashOnIcon from '@mui/icons-material/FlashOn';\nimport RocketLaunchIcon from '@mui/icons-material/RocketLaunch';\nimport GeneratingTokensOutlined from '@mui/icons-material/GeneratingTokensOutlined';\nimport AutoFixHighIcon from '@mui/icons-material/AutoFixHigh';\nimport SortByAlphaOutlined from \"@mui/icons-material/SortByAlphaOutlined\";\nimport AllInclusiveIcon from '@mui/icons-material/AllInclusive';\n\nexport type ChatEventType = 'ChatEvent' | 'ChatResponse' | 'ChatRequest';\nexport const ChatEventType = {\n ChatEvent: 'ChatEvent',\n ChatResponse: 'ChatResponse',\n ChatRequest: 'ChatRequest',\n} as const;\n\nexport type RunMode = 'interactive' | 'autonomous';\nexport const RunMode = {\n Interactive: 'interactive',\n Autonomous: 'autonomous'\n} as const;\n\nexport type ChatAction = 'SendMessage' | 'Suspend' | 'Ping' | 'Close' | 'Other' | 'AnswerHumanTool';\nexport const ChatAction = {\n SendMessage: 'SendMessage',\n Other: 'Other',\n Suspend: 'Suspend',\n Close: 'Close',\n Ping: 'Ping',\n AnswerHumanTool: 'AnswerHumanTool'\n} as const;\n\n\nexport type EventType = 'partial_function_call' | 'tool_event' | 'function_call' | 'not_defined' | 'function_response' | 'function_client_output' | 'user_answer' | 'video' | 'thought' | 'thought_highlight' | 'inline_data' | 'file_data' | 'code_execution_result' | 'executable_code' | 'text' | 'other' | 'waiting' | 'suspended' | 'server_error';\nexport const EventType = {\n FunctionCall: 'function_call',\n PartialFunctionCall: 'partial_function_call',\n FunctionResponse: 'function_response',\n // Persisted, client-only sibling carrying a tool's ToolClientOutput payload, keyed by call id.\n // Folded into its call part on replay (never rendered on its own); the live turn delivers the\n // same payload inline on the StreamingFinalFunctionResultContent result event.\n FunctionClientOutput: 'function_client_output',\n // A user turn's rich UI representation (from UserUiContent). Carries functionDetails {name,args,\n // isUi,status:'Done'} so it routes through the uiTool dispatcher/registry exactly like an\n // agent-emitted UI tool — but authored by the user and rendered on the user side of the turn.\n UserAnswer: 'user_answer',\n Video: 'video',\n Thought: 'thought',\n // A highlight of the reasoning (StreamingThoughtHighlightContent): feeds the thought run's trail, never renders alone.\n ThoughtHighlight: 'thought_highlight',\n InlineData: 'inline_data',\n FileData: 'file_data',\n CodeExecutionResult: 'code_execution_result',\n ExecutableCode: 'executable_code',\n Other: 'other',\n Text: 'text',\n ToolEvent: 'tool_event',\n ServerError: 'server_error',\n NotDefined: 'not_defined',\n Waiting: 'waiting',\n Suspended: 'suspended'\n} as const;\n\nexport const GetEventTypeFromDotNetName = (name: string): EventType => {\n switch (name.toLocaleLowerCase()) {\n case 'functioncall':\n return EventType.FunctionCall;\n case 'functionresponse':\n return EventType.FunctionResponse;\n // Streaming \"final\" call/result carry their own $type on the wire — map them like their collapsed\n // KernelContent forms so the top-level event classifies as call/response, not NotDefined.\n case 'streamingfinalfunctioncallcontent':\n return EventType.FunctionCall;\n case 'streamingfinalfunctionresultcontent':\n return EventType.FunctionResponse;\n case 'text':\n return EventType.Text;\n case 'streamingtextcontent':\n return EventType.Text;\n case 'partialfunctioncall':\n return EventType.PartialFunctionCall;\n case 'streamingfunctioncallupdatecontent':\n return EventType.PartialFunctionCall;\n case 'streamingreasoningcontent':\n return EventType.Thought;\n case 'streamingthoughthighlightcontent':\n case 'partialthoughthighlight':\n return EventType.ThoughtHighlight;\n case 'functionclientoutputcontent':\n return EventType.FunctionClientOutput;\n case 'streamingclientoutputcontent':\n return EventType.FunctionClientOutput;\n case 'partialText':\n return EventType.Text;\n case 'unknown':\n return EventType.Other;\n default:\n return EventType.NotDefined;\n }\n}\n\nexport const EventTypeDescriptions = {\n [EventType.FunctionCall]: 'Executing function call',\n [EventType.FunctionResponse]: 'Getting response',\n [EventType.Video]: 'Video',\n [EventType.Thought]: 'Thought',\n [EventType.InlineData]: 'InlineData',\n [EventType.FileData]: 'FileData',\n [EventType.CodeExecutionResult]: 'Coding...',\n [EventType.ExecutableCode]: 'Coding...',\n [EventType.Other]: 'Other',\n [EventType.Text]: 'Text',\n [EventType.NotDefined]: 'NotDefined'\n};\n\nexport type ResponseType = 'Regular' | 'Artifact';\nexport const ResponseType = {\n Regular: 'Regular',\n Artifact: 'Artifact',\n} as const;\n\nexport type AuthorType = 'User' | 'Agent' | \"System\";\nexport const AuthorType = {\n User: 'User',\n Agent: 'Agent',\n System: 'System'\n} as const;\n\nexport type ArtifactType = 'Dashboard' | 'Chart' | 'Code';\nexport const ArtifactType = {\n Dashboard: 'Dashboard',\n Chart: 'Chart',\n Code: 'Code',\n} as const;\n\n// Agent selection types\nexport type AgentType = 'BI_Envision_Agent' | 'BI_Master_Customer_Agent' | 'BI_Dedicated_Customer_Agent' | 'Unknown';\nexport const AgentType = {\n BI_Envision_Agent: 'BI_Envision_Agent',\n BI_Master_Customer_Agent: 'BI_Master_Customer_Agent',\n BI_Dedicated_Customer_Agent: 'BI_Dedicated_Customer_Agent',\n Unknown: 'Unknown',\n} as const;\n\n// Agent mode\nexport type AgentMode = 'Interactive' | 'Newsletter'\nexport const AgentMode = {\n Interactive: 'Interactive',\n Newsletter: 'Newsletter'\n} as const;\n\nexport const AgentConfig = {\n [AgentType.BI_Envision_Agent]: {\n name: 'Envision',\n description: 'Analisa dados de vendas globais\\ncom insights consolidados de todos os clientes\\ne métricas agregadas do mercado'\n },\n [AgentType.BI_Master_Customer_Agent]: {\n name: 'Clientes Master',\n description: 'Visão consolidada de todos os clientes\\ncom análises comparativas e benchmarks\\nentre diferentes organizações'\n },\n [AgentType.BI_Dedicated_Customer_Agent]: {\n name: 'Cliente Único',\n description: 'Foco em um cliente específico\\ncom análises detalhadas e personalizadas\\npara sua organização'\n },\n [AgentType.Unknown]: {\n name: 'Não definido',\n description: 'Não definido'\n }\n} as const;\n\nexport type SkillLevel = 'FAST' | 'BALANCED' | 'PRO' | 'LIVE'\nexport const SkillLevel = {\n 'FAST': 'FAST',\n 'BALANCED': 'BALANCED',\n 'PRO': 'PRO',\n 'LIVE': 'LIVE',\n} as const;\n\n// Model selection types\nexport type ModelType = 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'gemini_3_1_flash_lite_preview' | 'gemini_3_5_flash' | 'gemini-3.1-pro-preview' | 'gpt-5.1' | 'glm-5' | 'glm-4.7' | 'glm-4.7-flash' | 'kimi-k2.6' | 'kimi-k2-turbo-preview' | 'gpt-5.2' | 'gpt-5.4' | 'gpt-5.4-mini' | 'deepseek-v4-pro' | 'deepseek-v4-flash' | 'wen3.6-plus' | 'qwen3.7-max' | 'uiToolShowcase';\nexport const ModelType = {\n 'gemini_3_5_flash': 'gemini-3.5-flash',\n 'gemini_3_1_pro_preview': 'gemini-3.1-pro-preview',\n 'gemini_3_1_flash_lite_preview': 'gemini-3.1-flash-lite-preview',\n 'Gemini_live_2_5_flash_preview': 'gemini-live-2.5-flash-lite',\n 'Claude_Sonnet_4_6': 'claude-sonnet-4-6',\n 'Claude_Opus_4_6': 'claude-opus-4-6',\n 'Gpt_5_1': 'gpt-5.1',\n 'Gpt_5_2': 'gpt-5.2',\n 'Gpt_5_5': 'gpt-5.5-2026-04-23',\n 'Gpt_5_4_mini': 'gpt-5.4-mini',\n 'Glm-5_2': 'Glm-5.2',\n 'Glm_4.7': 'Glm-4.7',\n 'Glm_4.7_flash': 'Glm-4.7-Flash',\n 'Kimi_K26': 'kimi-k2.6',\n 'Kimi_Turbo': 'kimi-k2-turbo-preview',\n 'DeepSeek_v4_Pro': 'deepseek-v4-pro',\n 'DeepSeek_v4-Flash': 'deepseek-v4-flash',\n 'Qwen3_6-plus': 'qwen3.6-plus',\n 'Qwen3_7-max': 'qwen3.7-max',\n 'CorporateTravelDashboard': \"CorporateTravelDashboard\",\n 'ShowGuideDemo': \"ShowGuideDemo\",\n 'uiToolShowcase': 'uiToolShowcase',\n 'AUTO': 'AUTO'\n} as const;\n\nexport const ModelConfig = {\n [ModelType.Claude_Opus_4_6]: {\n name: 'Claude Opus 4.6',\n description: 'Modelo mais avançado da anthropic, no entanto, não tão rápido como o Sonnet',\n icon: AllInclusiveIcon,\n contextWindow: '1M tokens',\n speed: 'Moderate',\n quality: 'Highest'\n },\n [ModelType.Claude_Sonnet_4_6]: {\n name: 'Claude Sonnet 4.6',\n description: 'Ótima relação velocidade/qualidade',\n icon: AllInclusiveIcon,\n contextWindow: '1M tokens',\n speed: 'Fast',\n quality: 'High'\n },\n [ModelType.gemini_3_1_pro_preview]: {\n name: 'Gemini 3.1 Pro',\n description: 'Modelo mais avançado\\nMelhor qualidade para tarefas complexas\\nContexto: 2M tokens',\n icon: PsychologyIcon,\n contextWindow: '2M tokens',\n speed: 'Moderate',\n quality: 'Highest'\n },\n [ModelType.gemini_3_5_flash]: {\n name: 'Gemini 3.5 Flash',\n description: 'Equilibrio ideal entre velocidade e qualidade\\nÓtimo para a maioria das tarefas\\nContexto: 1M tokens',\n icon: FlashOnIcon,\n contextWindow: '1M tokens',\n speed: 'Fast',\n quality: 'High'\n },\n [ModelType.gemini_3_1_flash_lite_preview]: {\n name: 'Gemini 3 Lite Flash',\n description: 'NOVO: Equilibrio ideal entre velocidade e qualidade\\nÓtimo para a maioria das tarefas\\nContexto: 1M tokens',\n icon: FlashOnIcon,\n contextWindow: '1M tokens',\n speed: 'Fast',\n quality: 'High'\n },\n\n [ModelType.Gpt_5_1]: {\n name: 'Chat GPT 5.1',\n description: 'Chat GPT 5.1',\n icon: RocketLaunchIcon,\n contextWindow: '200k tokens',\n speed: 'Good',\n quality: 'High'\n },\n [ModelType.Gpt_5_2]: {\n name: 'Chat GPT 5.2',\n description: 'Chat GPT 5.2',\n icon: RocketLaunchIcon,\n contextWindow: '200k tokens',\n speed: 'Good',\n quality: 'Highest'\n },\n [ModelType.Gpt_5_5]: {\n name: 'Chat GPT 5.5',\n description: 'A melhor inteligência em escala para fluxos de trabalho de agentes, codificação e profissionais.',\n icon: RocketLaunchIcon,\n contextWindow: '200k tokens',\n speed: 'Good',\n quality: 'Highest'\n },\n [ModelType.Gpt_5_4_mini]: {\n name: 'Chat GPT 5.4 Mini',\n description: 'Modelo compacto mais robusto da OpenAi até momento para codificação, uso de computadores e subagentes.',\n icon: RocketLaunchIcon,\n contextWindow: '200k tokens',\n speed: 'Fast',\n quality: 'Highest'\n },\n [ModelType[\"Glm-5_2\"]]: {\n name: 'Z.ai Glm-5',\n description: 'Modelo open weights bem competente da Z.Ai. Apesar de gerar respostas mais longas o modelo é muito capaz.',\n icon: SortByAlphaOutlined,\n contextWindow: '200k tokens',\n speed: 'Good',\n quality: 'Highest'\n },\n [ModelType[\"Glm_4.7\"]]: {\n name: 'Z.ai Glm-4.7',\n description: '',\n icon: SortByAlphaOutlined,\n contextWindow: '200k tokens',\n speed: 'Fast',\n quality: 'High'\n },\n [ModelType[\"Glm_4.7_flash\"]]: {\n name: 'Z.ai Glm-4.7',\n description: '',\n icon: SortByAlphaOutlined,\n contextWindow: '200k tokens',\n speed: 'Good',\n quality: 'High'\n },\n [ModelType.DeepSeek_v4_Pro]: {\n name: 'DeepSeek Reasoner',\n description: 'Modelo da DeepSeek com modo de raciocínio profundo (thinking mode).\\nIdeal para tarefas complexas que se beneficiam de cadeia de pensamento extensa.',\n icon: PsychologyIcon,\n contextWindow: '128k tokens',\n speed: 'Moderate',\n quality: 'Highest'\n },\n [ModelType[\"DeepSeek_v4-Flash\"]]: {\n name: 'DeepSeek Chat',\n description: 'Modelo de chat rápido da DeepSeek, sem modo de raciocínio.\\nÓtimo equilíbrio entre velocidade e qualidade para uso geral.',\n icon: FlashOnIcon,\n contextWindow: '128k tokens',\n speed: 'Fast',\n quality: 'High'\n },\n [ModelType.Kimi_K26]: {\n name: 'Kimi K2.6 Pro',\n description: 'Modelo híbrido da Moonshot com modo de raciocínio (thinking) ativado por padrão.\\nMelhor capacidade da família K2 para tarefas complexas.',\n icon: PsychologyIcon,\n contextWindow: '256k tokens',\n speed: 'Moderate',\n quality: 'Highest'\n },\n [ModelType.Kimi_Turbo]: {\n name: 'Kimi K2 Turbo',\n description: 'Variante rápida (não-thinking) da Moonshot.\\nÓtima relação velocidade/qualidade para uso geral.',\n icon: FlashOnIcon,\n contextWindow: '256k tokens',\n speed: 'Fast',\n quality: 'High'\n },\n [ModelType[\"Qwen3_6-plus\"]]: {\n name: 'Qwen 3.6 Plus - Alibaba',\n description: 'Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva',\n icon: FlashOnIcon,\n contextWindow: '1 milhão',\n speed: 'Moderate',\n quality: 'Highest'\n },\n [ModelType[\"Qwen3_7-max\"]]: {\n name: 'Qwen 3.7 Max - Alibaba',\n description: 'Multimodal nativo, context window - 1 milhão de tokens, codificação agentiva',\n icon: FlashOnIcon,\n contextWindow: '1 milhão',\n speed: 'Moderate',\n quality: 'Highest'\n },\n [ModelType.uiToolShowcase]: {\n name: 'UiToolShowcase - Testing',\n description: 'Cria um stream de testes.',\n icon: GeneratingTokensOutlined,\n contextWindow: '256k tokens',\n speed: 'Fast',\n quality: 'High'\n }\n\n} as const;\n\nexport type ModelVendor = 'Google' | 'Anthropic' | 'OpenAI' | 'ZhiPu' | 'Moonshot' | 'DeepSeek' | 'Unknown';\n\nexport function getModelVendor(modelId: string | undefined): ModelVendor {\n if (!modelId) return 'Unknown';\n const id = modelId.toLowerCase();\n if (id.startsWith('gemini') || id.startsWith('live')) return 'Google';\n if (id.startsWith('claude')) return 'Anthropic';\n if (id.startsWith('gpt')) return 'OpenAI';\n if (id.startsWith('glm')) return 'ZhiPu';\n if (id.startsWith('kimi')) return 'Moonshot';\n if (id.startsWith('deepseek')) return 'DeepSeek';\n if (id === 'auto') return 'Unknown';\n return 'Unknown';\n}\n\nexport const getConnectionStateColor = (connectionState: ConnectionState, theme: Theme) => {\n switch (connectionState) {\n case 'Connected':\n return theme.palette.primary.light;\n case 'Paused':\n return theme.palette.warning.light;\n case 'Disconnected':\n return theme.palette.text.secondary;\n case 'Connecting':\n return theme.palette.success.dark;\n case 'Unknown':\n return theme.palette.text.secondary;\n default:\n return theme.palette.text.secondary;\n }\n};","import { getRandomUUID } from '@lib/utils/envUtils';\nimport type { FunctionDetails, CodeExecutionResultDetails, ExecutableCodeDetails, ThoughtDetails, ErrorDetails, TextDetails, ToolEventDetails } from \"./ServerEvent\";\nimport { EventType } from \"./enums\";\n\nexport interface InteractionPart {\n id: string;\n eventType: EventType;\n author: string,\n functionDetails?: FunctionDetails;\n codeExecutionResultDetails?: CodeExecutionResultDetails;\n executableCodeDetails?: ExecutableCodeDetails;\n thoughtDetails?: ThoughtDetails;\n toolDetails?: ToolEventDetails,\n textDetails?: TextDetails;\n errorDetails?: ErrorDetails;\n visible?: boolean;\n created: Date;\n ended?: Date;\n text?: string;\n hasTask?: boolean;\n rawDetails?: any;\n\n partial: boolean;\n\n /** @deprecated Write-only; nothing reads it. Kept optional so hosts' fixtures still compile. Goes in 0.5. */\n textLastChunk?: string;\n /** @deprecated Write-only; nothing reads it. Kept optional so hosts' fixtures still compile. Goes in 0.5. */\n isStillWriting?: boolean;\n\n //Helper properties (decided client-side in InteractionPartUtils.FlatParts — the server has no such concept)\n mustPush: boolean;\n textAppendable: boolean;\n waitingDetails?: {\n stopPoint?: Date;\n addTimer: boolean;\n isTimerRunning: boolean;\n status: string;\n startingPoint: Date\n loadDots?: boolean\n }\n}\n\n\nexport class InteractionPartUtils {\n static replaceFirstTwoTabsPerLine(value?: any): string {\n const regex = /^\\s{15}/gm;\n return typeof (value) === \"string\" ? value.replaceAll(regex, (match) => match.substring(15)) : value ?? \"\";\n }\n\n static jsonToString(json: any): string {\n if (json == null) return \"\";\n if (typeof json !== \"object\") return String(json);\n\n const charCollapsed = Array.isArray(json)\n ? (InteractionPartUtils.isCharArray(json) ? json.join(\"\") : null)\n : InteractionPartUtils.tryCollapseCharIndexedObject(json);\n if (charCollapsed != null) return charCollapsed;\n\n if (Array.isArray(json)) {\n try { return JSON.stringify(json, null, 2); }\n catch { return String(json); }\n }\n\n const objectProps = Object.keys(json);\n const textReponseLines: string[] = [];\n objectProps.forEach((prop: string) => {\n let value = json[prop];\n if (typeof value === 'object') {\n value = JSON.stringify(json[prop], null, 2);\n }\n const startChart = value?.toString().indexOf(\"\\n\") > -1 ? \"\\n\" : \"\";\n textReponseLines.push(`${prop}:${startChart}${value}`);\n });\n return textReponseLines.join(\"\\n\");\n }\n\n static functionDetailsToString(obj: any | undefined): string {\n if (obj == null) return \"\";\n if (typeof obj == \"string\") {\n obj = obj.replaceAll(\"\\\"{\", \"{\").replaceAll(\"}\\\"\", \"}\").replaceAll(\"'{\", \"{\").replaceAll(\"}'\", \"}\")\n obj = obj.replaceAll(\"\\\\\\\"\", \"\\\"\");\n try {\n obj = JSON.parse(obj)\n }\n catch {\n return obj;\n }\n if (typeof obj !== \"object\" || obj == null) return String(obj);\n }\n if (Array.isArray(obj)) {\n try { return JSON.stringify(obj, null, 2); }\n catch { return String(obj); }\n }\n\n const objectProps = Object.keys(obj);\n const textReponseLines: string[] = [];\n objectProps.forEach((prop: string) => {\n let value = obj?.[prop];\n if (typeof value === 'object') {\n value = JSON.stringify(value, null, 2);\n }\n const startChar = value?.toString().indexOf(\"\\n\") > -1 ? \"\\n\" : \"\";\n textReponseLines.push(`${prop}:${startChar}${value}`);\n });\n return textReponseLines.join(\"\\n\");\n }\n\n /**\n * Reads the server-generated SlotId from a UI render tool's result. The\n * result reaches the client as a plain object on the live path, but as a\n * JSON string — sometimes double-encoded (a JSON string of a JSON string) —\n * on the persisted / session-replay path. Unwrap up to two string layers\n * before reading the field. Returns undefined when absent or unparseable.\n */\n static uiSlotId(part?: InteractionPart): string | undefined {\n let r: unknown = part?.functionDetails?.response;\n for (let i = 0; i < 2 && typeof r === \"string\"; i++) {\n try { r = JSON.parse(r); } catch { return undefined; }\n }\n if (!r || typeof r !== \"object\") return undefined;\n const o = r as Record<string, unknown>;\n const v = o.SlotId ?? o.slotId;\n return typeof v === \"string\" ? v : undefined;\n }\n\n static fromError(errorMsg: string) {\n const errorPart: InteractionPart = {\n errorDetails: { errorMessage: errorMsg },\n eventType: EventType.ServerError,\n id: '',\n author: 'main',\n created: new Date(),\n partial: false,\n mustPush: false,\n textAppendable: false\n }\n return errorPart;\n }\n\n static fromText(text: string, author?: string, id?: string): InteractionPart {\n const textPart: InteractionPart = {\n text: text,\n eventType: EventType.Text,\n id: id ?? getRandomUUID(),\n created: new Date(),\n author: author ?? \"main\",\n partial: false,\n mustPush: false,\n textAppendable: false\n }\n return textPart;\n }\n\n /**\n * Builds the user-authored UI part for a `sendMessage(text, { ui })` turn. Mirrors the\n * shape `ServerEvent` produces from a persisted `UserUiContent` on reload, so the live\n * and replayed parts are identical: an `EventType.UserAnswer` carrying functionDetails\n * {name, args, isUi, status:'Done'} that routes through the uiTool dispatcher/registry.\n */\n static fromUserUi(name: string, args?: string, id?: string): InteractionPart {\n return {\n id: id ?? getRandomUUID(),\n eventType: EventType.UserAnswer,\n author: 'user',\n created: new Date(),\n partial: false,\n mustPush: false,\n textAppendable: false,\n functionDetails: {\n id: '',\n name: name,\n args: args,\n status: 'Done',\n isUi: true,\n },\n };\n }\n\n static createWaiting(addTimer: boolean = false, isTimerRunning: boolean = true, status: string, startingPoint: Date, stopPoint?: Date): InteractionPart {\n if (!status)\n status = \"Waiting\";\n const partData = InteractionPartUtils.fromText(\"...\", undefined, \"waitingpart\");\n partData.eventType = EventType.Waiting;\n partData.waitingDetails = {\n startingPoint: startingPoint,\n addTimer: addTimer,\n isTimerRunning: isTimerRunning,\n status: status,\n stopPoint: stopPoint\n }\n return partData;\n }\n\n static createSuspended(): InteractionPart {\n const partData = InteractionPartUtils.fromText(\"SUSPEND\")\n partData.eventType = EventType.Suspended;\n return partData;\n }\n\n static getPartTextContent(part: InteractionPart): string {\n return part.text ?? \"\";\n }\n\n static FlatParts(parts: InteractionPart[]): InteractionPart | undefined {\n if (parts.length === 0)\n return undefined;\n\n const textParts = parts.filter((p) => p.eventType == EventType.Text);\n const onlyPart = textParts.length > 0 ? textParts[0] : parts[0];\n const unique_event_types: EventType[] = [... new Set(parts.map((p) => p.eventType))];\n\n if (unique_event_types.length == 1) {\n onlyPart.eventType = unique_event_types[0]\n }\n else {\n if (textParts.length > 0) {\n onlyPart.eventType = EventType.Text\n }\n }\n\n onlyPart.mustPush = !(onlyPart.eventType == EventType.Text || onlyPart.eventType == EventType.Thought || onlyPart.eventType == EventType.NotDefined || onlyPart.eventType == EventType.PartialFunctionCall);\n onlyPart.textAppendable = onlyPart.eventType == EventType.Text || onlyPart.eventType == EventType.Thought || onlyPart.eventType == EventType.PartialFunctionCall;\n\n for (const part of parts) {\n if (!onlyPart.codeExecutionResultDetails && part.codeExecutionResultDetails)\n onlyPart.codeExecutionResultDetails = part.codeExecutionResultDetails;\n if (!onlyPart.errorDetails && part.errorDetails)\n onlyPart.errorDetails = part.errorDetails;\n if (!onlyPart.executableCodeDetails && part.executableCodeDetails)\n onlyPart.executableCodeDetails = part.executableCodeDetails;\n if (!onlyPart.functionDetails && part.functionDetails)\n onlyPart.functionDetails = part.functionDetails;\n // A streaming FINAL call/result event carries two reps of the same call: the collapsed\n // FunctionCall/Result (content.items) buries isUi/askUserComponent/clientOutput in `__`-args\n // — and a NO-ARG tool's don't survive decode — while the StreamingFinal* sibling\n // (streamingParts) carries them TOP-LEVEL. Fold those signals in from whichever sibling has\n // them, so collapsing to one part can't drop them (else a parked no-arg ask-user tool like\n // update_profile loses askUserComponent and its drawer never surfaces).\n if (onlyPart.functionDetails && part.functionDetails && part !== onlyPart) {\n const od = onlyPart.functionDetails, pd = part.functionDetails;\n if (!od.askUserComponent && pd.askUserComponent) od.askUserComponent = pd.askUserComponent;\n if (!od.isUi && pd.isUi) od.isUi = true;\n if (!od.clientOutput && pd.clientOutput) od.clientOutput = pd.clientOutput;\n od.isAskUser = od.isAskUser || pd.isAskUser || !!od.askUserComponent;\n }\n if (!onlyPart.rawDetails && part.rawDetails)\n onlyPart.rawDetails = part.rawDetails;\n if (!onlyPart.thoughtDetails && part.thoughtDetails)\n onlyPart.thoughtDetails = part.thoughtDetails;\n if (!onlyPart.errorDetails && part.errorDetails)\n onlyPart.errorDetails = part.errorDetails;\n }\n\n return onlyPart;\n }\n\n static isCharArray(value: any): value is string[] {\n return Array.isArray(value)\n && value.length > 0\n && value.every((item: any) => typeof item === \"string\" && item.length === 1);\n }\n\n /**\n * Detects objects like `{0: \"a\", 1: \"b\", 2: \"c\", ...}` — a string that was\n * spread/indexed into an object (e.g. `{...someString}` or the server\n * serializing a string as a char-indexed dict). Returns the reassembled\n * string, or `null` if the value doesn't match this pattern.\n */\n static tryCollapseCharIndexedObject(value: any): string | null {\n if (value == null || typeof value !== \"object\" || Array.isArray(value)) return null;\n const keys = Object.keys(value);\n if (keys.length === 0) return null;\n\n for (let i = 0; i < keys.length; i++) {\n if (keys[i] !== String(i)) return null;\n const v = value[keys[i]];\n if (typeof v !== \"string\" || v.length !== 1) return null;\n }\n\n return keys.map(k => value[k]).join(\"\");\n }\n\n static isCodeExecution(part: InteractionPart): boolean {\n return part.eventType === EventType.CodeExecutionResult ||\n part.eventType === EventType.ExecutableCode;\n }\n}","import './init'; // MUST be first - loads reflect-metadata\nimport { jsonObject, jsonMember, jsonArrayMember, AnyT } from 'typedjson';\nimport { type Artifact } from '../../models/Artifact'\n\n// // Enums\nexport type PartType = 'ToolEventContent' | 'StreamingToolEventContent' | 'TextContent' | 'StreamingFinalFunctionCallContent' | 'StreamingFinalFunctionResultContent' | 'StreamingClientOutputContent' | 'StreamingReasoningContent' | 'StreamingThoughtHighlightContent' | 'ImageContent' | 'FunctionCallContent' | 'FunctionResultContent' | 'FunctionClientOutputContent' | 'UserUiContent' | 'ChatMessageContent' | 'StreamingTextContent' | 'StreamingFunctionCallUpdateContent' | 'Unknown';\nexport const PartType = {\n // KernelContent derived types\n TextContent: \"TextContent\",\n ToolEventContent: \"ToolEventContent\",\n StreamingToolEventContent: \"StreamingToolEventContent\",\n StreamingReasoningContent: \"StreamingReasoningContent\",\n StreamingThoughtHighlightContent: \"StreamingThoughtHighlightContent\",\n ImageContent: \"ImageContent\",\n FunctionCallContent: \"FunctionCallContent\",\n FunctionResultContent: \"FunctionResultContent\",\n FunctionClientOutputContent: \"FunctionClientOutputContent\",\n UserUiContent: \"UserUiContent\",\n ChatMessageContent: \"ChatMessageContent\",\n // StreamingKernelContent derived types\n StreamingTextContent: \"StreamingTextContent\",\n StreamingFunctionCallUpdateContent: \"StreamingFunctionCallUpdateContent\",\n StreamingFinalFunctionCallContent: \"StreamingFinalFunctionCallContent\",\n StreamingFinalFunctionResultContent: \"StreamingFinalFunctionResultContent\",\n StreamingClientOutputContent: \"StreamingClientOutputContent\"\n\n} as const;\n\n@jsonObject({ name: 'AuthorRole' })\nexport class AuthorRole {\n\n @jsonMember(String)\n label?: string;\n}\n\nexport enum Commands {\n OpenStream = 'OpenStream',\n CloseStream = 'CloseStream',\n Ignore = 'Ignore',\n}\n\n// Supporting Classes\n@jsonObject({ name: 'EventTypeInformation' })\nexport class EventTypeInformation {\n @jsonMember(String)\n type?: string;\n\n @jsonMember(String)\n fullName?: string;\n}\n\n@jsonObject({ name: 'LlmArtifact' })\nexport class LlmArtifact {\n @jsonMember(String)\n id!: string;\n\n @jsonMember(String)\n name?: string;\n\n @jsonMember(String)\n mimeType?: string;\n\n @jsonMember(String)\n description?: string;\n\n toArtifact(): Artifact {\n return {\n created: new Date(),\n updatedAt: new Date(),\n name: this.name ?? 'Not Defined',\n description: this.description,\n mimeType: this.mimeType,\n id: this.id\n }\n }\n}\n\n@jsonObject({ name: 'KernelContent' })\nexport abstract class KernelContent {\n @jsonMember(String)\n mimeType?: string;\n\n // InnerContent is ignored (JsonIgnore in C#)\n // Not decorated with @jsonMember\n innerContent?: any;\n\n @jsonMember(String)\n modelId?: string;\n\n // Decorated so subtypes deserialize it (mirrors StreamingKernelContent.metadata). A tool's\n // client-only payload rides here when the runtime collapses StreamingFinalFunctionResultContent →\n // the sealed FunctionResultContent (see ToKernelContent); the decoder reads `metadata.clientOutput`.\n @jsonMember(AnyT)\n metadata?: Record<string, any> | null;\n}\n\n\n// StreamingKernelContent Base Class (Abstract)\n@jsonObject({ name: 'StreamingKernelContent' })\nexport abstract class StreamingKernelContent {\n @jsonMember(Number)\n choiceIndex: number = 0;\n\n // InnerContent is ignored (JsonIgnore in C#)\n // Not decorated with @jsonMember\n innerContent?: any;\n\n @jsonMember(String)\n modelId?: string;\n\n @jsonMember(Object)\n metadata?: Record<string, any>;\n}\n\n\n// TextContent\n@jsonObject({ name: 'TextContent' })\nexport class TextContent extends KernelContent {\n\n @jsonMember(String)\n text?: string;\n\n // Encoding is ignored (JsonIgnore in C#)\n // Not decorated with @jsonMember\n encoding?: string;\n\n constructor() {\n super();\n this.encoding = 'UTF8';\n }\n\n toString(): string {\n return this.text ?? '';\n }\n}\n\n@jsonObject({ name: 'StreamingToolEventContent' })\nexport class StreamingToolEventContent extends StreamingKernelContent {\n\n @jsonMember(String)\n eventName?: string;\n\n @jsonMember(String)\n eventData?: string;\n\n @jsonMember(String)\n sessionId?: string;\n\n constructor() {\n super();\n }\n}\n\n// TextContent\n@jsonObject({ name: 'ToolEventContent' })\nexport class ToolEventContent extends KernelContent {\n\n @jsonMember(String)\n eventName?: string;\n\n @jsonMember(String)\n eventData?: string;\n\n @jsonMember(String)\n sessionId?: string;\n\n constructor() {\n super();\n }\n}\n\n// ImageContent (referenced but not fully defined in original)\n@jsonObject({ name: 'ImageContent' })\nexport class ImageContent extends KernelContent {\n @jsonMember(String)\n url?: string;\n\n @jsonMember(String)\n dataUri?: string;\n}\n\n// FunctionCallContent\n@jsonObject({ name: 'FunctionCallContent' })\nexport class FunctionCallContent extends KernelContent {\n @jsonMember(String)\n id?: string;\n\n @jsonMember(String)\n pluginName?: string;\n\n @jsonMember(String)\n functionName!: string;\n\n @jsonMember(AnyT)\n arguments?: any;\n\n // Exception is not serializable - omit jsonMember decorator\n exception?: Error;\n}\n\n// The client-render hints for a tool call/result — one value object carried by the streaming final\n// types (server: ToolCallPresentation). Live wire is camelCase (these member names); on the reload\n// path it rides raw inside FunctionCall/Result `metadata[\"aia:presentation\"]` with PascalCase keys,\n// which ServerEvent reads case-insensitively.\n// ⚠️ EVERY field the server sends must be declared here. TypedJSON copies only declared members, so an\n// undeclared one is silently DROPPED on the live wire — it survives only on the reload path, where\n// ServerEvent reads the raw metadata object instead. That asymmetry is invisible until a flag that matters\n// only live stops arriving, which is exactly how `parked` shipped broken.\n@jsonObject({ name: 'ToolCallPresentation' })\nexport class ToolCallPresentation {\n @jsonMember(Boolean)\n isUi?: boolean;\n\n @jsonMember(String)\n askUserComponent?: string;\n\n @jsonMember(String)\n argsDescription?: string;\n\n // Runtime override on a RESULT: the UI tool called CancelUiRender() and must not be drawn.\n @jsonMember(Boolean)\n cancelUi?: boolean;\n\n // The PARK signal on a StreamingClientOutputContent: the tool is now waiting on a human, which is what\n // licenses the ask-user drawer to open.\n @jsonMember(Boolean)\n parked?: boolean;\n}\n\n// The metadata key the presentation rides under on a collapsed (persisted) FunctionCall/Result.\nexport const PresentationMetadataKey = 'aia:presentation';\n\n// MUST extend StreamingKernelContent (NOT FunctionCallContent): on the server this is a\n// StreamingKernelContent (StreamingFunctionCallUpdateContent), and it arrives in `streamingParts`\n// (StreamingKernelContent[]). TypedJSON only resolves a polymorphic $type to a subtype of the\n// declared element type — extending FunctionCallContent made it unresolvable there, so it fell\n// back to base StreamingKernelContent. Wire fields mirror StreamingFunctionCallUpdateContent\n// (callId / name / arguments) plus the presentation object.\n@jsonObject({ name: 'StreamingFinalFunctionCallContent' })\nexport class StreamingFinalFunctionCallContent extends StreamingKernelContent {\n @jsonMember(String, { name: \"callId\" })\n id?: string;\n\n @jsonMember(String, { name: \"name\" })\n functionName?: string;\n\n @jsonMember(String)\n arguments?: string;\n\n // Client-render hints (isUi / askUserComponent / argsDescription) as one object.\n @jsonMember(ToolCallPresentation)\n presentation?: ToolCallPresentation;\n}\n\n// FunctionResultContent\n@jsonObject({ name: 'FunctionResultContent' })\nexport class FunctionResultContent extends KernelContent {\n @jsonMember(String, { name: \"callId\" })\n id?: string;\n\n @jsonMember(String)\n pluginName?: string;\n\n @jsonMember(String)\n functionName?: string;\n\n @jsonMember(AnyT)\n result?: any;\n}\n\n// See StreamingFinalFunctionCallContent: must extend StreamingKernelContent so it resolves\n// inside `streamingParts`. Wire fields per the server-side StreamingFinalFunctionResultContent\n// (callId / pluginName / functionName / result / presentation / clientOutput).\n@jsonObject({ name: 'StreamingFinalFunctionResultContent' })\nexport class StreamingFinalFunctionResultContent extends StreamingKernelContent {\n @jsonMember(String, { name: \"callId\" })\n id?: string;\n\n @jsonMember(String)\n pluginName?: string;\n\n @jsonMember(String)\n functionName?: string;\n\n @jsonMember(AnyT)\n result?: any;\n\n // Client-render hints (isUi / askUserComponent) as one object.\n @jsonMember(ToolCallPresentation)\n presentation?: ToolCallPresentation;\n\n // Client-only payload the tool wrote via CallContext.SetClientData (a live object, camelCase +\n // string enums — shaped server-side, delivered in-line, NOT a JSON string), correlated to this\n // result by callId. Rides this result event live — never the model-facing `result`; the durable\n // replay form is FunctionClientOutputContent. Kept separate from `presentation` (a data payload,\n // not a render hint).\n @jsonMember(AnyT)\n clientOutput?: any;\n}\n\n// Persisted, client-only sibling carrying a tool's ToolClientOutput payload on the Tool message\n// (server-side FunctionClientOutputContent : IClientOnlyContent — stripped from the model request,\n// kept for replay). Correlated to its result by callId; folded into the call part on session reload.\n@jsonObject({ name: 'FunctionClientOutputContent' })\nexport class FunctionClientOutputContent extends KernelContent {\n @jsonMember(String, { name: \"callId\" })\n id?: string;\n\n // A live object (camelCase + string enums), delivered in-line by the server — NOT a JSON string.\n @jsonMember(AnyT)\n data?: any;\n}\n\n// Non-terminal, client-only payload pushed WHILE an ask-user tool is parked (server-side\n// StreamingClientOutputContent, from RegisterHumanInput(callId, initialClientOutput) — issue #60). Unlike\n// the result-event clientOutput, it carries no result and does NOT close the call: it is folded onto the\n// parked call part by callId so the ask-user component renders pre-filled, leaving the call Executing until\n// the real answer arrives. The LLM never sees it.\n@jsonObject({ name: 'StreamingClientOutputContent' })\nexport class StreamingClientOutputContent extends StreamingKernelContent {\n @jsonMember(String, { name: \"callId\" })\n id?: string;\n\n // A live object (camelCase + string enums), delivered in-line by the server — NOT a JSON string.\n // NULL/absent is legitimate: a tool that parks with no prefill still sends this content, because the\n // event's other job is to announce the PARK.\n @jsonMember(AnyT)\n clientOutput?: any;\n\n // Carries `parked` — the signal that this call is now waiting on a human, and therefore the only thing\n // that licenses the ask-user drawer. MUST be declared: TypedJSON drops undeclared members, so without\n // this the server's flag reached the socket and was thrown away one layer above it.\n @jsonMember(ToolCallPresentation)\n presentation?: ToolCallPresentation;\n}\n\n// Persisted, client-only sibling carrying a host UI representation for a USER turn\n// (server-side UserUiContent : IClientOnlyContent — stripped from the model request, kept for\n// replay). `name` selects a client-registered uiTool renderer; `args` is its serialized props\n// (JSON string). The live turn injects the same {name,args} as a UserAnswer part client-side;\n// this is the durable form that re-hydrates the component on session reload.\n@jsonObject({ name: 'UserUiContent' })\nexport class UserUiContent extends KernelContent {\n @jsonMember(String)\n name?: string;\n\n @jsonMember(String)\n args?: string;\n}\n\n// ChatMessageContent - defined before LlmEvent to avoid forward reference\n@jsonObject({ name: 'ChatMessageContent' })\nexport class ChatMessageContent extends KernelContent {\n @jsonMember(AuthorRole)\n role?: AuthorRole;\n\n @jsonArrayMember(() => KernelContent)\n items?: KernelContent[];\n}\n\n// StreamingFunctionCallUpdateContent\n@jsonObject({ name: 'StreamingFunctionCallUpdateContent' })\nexport class StreamingFunctionCallUpdateContent extends StreamingKernelContent {\n @jsonMember(String)\n callId?: string;\n\n @jsonMember(String)\n name?: string;\n\n @jsonMember(String)\n arguments?: string;\n\n @jsonMember(Number)\n functionCallIndex: number = 0;\n}\n\n// StreamingTextContent\n@jsonObject({ name: 'StreamingTextContent' })\nexport class StreamingTextContent extends StreamingKernelContent {\n @jsonMember(String)\n text?: string;\n\n // Encoding is not explicitly serialized in C#\n // Not decorated with @jsonMember\n encoding?: string;\n}\n\n@jsonObject({ name: 'StreamingReasoningContent' })\nexport class StreamingReasoningContent extends StreamingKernelContent {\n @jsonMember(String)\n text?: string;\n\n // Encoding is not explicitly serialized in C#\n // Not decorated with @jsonMember\n encoding?: string;\n}\n\n/**\n * A highlight of the model's reasoning — one short line saying what a reasoning paragraph does — produced by the\n * agents server while the reasoning streams. It belongs to the reasoning, so it is a streaming part of its own (the\n * SDK's StreamingThoughtHighlightContent), never a tool event.\n */\n@jsonObject({ name: 'StreamingThoughtHighlightContent' })\nexport class StreamingThoughtHighlightContent extends StreamingKernelContent {\n @jsonMember(String)\n headline?: string;\n}\n\n// InstructionSummary - defined before SessionInformation\n@jsonObject({ name: 'InstructionSummary' })\nexport class InstructionSummary {\n @jsonMember(String)\n instructionCategory: string = \"\"\n\n @jsonMember(String)\n description: string = \"\"\n\n @jsonMember(String)\n interactionId: string = \"\"\n}\n\n// SessionInformation - defined before LlmEvent to avoid forward reference\n@jsonObject({ name: 'SessionInformation' })\nexport class SessionInformation {\n @jsonMember(Number)\n size: number = 0\n\n @jsonMember(Number)\n originalSize: number = 0\n\n @jsonMember(Number)\n ratio: number = 0\n\n @jsonMember(Number)\n previousRatio: number = 0\n\n @jsonMember(Number)\n threshold: number = 0\n\n @jsonMember(Number)\n maxSize: number = 0\n\n @jsonMember(String)\n id?: string\n\n @jsonArrayMember(InstructionSummary)\n instructionSummaries?: InstructionSummary[] = []\n\n // ── Present only on a COMPRESSION event ──────────────────────────────────\n // The server sends SessionCompressionInformation (a subclass) as this same\n // `session_information` field when a compression step runs in-band, so these\n // arrive filled and are absent on every ordinary turn. Declared here rather\n // than as a second model because the wire has one field, and a subclass\n // TypedJSON never sees would silently drop the numbers.\n //\n // ⚠️ In-band means the LEGACY trim and the planner's own events. The\n // summarizing compactor runs DETACHED (out of band, on the run bus), so its\n // pass produces no event here at all — which is why the panel infers a\n // compaction from a drop in `size` instead of waiting for these. They are the\n // richer signal when they do arrive, not the only one.\n @jsonMember(Number)\n interactionsCompressed?: number\n\n @jsonMember(Number)\n interactionsRemoved?: number\n\n @jsonMember(Number)\n compressionRatio?: number\n\n @jsonMember(Number)\n newOverallCount?: number\n}\n\n// Main Event Class\n@jsonObject({ name: 'LlmEvent' })\nexport class LlmEvent {\n\n @jsonMember(Number)\n timestamp!: number;\n\n @jsonMember(String)\n mimeType!: string;\n\n @jsonMember(Boolean)\n partial!: boolean;\n\n @jsonMember(Boolean)\n turnComplete!: boolean;\n\n @jsonMember(Boolean)\n visible!: boolean;\n\n @jsonMember(String)\n serverError?: string;\n\n @jsonMember(String)\n interactionId!: string;\n\n @jsonMember(SessionInformation)\n sessionInformation?: SessionInformation;\n\n @jsonMember(EventTypeInformation)\n eventType?: EventTypeInformation;\n\n @jsonArrayMember(LlmArtifact)\n artifactsGenerated: LlmArtifact[] = [];\n\n @jsonMember(String)\n author?: string;\n\n @jsonMember(AuthorRole)\n role?: AuthorRole;\n\n @jsonMember(String)\n command?: Commands;\n\n @jsonMember(ChatMessageContent)\n content?: ChatMessageContent;\n\n @jsonArrayMember(() => StreamingKernelContent)\n streamingParts?: StreamingKernelContent[];\n\n subAgentId?: string;\n subAgentName?: string;\n text?: string;\n}\n\n@jsonObject({ name: 'PartialLlmEvent' })\nexport class PartialLlmEvent {\n\n @jsonMember(Number, { name: \"ts\" })\n timeStamp?: number;\n\n @jsonMember(String, { name: \"pt\" })\n partialText?: string;\n\n @jsonMember(String, { name: \"pr\" })\n partialReasoning?: string;\n\n @jsonMember(String, { name: \"fn\" })\n functionName?: string;\n\n @jsonArrayMember(() => StreamingKernelContent)\n streamingParts?: StreamingKernelContent[];\n\n @jsonMember(String, { name: \"fid\" })\n functionCallId?: string;\n\n @jsonMember(String, { name: \"tp\" })\n type?: string;\n\n @jsonMember(String, { name: \"itid\" })\n iteractionId?: string;\n\n @jsonMember(EventTypeInformation)\n partialEventType?: EventTypeInformation;\n\n @jsonMember(String, { name: \"said\" })\n subAgentId?: string;\n}\n\n\n@jsonObject({ name: 'StreamingResponse' })\nexport class StreamingResponse {\n\n @jsonMember(String)\n type!: string;\n\n @jsonMember(LlmEvent)\n event?: LlmEvent;\n\n @jsonMember(String)\n sessionId?: string;\n\n /**\n * Optional. Server piggybacks a freshly minted JWT on the next few Pong frames\n * after a WS upgrade where it auto-refreshed the token (inbound was expired or\n * near expiry). The client mirrors this into the stored user record so the\n * global fetch interceptor stops sending the stale token.\n */\n @jsonMember(String)\n accessToken?: string;\n\n @jsonMember(PartialLlmEvent, { name: \"pe\" })\n partialEvent?: PartialLlmEvent;\n\n @jsonMember(String)\n subAgentId?: string;\n\n @jsonMember(String)\n subAgentName?: string;\n\n /**\n * Server-assigned monotonic sequence number for events emitted by an InteractionRun.\n * Tracked client-side as `lastSeq` so reconnects can resume mid-stream via\n * `?lastSeq=N` on the WebSocket URL. Absent on control messages (Pong / Suspended)\n * and on RewindLost notices that carry the new starting seq directly.\n */\n @jsonMember(Number)\n seq?: number;\n}\n\n@jsonObject({ name: 'Payload' })\nexport class Payload {\n\n @jsonArrayMember(LlmEvent)\n events!: LlmEvent[];\n}\n\nexport interface InteractionStatistics {\n eventCount: number,\n unknonwCount: number,\n unparsedCount: number,\n totalTransfered: number,\n buffer: string[],\n startTime: Date,\n elapsed: number,\n tokensPerSecond: number,\n sessionInformation?: SessionInformation\n /**\n * Every compaction observed on this connection, oldest first — what the\n * session-usage panel draws as markers. See `detectCompaction`.\n */\n sessionCompactions?: SessionCompaction[]\n}\n\n/**\n * One observed compaction: when it happened, and how much smaller the session\n * got. `ratio` is where on the usage bar it happened (the fill BEFORE it), which\n * is what makes a marker's position meaningful.\n */\nexport interface SessionCompaction {\n at: number\n ratio: number\n sizeBefore: number\n sizeAfter: number\n /** From an in-band compression event; absent for a detached pass. */\n interactionsCompressed?: number\n}\n\n","import { EventType, SkillLevel, GetEventTypeFromDotNetName } from './enums';\nimport { InteractionPartUtils, type InteractionPart } from './InteractionPart';\nimport { type EndMessageData } from './EndMessageData';\nimport { ANALYTICS_AGENT_NAME } from '@lib/utils/environmentUtils';\nimport { FunctionCallContent, FunctionClientOutputContent, FunctionResultContent, KernelContent, LlmArtifact, LlmEvent, PartType, PresentationMetadataKey, SessionInformation, StreamingClientOutputContent, StreamingFinalFunctionCallContent, StreamingFinalFunctionResultContent, StreamingFunctionCallUpdateContent, StreamingKernelContent, StreamingReasoningContent, StreamingThoughtHighlightContent, StreamingTextContent, StreamingToolEventContent, TextContent, ToolEventContent, UserUiContent } from './semanticKernelModel/models';\nimport { getRandomUUID } from '@lib/utils';\n\n/**\n * The client-render hints for a tool call/result, read from whichever shape arrived:\n * • a LIVE streaming part carries them top-level as `presentation` (camelCase), or\n * • a persisted/collapsed FunctionCall/Result carries them in `metadata[\"aia:presentation\"]`\n * (PascalCase, from the session-load serializer).\n * Fields are read case-insensitively so one mapping covers both. Replaces the old scattered\n * top-level flags + `__`-args smuggling.\n */\nfunction readPresentation(serverCall: any): { isUi: boolean; askUserComponent?: string; argsDescription?: string; cancelUi?: boolean; parked?: boolean } {\n const raw = serverCall?.presentation\n ?? (serverCall?.metadata as Record<string, unknown> | undefined)?.[PresentationMetadataKey];\n if (!raw || typeof raw !== 'object') return { isUi: false };\n const o = raw as Record<string, unknown>;\n const pick = (camel: string, pascal: string) => o[camel] ?? o[pascal];\n return {\n isUi: pick('isUi', 'IsUi') === true,\n askUserComponent: (pick('askUserComponent', 'AskUserComponent') as string | undefined) || undefined,\n argsDescription: (pick('argsDescription', 'ArgsDescription') as string | undefined) || undefined,\n // Runtime override on a RESULT: the UI tool chose not to render (CallContext.CancelUiRender).\n cancelUi: pick('cancelUi', 'CancelUi') === true || undefined,\n // Live signal on the PARK event: the tool is now waiting on a human, so the drawer may open.\n parked: pick('parked', 'Parked') === true || undefined,\n };\n}\n\nexport interface FunctionDetails {\n id: string;\n args?: any;\n text?: string;\n name: string;\n start?: Date,\n end?: Date,\n response?: any;\n status: 'Composing' | 'Executing' | 'Done';\n silent?: boolean\n /** True when this targets a [KernelUiFunction] render tool — classified as `uiTool`. */\n isUi?: boolean\n /**\n * True when this targets a [KernelUIComponent] ask-user tool — classified as `askUser` and drawn\n * in the docked ask-user drawer (AskUserSheet). Derived from {@link askUserComponent}'s presence;\n * mirrors how {@link isUi} works, replacing the legacy hard-coded ask_user/askauth name matching.\n */\n isAskUser?: boolean\n /**\n * The ask-user component to draw (the server's [KernelUIComponent] value): e.g. `\"AskUserPart\"`,\n * `\"AskAuthPart\"`, `\"AskCreateAccount\"`. Resolved against the ui-tool registry's askUser entries.\n */\n askUserComponent?: string\n /** Server-provided human one-liner describing the call args, for the tool-call chip. */\n argsDescription?: string\n /**\n * Runtime override stamped on a RESULT when a UI tool called `CallContext.CancelUiRender()`: the\n * call targets a [KernelUIComponent]/[KernelUiFunction] but the tool chose NOT to draw it (e.g. a\n * precondition already held). Sticky in the interaction merge; suppresses the ask-user drawer /\n * UI-render classification so a stale/empty prompt never lingers.\n */\n cancelUi?: boolean\n /**\n * True once the tool has actually PARKED — it called `CallContext.Ask`/`RegisterHumanInput` and is waiting\n * on a human. Arrives on the park event (`StreamingClientOutputContent`, prefill or not) and is sticky in\n * the interaction merge.\n *\n * This is what licenses the ask-user drawer. {@link askUserComponent} cannot: it rides the CALL, which is\n * streamed before the tool body runs, so it says \"this call targets a form\" and not \"this call is asking\".\n * Keying the drawer off the call meant it opened for the whole body of every UI tool — so a guard that\n * short-circuits (`ask_for_credit_card` finding a card already on file) FLASHED the drawer for as long as\n * its ProfileApi round trip took. Requiring this flag inverts the default: nothing opens until the server\n * says it is waiting.\n *\n * Live-only by design, and not persisted: it describes a moment, and a replayed session has nothing\n * waiting. The drawer is only ever computed from the live turn (`currentMessage`, reset to null on session\n * load), so there is no replay path that needs it.\n */\n parked?: boolean\n /**\n * Client-only payload the tool produced via its ToolClientOutput sink, correlated to this call\n * by id. A (possibly JSON) string off the wire — render data the LLM never saw. Arrives WITH the\n * result on the live path (StreamingFinalFunctionResultContent.clientOutput) and is folded from\n * the persisted FunctionClientOutputContent sibling on replay. Prefer this over `args` in a\n * uiTool renderer; it is only present once the call has RESPONDED.\n */\n clientOutput?: any\n}\n\nexport interface ThoughtDetails {\n text: string;\n /** The Portuguese headlines the agents server derived from this thought (reasoning-trace localization), as\n * persisted on the message (`ChatResponseMessage.ReasoningHeadlines`). Live, they arrive as tool events instead. */\n headlines?: string[];\n}\n\nexport interface ToolEventDetails {\n eventName: string;\n eventData: string;\n subAgentId?: string;\n /** Id of the session that generated the event (server-stamped). Lets consumers\n * persist event-derived state to the right session even for stale/trailing events. */\n sessionId?: string;\n}\n\nexport interface TextDetails {\n hasCodeBlock?: boolean\n version: number;\n}\n\nexport interface ErrorDetails {\n errorMessage: string;\n /**\n * The server's stack trace, when the failure came from the SDK's `Server Error` event.\n *\n * Kept apart from `errorMessage` so a renderer can show the sentence and hide the trace behind a\n * disclosure: pasting the whole thing into the transcript is how the message that matters gets lost.\n */\n stackTrace?: string;\n}\n\nexport interface ExecutableCodeDetails {\n code: string;\n language: string;\n}\n\nexport interface CodeExecutionResultDetails {\n outcome: string;\n output?: string;\n}\n\ninterface CodeExecutionResult {\n outcome: string | null\n output: string | null\n}\n\ninterface ExecutableCode {\n code: string | null\n language: string | null\n}\n\nexport class ServerEvent {\n /** The call id the SDK puts on its error sentinel (`Event.ServerErrorIdentification`). */\n static readonly SERVER_ERROR_CALL_ID = 'Server Error';\n uniqueId!: string;\n mimeType!: string;\n created!: Date;\n author: 'tool' | 'main' | 'system';\n eventType!: EventType;\n allEventTypes: EventType[] = [];\n interactionId: string;\n artifactsDelta: string[] = [];\n llmArtifacts?: LlmArtifact[] = [];\n partial!: boolean;\n turn_complete?: boolean;\n isFinalResponse?: boolean;\n interrupted?: boolean;\n model_session_id!: string;\n functionDetails?: FunctionDetails\n executableCodeDetails?: ExecutableCodeDetails;\n codeExecutionResultDetails?: CodeExecutionResultDetails;\n thoughtDefails?: ThoughtDetails;\n rawDetails?: any;\n rendered?: boolean;\n serverError?: string;\n server_session_id?: string | null;\n asyncFinalResponse?: boolean;\n agentServerBaseUrl?: string;\n parts: InteractionPart[] = [];\n endMessageData?: EndMessageData;\n command?: string;\n session_information?: SessionInformation;\n subAgentId?: string;\n subAgentName?: string;\n visible: boolean = true;\n\n constructor(interactionId: string) {\n this.interactionId = interactionId;\n this.author = \"main\";\n }\n\n public static createErrorEvent(errorMessage: string, interactionId: string) {\n const serverErrorEvent = new ServerEvent(interactionId)\n serverErrorEvent.turn_complete = true;\n serverErrorEvent.partial = false;\n serverErrorEvent.parts = []\n const errorPart: InteractionPart = {\n eventType: EventType.ServerError,\n errorDetails: {\n errorMessage: errorMessage\n },\n id: '',\n author: 'main',\n created: new Date(),\n partial: false,\n mustPush: false,\n textAppendable: false\n }\n serverErrorEvent.parts.push(errorPart);\n return serverErrorEvent;\n }\n\n static parseFlatPropertiesTypedEvent(event: LlmEvent) {\n const serverMessage: ServerEvent = new ServerEvent(event.interactionId);\n\n serverMessage.serverError = event.serverError;\n\n // Every event names its turn — except a server error the socket layer raises outside any run (an\n // ask_user answer nobody was waiting for, an unknown action): it comes with an empty interaction id,\n // and the gateway lands it on the turn the user is waiting on. Throwing here dropped that frame in\n // the transport's catch, and the turn it was meant to close stayed open with the composer locked.\n if (!event.interactionId && !ServerEvent.carriesServerError(event)) {\n throw new Error(\"Interaction ID is required\");\n }\n\n\n serverMessage.model_session_id = \"\";\n serverMessage.server_session_id = null;\n serverMessage.asyncFinalResponse = event.turnComplete;\n serverMessage.command = event.command?.toString();\n if (event.sessionInformation)\n serverMessage.session_information = event.sessionInformation as SessionInformation\n\n // The agent occasionally emits terminal events (notably the\n // `turnComplete: true` packet) without an `author` field. The\n // previous strict throw here got swallowed by the WS handler's\n // try/catch (WebSocketConnectionV2.handleEvent), which meant\n // `serverMessage.turn_complete` never propagated and the store\n // was stuck at `turnOpen: true` forever. Treat missing-author\n // events as `main` (same as the switch default below) so the\n // turn-complete signal reaches `setTurnOpen(false)`.\n if (!event.author || event.author == \"\") {\n console.warn('[ServerEvent] event with no author; defaulting to \"main\"', {\n interactionId: event.interactionId,\n turnComplete: event.turnComplete,\n });\n }\n\n switch (event?.author) {\n case ANALYTICS_AGENT_NAME:\n serverMessage.author = \"tool\";\n break;\n case \"system\":\n serverMessage.author = \"system\";\n break;\n default:\n serverMessage.author = \"main\";\n }\n serverMessage.mimeType = event.mimeType;\n serverMessage.created = new Date(event.timestamp);\n serverMessage.eventType = EventType.NotDefined;\n\n serverMessage.partial = event.partial?.toString()?.toLowerCase() === \"true\"\n\n serverMessage.turn_complete = event.turnComplete;\n serverMessage.visible = event.visible;\n serverMessage.isFinalResponse = event.turnComplete ?? false;\n\n serverMessage.artifactsDelta = []\n if (event.artifactsGenerated && event.artifactsGenerated.length > 0) {\n serverMessage.created = new Date(event.timestamp);\n serverMessage.llmArtifacts = event.artifactsGenerated;\n }\n\n serverMessage.subAgentId = event.subAgentId;\n serverMessage.subAgentName = event.subAgentName;\n\n return serverMessage;\n }\n\n static getPartType(part: KernelContent | StreamingKernelContent): PartType {\n if (part instanceof TextContent) {\n return \"TextContent\"\n }\n else if (part instanceof FunctionCallContent) {\n return \"FunctionCallContent\"\n }\n else if (part instanceof FunctionResultContent) {\n return \"FunctionResultContent\"\n }\n else if (part instanceof StreamingFunctionCallUpdateContent) {\n return \"StreamingFunctionCallUpdateContent\"\n }\n else if (part instanceof StreamingFinalFunctionCallContent) {\n return \"StreamingFinalFunctionCallContent\"\n }\n else if (part instanceof StreamingFinalFunctionResultContent) {\n return \"StreamingFinalFunctionResultContent\"\n }\n else if (part instanceof FunctionClientOutputContent) {\n return \"FunctionClientOutputContent\"\n }\n else if (part instanceof StreamingClientOutputContent) {\n return \"StreamingClientOutputContent\"\n }\n else if (part instanceof UserUiContent) {\n return \"UserUiContent\"\n }\n else if (part instanceof StreamingTextContent) {\n return \"StreamingTextContent\"\n }\n else if (part instanceof StreamingReasoningContent) {\n return \"StreamingReasoningContent\"\n }\n else if (part instanceof StreamingThoughtHighlightContent) {\n return \"StreamingThoughtHighlightContent\"\n }\n else if (part instanceof ToolEventContent) {\n return \"ToolEventContent\"\n }\n else if (part instanceof StreamingToolEventContent) {\n return \"StreamingToolEventContent\"\n }\n else {\n return \"Unknown\";\n }\n }\n\n /** True when the event holds the SDK's \"Server Error\" sentinel call (`Event.GetErrorEvent`). */\n static carriesServerError(event: LlmEvent): boolean {\n const items = (event.content?.items ?? []) as Array<{ id?: unknown }>;\n return items.some((item) => item?.id === ServerEvent.SERVER_ERROR_CALL_ID);\n }\n\n static parseFromTypedEvent(event: LlmEvent) {\n const serverMessage = ServerEvent.parseFlatPropertiesTypedEvent(event);\n\n if (serverMessage.serverError) {\n serverMessage.parts.push(InteractionPartUtils.fromError(serverMessage.serverError));\n return serverMessage;\n }\n\n //For turncomplete msgs for instance\n if (!event.content && !event.streamingParts)\n return serverMessage;\n\n serverMessage.parts = [];\n\n const mergedParts: KernelContent[] | StreamingKernelContent[] = [...event.content?.items ?? [], ...event.streamingParts ?? []];\n\n serverMessage.eventType = GetEventTypeFromDotNetName(event.eventType?.type ?? '');\n\n let index = 0;\n for (const serverPart of mergedParts) {\n let part: InteractionPart = {\n id: \"\",\n author: serverMessage.author,\n eventType: serverMessage.eventType,\n created: new Date(),\n visible: serverMessage.visible,\n partial: serverMessage.partial,\n mustPush: false,\n textAppendable: false\n }\n index++;\n\n const partType: PartType = ServerEvent.getPartType(serverPart);\n\n\n type functionType = FunctionCallContent & FunctionResultContent & StreamingFinalFunctionCallContent & StreamingFinalFunctionResultContent;\n\n if (partType == PartType.FunctionCallContent || partType == PartType.FunctionResultContent || partType == PartType.StreamingFinalFunctionCallContent || partType == PartType.StreamingFinalFunctionResultContent) {\n var serverCall = serverPart as functionType;\n\n if (serverCall.id == ServerEvent.SERVER_ERROR_CALL_ID) {\n // The SDK sends `arguments: { error, stackTrace }`. Read the two fields out instead of\n // stringifying the bag: `errorMessage` is what a renderer puts in front of a person, and\n // a JSON blob with an escaped multi-line trace in it is not a sentence anybody can read.\n // Falls back to the stringified bag if the shape is ever something else, so an unexpected\n // payload still surfaces rather than vanishing.\n const args = (serverCall.arguments ?? {}) as { error?: unknown; stackTrace?: unknown };\n const message = typeof args.error === 'string' && args.error.trim().length > 0\n ? args.error\n : JSON.stringify(serverCall.arguments);\n\n part.eventType = EventType.ServerError\n part.errorDetails = {\n errorMessage: message,\n stackTrace: typeof args.stackTrace === 'string' ? args.stackTrace : undefined,\n }\n part.functionDetails = undefined;\n }\n else {\n part.eventType = partType == PartType.FunctionCallContent || partType == PartType.StreamingFinalFunctionCallContent ? EventType.FunctionCall : EventType.FunctionResponse;\n let result: any = undefined;\n try {\n if (serverCall?.result) {\n if (typeof serverCall.result === \"object\") {\n result = serverCall.result;\n } else if (typeof serverCall.result === \"string\") {\n const parsed = JSON.parse(serverCall.result);\n result = (typeof parsed === \"object\" && parsed !== null)\n ? parsed\n : serverCall.result;\n } else {\n result = serverCall.result;\n }\n }\n }\n catch (error) {\n console.warn(\"Parse function error\", error)\n result = serverCall?.result;\n }\n part.thoughtDetails = {\n text: ''\n }\n // Client-render hints ride as ONE presentation object (no more `__`-args smuggling):\n // a live streaming part carries it top-level as `presentation` (camelCase); a\n // persisted/collapsed FunctionCall/Result carries it in metadata[\"aia:presentation\"]\n // (PascalCase). readPresentation reads either, case-insensitively.\n const presentation = readPresentation(serverCall);\n part.functionDetails = {\n id: serverCall?.id ?? '',\n args: serverCall?.arguments,\n // The SETTLED call arrives as FunctionCallContent on the persisted/replay path and as\n // StreamingFinalFunctionCallContent on the live one — both open the call, so both stamp\n // `start`. Keying on the persisted type alone left every LIVE call `Executing` with no\n // start, and a renderer gating its elapsed timer on `status === 'Executing' && start`\n // showed \"running\" with no stopwatch (AIA issue 1022). Same for `end` on the result.\n start: partType == PartType.FunctionCallContent || partType == PartType.StreamingFinalFunctionCallContent\n ? serverMessage.created : undefined,\n end: partType == PartType.FunctionResultContent || partType == PartType.StreamingFinalFunctionResultContent\n ? serverMessage.created : undefined,\n text: JSON.stringify(serverCall?.arguments) ?? '',\n name: (serverCall?.functionName ?? \"\"),\n status: part.eventType == EventType.FunctionCall ? 'Executing' : 'Done',\n response: result,\n isUi: presentation.isUi,\n argsDescription: presentation.argsDescription,\n // Client-only payload riding the RESULT event: live top-level `clientOutput`, or\n // metadata.clientOutput on the collapsed/persisted result. Calls leave it undefined.\n // The persisted-replay form also folds in via FunctionClientOutputContent.\n clientOutput: serverCall?.clientOutput\n ?? (serverCall?.metadata as Record<string, unknown> | undefined)?.clientOutput,\n askUserComponent: presentation.askUserComponent,\n // Runtime \"don't render\" override on a RESULT (CallContext.CancelUiRender).\n cancelUi: presentation.cancelUi,\n }\n // isAskUser mirrors isUi: derived from the component's presence, so classification\n // and the drawer key off a single flag (see classifyPart / AskUserSheet).\n part.functionDetails.isAskUser = !!part.functionDetails.askUserComponent;\n\n event.text = serverCall?.arguments;\n }\n }\n else if (partType == PartType.StreamingTextContent) {\n part.eventType = EventType.Text;\n part.text = (serverPart as StreamingTextContent)?.text?.replaceAll(\"\\\\n\", \"\\n\");;\n event.text = part.text;\n }\n else if (partType == PartType.TextContent) {\n part.eventType = EventType.Text;\n part.text = (serverPart as TextContent)?.text?.replaceAll(\"\\\\n\", \"\\n\");;\n event.text = part.text;\n }\n else if (partType == PartType.StreamingReasoningContent) {\n part.eventType = EventType.Thought;\n part.thoughtDetails = {\n text: (serverPart as StreamingReasoningContent)?.text?.replaceAll(\"\\\\n\", \"\\n\") ?? \"\"\n }\n part.text = (serverPart as StreamingReasoningContent)?.text?.replaceAll(\"\\\\n\", \"\\n\")\n event.text = part.text;\n }\n else if (partType == PartType.StreamingThoughtHighlightContent) {\n // A highlight of the reasoning: carried as the thought's headline, never as text of its own, so it\n // can neither merge into the reasoning text nor render as a part (MessageAgent folds it into the\n // thought run's trail).\n const headline = (serverPart as StreamingThoughtHighlightContent)?.headline ?? \"\";\n part.eventType = EventType.ThoughtHighlight;\n part.thoughtDetails = { text: \"\", headlines: headline ? [headline] : [] };\n }\n else if (partType == PartType.StreamingFunctionCallUpdateContent) {\n const partialFunctionCall = (serverPart as StreamingFunctionCallUpdateContent);\n part.eventType = EventType.PartialFunctionCall;\n part.text = partialFunctionCall.arguments;\n part.thoughtDetails = {\n text: ''\n }\n part.functionDetails = {\n id: partialFunctionCall.callId ?? '',\n text: part.text,\n status: 'Composing',\n name: partialFunctionCall?.name ?? 'Unknown',\n }\n event.text = part.text;\n }\n else if (partType == PartType.ToolEventContent || partType == PartType.StreamingToolEventContent) {\n part.eventType = EventType.ToolEvent;\n const toolEvent = (serverPart as ToolEventContent);\n part.toolDetails = {\n eventName: toolEvent.eventName ?? \"\",\n eventData: toolEvent.eventData ?? \"\",\n sessionId: toolEvent.sessionId ?? undefined,\n }\n }\n else if (partType == PartType.FunctionClientOutputContent) {\n // Persisted, client-only sibling of a function result (replay path). Carries the\n // tool's ToolClientOutput payload keyed by callId; it is folded into the matching\n // call part (functionDetails.clientOutput) by the session decoder and never renders\n // on its own. The live path delivers the same payload on the result event instead.\n const clientOutput = (serverPart as FunctionClientOutputContent);\n part.eventType = EventType.FunctionClientOutput;\n part.functionDetails = {\n id: clientOutput.id ?? '',\n name: '',\n status: 'Done',\n clientOutput: clientOutput.data,\n }\n }\n else if (partType == PartType.StreamingClientOutputContent) {\n // Non-terminal prefill pushed while an ask-user tool is PARKED (issue #60). Same call-id\n // fold as the persisted sibling above, but it must NOT close the call — no status here, so\n // interactionService folds clientOutput onto the parked call and leaves it Executing.\n const clientOutput = (serverPart as StreamingClientOutputContent);\n part.eventType = EventType.FunctionClientOutput;\n part.functionDetails = {\n id: clientOutput.id ?? '',\n name: '',\n // The parked call stays Executing; interactionService folds only clientOutput onto it and\n // leaves the existing status untouched, so this is just to satisfy the type.\n status: 'Executing',\n clientOutput: clientOutput.clientOutput,\n // The park signal itself (the reason this event fires even with no prefill).\n parked: readPresentation(clientOutput).parked,\n }\n }\n else if (partType == PartType.UserUiContent) {\n // Client-only UI representation for this user turn (replay path). Routes through the\n // uiTool dispatcher via functionDetails (name → registry key, args → props), but is\n // authored by the user: rendered on the user side (MessageUser) and excluded from the\n // agent side (MessageAgent). The live turn injects this same shape client-side; this\n // branch re-hydrates it on session reload.\n const userUi = (serverPart as UserUiContent);\n part.eventType = EventType.UserAnswer;\n part.author = 'user';\n part.functionDetails = {\n id: '',\n name: userUi.name ?? '',\n args: userUi.args,\n status: 'Done',\n isUi: true,\n }\n }\n else {\n part.eventType = EventType.NotDefined;\n console.warn(`Got a unmapped event_type:${serverMessage.eventType}, data:`, partType, serverPart)\n continue;\n }\n\n serverMessage.parts.push(part);\n }\n\n return serverMessage;\n }\n\n static createFromThought(interactionId: string, thinkingText: string): ServerEvent {\n const thinkingEvent: ServerEvent = {\n author: \"main\",\n visible: true,\n eventType: EventType.Thought,\n uniqueId: new Date().getTime().toString(),\n interactionId: interactionId,\n allEventTypes: [EventType.Thought],\n artifactsDelta: [''],\n model_session_id: \"\",\n created: new Date(),\n turn_complete: false,\n partial: true,\n asyncFinalResponse: false,\n mimeType: \"text/plain\",\n parts: [\n {\n thoughtDetails: {\n text: thinkingText,\n },\n // ThoughtPart renders `part.text` (via getPartTextContent), so a\n // thought built here with only `thoughtDetails` rendered as an\n // EMPTY reasoning block. The live decoder sets both for a\n // StreamingReasoningContent — match it, or this factory produces\n // a part the UI cannot show. Only the demo's fake gateway builds\n // thoughts this way, which is why it went unnoticed.\n text: thinkingText,\n id: getRandomUUID(),\n created: new Date(),\n eventType: EventType.Thought,\n author: \"main\",\n textAppendable: true,\n partial: true,\n mustPush: true\n }\n ]\n }\n return thinkingEvent\n }\n\n static createFromFunctionName(functionName: string, interactionId: string, callData?: any): ServerEvent {\n const callEvent = ServerEvent.createFromText(\"\",interactionId);\n callEvent.parts[0].text = undefined;\n callEvent.parts[0].thoughtDetails = undefined;\n callEvent.parts[0].textAppendable = false;\n callEvent.parts[0].mustPush = true;\n \n callEvent.parts[0].functionDetails = {\n name: functionName,\n id:'callId',\n status: 'Executing',\n start: new Date(),\n end:undefined,\n text:'dfsdfdf',\n args:callData\n }\n return callEvent;\n }\n\n static createFromText(message: string, interactionId: string, thinkingData?: string): ServerEvent {\n\n const textEvent: ServerEvent = {\n author: \"main\",\n visible: true,\n eventType: EventType.Text,\n uniqueId: new Date().getTime().toString(),\n interactionId: interactionId,\n allEventTypes: [EventType.Text],\n artifactsDelta: [''],\n model_session_id: \"\",\n created: new Date(),\n turn_complete: false,\n partial: true,\n asyncFinalResponse: false,\n mimeType: \"text/plain\",\n parts: [\n {\n // Optional reasoning trace shown next to the message. Parts\n // with `eventType: Text` AND a populated `thoughtDetails`\n // render the text in the body and the trace in the\n // thinking strip.\n thoughtDetails: thinkingData ? {\n text: thinkingData\n } : undefined,\n id: getRandomUUID(),\n created: new Date(),\n // Part eventType MUST match the outer event's eventType.\n // Was previously `Thought` here, which made the merger\n // classify a streamed Text part as a Thought (rendered\n // in the trace strip instead of the message body) —\n // the chat would show the message during streaming and\n // then \"disappear\" once the part was reclassified.\n eventType: EventType.Text,\n author: \"main\",\n textAppendable: true,\n partial: true,\n mustPush: true,\n text: message\n }\n ]\n }\n return textEvent;\n }\n\n} ","import './init'; // MUST be first - loads reflect-metadata\n\nimport { TypedJSON, type IndexedObject, JsonObjectMetadata } from 'typedjson';\nimport {\n LlmEvent,\n KernelContent,\n TextContent,\n ImageContent,\n FunctionCallContent,\n FunctionResultContent,\n ChatMessageContent,\n StreamingKernelContent,\n StreamingTextContent,\n StreamingFunctionCallUpdateContent,\n StreamingResponse,\n Payload,\n InstructionSummary,\n StreamingReasoningContent,\n StreamingThoughtHighlightContent,\n ToolEventContent,\n StreamingToolEventContent,\n StreamingFinalFunctionCallContent,\n StreamingFinalFunctionResultContent,\n StreamingClientOutputContent,\n FunctionClientOutputContent,\n UserUiContent\n} from './models';\n\n// All known content types for polymorphic deserialization\nconst KNOWN_CONTENT_TYPES = [\n // KernelContent derived types\n TextContent,\n ImageContent,\n FunctionCallContent,\n ToolEventContent,\n FunctionResultContent,\n FunctionClientOutputContent,\n UserUiContent,\n ChatMessageContent,\n // StreamingKernelContent derived types\n StreamingTextContent,\n StreamingFunctionCallUpdateContent,\n StreamingReasoningContent,\n StreamingThoughtHighlightContent,\n StreamingToolEventContent,\n StreamingFinalFunctionCallContent,\n StreamingFinalFunctionResultContent,\n StreamingClientOutputContent,\n InstructionSummary\n];\n\n/**\n * Helper function to get constructor name (replaces typedjson internal nameof)\n */\nfunction getConstructorName(constructor: Function): string {\n return constructor.name;\n}\n\n/**\n * Custom type emitter for .NET compatibility\n * Emits \"$type\" property for polymorphic types to match .NET serialization\n */\nexport function dotNetTypeEmitter(\n targetObject: IndexedObject,\n sourceObject: IndexedObject,\n expectedSourceType: Function,\n sourceTypeMetadata?: JsonObjectMetadata,\n) {\n // Add \"$type\" property for polymorphic deserialization (matches .NET's JsonPolymorphic)\n if (sourceObject.constructor !== expectedSourceType) {\n targetObject[\"$type\"] = sourceTypeMetadata?.name ?? getConstructorName(sourceObject.constructor);\n }\n}\n\nexport function dotnetTypeResolver(\n sourceObject: IndexedObject,\n knownTypes: Map<string, Function>,\n): Function | undefined {\n if (sourceObject[\"$type\"] != null) {\n return knownTypes.get(sourceObject[\"$type\"]);\n }\n}\n\n/**\n * Creates a configured TypedJSON serializer for Event objects\n * Includes all known types for polymorphic serialization\n */\nexport function createEventSerializer(): TypedJSON<LlmEvent> {\n const serializer = new TypedJSON(LlmEvent);\n\n serializer.config({\n knownTypes: KNOWN_CONTENT_TYPES,\n typeHintEmitter: dotNetTypeEmitter,\n typeResolver: dotnetTypeResolver\n });\n\n return serializer;\n}\n\nexport function createPayloadSerializer(): TypedJSON<Payload> {\n const serializer = new TypedJSON<Payload>(Payload);\n\n serializer.config({\n knownTypes: KNOWN_CONTENT_TYPES,\n typeHintEmitter: dotNetTypeEmitter,\n typeResolver: dotnetTypeResolver\n });\n\n return serializer;\n}\n\nexport function createStreamingResponseSerializer(): TypedJSON<StreamingResponse> {\n const serializer = new TypedJSON<StreamingResponse>(StreamingResponse);\n\n serializer.config({\n knownTypes: KNOWN_CONTENT_TYPES,\n typeHintEmitter: dotNetTypeEmitter,\n typeResolver: dotnetTypeResolver\n });\n\n return serializer;\n}\n\n/**\n * Sanitizes JSON string by fixing control characters that may come from .NET serialization\n * This handles cases where newlines, tabs, and other control characters are not properly escaped\n */\nexport function sanitizeJsonString(jsonStr: string): string {\n try {\n // First, try to parse as-is (in case it's already valid)\n JSON.parse(jsonStr);\n return jsonStr;\n } catch (e) {\n // If parsing fails, we need to escape unescaped control characters within string values\n // We'll do this by processing character by character, tracking when we're inside a string\n\n let result = '';\n let inString = false;\n\n for (let i = 0; i < jsonStr.length; i++) {\n const char = jsonStr[i];\n const code = char.charCodeAt(0);\n\n // Handle backslash - check if it's starting an escape sequence\n if (char === '\\\\' && inString && i + 1 < jsonStr.length) {\n const nextChar = jsonStr[i + 1];\n // Valid escape sequences in JSON: \\\" \\\\ \\/ \\b \\f \\n \\r \\t \\uXXXX\n if (nextChar === '\"' || nextChar === '\\\\' || nextChar === '/' ||\n nextChar === 'b' || nextChar === 'f' || nextChar === 'n' ||\n nextChar === 'r' || nextChar === 't') {\n // Valid single-char escape - copy both characters\n result += char + nextChar;\n i++; // Skip the next character\n continue;\n } else if (nextChar === 'u' && i + 5 < jsonStr.length) {\n // Unicode escape sequence \\uXXXX - copy all 6 characters\n result += jsonStr.substring(i, i + 6);\n i += 5; // Skip the next 5 characters (u and 4 hex digits)\n continue;\n } else {\n // Invalid escape sequence - just add the backslash\n result += char;\n continue;\n }\n }\n\n // Track string boundaries (but not if it's escaped)\n if (char === '\"') {\n // Check if this quote is escaped by looking back\n let numBackslashes = 0;\n for (let j = i - 1; j >= 0 && jsonStr[j] === '\\\\'; j--) {\n numBackslashes++;\n }\n // If there's an even number of backslashes (including 0), the quote is not escaped\n if (numBackslashes % 2 === 0) {\n inString = !inString;\n }\n result += char;\n continue;\n }\n\n // If we're inside a string and encounter an unescaped control character, escape it\n if (inString && code < 32) {\n switch (char) {\n case '\\n':\n result += '\\\\n';\n break;\n case '\\r':\n result += '\\\\r';\n break;\n case '\\t':\n result += '\\\\t';\n break;\n case '\\f':\n result += '\\\\f';\n break;\n case '\\b':\n result += '\\\\b';\n break;\n default:\n // For other control characters, use unicode escape\n const hex = code.toString(16).padStart(4, '0');\n result += `\\\\u${hex}`;\n break;\n }\n } else {\n result += char;\n }\n }\n\n return result;\n }\n}\n\n/**\n * Deserializes a JSON string into a Payload, with automatic sanitization of control characters\n */\nexport function deserializePayload(json: string): StreamingResponse | undefined {\n const sanitized = sanitizeJsonString(json);\n const serializer = createStreamingResponseSerializer();\n return serializer.parse(sanitized);\n}\n\n/**\n * Deserializes a JSON string into an Event object, with automatic sanitization of control characters\n */\nexport function deserializeEvent(json: string): LlmEvent | undefined {\n const sanitized = sanitizeJsonString(json);\n const serializer = createEventSerializer();\n return serializer.parse(sanitized);\n}\n\n/**\n * Serializes an Event object into a JSON string\n */\nexport function serializeEvent(event: LlmEvent): string {\n const serializer = createEventSerializer();\n return serializer.stringify(event);\n}\n\n/**\n * Creates a configured TypedJSON serializer for KernelContent objects\n */\nexport function createKernelContentSerializer(): TypedJSON<KernelContent> {\n const serializer = new TypedJSON(KernelContent);\n\n serializer.config({\n knownTypes: KNOWN_CONTENT_TYPES,\n typeHintEmitter: dotNetTypeEmitter,\n typeResolver: dotnetTypeResolver\n });\n\n return serializer;\n}\n\n/**\n * Creates a configured TypedJSON serializer for StreamingKernelContent objects\n */\nexport function createStreamingKernelContentSerializer(): TypedJSON<StreamingKernelContent> {\n const serializer = new TypedJSON(StreamingKernelContent);\n\n serializer.config({\n knownTypes: [\n StreamingTextContent,\n StreamingFunctionCallUpdateContent\n ],\n typeHintEmitter: dotNetTypeEmitter\n });\n\n return serializer;\n}\n"],"names":["ChatEventType","RunMode","ChatAction","EventType","GetEventTypeFromDotNetName","__name","name","EventTypeDescriptions","ResponseType","AuthorType","ArtifactType","AgentType","AgentMode","AgentConfig","SkillLevel","ModelType","ModelConfig","AllInclusiveIcon","PsychologyIcon","FlashOnIcon","RocketLaunchIcon","SortByAlphaOutlined","GeneratingTokensOutlined","getModelVendor","modelId","id","getConnectionStateColor","connectionState","theme","_InteractionPartUtils","value","regex","match","json","charCollapsed","objectProps","textReponseLines","prop","startChart","obj","startChar","part","r","_a","i","o","v","errorMsg","text","author","getRandomUUID","args","addTimer","isTimerRunning","status","startingPoint","stopPoint","partData","parts","textParts","p","onlyPart","unique_event_types","od","pd","item","keys","k","InteractionPartUtils","PartType","AuthorRole","__publicField","__decorateClass","jsonMember","jsonObject","EventTypeInformation","LlmArtifact","KernelContent","AnyT","StreamingKernelContent","TextContent","StreamingToolEventContent","ToolEventContent","ImageContent","FunctionCallContent","ToolCallPresentation","PresentationMetadataKey","StreamingFinalFunctionCallContent","FunctionResultContent","StreamingFinalFunctionResultContent","FunctionClientOutputContent","StreamingClientOutputContent","UserUiContent","ChatMessageContent","jsonArrayMember","StreamingFunctionCallUpdateContent","StreamingTextContent","StreamingReasoningContent","StreamingThoughtHighlightContent","InstructionSummary","SessionInformation","LlmEvent","PartialLlmEvent","StreamingResponse","Payload","readPresentation","serverCall","raw","pick","camel","pascal","_ServerEvent","interactionId","errorMessage","serverErrorEvent","errorPart","event","serverMessage","ANALYTICS_AGENT_NAME","_c","_b","mergedParts","serverPart","partType","message","result","parsed","error","presentation","_d","_e","_f","_g","headline","partialFunctionCall","toolEvent","clientOutput","userUi","thinkingText","functionName","callData","callEvent","thinkingData","ServerEvent","KNOWN_CONTENT_TYPES","getConstructorName","constructor","dotNetTypeEmitter","targetObject","sourceObject","expectedSourceType","sourceTypeMetadata","dotnetTypeResolver","knownTypes","createEventSerializer","serializer","TypedJSON","createStreamingResponseSerializer","sanitizeJsonString","jsonStr","inString","char","code","nextChar","numBackslashes","j","hex","deserializePayload","sanitized","deserializeEvent","serializeEvent"],"mappings":";;;;;;;;;;;;AAWO,MAAMA,KAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,cAAc;AAAA,EACd,aAAa;AACf,GAGaC,KAAU;AAAA,EACrB,aAAa;AAAA,EACb,YAAY;AACd,GAGaC,KAAa;AAAA,EACxB,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,iBAAiB;AACnB,GAIaC,IAAY;AAAA,EACvB,cAAc;AAAA,EACd,qBAAqB;AAAA,EACrB,kBAAkB;AAAA;AAAA;AAAA;AAAA,EAIlB,sBAAsB;AAAA;AAAA;AAAA;AAAA,EAItB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,SAAS;AAAA;AAAA,EAET,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,OAAO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YAAAA,KAAU;AACV;AAAA,UACJ,KAAK;AACD,YAAAA,KAAU;AACV;AAAA,UACJ;AAEI,kBAAMyC,IAAMJ,EAAK,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG;AAC7C,YAAArC,KAAU,MAAMyC,CAAG;AACnB;AAAA,QAAA;AAAA;AAGR,QAAAzC,KAAUoC;AAAA,IAElB;AAEA,WAAOpC;AAAA,EACX;AACJ;AArFgBxH,EAAAyJ,IAAA;AA0FT,SAASS,GAAmBtI,GAA6C;AAC5E,QAAMuI,IAAYV,GAAmB7H,CAAI;AAEzC,SADmB4H,GAAA,EACD,MAAMW,CAAS;AACrC;AAJgBnK,EAAAkK,IAAA;AAST,SAASE,GAAiBxI,GAAoC;AACjE,QAAMuI,IAAYV,GAAmB7H,CAAI;AAEzC,SADmByH,GAAA,EACD,MAAMc,CAAS;AACrC;AAJgBnK,EAAAoK,IAAA;AAST,SAASC,GAAetD,GAAyB;AAEpD,SADmBsC,GAAA,EACD,UAAUtC,CAAK;AACrC;AAHgB/G,EAAAqK,IAAA;"}
|
package/dist/services.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { A as t,
|
|
2
|
-
import { A as
|
|
3
|
-
import { H, d as
|
|
1
|
+
import { A as t, A as s, E as r, H as c, a as o, L as n, M as i, b as A, r as S } from "./httpArtifactService-EEhF_mp9.js";
|
|
2
|
+
import { A as H } from "./artifactHtmlHandler-CMQJf1cX.js";
|
|
3
|
+
import { H as f, d as p, r as E } from "./httpSessionService-wBby4ggl.js";
|
|
4
4
|
export {
|
|
5
5
|
t as AgentGatewayService,
|
|
6
6
|
s as AgentGatewayWSAsync,
|
|
7
|
-
|
|
7
|
+
H as ArtifactHtmlHandler,
|
|
8
8
|
r as EventBusService,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
c as HttpArtifactService,
|
|
10
|
+
f as HttpSessionService,
|
|
11
|
+
o as InteractionService,
|
|
12
12
|
n as LocalStorageService,
|
|
13
|
-
i as
|
|
14
|
-
|
|
15
|
-
p as
|
|
13
|
+
i as MAX_CHAR_PER_TEXT_PART,
|
|
14
|
+
A as WebSocketConnecionV2,
|
|
15
|
+
p as decodeSessionEvents,
|
|
16
|
+
S as reduceInteraction,
|
|
17
|
+
E as resolveAccessToken
|
|
16
18
|
};
|
|
17
19
|
//# sourceMappingURL=services.js.map
|
|
@@ -11,6 +11,7 @@ import { PartRendererMap, UiToolRegistry } from './ChatPane/parts';
|
|
|
11
11
|
import { Interaction } from '../../models/Interaction';
|
|
12
12
|
import { AuthPromptContext, SendMessageOptions, UserMessageRendererProps } from './AiChatTypes';
|
|
13
13
|
import { SendMessageResponse } from '../../models/SendMessageResponse';
|
|
14
|
+
import { ChatVerbosity } from './ChatPane/verbosity';
|
|
14
15
|
export interface AiChatContextState {
|
|
15
16
|
agentGatewayService: AgentGatewayService;
|
|
16
17
|
eventBusService: EventBusService;
|
|
@@ -53,6 +54,9 @@ export interface AiChatContextState {
|
|
|
53
54
|
setShowToolCalls: (show: boolean) => void;
|
|
54
55
|
friendlyMode: boolean;
|
|
55
56
|
setFriendlyMode: (enabled: boolean) => void;
|
|
57
|
+
/** How much of the run internals (reasoning, tool calls) the transcript shows — see {@link ChatVerbosity}. */
|
|
58
|
+
verbosity: ChatVerbosity;
|
|
59
|
+
setVerbosity: (verbosity: ChatVerbosity) => void;
|
|
56
60
|
currentModel: string | undefined;
|
|
57
61
|
setCurrentModel: (modelId: string) => void;
|
|
58
62
|
onVisibleQuestionChange?: (question: string | null) => void;
|
|
@@ -7,6 +7,7 @@ import { ISessionService } from '../../services/servers/sessionService/ISessionS
|
|
|
7
7
|
import { IArtifactService } from '../../services/interfaces/artifactService';
|
|
8
8
|
import { IStorageService } from '../../services/storageService';
|
|
9
9
|
import { EventBusService, FirstTokenEventDetails } from '../../services/eventBusService';
|
|
10
|
+
import { ChatVerbosity } from './ChatPane/verbosity';
|
|
10
11
|
import { AgentGatewayService, GatewaySendMessageOptions } from '../../services/servers/AgentGatewayService';
|
|
11
12
|
import { INotificationPort } from '../../interfaces/INotificationPort';
|
|
12
13
|
import { IWebSocketConnection } from '../../services/WebSocketConnection/webSocketConnection';
|
|
@@ -245,6 +246,13 @@ export interface AiChatBaseProps extends AiChatStyleProps {
|
|
|
245
246
|
*/
|
|
246
247
|
onNavigate?: (path: string) => void;
|
|
247
248
|
friendlyMode?: boolean;
|
|
249
|
+
/**
|
|
250
|
+
* How much of the run internals — reasoning and tool calls — the transcript shows: `'naked'` (none),
|
|
251
|
+
* `'minimum'` (one italic line while the turn is open), `'information'` (reasoning, plus tool calls only while
|
|
252
|
+
* they run) or `'detailed'` (everything; `showToolCalls` still governs closed turns). Defaults to
|
|
253
|
+
* `'detailed'`. Seeds the composer menu's verbosity bar, which can change it at runtime.
|
|
254
|
+
*/
|
|
255
|
+
verbosity?: ChatVerbosity;
|
|
248
256
|
/**
|
|
249
257
|
* Per-part renderer overrides. Map a `PartKind` ('text' | 'thought' |
|
|
250
258
|
* 'function' | 'waiting' | 'suspended' | 'boxed') to a custom
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Long enough to read as a change, short enough that a 300 ms tool never shows two faces at once for long. */
|
|
3
|
+
export declare const CROSSFADE_MS = 180;
|
|
4
|
+
interface CrossfadeSlotProps {
|
|
5
|
+
/** What the slot is showing. A new key crossfades: the previous content fades out over the new one. */
|
|
6
|
+
itemKey: string;
|
|
7
|
+
/**
|
|
8
|
+
* Also slide the layers a few pixels as they fade (in from below, out upwards). Reads well on a tall block;
|
|
9
|
+
* on a single line of text the motion reads as a bounce, so the default is a plain fade.
|
|
10
|
+
*/
|
|
11
|
+
slide?: boolean;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* One place in the transcript whose content is replaced over time — the call the `information` verbosity shows,
|
|
16
|
+
* the `minimum` verbosity's line. Swapping the content outright was a hard cut, and the eye read it as a blink.
|
|
17
|
+
* Here the new content fades in where it will stay, while the previous one — a snapshot of its last render —
|
|
18
|
+
* fades out on top of it and is dropped.
|
|
19
|
+
*
|
|
20
|
+
* The incoming layer stays in the flow, so the slot is as tall as what it currently shows; give that content a
|
|
21
|
+
* fixed size to keep the slot from changing height between items.
|
|
22
|
+
*/
|
|
23
|
+
declare const CrossfadeSlot: React.FC<CrossfadeSlotProps>;
|
|
24
|
+
export default CrossfadeSlot;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface CurrentMessage {
|
|
5
|
-
onLinkClicked: (link: string, content: string | null) => void;
|
|
6
|
-
messagesRef: React.RefObject<Map<string, HTMLDivElement>>;
|
|
7
|
-
artifactService: IArtifactService;
|
|
8
|
-
eventBusService: EventBusService;
|
|
9
|
-
friendlyMode?: boolean;
|
|
2
|
+
export interface CurrentMessageProps {
|
|
3
|
+
onLinkClicked?: (link: string, content: string | null) => void;
|
|
10
4
|
}
|
|
11
|
-
|
|
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.)
|
|
10
|
+
*/
|
|
11
|
+
export declare const CurrentMessage: React.FC<CurrentMessageProps>;
|
|
12
12
|
export default CurrentMessage;
|
|
@@ -3,9 +3,7 @@ import { Interaction } from '../../../models/Interaction';
|
|
|
3
3
|
interface MessageProps {
|
|
4
4
|
message: Interaction;
|
|
5
5
|
onLinkClicked: (link: string, content: string | null) => void;
|
|
6
|
-
appendWaitingPart: boolean;
|
|
7
|
-
messagesRef?: React.RefObject<Map<string, HTMLDivElement>>;
|
|
8
|
-
friendlyMode?: boolean;
|
|
9
6
|
}
|
|
7
|
+
/** A settled turn in the history: the user's question and the agent's answer, under one message scope. */
|
|
10
8
|
declare const Message: React.FC<MessageProps>;
|
|
11
9
|
export default Message;
|
|
@@ -9,14 +9,15 @@ export declare function hideUnfinishedUiParts(parts: InteractionPart[], onGoing:
|
|
|
9
9
|
keepParkedAskUser?: boolean): InteractionPart[];
|
|
10
10
|
interface MessageAgentProps {
|
|
11
11
|
message: Interaction;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
appendWaitingPart: boolean;
|
|
15
|
-
messagesRef?: React.RefObject<Map<string, HTMLDivElement>>;
|
|
16
|
-
isConnectionOpen: boolean;
|
|
17
|
-
preview: boolean;
|
|
18
|
-
container: string;
|
|
19
|
-
friendlyMode?: boolean;
|
|
12
|
+
/** The turn is still streaming and this is its live message (CurrentMessage), not a history entry (Message). */
|
|
13
|
+
live: boolean;
|
|
20
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* The agent's side of a turn. Takes the message and whether it is live; the
|
|
17
|
+
* host switches come from the services context, the per-message values
|
|
18
|
+
* (friendly mode, links) from the enclosing {@link MessageScope}, and the
|
|
19
|
+
* turn-open flag from the store. It used to take nine props, most of them
|
|
20
|
+
* other spellings of `live`.
|
|
21
|
+
*/
|
|
21
22
|
declare const MessageAgent: React.FC<MessageAgentProps>;
|
|
22
23
|
export default MessageAgent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* What every renderer under one message needs to know about the message it is
|
|
4
|
+
* drawing, and that is the SAME for all of them: is the turn still streaming,
|
|
5
|
+
* is the host in friendly mode, and where do links go.
|
|
6
|
+
*
|
|
7
|
+
* Provided once, by `Message` (history) and `CurrentMessage` (the live turn),
|
|
8
|
+
* instead of being threaded through MessageAgent → MessagePart → every leaf.
|
|
9
|
+
* The three values change once per turn or never, so reading them through
|
|
10
|
+
* context does not undermine `MessagePart`'s memo — `useContext` wakes a
|
|
11
|
+
* consumer regardless of `React.memo`, which is exactly why nothing that
|
|
12
|
+
* changes per tick belongs here.
|
|
13
|
+
*/
|
|
14
|
+
export interface MessageScope {
|
|
15
|
+
/** The turn is still open and this is its live message, not a history entry. */
|
|
16
|
+
live: boolean;
|
|
17
|
+
friendlyMode: boolean;
|
|
18
|
+
onLinkClicked: (link: string, content: string | null) => void;
|
|
19
|
+
}
|
|
20
|
+
/** What a renderer sees with no provider above it: a settled, non-friendly message whose links go nowhere. */
|
|
21
|
+
export declare const DEFAULT_MESSAGE_SCOPE: MessageScope;
|
|
22
|
+
export declare const MessageScopeContext: React.Context<MessageScope>;
|
|
23
|
+
export declare const useMessageScope: () => MessageScope;
|
|
24
|
+
export interface MessageScopeProviderProps {
|
|
25
|
+
live: boolean;
|
|
26
|
+
/** Defaults to the host's `friendlyMode` from the services context, then to the enclosing scope's. */
|
|
27
|
+
friendlyMode?: boolean;
|
|
28
|
+
/** Defaults to the enclosing scope's handler (a no-op at the top). */
|
|
29
|
+
onLinkClicked?: MessageScope['onLinkClicked'];
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare const MessageScopeProvider: React.FC<MessageScopeProviderProps>;
|
|
@@ -2,7 +2,6 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { Interaction } from '../../../models/Interaction';
|
|
3
3
|
interface MessageUserProps {
|
|
4
4
|
message: Interaction;
|
|
5
|
-
onLinkClicked?: (link: string, content: string | null) => void;
|
|
6
5
|
}
|
|
7
6
|
declare const MessageUser: React.FC<MessageUserProps>;
|
|
8
7
|
export default MessageUser;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InteractionPart } from '../../../models/InteractionPart';
|
|
2
|
+
export type InteractionPartGroupType = 'inline' | 'block';
|
|
3
|
+
export declare const InteractionPartGroupType: {
|
|
4
|
+
readonly inline: "inline";
|
|
5
|
+
readonly block: "block";
|
|
6
|
+
};
|
|
7
|
+
export declare class InteractionPartGroup {
|
|
8
|
+
parts: InteractionPart[];
|
|
9
|
+
isLastGroup: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* A run of CONSECUTIVE thought parts — one continuous piece of reasoning
|
|
12
|
+
* that the reducer split at MAX_CHAR_PER_TEXT_PART to keep a very long
|
|
13
|
+
* prose from dragging the browser down.
|
|
14
|
+
*
|
|
15
|
+
* The split is a rendering optimisation and must not be legible as one: the
|
|
16
|
+
* reader gets a single "Pensando…" block whatever the chunk count, drawn by
|
|
17
|
+
* the run's chrome, while each chunk stays its own memoized MessagePart —
|
|
18
|
+
* which is where the CPU saving actually comes from.
|
|
19
|
+
*/
|
|
20
|
+
isThoughtRun: boolean;
|
|
21
|
+
type: InteractionPartGroupType;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Lays a message's parts out for rendering: consecutive tool-call chips share an
|
|
25
|
+
* INLINE row; text, thoughts and UI parts each get a BLOCK; consecutive thought
|
|
26
|
+
* chunks fold into one run.
|
|
27
|
+
*
|
|
28
|
+
* A view concern, so it lives with the view. Pure: same parts, same groups.
|
|
29
|
+
*
|
|
30
|
+
* @param live whether the turn is still open. Closed turns drop tool chips unless `showToolCalls`.
|
|
31
|
+
* @param inlineTrailing let the LAST part join the inline row too. By default a trailing tool call gets a block of
|
|
32
|
+
* its own; the `information` verbosity wants every running call on the same line.
|
|
33
|
+
*/
|
|
34
|
+
export declare function groupParts(parts: InteractionPart[], live?: boolean, showToolCalls?: boolean, inlineTrailing?: boolean): InteractionPartGroup[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ActivityRendererProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* The built-in `activity` renderer — the `minimum` verbosity's whole view of the run internals: one line of
|
|
5
|
+
* plain italic text, no chrome. A thinking icon with the current reasoning highlight, or a tool icon with the
|
|
6
|
+
* running calls, comma separated. Hosts replace it with `partRenderers.activity`.
|
|
7
|
+
*/
|
|
8
|
+
declare const ActivityLine: React.FC<ActivityRendererProps>;
|
|
9
|
+
export default ActivityLine;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The live turn was cut off by a dropped connection. Drawn where the text stopped, in the place of
|
|
4
|
+
* the waiting dots, so the reader knows the silence is the network and not the agent — and when the
|
|
5
|
+
* next attempt comes. The supervisor's schedule drives it (`connectionOutage` in the store); it
|
|
6
|
+
* disappears on its own when the socket is back and the stream resumes from the replay cursor.
|
|
7
|
+
*/
|
|
8
|
+
declare const ConnectionOutagePart: React.FC;
|
|
9
|
+
export default ConnectionOutagePart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|