@8wave/ai-elements 0.117.0-beta.34 → 0.118.0-beta.15
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/_chunks/{Agent-DDAyL-4q.js → Agent-D8YrsP52.js} +15 -11
- package/dist/_chunks/Agent-D8YrsP52.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js → PkStreamingMarkdown--CcBvs19.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js.map → PkStreamingMarkdown--CcBvs19.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js → PkToolEditSpreadsheet-5vHzEy4P.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js.map → PkToolEditSpreadsheet-5vHzEy4P.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js → PkToolRequestGeolocation-Cj8hTfNF.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js.map → PkToolRequestGeolocation-Cj8hTfNF.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js → PkToolRequestOAuthConnection-BWxR1hV4.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js.map → PkToolRequestOAuthConnection-BWxR1hV4.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js → PkToolShowArtifact-BVGN7hV2.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js.map → PkToolShowArtifact-BVGN7hV2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js → PkToolShowContactForm-Blrwqpl0.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js.map → PkToolShowContactForm-Blrwqpl0.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js → PkToolShowForm-BpGHaN6x.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js.map → PkToolShowForm-BpGHaN6x.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js → PkToolShowImageGallery-CIhIrIcY.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js.map → PkToolShowImageGallery-CIhIrIcY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js → PkToolShowProductList-BjWKnbyD.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js.map → PkToolShowProductList-BjWKnbyD.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js → PkToolShowSources-8c9RvGV1.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js.map → PkToolShowSources-8c9RvGV1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js → PkToolShowSuggestedReply-0KahUIlw.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js.map → PkToolShowSuggestedReply-0KahUIlw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js → PkToolShowVideo-_V_d-PDr.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js.map → PkToolShowVideo-_V_d-PDr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js → PkToolShowWebPages-D55VEPjK.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js.map → PkToolShowWebPages-D55VEPjK.js.map} +1 -1
- package/dist/_chunks/{browser-BJcsjj9S.js → browser-CuMi3Hhg.js} +796 -701
- package/dist/_chunks/browser-CuMi3Hhg.js.map +1 -0
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js → chatImagePolicy-DXkhb-N_.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js.map → chatImagePolicy-DXkhb-N_.js.map} +1 -1
- package/dist/_chunks/{markdown-lpamC2tL.js → markdown-c59ir6tw.js} +4 -3
- package/dist/_chunks/markdown-c59ir6tw.js.map +1 -0
- package/dist/ai-elements.es.js +235 -141
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotFeedbackForm.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/Agent-CV5O0I7I.js +758 -0
- package/dist-vue/_chunks/{Agent-Bd_4UVe4.js.map → Agent-CV5O0I7I.js.map} +1 -1
- package/dist-vue/_chunks/{Document-BrMThi12.js → Document-eXkZraWr.js} +214 -213
- package/dist-vue/_chunks/Document-eXkZraWr.js.map +1 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js +139 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js → PkChatbot-D9lPQjYZ.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js.map → PkChatbot-D9lPQjYZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js → PkChatbotAuth-BMLLTSwK.js} +78 -78
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js.map → PkChatbotAuth-BMLLTSwK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js → PkChatbotEmptyState-CNLDbDVS.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js.map → PkChatbotEmptyState-CNLDbDVS.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js → PkChatbotFeedbackForm-CMFXjoKR.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js.map → PkChatbotFeedbackForm-CMFXjoKR.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js → PkChatbotInput-Cf1iqwkL.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js.map → PkChatbotInput-Cf1iqwkL.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js → PkChatbotMessages-BPCZaW9I.js} +29 -29
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js.map → PkChatbotMessages-BPCZaW9I.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js → PkChatbotStepPayload-CShP2HwK.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js.map → PkChatbotStepPayload-CShP2HwK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js → PkChatbotStepToolDetail-Dhi60cJt.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js.map → PkChatbotStepToolDetail-Dhi60cJt.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js → PkChatbotSteps-CW13WtvP.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js.map → PkChatbotSteps-CW13WtvP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-eXFjwNkz.js → PkChatbotViewChat-DyEDdBwU.js} +205 -198
- package/dist-vue/_chunks/PkChatbotViewChat-DyEDdBwU.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js → PkChatbotViewConversations-VpZ-zYTF.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js.map → PkChatbotViewConversations-VpZ-zYTF.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js → PkChatbotViewFiles-ByZ8Wy2A.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js.map → PkChatbotViewFiles-ByZ8Wy2A.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js → PkChatbotViewProfile-BXehkAop.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js.map → PkChatbotViewProfile-BXehkAop.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js → PkStreamingMarkdown-BBu6Z82G.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js.map → PkStreamingMarkdown-BBu6Z82G.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js → PkToolEditSpreadsheet-COhUFZGD.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js.map → PkToolEditSpreadsheet-COhUFZGD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js → PkToolRequestGeolocation-VZ6TUHwA.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js.map → PkToolRequestGeolocation-VZ6TUHwA.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js → PkToolRequestOAuthConnection-LMTQMCU3.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js.map → PkToolRequestOAuthConnection-LMTQMCU3.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js → PkToolShowArtifact-Ciq5bmlS.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js.map → PkToolShowArtifact-Ciq5bmlS.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js → PkToolShowContactForm-BufNZX42.js} +8 -8
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js.map → PkToolShowContactForm-BufNZX42.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js → PkToolShowDiagram-daSyNcr9.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js.map → PkToolShowDiagram-daSyNcr9.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js → PkToolShowForm-DdyPbM6u.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js.map → PkToolShowForm-DdyPbM6u.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js → PkToolShowImageGallery-BTEr7g8b.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js.map → PkToolShowImageGallery-BTEr7g8b.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js → PkToolShowProductList-TWwOQW0f.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js.map → PkToolShowProductList-TWwOQW0f.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js → PkToolShowSources-CK30aUfr.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js.map → PkToolShowSources-CK30aUfr.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js → PkToolShowSuggestedReply-TNaSN94U.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js.map → PkToolShowSuggestedReply-TNaSN94U.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js → PkToolShowVideo-CY3LSfda.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js.map → PkToolShowVideo-CY3LSfda.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js → PkToolShowWebPages-Bjyfu3SU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js.map → PkToolShowWebPages-Bjyfu3SU.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js → createChatbotApiClient-C0_uDob8.js} +56 -53
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js.map → createChatbotApiClient-C0_uDob8.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-DWf6im7k.js → index.es-C1u3kP7i.js} +14 -14
- package/dist-vue/_chunks/{index.es-DWf6im7k.js.map → index.es-C1u3kP7i.js.map} +1 -1
- package/dist-vue/_chunks/{schemas-Bt5eFdV0.js → schemas-Bu1lick6.js} +213 -204
- package/dist-vue/_chunks/schemas-Bu1lick6.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Dmxnn4xV.js → useChatbotStore-1mq1FznN.js} +22 -22
- package/dist-vue/_chunks/useChatbotStore-1mq1FznN.js.map +1 -0
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js → utils-BFoe95R4.js} +2 -2
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js.map → utils-BFoe95R4.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +87 -3
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3423 -3406
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/components/src/chat/useWakeupWatch.d.ts +5 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +16 -8
- package/dist-vue/packages/models/src/schema/Media.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/Notification.d.ts +94 -0
- package/package.json +1 -1
- package/dist/_chunks/Agent-DDAyL-4q.js.map +0 -1
- package/dist/_chunks/browser-BJcsjj9S.js.map +0 -1
- package/dist/_chunks/markdown-lpamC2tL.js.map +0 -1
- package/dist-vue/_chunks/Agent-Bd_4UVe4.js +0 -758
- package/dist-vue/_chunks/Document-BrMThi12.js.map +0 -1
- package/dist-vue/_chunks/Media-Bzv3zEWR.js +0 -135
- package/dist-vue/_chunks/Media-Bzv3zEWR.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-eXFjwNkz.js.map +0 -1
- package/dist-vue/_chunks/schemas-Bt5eFdV0.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Dmxnn4xV.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as e } from "./Agent-
|
|
1
|
+
import { k as e } from "./Agent-CV5O0I7I.js";
|
|
2
2
|
import "./src-DCfvejyT.js";
|
|
3
3
|
import { c as t, i as n, l as r, s as i } from "./message-BOiF6Bt5.js";
|
|
4
4
|
//#region ../../packages/components/src/chat/utils.ts
|
|
@@ -196,4 +196,4 @@ function R(e, t) {
|
|
|
196
196
|
//#endregion
|
|
197
197
|
export { l as C, a as S, E as T, N as _, u as a, d as b, k as c, L as d, x as f, D as g, I as h, s as i, T as l, R as m, f as n, O as o, b as p, j as r, A as s, _ as t, m as u, y as v, w, v as x, S as y };
|
|
198
198
|
|
|
199
|
-
//# sourceMappingURL=utils-
|
|
199
|
+
//# sourceMappingURL=utils-BFoe95R4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-CGb6Qc_9.js","names":["isPresentationTool","isTextPart","getToolPartName","isToolPart","isReasoningPart","mergeConsecutiveTextParts","merged","part","parts","prev","isWidgetPart","dropCorrectedWidgetErrors","lastDrawn","index","isStreamingPart","FILE_OUTPUT_PARTS","moveFileOutputsLast","files","feedPartKey","toolCallId","LIVE_REASONING_TAIL_LENGTH","FENCE_LINE","getMarkdownTail","markdown","maxLength","from","limit","boundary","length","cut","openFence","match","marker","rest","TOOL_APPROVAL_STATES","isToolApprovalPart","CONFIRM_TOOL_NAME","isToolConfirmPart","isConfirmationCardPart","getToolApprovalId","getPartState","isLoadingState","state","getContrast","hex","hexcolor","char","r","g","b","linearize","c","resolveContrastColor","textColor","mainColor","formatDuration","ms","$n","stringifyPayload","value","json","hasPayload","formAnswerAsSpoken","input","answer","question","questionById","step","said","id","formStepOptions","option","formAnswerSlots","slots","output","steps","assign","list","WEB_SEARCH_TOOL_TYPES","RICH_DETAIL_TOOL_TYPES","hasRichToolDetail","asRecord","pickString","keys","key","record","getToolPartSummary","queries","valid","query","sheet","range","getPartIcon","getToolPartLabel","$t"],"sources":["../../../../packages/components/src/chat/utils.ts"],"sourcesContent":["import type { UIMessage } from 'ai'\nimport { isPresentationTool } from 'models'\nimport {\n isTextPart,\n isFilePart,\n isToolPart,\n isReasoningPart,\n hasPartText,\n hasTextPart,\n getTextPart,\n getMessageText,\n getToolPartName,\n} from 'utils'\n\nexport {\n isTextPart,\n isFilePart,\n isToolPart,\n isReasoningPart,\n hasPartText,\n hasTextPart,\n getTextPart,\n getMessageText,\n}\n\n/**\n * Merges consecutive text parts into a single text part.\n * Claude (and other models) often produce multiple text parts during streaming\n * that should logically be a single block of text.\n */\nexport function mergeConsecutiveTextParts(\n parts: UIMessage['parts'],\n): UIMessage['parts'] {\n const merged: UIMessage['parts'] = []\n for (const part of parts) {\n if (!isTextPart(part)) {\n merged.push(part)\n continue\n }\n const prev = merged[merged.length - 1]\n if (prev && isTextPart(prev)) {\n merged[merged.length - 1] = { ...prev, text: prev.text + part.text }\n } else {\n merged.push(part)\n }\n }\n return merged\n}\n\nconst isWidgetPart = (\n part: UIMessage['parts'][number],\n): part is Extract<UIMessage['parts'][number], { type: `tool-${string}` }> =>\n isToolPart(part) && isPresentationTool(getToolPartName(part))\n\n/**\n * Drops a widget call refused for its arguments when a later call of the same\n * widget in the message was drawn: the turn corrected it (the backend's\n * `correctableInputRefusals`), and the refusal would sit next to the working\n * widget, `showForm` drawing its render error above the form. A refusal with\n * nothing drawn after it stays. Only the feed reads this: the steps timeline\n * keeps every call, the refused one included.\n */\nexport function dropCorrectedWidgetErrors(\n parts: UIMessage['parts'],\n): UIMessage['parts'] {\n const lastDrawn = new Map<string, number>()\n for (const [index, part] of parts.entries()) {\n if (\n isWidgetPart(part) &&\n part.state !== 'output-error' &&\n !isStreamingPart(part)\n ) {\n lastDrawn.set(part.type, index)\n }\n }\n return parts.filter(\n (part, index) =>\n !(\n isWidgetPart(part) &&\n part.state === 'output-error' &&\n (lastDrawn.get(part.type) ?? -1) > index\n ),\n )\n}\n\n/**\n * Tool calls whose output is a file for the user to download. The feed draws\n * them after the answer, where the reader arrives, wherever in the message the\n * model made the call: a version written before a long answer sat above it,\n * out of sight.\n */\nconst FILE_OUTPUT_PARTS: ReadonlySet<string> = new Set(['tool-editSpreadsheet'])\n\n/** The parts with the file outputs moved last, in their own order. */\nexport function moveFileOutputsLast(\n parts: UIMessage['parts'],\n): UIMessage['parts'] {\n const files = parts.filter((part) => FILE_OUTPUT_PARTS.has(part.type))\n return files.length > 0\n ? [\n ...parts.filter((part) => !FILE_OUTPUT_PARTS.has(part.type)),\n ...files,\n ]\n : parts\n}\n\n/**\n * The key of a part in the feed. Its position, except for a file output: that\n * one is always last, so its position moves as the answer grows, and keyed by\n * it the card would be redrawn at every new part.\n */\nexport function feedPartKey(\n part: UIMessage['parts'][number],\n index: number,\n): string | number {\n const toolCallId = (part as { toolCallId?: string }).toolCallId\n return FILE_OUTPUT_PARTS.has(part.type) && toolCallId\n ? `file-${toolCallId}`\n : index\n}\n\nexport function isStreamingPart(\n part: UIMessage['parts'][number] | null | undefined,\n): part is Extract<UIMessage['parts'][number], { streaming?: boolean }> {\n if (!part) {\n return false\n }\n if ('state' in part) {\n return part.state === 'streaming' || part.state === 'input-streaming'\n }\n return false\n}\n\n/**\n * How much of a reasoning still being written its live box renders. The box is\n * a few lines tall and follows the bottom, while the reasoning of one turn runs\n * to tens of kilobytes: chat `st0Eg8iG0zUX0HQN` wrote 92KB, and parsing all of\n * it at every delta froze the tab. Four thousand characters leave a few screens\n * to scroll back through, and a finished step renders all of it.\n */\nexport const LIVE_REASONING_TAIL_LENGTH = 4000\n\n// A fence opener or closer, also inside a list item or a quote, whose markers\n// and indentation are skipped. The rest of the line tells them apart: a\n// closing fence carries no info string.\nconst FENCE_LINE =\n /^[ \\t]*(?:(?:[-*+]|\\d{1,9}[.)])[ \\t]+|>[ \\t]?)*(`{3,}|~{3,})(.*)$/gm\n\n/**\n * The end of a markdown text, at most `maxLength` characters long, cut on a\n * blank line (a line break when there is none) so it does not open on half a\n * paragraph. A table or a formula can still be cut in two. An ellipsis marks\n * the cut. A cut inside a fenced code block reopens the fence, or the rest of\n * the text would render as code and the code as prose.\n */\nexport function getMarkdownTail(markdown: string, maxLength: number): string {\n if (markdown.length <= maxLength) {\n return markdown\n }\n const from = markdown.length - maxLength\n // The boundary is looked for in the first half of the window only: the one\n // blank line of the window can be the last thing written, and cutting there\n // would leave nothing to render.\n const limit = from + maxLength / 2\n const boundary = (index: number, length: number) =>\n index !== -1 && index < limit ? index + length : undefined\n const cut =\n boundary(markdown.indexOf('\\n\\n', from), 2) ??\n boundary(markdown.indexOf('\\n', from), 1) ??\n from\n let openFence: string | undefined\n for (const match of markdown.matchAll(FENCE_LINE)) {\n if (match.index >= cut) {\n break\n }\n const [, marker, rest] = match\n if (!openFence) {\n // A backtick in a backtick fence's info string makes it inline\n // code, not a fence.\n if (marker[0] === '`' && rest.includes('`')) {\n continue\n }\n openFence = marker\n } else if (\n marker[0] === openFence[0] &&\n marker.length >= openFence.length &&\n !rest.trim()\n ) {\n openFence = undefined\n }\n }\n const reopen = openFence ? `${openFence}\\n` : ''\n return `…\\n\\n${reopen}${markdown.slice(cut)}`\n}\n\n/**\n * States a tool part goes through when it needs the user's approval. They are\n * rendered by `PkToolApprovalCard` whatever the tool is, so the decision (and\n * its outcome) stays visible in the transcript.\n */\nconst TOOL_APPROVAL_STATES = new Set([\n 'approval-requested',\n 'approval-responded',\n 'output-denied',\n])\n\nexport function isToolApprovalPart(\n part: UIMessage['parts'][number] | null | undefined,\n): boolean {\n if (!isToolPart(part)) {\n return false\n }\n if (TOOL_APPROVAL_STATES.has(part.state)) {\n return true\n }\n // An executed (or errored) call that went through the gate keeps its\n // verdict in `approval`: the card stays in the transcript, so the user's\n // decision remains visible in the chat and in the log viewers (parity\n // with requestConfirm, whose 'confirmed' output is persisted).\n return (part as { approval?: unknown }).approval != null\n}\n\n/**\n * The client-side tool the model uses to have an action it described approved.\n * It predates the SDK's approval gate and keeps its own round-trip (it resolves\n * through `addToolOutput`), but it asks the user the very same question, so it\n * shares `PkToolApprovalCard` instead of having a card of its own.\n */\nexport const CONFIRM_TOOL_NAME = 'requestConfirm'\n\nexport function isToolConfirmPart(\n part: UIMessage['parts'][number] | null | undefined,\n): boolean {\n return isToolPart(part) && part.type === `tool-${CONFIRM_TOOL_NAME}`\n}\n\n/** True for any part the confirmation card is responsible for. */\nexport function isConfirmationCardPart(\n part: UIMessage['parts'][number] | null | undefined,\n): boolean {\n return isToolApprovalPart(part) || isToolConfirmPart(part)\n}\n\n/** The id of the pending approval request on a tool part, if any. */\nexport function getToolApprovalId(\n part: UIMessage['parts'][number] | null | undefined,\n): string | undefined {\n if (!isToolPart(part)) {\n return undefined\n }\n return (part as { approval?: { id?: string } }).approval?.id\n}\n\nexport function getPartState(\n part: UIMessage['parts'][number] | null | undefined,\n): string | undefined {\n if (!part) {\n return undefined\n }\n if ('state' in part) {\n return part.state\n }\n return undefined\n}\n\nexport function isLoadingState(state?: string): boolean {\n if (!state) {\n return false\n }\n return ['streaming'].includes(state)\n}\n\nexport function getContrast(hexcolor: string = '000000'): 'black' | 'white' {\n let hex = hexcolor.replace('#', '')\n\n // Expand 3-character hex to 6-character (e.g., #ccc -> #cccccc)\n if (hex.length === 3) {\n hex = hex\n .split('')\n .map((char) => char + char)\n .join('')\n }\n\n // WCAG relative luminance\n const r = parseInt(hex.substring(0, 2), 16) / 255\n const g = parseInt(hex.substring(2, 4), 16) / 255\n const b = parseInt(hex.substring(4, 6), 16) / 255\n\n const linearize = (c: number) =>\n c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4\n\n const luminance =\n 0.2126 * linearize(r) + 0.7152 * linearize(g) + 0.0722 * linearize(b)\n\n return luminance > 0.179 ? 'black' : 'white'\n}\n\n/**\n * Resolves the contrast color based on the user's `textColor` preference.\n * Falls back to WCAG auto-detection via `getContrast` when set to `'auto'` or `undefined`.\n */\nexport function resolveContrastColor(\n textColor: 'auto' | 'white' | 'black' | undefined,\n mainColor: string | undefined,\n): 'black' | 'white' {\n if (textColor === 'white' || textColor === 'black') {\n return textColor\n }\n return getContrast(mainColor)\n}\n\n/**\n * Formats a duration in milliseconds using the i18n `seconds` number format\n * (e.g. \"12,4 secondi\" / \"12.4 seconds\"). Returns undefined for durations\n * that would render as \"0 seconds\" (less than 0.05s).\n */\nexport function formatDuration(\n $n: (value: number, format: string) => string,\n ms?: number,\n): string | undefined {\n if (ms === undefined || ms < 50) {\n return undefined\n }\n return $n(ms / 1000, 'seconds')\n}\n\n/**\n * Stringifies a tool payload for the raw fallback view. Returns undefined for\n * empty values so the caller can skip rendering the block entirely.\n */\nexport function stringifyPayload(value: unknown): string | undefined {\n if (value === undefined) {\n return undefined\n }\n if (typeof value === 'string') {\n return value.trim() || undefined\n }\n try {\n const json = JSON.stringify(value, null, 2)\n return json === '{}' || json === '[]' ? undefined : json\n } catch {\n return undefined\n }\n}\n\n/**\n * True when a tool payload carries something worth rendering, so a caller can\n * skip the block without stringifying the value twice.\n */\nexport function hasPayload(value: unknown): boolean {\n return stringifyPayload(value) !== undefined\n}\n\n/**\n * Turns the answers of a form into the sentence the caller would have said.\n *\n * On a call the tool loop is over by the time the form is on screen, so the\n * answers go back to the agent as a user message (see `sendUserMessage` in\n * `useVoiceSession`). Each answer is paired with its question, because that is\n * how a person would say it and because the agent hears it with no widget\n * attached.\n */\nexport function formAnswerAsSpoken(\n part: unknown,\n answer: string | { answers: { id: string; value: unknown }[] },\n): string {\n const input = (\n part as {\n input?: {\n steps?: { id: string; question?: string }[]\n question?: string\n }\n }\n )?.input\n\n if (typeof answer === 'string') {\n const question = input?.question ?? input?.steps?.[0]?.question\n return question ? `${question} ${answer}` : answer\n }\n\n const questionById = new Map(\n (input?.steps ?? []).map((step) => [step.id, step.question]),\n )\n const lines = answer.answers\n .filter(\n ({ value }) =>\n value !== null &&\n value !== '' &&\n !(Array.isArray(value) && !value.length),\n )\n .map(({ id, value }) => {\n const said = Array.isArray(value) ? value.join(', ') : String(value)\n const question = questionById.get(id)\n return question ? `${question} ${said}` : said\n })\n\n return lines.join('. ')\n}\n\n/**\n * The choices of a form step, as the radio and checkbox editors take them.\n *\n * The `value` is the LABEL and not the position, because it is what travels\n * back to the model as the answer: it reads the words it wrote, not an index.\n * Nothing here caps the list, and nothing should: the number of options an\n * agent configures is advice to the model, so a step can legitimately carry\n * more (see `showForm.tool.ts`).\n */\nexport function formStepOptions(\n step: { options?: { label: string; description?: string }[] } | undefined,\n): { label: string; value: string; description?: string }[] {\n if (!step?.options) {\n return []\n }\n return step.options.map((option) => ({\n label: option.label,\n value: option.label,\n description: option.description,\n }))\n}\n\n/**\n * Spreads the answers a form comes back with onto one slot PER STEP.\n *\n * A form's answers travel paired with step ids, and the tool schema does not\n * enforce that those ids are unique: a `.refine()` there would refuse the whole\n * form over a duplicate, which is the failure the schema was just cured of (see\n * the gotchas entry \"A configurable cap does not belong in an inputSchema\").\n * So the duplicate has to be survivable here. Keyed by id, two steps sharing\n * one collapsed onto a single answer: the second question showed the first\n * one's reply, and submitting sent that reply twice. Keyed by position, each\n * step keeps its own.\n *\n * A duplicated id restores the same incoming value to every step claiming it,\n * which is as much as the payload allows: the ids are all it says.\n */\nexport function formAnswerSlots(\n steps: { id: string }[],\n output: unknown,\n): Record<number, unknown> {\n const slots: Record<number, unknown> = {}\n if (output === undefined || output === null) {\n return slots\n }\n // A legacy single-choice answer is the plain string, and it can only\n // belong to a single-step form.\n if (typeof output === 'string') {\n if (steps.length === 1) {\n slots[0] = output\n }\n return slots\n }\n const assign = (id: string, value: unknown) => {\n steps.forEach((step, index) => {\n if (step.id === id) {\n slots[index] = value\n }\n })\n }\n const list = (output as { answers?: unknown }).answers\n if (Array.isArray(list)) {\n for (const answer of list as { id?: unknown; value?: unknown }[]) {\n if (typeof answer?.id === 'string') {\n assign(answer.id, answer.value)\n }\n }\n return slots\n }\n // Forms answered on a platform channel (the Teams modal) come back as a\n // flat record keyed by step id.\n for (const [id, value] of Object.entries(\n output as Record<string, unknown>,\n )) {\n if (value !== undefined) {\n assign(id, value)\n }\n }\n return slots\n}\n\n// Provider-native web search tool part types\nexport const WEB_SEARCH_TOOL_TYPES = [\n 'tool-perplexity_search',\n 'tool-parallel_search',\n 'tool-web_search',\n 'tool-google_search',\n]\n\n// Tool part types with a dedicated rich rendering in PkChatbotStepToolDetail\nconst RICH_DETAIL_TOOL_TYPES = new Set([\n 'tool-searchInKnowledgeBase',\n 'tool-retrieveRevisedAnswers',\n 'tool-expandChunkContext',\n 'tool-readDocumentFile',\n 'tool-getWeather',\n 'tool-geocode',\n 'tool-recallUserMemory',\n 'tool-saveUserMemory',\n ...WEB_SEARCH_TOOL_TYPES,\n])\n\nexport function hasRichToolDetail(\n part?: UIMessage['parts'][number] | null,\n): boolean {\n return isToolPart(part) && RICH_DETAIL_TOOL_TYPES.has(part.type)\n}\n\nconst asRecord = (value: unknown): Record<string, unknown> | undefined =>\n value && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined\n\nconst pickString = (\n record: Record<string, unknown> | undefined,\n ...keys: string[]\n): string | undefined => {\n for (const key of keys) {\n const value = record?.[key]\n if (typeof value === 'string' && value.trim()) {\n return value\n }\n }\n return undefined\n}\n\n/**\n * Returns a short inline summary for a tool part (search queries, location,\n * document name, ...) to be shown next to the step label without expanding\n * the step body.\n */\nexport function getToolPartSummary(\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (!isToolPart(part)) {\n return undefined\n }\n const input = asRecord('input' in part ? part.input : undefined)\n const output = asRecord('output' in part ? part.output : undefined)\n if (\n part.type === 'tool-searchInKnowledgeBase' ||\n WEB_SEARCH_TOOL_TYPES.includes(part.type)\n ) {\n const queries = input?.queries\n if (Array.isArray(queries)) {\n const valid = queries.filter(\n (query): query is string =>\n typeof query === 'string' && Boolean(query.trim()),\n )\n return valid.length ? valid.join(' · ') : undefined\n }\n return pickString(input, 'query', 'objective')\n }\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return pickString(input, 'query')\n }\n if (part.type === 'tool-getWeather') {\n return (\n pickString(output, 'location') ?? pickString(input, 'locationName')\n )\n }\n if (part.type === 'tool-geocode') {\n return pickString(input, 'locationName')\n }\n if (part.type === 'tool-expandChunkContext') {\n return pickString(output, 'documentName')\n }\n if (part.type === 'tool-readDocumentFile') {\n return pickString(output, 'name')\n }\n if (part.type === 'tool-readSpreadsheet') {\n const sheet = pickString(input, 'sheet')\n const range = pickString(input, 'range')\n return sheet && range ? `${sheet}!${range}` : sheet\n }\n if (part.type === 'tool-editSpreadsheet') {\n return pickString(output, 'filename')\n }\n if (part.type === 'tool-querySpreadsheet') {\n // The file when the step asked for the schema; a query has no name.\n return pickString(output, 'file')\n }\n if (part.type === 'tool-recallUserMemory') {\n return pickString(input, 'query')\n }\n if (part.type === 'tool-saveUserMemory') {\n return pickString(input, 'content', 'query')\n }\n return undefined\n}\n\n// Get part icon\nexport function getPartIcon(\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (isToolPart(part)) {\n if (part.type.includes('tool-subagent')) {\n return 'ri:robot-2-line'\n }\n if (part.type === 'tool-runWorker') {\n return 'ri:flow-chart'\n }\n if (part.type === 'tool-scheduleWakeup') {\n return 'ri:alarm-line'\n }\n if (part.type === 'tool-fetchTeamsChannelHistory') {\n return 'ri:chat-history-line'\n }\n if (part.type === 'tool-readEarlierMessages') {\n return 'ri:history-line'\n }\n if (part.type === 'tool-enableTools') {\n return 'ri:toggle-line'\n }\n if (part.type.includes('tool-mcp')) {\n return 'mcp'\n }\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return 'ri:file-edit-line'\n }\n if (part.type === 'tool-searchInKnowledgeBase') {\n return 'ri:search-line'\n }\n if (part.type === 'tool-expandChunkContext') {\n return 'ri:file-search-line'\n }\n if (part.type === 'tool-readDocumentFile') {\n return 'ri:file-text-line'\n }\n if (part.type === 'tool-readSpreadsheet') {\n return 'ri:table-line'\n }\n if (part.type === 'tool-editSpreadsheet') {\n return 'ri:file-excel-2-line'\n }\n if (part.type === 'tool-querySpreadsheet') {\n return 'ri:database-2-line'\n }\n if (part.type === 'tool-geocode') {\n return 'ri:map-2-line'\n }\n if (part.type === 'tool-getWeather') {\n return 'ri:sun-cloudy-line'\n }\n if (part.type === 'tool-recallUserMemory') {\n return 'ri:brain-line'\n }\n if (part.type === 'tool-saveUserMemory') {\n return 'ri:save-3-line'\n }\n if (part.type === 'tool-showWeather') {\n return 'ri:sun-line'\n }\n if (part.type === 'tool-showDiagram') {\n return 'ri:flow-chart'\n }\n if (part.type === 'tool-showSources') {\n return 'ri:book-2-line'\n }\n if (part.type === 'tool-showForm') {\n return 'ri:survey-line'\n }\n if (part.type === 'tool-showMultipleChoice') {\n return 'ri:checkbox-multiple-line'\n }\n if (part.type === 'tool-showArtifact') {\n return 'ri:file-code-line'\n }\n if (part.type === 'tool-showEmail') {\n return 'ri:mail-line'\n }\n if (part.type === 'tool-showMessage') {\n return 'ri:chat-1-line'\n }\n if (part.type === 'tool-showWebPages') {\n return 'ri:pages-line'\n }\n if (part.type === 'tool-showProductList') {\n return 'ri:shopping-bag-line'\n }\n if (part.type === 'tool-showContactForm') {\n return 'ri:send-plane-2-line'\n }\n if (part.type === 'tool-showCalendarEvent') {\n return 'ri:calendar-event-line'\n }\n if (part.type === 'tool-showComparison') {\n return 'ri:scales-line'\n }\n if (part.type === 'tool-showLocation') {\n return 'ri:map-pin-line'\n }\n if (part.type === 'tool-showQrCode') {\n return 'ri:qr-code-line'\n }\n if (part.type === 'tool-showImageGallery') {\n return 'ri:image-line'\n }\n if (part.type === 'tool-showVideo') {\n return 'ri:film-line'\n }\n if (part.type === 'tool-showSuggestedReply') {\n return 'ri:corner-down-right-line'\n }\n if (part.type === 'tool-requestGeolocation') {\n return 'ri:map-pin-user-line'\n }\n if (part.type === 'tool-disconnectOAuthConnection') {\n return 'ri:link-unlink'\n }\n if (\n part.type === 'tool-perplexity_search' ||\n part.type === 'tool-parallel_search' ||\n part.type === 'tool-web_search' ||\n part.type === 'tool-google_search'\n ) {\n return 'ri:global-line'\n }\n return 'ri:tools-line'\n }\n if (isReasoningPart(part)) {\n return 'ri:lightbulb-line'\n }\n if (isTextPart(part)) {\n return 'ri:double-quotes-r'\n }\n return undefined\n}\n\n// Get part label\nexport function getToolPartLabel(\n $t: (key: string) => string,\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (isToolPart(part)) {\n if (part.type.includes('tool-subagent')) {\n return $t(`messagePart.runSubagent`)\n }\n if (part.type === 'tool-runWorker') {\n return $t(`messagePart.runWorker`)\n }\n if (part.type === 'tool-scheduleWakeup') {\n return $t(`messagePart.scheduleWakeup`)\n }\n if (part.type === 'tool-fetchTeamsChannelHistory') {\n return $t(`messagePart.fetchTeamsChannelHistory`)\n }\n if (part.type === 'tool-readEarlierMessages') {\n return $t(`messagePart.readEarlierMessages`)\n }\n if (part.type === 'tool-enableTools') {\n return $t(`messagePart.enableTools`)\n }\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return $t(`messagePart.revisedAnswers`)\n }\n if (part.type === 'tool-searchInKnowledgeBase') {\n return $t(`messagePart.searchingDocuments`)\n }\n if (part.type === 'tool-expandChunkContext') {\n return $t(`messagePart.expandChunkContext`)\n }\n if (part.type === 'tool-readDocumentFile') {\n return $t(`messagePart.readDocumentFile`)\n }\n if (part.type === 'tool-readSpreadsheet') {\n return $t(`messagePart.readSpreadsheet`)\n }\n if (part.type === 'tool-editSpreadsheet') {\n return $t(`messagePart.editSpreadsheet`)\n }\n if (part.type === 'tool-querySpreadsheet') {\n return $t(`messagePart.querySpreadsheet`)\n }\n if (part.type === 'tool-geocode') {\n return $t(`messagePart.geocode`)\n }\n if (part.type === 'tool-getWeather') {\n return $t(`messagePart.getWeather`)\n }\n if (part.type === 'tool-recallUserMemory') {\n return $t(`messagePart.recallUserMemory`)\n }\n if (part.type === 'tool-saveUserMemory') {\n return $t(`messagePart.saveUserMemory`)\n }\n if (part.type === 'tool-showWeather') {\n return $t(`messagePart.showWeather`)\n }\n if (part.type === 'tool-showForm') {\n return $t(`messagePart.showForm`)\n }\n if (part.type === 'tool-showDiagram') {\n return $t(`messagePart.showDiagram`)\n }\n if (part.type === 'tool-showSources') {\n return $t(`messagePart.showSources`)\n }\n if (part.type === 'tool-showMultipleChoice') {\n return $t(`messagePart.showMultipleChoice`)\n }\n if (part.type === 'tool-showArtifact') {\n return $t(`messagePart.showArtifact`)\n }\n if (part.type === 'tool-showEmail') {\n return $t(`messagePart.showEmail`)\n }\n if (part.type === 'tool-showMessage') {\n return $t(`messagePart.showMessage`)\n }\n if (part.type === 'tool-showWebPages') {\n return $t(`messagePart.showWebPages`)\n }\n if (part.type === 'tool-showProducts') {\n return $t(`messagePart.showProducts`)\n }\n if (part.type === 'tool-showContactForm') {\n return $t(`messagePart.showContactForm`)\n }\n if (part.type === 'tool-showCalendarEvent') {\n return $t(`messagePart.showCalendarEvent`)\n }\n if (part.type === 'tool-showComparison') {\n return $t(`messagePart.showComparison`)\n }\n if (part.type === 'tool-showLocation') {\n return $t(`messagePart.showLocation`)\n }\n if (part.type === 'tool-showQrCode') {\n return $t(`messagePart.showQrCode`)\n }\n if (part.type === 'tool-showImageGallery') {\n return $t(`messagePart.showImageGallery`)\n }\n if (part.type === 'tool-showVideo') {\n return $t(`messagePart.showVideo`)\n }\n if (part.type === 'tool-showSuggestedReply') {\n return $t(`messagePart.showSuggestedReply`)\n }\n if (part.type === 'tool-requestGeolocation') {\n return $t(`messagePart.requestGeolocation`)\n }\n if (part.type === 'tool-disconnectOAuthConnection') {\n return $t(`messagePart.disconnectOAuthConnection`)\n }\n if (WEB_SEARCH_TOOL_TYPES.includes(part.type)) {\n return $t(`messagePart.webSearch`)\n }\n return $t(`messagePart.tool`)\n }\n if (isReasoningPart(part)) {\n return $t(`messagePart.reasoning`)\n }\n return $t(`messagePart.streaming`)\n}\n"],"mappings":";;;;AA8BA,SAAgBK,EACZ,GACkB;CAClB,IAAMC,IAA6B,CAAC;CACpC,KAAK,IAAMC,KAAQC,GAAO;EACtB,IAAI,CAACP,EAAWM,CAAI,GAAG;GACnB,EAAO,KAAKA,CAAI;GAChB;EACJ;EACA,IAAME,IAAOH,EAAOA,EAAO,SAAS;EACpC,AAAIG,KAAQR,EAAWQ,CAAI,IACvB,EAAOH,EAAO,SAAS,KAAK;GAAE,GAAGG;GAAM,MAAMA,EAAK,OAAOF,EAAK;EAAK,IAEnED,EAAO,KAAKC,CAAI;CAExB;CACA,OAAOD;AACX;AAEA,IAAMI,KACF,MAEAP,EAAWI,CAAI,KAAKP,EAAmBE,EAAgBK,CAAI,CAAC;AAUhE,SAAgBI,EACZ,GACkB;CAClB,IAAMC,oBAAY,IAAI,IAAoB;CAC1C,KAAK,IAAM,CAACC,GAAON,MAASC,EAAM,QAAQ,GACtC,AACIE,EAAaH,CAAI,KACjBA,EAAK,UAAU,kBACf,CAACO,EAAgBP,CAAI,KAErBK,EAAU,IAAIL,EAAK,MAAMM,CAAK;CAGtC,OAAOL,EAAM,QACR,GAAM,MACH,EACIE,EAAaH,CAAI,KACjBA,EAAK,UAAU,mBACdK,EAAU,IAAIL,EAAK,IAAI,KAAK,MAAMM,EAE/C;AACJ;AAQA,IAAME,oBAAyC,IAAI,IAAI,CAAC,sBAAsB,CAAC;AAG/E,SAAgBC,EACZ,GACkB;CAClB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AS,qBACPuF,EAAG,yBAAyB,IAEnCvF,EAAK,SAAS,sBACPuF,EAAG,0BAA0B,IAEpCvF,EAAK,SAAS,sBACPuF,EAAG,0BAA0B,IAEpCvF,EAAK,SAAS,yBACPuF,EAAG,6BAA6B,IAEvCvF,EAAK,SAAS,2BACPuF,EAAG,+BAA+B,IAEzCvF,EAAK,SAAS,wBACPuF,EAAG,4BAA4B,IAEtCvF,EAAK,SAAS,sBACPuF,EAAG,0BAA0B,IAEpCvF,EAAK,SAAS,oBACPuF,EAAG,wBAAwB,IAElCvF,EAAK,SAAS,0BACPuF,EAAG,8BAA8B,IAExCvF,EAAK,SAAS,mBACPuF,EAAG,uBAAuB,IAEjCvF,EAAK,SAAS,4BACPuF,EAAG,gCAAgC,IAE1CvF,EAAK,SAAS,4BACPuF,EAAG,gCAAgC,IAE1CvF,EAAK,SAAS,mCACPuF,EAAG,uCAAuC,IAEjDhB,EAAsB,SAASvE,EAAK,IAAI,IACjCuF,EAAG,uBAAuB,IAE9BA,EAAG,kBAAkB,IAE5B1F,EAAgBG,CAAI,IACbuF,EAAG,uBAAuB,IAE9BA,EAAG,uBAAuB;AACrC"}
|
|
1
|
+
{"version":3,"file":"utils-BFoe95R4.js","names":["isPresentationTool","isTextPart","getToolPartName","isToolPart","isReasoningPart","mergeConsecutiveTextParts","merged","part","parts","prev","isWidgetPart","dropCorrectedWidgetErrors","lastDrawn","index","isStreamingPart","FILE_OUTPUT_PARTS","moveFileOutputsLast","files","feedPartKey","toolCallId","LIVE_REASONING_TAIL_LENGTH","FENCE_LINE","getMarkdownTail","markdown","maxLength","from","limit","boundary","length","cut","openFence","match","marker","rest","TOOL_APPROVAL_STATES","isToolApprovalPart","CONFIRM_TOOL_NAME","isToolConfirmPart","isConfirmationCardPart","getToolApprovalId","getPartState","isLoadingState","state","getContrast","hex","hexcolor","char","r","g","b","linearize","c","resolveContrastColor","textColor","mainColor","formatDuration","ms","$n","stringifyPayload","value","json","hasPayload","formAnswerAsSpoken","input","answer","question","questionById","step","said","id","formStepOptions","option","formAnswerSlots","slots","output","steps","assign","list","WEB_SEARCH_TOOL_TYPES","RICH_DETAIL_TOOL_TYPES","hasRichToolDetail","asRecord","pickString","keys","key","record","getToolPartSummary","queries","valid","query","sheet","range","getPartIcon","getToolPartLabel","$t"],"sources":["../../../../packages/components/src/chat/utils.ts"],"sourcesContent":["import type { UIMessage } from 'ai'\nimport { isPresentationTool } from 'models'\nimport {\n isTextPart,\n isFilePart,\n isToolPart,\n isReasoningPart,\n hasPartText,\n hasTextPart,\n getTextPart,\n getMessageText,\n getToolPartName,\n} from 'utils'\n\nexport {\n isTextPart,\n isFilePart,\n isToolPart,\n isReasoningPart,\n hasPartText,\n hasTextPart,\n getTextPart,\n getMessageText,\n}\n\n/**\n * Merges consecutive text parts into a single text part.\n * Claude (and other models) often produce multiple text parts during streaming\n * that should logically be a single block of text.\n */\nexport function mergeConsecutiveTextParts(\n parts: UIMessage['parts'],\n): UIMessage['parts'] {\n const merged: UIMessage['parts'] = []\n for (const part of parts) {\n if (!isTextPart(part)) {\n merged.push(part)\n continue\n }\n const prev = merged[merged.length - 1]\n if (prev && isTextPart(prev)) {\n merged[merged.length - 1] = { ...prev, text: prev.text + part.text }\n } else {\n merged.push(part)\n }\n }\n return merged\n}\n\nconst isWidgetPart = (\n part: UIMessage['parts'][number],\n): part is Extract<UIMessage['parts'][number], { type: `tool-${string}` }> =>\n isToolPart(part) && isPresentationTool(getToolPartName(part))\n\n/**\n * Drops a widget call refused for its arguments when a later call of the same\n * widget in the message was drawn: the turn corrected it (the backend's\n * `correctableInputRefusals`), and the refusal would sit next to the working\n * widget, `showForm` drawing its render error above the form. A refusal with\n * nothing drawn after it stays. Only the feed reads this: the steps timeline\n * keeps every call, the refused one included.\n */\nexport function dropCorrectedWidgetErrors(\n parts: UIMessage['parts'],\n): UIMessage['parts'] {\n const lastDrawn = new Map<string, number>()\n for (const [index, part] of parts.entries()) {\n if (\n isWidgetPart(part) &&\n part.state !== 'output-error' &&\n !isStreamingPart(part)\n ) {\n lastDrawn.set(part.type, index)\n }\n }\n return parts.filter(\n (part, index) =>\n !(\n isWidgetPart(part) &&\n part.state === 'output-error' &&\n (lastDrawn.get(part.type) ?? -1) > index\n ),\n )\n}\n\n/**\n * Tool calls whose output is a file for the user to download. The feed draws\n * them after the answer, where the reader arrives, wherever in the message the\n * model made the call: a version written before a long answer sat above it,\n * out of sight.\n */\nconst FILE_OUTPUT_PARTS: ReadonlySet<string> = new Set(['tool-editSpreadsheet'])\n\n/** The parts with the file outputs moved last, in their own order. */\nexport function moveFileOutputsLast(\n parts: UIMessage['parts'],\n): UIMessage['parts'] {\n const files = parts.filter((part) => FILE_OUTPUT_PARTS.has(part.type))\n return files.length > 0\n ? [\n ...parts.filter((part) => !FILE_OUTPUT_PARTS.has(part.type)),\n ...files,\n ]\n : parts\n}\n\n/**\n * The key of a part in the feed. Its position, except for a file output: that\n * one is always last, so its position moves as the answer grows, and keyed by\n * it the card would be redrawn at every new part.\n */\nexport function feedPartKey(\n part: UIMessage['parts'][number],\n index: number,\n): string | number {\n const toolCallId = (part as { toolCallId?: string }).toolCallId\n return FILE_OUTPUT_PARTS.has(part.type) && toolCallId\n ? `file-${toolCallId}`\n : index\n}\n\nexport function isStreamingPart(\n part: UIMessage['parts'][number] | null | undefined,\n): part is Extract<UIMessage['parts'][number], { streaming?: boolean }> {\n if (!part) {\n return false\n }\n if ('state' in part) {\n return part.state === 'streaming' || part.state === 'input-streaming'\n }\n return false\n}\n\n/**\n * How much of a reasoning still being written its live box renders. The box is\n * a few lines tall and follows the bottom, while the reasoning of one turn runs\n * to tens of kilobytes: chat `st0Eg8iG0zUX0HQN` wrote 92KB, and parsing all of\n * it at every delta froze the tab. Four thousand characters leave a few screens\n * to scroll back through, and a finished step renders all of it.\n */\nexport const LIVE_REASONING_TAIL_LENGTH = 4000\n\n// A fence opener or closer, also inside a list item or a quote, whose markers\n// and indentation are skipped. The rest of the line tells them apart: a\n// closing fence carries no info string.\nconst FENCE_LINE =\n /^[ \\t]*(?:(?:[-*+]|\\d{1,9}[.)])[ \\t]+|>[ \\t]?)*(`{3,}|~{3,})(.*)$/gm\n\n/**\n * The end of a markdown text, at most `maxLength` characters long, cut on a\n * blank line (a line break when there is none) so it does not open on half a\n * paragraph. A table or a formula can still be cut in two. An ellipsis marks\n * the cut. A cut inside a fenced code block reopens the fence, or the rest of\n * the text would render as code and the code as prose.\n */\nexport function getMarkdownTail(markdown: string, maxLength: number): string {\n if (markdown.length <= maxLength) {\n return markdown\n }\n const from = markdown.length - maxLength\n // The boundary is looked for in the first half of the window only: the one\n // blank line of the window can be the last thing written, and cutting there\n // would leave nothing to render.\n const limit = from + maxLength / 2\n const boundary = (index: number, length: number) =>\n index !== -1 && index < limit ? index + length : undefined\n const cut =\n boundary(markdown.indexOf('\\n\\n', from), 2) ??\n boundary(markdown.indexOf('\\n', from), 1) ??\n from\n let openFence: string | undefined\n for (const match of markdown.matchAll(FENCE_LINE)) {\n if (match.index >= cut) {\n break\n }\n const [, marker, rest] = match\n if (!openFence) {\n // A backtick in a backtick fence's info string makes it inline\n // code, not a fence.\n if (marker[0] === '`' && rest.includes('`')) {\n continue\n }\n openFence = marker\n } else if (\n marker[0] === openFence[0] &&\n marker.length >= openFence.length &&\n !rest.trim()\n ) {\n openFence = undefined\n }\n }\n const reopen = openFence ? `${openFence}\\n` : ''\n return `…\\n\\n${reopen}${markdown.slice(cut)}`\n}\n\n/**\n * States a tool part goes through when it needs the user's approval. They are\n * rendered by `PkToolApprovalCard` whatever the tool is, so the decision (and\n * its outcome) stays visible in the transcript.\n */\nconst TOOL_APPROVAL_STATES = new Set([\n 'approval-requested',\n 'approval-responded',\n 'output-denied',\n])\n\nexport function isToolApprovalPart(\n part: UIMessage['parts'][number] | null | undefined,\n): boolean {\n if (!isToolPart(part)) {\n return false\n }\n if (TOOL_APPROVAL_STATES.has(part.state)) {\n return true\n }\n // An executed (or errored) call that went through the gate keeps its\n // verdict in `approval`: the card stays in the transcript, so the user's\n // decision remains visible in the chat and in the log viewers (parity\n // with requestConfirm, whose 'confirmed' output is persisted).\n return (part as { approval?: unknown }).approval != null\n}\n\n/**\n * The client-side tool the model uses to have an action it described approved.\n * It predates the SDK's approval gate and keeps its own round-trip (it resolves\n * through `addToolOutput`), but it asks the user the very same question, so it\n * shares `PkToolApprovalCard` instead of having a card of its own.\n */\nexport const CONFIRM_TOOL_NAME = 'requestConfirm'\n\nexport function isToolConfirmPart(\n part: UIMessage['parts'][number] | null | undefined,\n): boolean {\n return isToolPart(part) && part.type === `tool-${CONFIRM_TOOL_NAME}`\n}\n\n/** True for any part the confirmation card is responsible for. */\nexport function isConfirmationCardPart(\n part: UIMessage['parts'][number] | null | undefined,\n): boolean {\n return isToolApprovalPart(part) || isToolConfirmPart(part)\n}\n\n/** The id of the pending approval request on a tool part, if any. */\nexport function getToolApprovalId(\n part: UIMessage['parts'][number] | null | undefined,\n): string | undefined {\n if (!isToolPart(part)) {\n return undefined\n }\n return (part as { approval?: { id?: string } }).approval?.id\n}\n\nexport function getPartState(\n part: UIMessage['parts'][number] | null | undefined,\n): string | undefined {\n if (!part) {\n return undefined\n }\n if ('state' in part) {\n return part.state\n }\n return undefined\n}\n\nexport function isLoadingState(state?: string): boolean {\n if (!state) {\n return false\n }\n return ['streaming'].includes(state)\n}\n\nexport function getContrast(hexcolor: string = '000000'): 'black' | 'white' {\n let hex = hexcolor.replace('#', '')\n\n // Expand 3-character hex to 6-character (e.g., #ccc -> #cccccc)\n if (hex.length === 3) {\n hex = hex\n .split('')\n .map((char) => char + char)\n .join('')\n }\n\n // WCAG relative luminance\n const r = parseInt(hex.substring(0, 2), 16) / 255\n const g = parseInt(hex.substring(2, 4), 16) / 255\n const b = parseInt(hex.substring(4, 6), 16) / 255\n\n const linearize = (c: number) =>\n c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4\n\n const luminance =\n 0.2126 * linearize(r) + 0.7152 * linearize(g) + 0.0722 * linearize(b)\n\n return luminance > 0.179 ? 'black' : 'white'\n}\n\n/**\n * Resolves the contrast color based on the user's `textColor` preference.\n * Falls back to WCAG auto-detection via `getContrast` when set to `'auto'` or `undefined`.\n */\nexport function resolveContrastColor(\n textColor: 'auto' | 'white' | 'black' | undefined,\n mainColor: string | undefined,\n): 'black' | 'white' {\n if (textColor === 'white' || textColor === 'black') {\n return textColor\n }\n return getContrast(mainColor)\n}\n\n/**\n * Formats a duration in milliseconds using the i18n `seconds` number format\n * (e.g. \"12,4 secondi\" / \"12.4 seconds\"). Returns undefined for durations\n * that would render as \"0 seconds\" (less than 0.05s).\n */\nexport function formatDuration(\n $n: (value: number, format: string) => string,\n ms?: number,\n): string | undefined {\n if (ms === undefined || ms < 50) {\n return undefined\n }\n return $n(ms / 1000, 'seconds')\n}\n\n/**\n * Stringifies a tool payload for the raw fallback view. Returns undefined for\n * empty values so the caller can skip rendering the block entirely.\n */\nexport function stringifyPayload(value: unknown): string | undefined {\n if (value === undefined) {\n return undefined\n }\n if (typeof value === 'string') {\n return value.trim() || undefined\n }\n try {\n const json = JSON.stringify(value, null, 2)\n return json === '{}' || json === '[]' ? undefined : json\n } catch {\n return undefined\n }\n}\n\n/**\n * True when a tool payload carries something worth rendering, so a caller can\n * skip the block without stringifying the value twice.\n */\nexport function hasPayload(value: unknown): boolean {\n return stringifyPayload(value) !== undefined\n}\n\n/**\n * Turns the answers of a form into the sentence the caller would have said.\n *\n * On a call the tool loop is over by the time the form is on screen, so the\n * answers go back to the agent as a user message (see `sendUserMessage` in\n * `useVoiceSession`). Each answer is paired with its question, because that is\n * how a person would say it and because the agent hears it with no widget\n * attached.\n */\nexport function formAnswerAsSpoken(\n part: unknown,\n answer: string | { answers: { id: string; value: unknown }[] },\n): string {\n const input = (\n part as {\n input?: {\n steps?: { id: string; question?: string }[]\n question?: string\n }\n }\n )?.input\n\n if (typeof answer === 'string') {\n const question = input?.question ?? input?.steps?.[0]?.question\n return question ? `${question} ${answer}` : answer\n }\n\n const questionById = new Map(\n (input?.steps ?? []).map((step) => [step.id, step.question]),\n )\n const lines = answer.answers\n .filter(\n ({ value }) =>\n value !== null &&\n value !== '' &&\n !(Array.isArray(value) && !value.length),\n )\n .map(({ id, value }) => {\n const said = Array.isArray(value) ? value.join(', ') : String(value)\n const question = questionById.get(id)\n return question ? `${question} ${said}` : said\n })\n\n return lines.join('. ')\n}\n\n/**\n * The choices of a form step, as the radio and checkbox editors take them.\n *\n * The `value` is the LABEL and not the position, because it is what travels\n * back to the model as the answer: it reads the words it wrote, not an index.\n * Nothing here caps the list, and nothing should: the number of options an\n * agent configures is advice to the model, so a step can legitimately carry\n * more (see `showForm.tool.ts`).\n */\nexport function formStepOptions(\n step: { options?: { label: string; description?: string }[] } | undefined,\n): { label: string; value: string; description?: string }[] {\n if (!step?.options) {\n return []\n }\n return step.options.map((option) => ({\n label: option.label,\n value: option.label,\n description: option.description,\n }))\n}\n\n/**\n * Spreads the answers a form comes back with onto one slot PER STEP.\n *\n * A form's answers travel paired with step ids, and the tool schema does not\n * enforce that those ids are unique: a `.refine()` there would refuse the whole\n * form over a duplicate, which is the failure the schema was just cured of (see\n * the gotchas entry \"A configurable cap does not belong in an inputSchema\").\n * So the duplicate has to be survivable here. Keyed by id, two steps sharing\n * one collapsed onto a single answer: the second question showed the first\n * one's reply, and submitting sent that reply twice. Keyed by position, each\n * step keeps its own.\n *\n * A duplicated id restores the same incoming value to every step claiming it,\n * which is as much as the payload allows: the ids are all it says.\n */\nexport function formAnswerSlots(\n steps: { id: string }[],\n output: unknown,\n): Record<number, unknown> {\n const slots: Record<number, unknown> = {}\n if (output === undefined || output === null) {\n return slots\n }\n // A legacy single-choice answer is the plain string, and it can only\n // belong to a single-step form.\n if (typeof output === 'string') {\n if (steps.length === 1) {\n slots[0] = output\n }\n return slots\n }\n const assign = (id: string, value: unknown) => {\n steps.forEach((step, index) => {\n if (step.id === id) {\n slots[index] = value\n }\n })\n }\n const list = (output as { answers?: unknown }).answers\n if (Array.isArray(list)) {\n for (const answer of list as { id?: unknown; value?: unknown }[]) {\n if (typeof answer?.id === 'string') {\n assign(answer.id, answer.value)\n }\n }\n return slots\n }\n // Forms answered on a platform channel (the Teams modal) come back as a\n // flat record keyed by step id.\n for (const [id, value] of Object.entries(\n output as Record<string, unknown>,\n )) {\n if (value !== undefined) {\n assign(id, value)\n }\n }\n return slots\n}\n\n// Provider-native web search tool part types\nexport const WEB_SEARCH_TOOL_TYPES = [\n 'tool-perplexity_search',\n 'tool-parallel_search',\n 'tool-web_search',\n 'tool-google_search',\n]\n\n// Tool part types with a dedicated rich rendering in PkChatbotStepToolDetail\nconst RICH_DETAIL_TOOL_TYPES = new Set([\n 'tool-searchInKnowledgeBase',\n 'tool-retrieveRevisedAnswers',\n 'tool-expandChunkContext',\n 'tool-readDocumentFile',\n 'tool-getWeather',\n 'tool-geocode',\n 'tool-recallUserMemory',\n 'tool-saveUserMemory',\n ...WEB_SEARCH_TOOL_TYPES,\n])\n\nexport function hasRichToolDetail(\n part?: UIMessage['parts'][number] | null,\n): boolean {\n return isToolPart(part) && RICH_DETAIL_TOOL_TYPES.has(part.type)\n}\n\nconst asRecord = (value: unknown): Record<string, unknown> | undefined =>\n value && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined\n\nconst pickString = (\n record: Record<string, unknown> | undefined,\n ...keys: string[]\n): string | undefined => {\n for (const key of keys) {\n const value = record?.[key]\n if (typeof value === 'string' && value.trim()) {\n return value\n }\n }\n return undefined\n}\n\n/**\n * Returns a short inline summary for a tool part (search queries, location,\n * document name, ...) to be shown next to the step label without expanding\n * the step body.\n */\nexport function getToolPartSummary(\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (!isToolPart(part)) {\n return undefined\n }\n const input = asRecord('input' in part ? part.input : undefined)\n const output = asRecord('output' in part ? part.output : undefined)\n if (\n part.type === 'tool-searchInKnowledgeBase' ||\n WEB_SEARCH_TOOL_TYPES.includes(part.type)\n ) {\n const queries = input?.queries\n if (Array.isArray(queries)) {\n const valid = queries.filter(\n (query): query is string =>\n typeof query === 'string' && Boolean(query.trim()),\n )\n return valid.length ? valid.join(' · ') : undefined\n }\n return pickString(input, 'query', 'objective')\n }\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return pickString(input, 'query')\n }\n if (part.type === 'tool-getWeather') {\n return (\n pickString(output, 'location') ?? pickString(input, 'locationName')\n )\n }\n if (part.type === 'tool-geocode') {\n return pickString(input, 'locationName')\n }\n if (part.type === 'tool-expandChunkContext') {\n return pickString(output, 'documentName')\n }\n if (part.type === 'tool-readDocumentFile') {\n return pickString(output, 'name')\n }\n if (part.type === 'tool-readSpreadsheet') {\n const sheet = pickString(input, 'sheet')\n const range = pickString(input, 'range')\n return sheet && range ? `${sheet}!${range}` : sheet\n }\n if (part.type === 'tool-editSpreadsheet') {\n return pickString(output, 'filename')\n }\n if (part.type === 'tool-querySpreadsheet') {\n // The file when the step asked for the schema; a query has no name.\n return pickString(output, 'file')\n }\n if (part.type === 'tool-recallUserMemory') {\n return pickString(input, 'query')\n }\n if (part.type === 'tool-saveUserMemory') {\n return pickString(input, 'content', 'query')\n }\n return undefined\n}\n\n// Get part icon\nexport function getPartIcon(\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (isToolPart(part)) {\n if (part.type.includes('tool-subagent')) {\n return 'ri:robot-2-line'\n }\n if (part.type === 'tool-runWorker') {\n return 'ri:flow-chart'\n }\n if (part.type === 'tool-scheduleWakeup') {\n return 'ri:alarm-line'\n }\n if (part.type === 'tool-fetchTeamsChannelHistory') {\n return 'ri:chat-history-line'\n }\n if (part.type === 'tool-readEarlierMessages') {\n return 'ri:history-line'\n }\n if (part.type === 'tool-enableTools') {\n return 'ri:toggle-line'\n }\n if (part.type.includes('tool-mcp')) {\n return 'mcp'\n }\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return 'ri:file-edit-line'\n }\n if (part.type === 'tool-searchInKnowledgeBase') {\n return 'ri:search-line'\n }\n if (part.type === 'tool-expandChunkContext') {\n return 'ri:file-search-line'\n }\n if (part.type === 'tool-readDocumentFile') {\n return 'ri:file-text-line'\n }\n if (part.type === 'tool-readSpreadsheet') {\n return 'ri:table-line'\n }\n if (part.type === 'tool-editSpreadsheet') {\n return 'ri:file-excel-2-line'\n }\n if (part.type === 'tool-querySpreadsheet') {\n return 'ri:database-2-line'\n }\n if (part.type === 'tool-geocode') {\n return 'ri:map-2-line'\n }\n if (part.type === 'tool-getWeather') {\n return 'ri:sun-cloudy-line'\n }\n if (part.type === 'tool-recallUserMemory') {\n return 'ri:brain-line'\n }\n if (part.type === 'tool-saveUserMemory') {\n return 'ri:save-3-line'\n }\n if (part.type === 'tool-showWeather') {\n return 'ri:sun-line'\n }\n if (part.type === 'tool-showDiagram') {\n return 'ri:flow-chart'\n }\n if (part.type === 'tool-showSources') {\n return 'ri:book-2-line'\n }\n if (part.type === 'tool-showForm') {\n return 'ri:survey-line'\n }\n if (part.type === 'tool-showMultipleChoice') {\n return 'ri:checkbox-multiple-line'\n }\n if (part.type === 'tool-showArtifact') {\n return 'ri:file-code-line'\n }\n if (part.type === 'tool-showEmail') {\n return 'ri:mail-line'\n }\n if (part.type === 'tool-showMessage') {\n return 'ri:chat-1-line'\n }\n if (part.type === 'tool-showWebPages') {\n return 'ri:pages-line'\n }\n if (part.type === 'tool-showProductList') {\n return 'ri:shopping-bag-line'\n }\n if (part.type === 'tool-showContactForm') {\n return 'ri:send-plane-2-line'\n }\n if (part.type === 'tool-showCalendarEvent') {\n return 'ri:calendar-event-line'\n }\n if (part.type === 'tool-showComparison') {\n return 'ri:scales-line'\n }\n if (part.type === 'tool-showLocation') {\n return 'ri:map-pin-line'\n }\n if (part.type === 'tool-showQrCode') {\n return 'ri:qr-code-line'\n }\n if (part.type === 'tool-showImageGallery') {\n return 'ri:image-line'\n }\n if (part.type === 'tool-showVideo') {\n return 'ri:film-line'\n }\n if (part.type === 'tool-showSuggestedReply') {\n return 'ri:corner-down-right-line'\n }\n if (part.type === 'tool-requestGeolocation') {\n return 'ri:map-pin-user-line'\n }\n if (part.type === 'tool-disconnectOAuthConnection') {\n return 'ri:link-unlink'\n }\n if (\n part.type === 'tool-perplexity_search' ||\n part.type === 'tool-parallel_search' ||\n part.type === 'tool-web_search' ||\n part.type === 'tool-google_search'\n ) {\n return 'ri:global-line'\n }\n return 'ri:tools-line'\n }\n if (isReasoningPart(part)) {\n return 'ri:lightbulb-line'\n }\n if (isTextPart(part)) {\n return 'ri:double-quotes-r'\n }\n return undefined\n}\n\n// Get part label\nexport function getToolPartLabel(\n $t: (key: string) => string,\n part?: UIMessage['parts'][number] | null,\n): string | undefined {\n if (isToolPart(part)) {\n if (part.type.includes('tool-subagent')) {\n return $t(`messagePart.runSubagent`)\n }\n if (part.type === 'tool-runWorker') {\n return $t(`messagePart.runWorker`)\n }\n if (part.type === 'tool-scheduleWakeup') {\n return $t(`messagePart.scheduleWakeup`)\n }\n if (part.type === 'tool-fetchTeamsChannelHistory') {\n return $t(`messagePart.fetchTeamsChannelHistory`)\n }\n if (part.type === 'tool-readEarlierMessages') {\n return $t(`messagePart.readEarlierMessages`)\n }\n if (part.type === 'tool-enableTools') {\n return $t(`messagePart.enableTools`)\n }\n if (part.type === 'tool-retrieveRevisedAnswers') {\n return $t(`messagePart.revisedAnswers`)\n }\n if (part.type === 'tool-searchInKnowledgeBase') {\n return $t(`messagePart.searchingDocuments`)\n }\n if (part.type === 'tool-expandChunkContext') {\n return $t(`messagePart.expandChunkContext`)\n }\n if (part.type === 'tool-readDocumentFile') {\n return $t(`messagePart.readDocumentFile`)\n }\n if (part.type === 'tool-readSpreadsheet') {\n return $t(`messagePart.readSpreadsheet`)\n }\n if (part.type === 'tool-editSpreadsheet') {\n return $t(`messagePart.editSpreadsheet`)\n }\n if (part.type === 'tool-querySpreadsheet') {\n return $t(`messagePart.querySpreadsheet`)\n }\n if (part.type === 'tool-geocode') {\n return $t(`messagePart.geocode`)\n }\n if (part.type === 'tool-getWeather') {\n return $t(`messagePart.getWeather`)\n }\n if (part.type === 'tool-recallUserMemory') {\n return $t(`messagePart.recallUserMemory`)\n }\n if (part.type === 'tool-saveUserMemory') {\n return $t(`messagePart.saveUserMemory`)\n }\n if (part.type === 'tool-showWeather') {\n return $t(`messagePart.showWeather`)\n }\n if (part.type === 'tool-showForm') {\n return $t(`messagePart.showForm`)\n }\n if (part.type === 'tool-showDiagram') {\n return $t(`messagePart.showDiagram`)\n }\n if (part.type === 'tool-showSources') {\n return $t(`messagePart.showSources`)\n }\n if (part.type === 'tool-showMultipleChoice') {\n return $t(`messagePart.showMultipleChoice`)\n }\n if (part.type === 'tool-showArtifact') {\n return $t(`messagePart.showArtifact`)\n }\n if (part.type === 'tool-showEmail') {\n return $t(`messagePart.showEmail`)\n }\n if (part.type === 'tool-showMessage') {\n return $t(`messagePart.showMessage`)\n }\n if (part.type === 'tool-showWebPages') {\n return $t(`messagePart.showWebPages`)\n }\n if (part.type === 'tool-showProducts') {\n return $t(`messagePart.showProducts`)\n }\n if (part.type === 'tool-showContactForm') {\n return $t(`messagePart.showContactForm`)\n }\n if (part.type === 'tool-showCalendarEvent') {\n return $t(`messagePart.showCalendarEvent`)\n }\n if (part.type === 'tool-showComparison') {\n return $t(`messagePart.showComparison`)\n }\n if (part.type === 'tool-showLocation') {\n return $t(`messagePart.showLocation`)\n }\n if (part.type === 'tool-showQrCode') {\n return $t(`messagePart.showQrCode`)\n }\n if (part.type === 'tool-showImageGallery') {\n return $t(`messagePart.showImageGallery`)\n }\n if (part.type === 'tool-showVideo') {\n return $t(`messagePart.showVideo`)\n }\n if (part.type === 'tool-showSuggestedReply') {\n return $t(`messagePart.showSuggestedReply`)\n }\n if (part.type === 'tool-requestGeolocation') {\n return $t(`messagePart.requestGeolocation`)\n }\n if (part.type === 'tool-disconnectOAuthConnection') {\n return $t(`messagePart.disconnectOAuthConnection`)\n }\n if (WEB_SEARCH_TOOL_TYPES.includes(part.type)) {\n return $t(`messagePart.webSearch`)\n }\n return $t(`messagePart.tool`)\n }\n if (isReasoningPart(part)) {\n return $t(`messagePart.reasoning`)\n }\n return $t(`messagePart.streaming`)\n}\n"],"mappings":";;;;AA8BA,SAAgBK,EACZ,GACkB;CAClB,IAAMC,IAA6B,CAAC;CACpC,KAAK,IAAMC,KAAQC,GAAO;EACtB,IAAI,CAACP,EAAWM,CAAI,GAAG;GACnB,EAAO,KAAKA,CAAI;GAChB;EACJ;EACA,IAAME,IAAOH,EAAOA,EAAO,SAAS;EACpC,AAAIG,KAAQR,EAAWQ,CAAI,IACvB,EAAOH,EAAO,SAAS,KAAK;GAAE,GAAGG;GAAM,MAAMA,EAAK,OAAOF,EAAK;EAAK,IAEnED,EAAO,KAAKC,CAAI;CAExB;CACA,OAAOD;AACX;AAEA,IAAMI,KACF,MAEAP,EAAWI,CAAI,KAAKP,EAAmBE,EAAgBK,CAAI,CAAC;AAUhE,SAAgBI,EACZ,GACkB;CAClB,IAAMC,oBAAY,IAAI,IAAoB;CAC1C,KAAK,IAAM,CAACC,GAAON,MAASC,EAAM,QAAQ,GACtC,AACIE,EAAaH,CAAI,KACjBA,EAAK,UAAU,kBACf,CAACO,EAAgBP,CAAI,KAErBK,EAAU,IAAIL,EAAK,MAAMM,CAAK;CAGtC,OAAOL,EAAM,QACR,GAAM,MACH,EACIE,EAAaH,CAAI,KACjBA,EAAK,UAAU,mBACdK,EAAU,IAAIL,EAAK,IAAI,KAAK,MAAMM,EAE/C;AACJ;AAQA,IAAME,oBAAyC,IAAI,IAAI,CAAC,sBAAsB,CAAC;AAG/E,SAAgBC,EACZ,GACkB;CAClB,IAAMC,IAAQT,EAAM,QAAQ,MAASO,EAAkB,IAAIR,EAAK,IAAI,CAAC;CACrE,OAAOU,EAAM,SAAS,IAChB,CACI,GAAGT,EAAM,QAAQ,MAAS,CAACO,EAAkB,IAAIR,EAAK,IAAI,CAAC,GAC3D,GAAGU,CACP,IACAT;AACV;AAOA,SAAgBU,EACZ,GACA,GACe;CACf,IAAMC,IAAcZ,EAAiC;CACrD,OAAO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AS,sBACPuF,EAAG,0BAA0B,IAEpCvF,EAAK,SAAS,oBACPuF,EAAG,wBAAwB,IAElCvF,EAAK,SAAS,0BACPuF,EAAG,8BAA8B,IAExCvF,EAAK,SAAS,mBACPuF,EAAG,uBAAuB,IAEjCvF,EAAK,SAAS,4BACPuF,EAAG,gCAAgC,IAE1CvF,EAAK,SAAS,4BACPuF,EAAG,gCAAgC,IAE1CvF,EAAK,SAAS,mCACPuF,EAAG,uCAAuC,IAEjDhB,EAAsB,SAASvE,EAAK,IAAI,IACjCuF,EAAG,uBAAuB,IAE9BA,EAAG,kBAAkB,IAE5B1F,EAAgBG,CAAI,IACbuF,EAAG,uBAAuB,IAE9BA,EAAG,uBAAuB;AACrC"}
|
package/dist-vue/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createChatbotApiClient } from "./_chunks/createChatbotApiClient-
|
|
1
|
+
export { t as createChatbotApiClient } from "./_chunks/createChatbotApiClient-C0_uDob8.js";
|
package/dist-vue/composables.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as e } from "./_chunks/createChatbotApiClient-
|
|
2
|
-
import { n as t } from "./_chunks/useChatbotStore-
|
|
1
|
+
import { t as e } from "./_chunks/createChatbotApiClient-C0_uDob8.js";
|
|
2
|
+
import { n as t } from "./_chunks/useChatbotStore-1mq1FznN.js";
|
|
3
3
|
import { t as n } from "./_chunks/src-DCfvejyT.js";
|
|
4
4
|
import { t as r } from "./_chunks/useLocalizedString-PfaKjIQY.js";
|
|
5
|
-
import { w as i } from "./_chunks/utils-
|
|
5
|
+
import { w as i } from "./_chunks/utils-BFoe95R4.js";
|
|
6
6
|
import { computed as a, getCurrentInstance as o, onBeforeUnmount as s, onMounted as c, ref as l, toValue as u, watch as d } from "vue";
|
|
7
7
|
import { createI18n as f } from "vue-i18n";
|
|
8
8
|
import { createAuthClient as p } from "better-auth/vue";
|
|
@@ -744,6 +744,7 @@ var A = {
|
|
|
744
744
|
"gateway-disabled": "Serve il gateway AI della piattaforma, che questa organizzazione non usa",
|
|
745
745
|
"model-unavailable": "Il modello scelto per i documenti non è attivo per questa organizzazione",
|
|
746
746
|
"no-model": "Nessun modello impostato per l'AI dei documenti",
|
|
747
|
+
"page-too-large": "La pagina è troppo pesante per essere letta, anche senza script e grafica incorporata",
|
|
747
748
|
"source-status": "La pagina di origine ha risposto HTTP {status}",
|
|
748
749
|
"spreadsheet-macros": "La cartella di lavoro contiene macro: salvala come .xlsx senza macro",
|
|
749
750
|
"spreadsheet-no-table": "Nessun foglio ha una riga di intestazione nelle prime trenta righe, quindi non c'è una tabella da interrogare",
|
|
@@ -1279,6 +1280,37 @@ var A = {
|
|
|
1279
1280
|
description: "Il tuo nome, la tua immagine e come vedi l'app.",
|
|
1280
1281
|
pictureHint: "PNG o JPG."
|
|
1281
1282
|
},
|
|
1283
|
+
notifications: {
|
|
1284
|
+
title: "Notifiche",
|
|
1285
|
+
description: "Quali avvisi ricevi, nell'app e per email.",
|
|
1286
|
+
groups: "Tipi di notifica",
|
|
1287
|
+
alwaysOn: "Gli avvisi sulla sicurezza dell'account e i messaggi degli amministratori arrivano sempre.",
|
|
1288
|
+
loadFailed: "Non è stato possibile leggere le tue preferenze.",
|
|
1289
|
+
channel: {
|
|
1290
|
+
inApp: "App",
|
|
1291
|
+
email: "Email"
|
|
1292
|
+
},
|
|
1293
|
+
agent_replies: {
|
|
1294
|
+
title: "Risposte degli agenti",
|
|
1295
|
+
summary: "Quando un agente a cui hai chiesto di ricontrollare ha una novità per te."
|
|
1296
|
+
},
|
|
1297
|
+
documents: {
|
|
1298
|
+
title: "Documenti e fonti",
|
|
1299
|
+
summary: "I documenti che non si elaborano e le pagine tolte da una fonte sincronizzata."
|
|
1300
|
+
},
|
|
1301
|
+
integrations: {
|
|
1302
|
+
title: "Integrazioni e chiavi",
|
|
1303
|
+
summary: "Un accesso a un'integrazione chiuso da un amministratore e le API key in scadenza."
|
|
1304
|
+
},
|
|
1305
|
+
flagged_conversations: {
|
|
1306
|
+
title: "Conversazioni segnalate",
|
|
1307
|
+
summary: "Le conversazioni che l'analisi ha segnalato o bloccato."
|
|
1308
|
+
},
|
|
1309
|
+
usage_limits: {
|
|
1310
|
+
title: "Limiti di utilizzo",
|
|
1311
|
+
summary: "Quando l'organizzazione esaurisce le esecuzioni automatiche del giorno."
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1282
1314
|
security: {
|
|
1283
1315
|
title: "Sicurezza",
|
|
1284
1316
|
description: "Come entri e da dove sei collegato.",
|
|
@@ -1650,6 +1682,16 @@ var A = {
|
|
|
1650
1682
|
dailyForecast: "Previsioni giornaliere",
|
|
1651
1683
|
feelsLike: "Percepita",
|
|
1652
1684
|
today: "Oggi"
|
|
1685
|
+
},
|
|
1686
|
+
unsubscribe: {
|
|
1687
|
+
title: "Disiscriviti dalle mail",
|
|
1688
|
+
message: "Smetti di ricevere per email le notifiche di «{group}». Quelle nell'app non cambiano.",
|
|
1689
|
+
action: "Disiscriviti",
|
|
1690
|
+
doneTitle: "Fatto",
|
|
1691
|
+
doneMessage: "Non riceverai più per email le notifiche di «{group}». Puoi riaccenderle quando vuoi dal tuo profilo.",
|
|
1692
|
+
invalidTitle: "Link non valido",
|
|
1693
|
+
invalidMessage: "Questo link non vale più. Puoi spegnere le mail dal tuo profilo, nella sezione Notifiche.",
|
|
1694
|
+
openSettings: "Apri le preferenze di notifica"
|
|
1653
1695
|
}
|
|
1654
1696
|
}, j = {
|
|
1655
1697
|
action: {
|
|
@@ -2302,6 +2344,7 @@ var A = {
|
|
|
2302
2344
|
"gateway-disabled": "It needs the platform AI gateway, which this organization does not use",
|
|
2303
2345
|
"model-unavailable": "The model chosen for documents is not switched on for this organization",
|
|
2304
2346
|
"no-model": "No model is set for the AI of documents",
|
|
2347
|
+
"page-too-large": "The page is too heavy to be read, even without its scripts and inline graphics",
|
|
2305
2348
|
"source-status": "The source page answered HTTP {status}",
|
|
2306
2349
|
"spreadsheet-macros": "The workbook contains macros: save it as an .xlsx without macros",
|
|
2307
2350
|
"spreadsheet-no-table": "No sheet has a header row in its first thirty rows, so there is no table to query",
|
|
@@ -2837,6 +2880,37 @@ var A = {
|
|
|
2837
2880
|
description: "Your name and picture, and how the app looks to you.",
|
|
2838
2881
|
pictureHint: "PNG or JPG."
|
|
2839
2882
|
},
|
|
2883
|
+
notifications: {
|
|
2884
|
+
title: "Notifications",
|
|
2885
|
+
description: "Which notices you get, in the app and by email.",
|
|
2886
|
+
groups: "Notification types",
|
|
2887
|
+
alwaysOn: "Account security notices and messages from administrators always arrive.",
|
|
2888
|
+
loadFailed: "Your preferences could not be read.",
|
|
2889
|
+
channel: {
|
|
2890
|
+
inApp: "App",
|
|
2891
|
+
email: "Email"
|
|
2892
|
+
},
|
|
2893
|
+
agent_replies: {
|
|
2894
|
+
title: "Agent replies",
|
|
2895
|
+
summary: "When an agent you asked to check again has news for you."
|
|
2896
|
+
},
|
|
2897
|
+
documents: {
|
|
2898
|
+
title: "Documents and sources",
|
|
2899
|
+
summary: "Documents that fail to process, and pages removed from a synced source."
|
|
2900
|
+
},
|
|
2901
|
+
integrations: {
|
|
2902
|
+
title: "Integrations and keys",
|
|
2903
|
+
summary: "An integration sign-in ended by an administrator, and API keys about to expire."
|
|
2904
|
+
},
|
|
2905
|
+
flagged_conversations: {
|
|
2906
|
+
title: "Flagged conversations",
|
|
2907
|
+
summary: "Conversations the analysis flagged or blocked."
|
|
2908
|
+
},
|
|
2909
|
+
usage_limits: {
|
|
2910
|
+
title: "Usage limits",
|
|
2911
|
+
summary: "When the organization uses up the day's automatic runs."
|
|
2912
|
+
}
|
|
2913
|
+
},
|
|
2840
2914
|
security: {
|
|
2841
2915
|
title: "Security",
|
|
2842
2916
|
description: "How you sign in, and where you are signed in.",
|
|
@@ -3208,6 +3282,16 @@ var A = {
|
|
|
3208
3282
|
dailyForecast: "Daily forecast",
|
|
3209
3283
|
feelsLike: "Feels like",
|
|
3210
3284
|
today: "Today"
|
|
3285
|
+
},
|
|
3286
|
+
unsubscribe: {
|
|
3287
|
+
title: "Unsubscribe from these emails",
|
|
3288
|
+
message: "Stop getting “{group}” notifications by email. The ones in the app do not change.",
|
|
3289
|
+
action: "Unsubscribe",
|
|
3290
|
+
doneTitle: "Done",
|
|
3291
|
+
doneMessage: "You will no longer get “{group}” notifications by email. You can turn them back on from your profile at any time.",
|
|
3292
|
+
invalidTitle: "Link not valid",
|
|
3293
|
+
invalidMessage: "This link no longer works. You can turn the emails off from your profile, in the Notifications section.",
|
|
3294
|
+
openSettings: "Open notification settings"
|
|
3211
3295
|
}
|
|
3212
3296
|
}, M = {
|
|
3213
3297
|
invalidType: "Expected {expected}, received {received}",
|