@carbon/ai-chat 1.15.0 → 1.16.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/aiChatEntry.js +5 -5
- package/dist/es/chat.ChatAppEntry.js +113 -29
- package/dist/es/chat.ChatAppEntry.js.map +1 -1
- package/dist/es/chat.index.js.map +1 -1
- package/dist/es/chat.languageUtils.js.map +1 -1
- package/dist/es/web-components/cds-aichat-container/index.js +5 -5
- package/dist/es/web-components/cds-aichat-custom-element/index.js +5 -5
- package/dist/es/web-components/cds-aichat-custom-element/index.js.map +1 -1
- package/dist/es-custom/aiChatEntry.js +5 -5
- package/dist/es-custom/chat.ChatAppEntry.js +113 -29
- package/dist/es-custom/chat.ChatAppEntry.js.map +1 -1
- package/dist/es-custom/chat.index.js.map +1 -1
- package/dist/es-custom/chat.languageUtils.js.map +1 -1
- package/dist/es-custom/web-components/cds-aichat-container/index.js +5 -5
- package/dist/es-custom/web-components/cds-aichat-custom-element/index.js +5 -5
- package/dist/es-custom/web-components/cds-aichat-custom-element/index.js.map +1 -1
- package/dist/types/aiChatEntry.d.ts +2 -2
- package/dist/types/{serverEntry-8eaazD-Z.d.ts → serverEntry-Byd0DXxW.d.ts} +60 -1
- package/dist/types/serverEntry.d.ts +1 -1
- package/package.json +7 -7
|
@@ -90,6 +90,8 @@ import "lodash-es/throttle.js";
|
|
|
90
90
|
|
|
91
91
|
import "@carbon/icons/es/down-to-bottom/16.js";
|
|
92
92
|
|
|
93
|
+
import "@carbon/ai-chat-components/es-custom/globals/settings.js";
|
|
94
|
+
|
|
93
95
|
import "@carbon/icons/es/screen--off/16.js";
|
|
94
96
|
|
|
95
97
|
import "@carbon/icons/es/user--avatar/32.js";
|
|
@@ -126,8 +128,6 @@ import "@carbon/ai-chat-components/es-custom/react/feedback-buttons.js";
|
|
|
126
128
|
|
|
127
129
|
import "@carbon/ai-chat-components/es-custom/react/feedback.js";
|
|
128
130
|
|
|
129
|
-
import "@carbon/ai-chat-components/es-custom/globals/settings.js";
|
|
130
|
-
|
|
131
131
|
import "@carbon/icons/es/checkmark/16.js";
|
|
132
132
|
|
|
133
133
|
import "@carbon/icons/es/headset/16.js";
|
|
@@ -214,12 +214,12 @@ import "@carbon/icons/es/stop--filled/16.js";
|
|
|
214
214
|
|
|
215
215
|
import "@carbon/ai-chat-components/es-custom/react/panel.js";
|
|
216
216
|
|
|
217
|
-
import "@carbon/icons/es/chevron--
|
|
218
|
-
|
|
219
|
-
import "@carbon/icons/es/close--large/20.js";
|
|
217
|
+
import "@carbon/icons/es/chevron--left/16.js";
|
|
220
218
|
|
|
221
219
|
import "@carbon/ai-chat-components/es-custom/react/toolbar.js";
|
|
222
220
|
|
|
221
|
+
import "@carbon/web-components/es-custom/components/icon-button/icon-button.js";
|
|
222
|
+
|
|
223
223
|
import "@carbon/web-components/es-custom/components/chat-button/chat-button.js";
|
|
224
224
|
|
|
225
225
|
import "@carbon/ai-chat-components/es-custom/components/chain-of-thought/defs.js";
|
|
@@ -92,6 +92,8 @@ import "lodash-es/throttle.js";
|
|
|
92
92
|
|
|
93
93
|
import "@carbon/icons/es/down-to-bottom/16.js";
|
|
94
94
|
|
|
95
|
+
import "@carbon/ai-chat-components/es-custom/globals/settings.js";
|
|
96
|
+
|
|
95
97
|
import "@carbon/icons/es/screen--off/16.js";
|
|
96
98
|
|
|
97
99
|
import "@carbon/icons/es/user--avatar/32.js";
|
|
@@ -128,8 +130,6 @@ import "@carbon/ai-chat-components/es-custom/react/feedback-buttons.js";
|
|
|
128
130
|
|
|
129
131
|
import "@carbon/ai-chat-components/es-custom/react/feedback.js";
|
|
130
132
|
|
|
131
|
-
import "@carbon/ai-chat-components/es-custom/globals/settings.js";
|
|
132
|
-
|
|
133
133
|
import "@carbon/icons/es/checkmark/16.js";
|
|
134
134
|
|
|
135
135
|
import "@carbon/icons/es/headset/16.js";
|
|
@@ -216,12 +216,12 @@ import "@carbon/icons/es/stop--filled/16.js";
|
|
|
216
216
|
|
|
217
217
|
import "@carbon/ai-chat-components/es-custom/react/panel.js";
|
|
218
218
|
|
|
219
|
-
import "@carbon/icons/es/chevron--
|
|
220
|
-
|
|
221
|
-
import "@carbon/icons/es/close--large/20.js";
|
|
219
|
+
import "@carbon/icons/es/chevron--left/16.js";
|
|
222
220
|
|
|
223
221
|
import "@carbon/ai-chat-components/es-custom/react/toolbar.js";
|
|
224
222
|
|
|
223
|
+
import "@carbon/web-components/es-custom/components/icon-button/icon-button.js";
|
|
224
|
+
|
|
225
225
|
import "@carbon/web-components/es-custom/components/chat-button/chat-button.js";
|
|
226
226
|
|
|
227
227
|
import "@carbon/ai-chat-components/es-custom/components/chain-of-thought/defs.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/web-components/cds-custom-aichat-custom-element/index.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n// Ensure the container custom element is registered whenever the\n// custom element module is imported by re-exporting its exports.\n// This prevents bundlers (and our own multi-entry Rollup build)\n// from pruning the side-effect-only import.\nexport { default as __cds-custom_aichat_container_register } from \"../cds-custom-aichat-container\";\nimport \"../cds-custom-aichat-container\";\n\nimport { html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\n\nimport { carbonElement } from \"@carbon/ai-chat-components/es-custom/globals/decorators/index.js\";\nimport { PublicConfig } from \"../../types/config/PublicConfig\";\nimport { FlattenedConfigElement } from \"../shared/FlattenedConfigElement\";\nimport { ChatInstance } from \"../../types/instance/ChatInstance\";\nimport {\n BusEventChunkUserDefinedResponse,\n BusEventCustomFooterSlot,\n BusEventType,\n BusEventUserDefinedResponse,\n BusEventViewChange,\n BusEventViewPreChange,\n} from \"../../types/events/eventBusTypes\";\nimport type {\n WCMarkdown,\n WCRenderCustomMessageFooter,\n WCRenderUserDefinedResponse,\n} from \"../../types/component/ChatContainer\";\n\n/**\n * cds-custom-aichat-custom-element will is a pass through to cds-custom-aichat-container. It takes any user_defined and writeable element\n * slotted content and forwards it to cds-custom-aichat-container. It also will setup the custom element with a default viewChange\n * pattern (e.g. hiding and showing the custom element when the chat should be open/closed) if a onViewChange property is not\n * defined. Finally, it registers the custom element with cds-custom-aichat-container so a default \"floating\" element will not be created.\n *\n * The custom element should be sized using external CSS. When hidden, the 'cds-custom-aichat--hidden' class is added to set dimensions to 0x0.\n */\n@carbonElement(\"cds-custom-aichat-custom-element\")\nclass ChatCustomElement extends FlattenedConfigElement {\n /**\n * Shared stylesheet for hiding styles.\n */\n private static hideSheet = new CSSStyleSheet();\n static {\n // Hide styles that override any external sizing. `replaceSync` is absent\n // in non-browser environments (e.g. the jsdom-based test environment), so\n // skip styling there rather than throwing at module-evaluation time.\n ChatCustomElement.hideSheet.replaceSync?.(`\n :host {\n display: block;\n }\n :host(.cds-custom-aichat--hidden) {\n width: 0 !important;\n height: 0 !important;\n min-width: 0 !important;\n min-height: 0 !important;\n max-width: 0 !important;\n max-height: 0 !important;\n inline-size: 0 !important;\n block-size: 0 !important;\n min-inline-size: 0 !important;\n min-block-size: 0 !important;\n max-inline-size: 0 !important;\n max-block-size: 0 !important;\n overflow: hidden !important;\n display: block !important;\n }\n `);\n }\n\n /**\n * Adopt our stylesheet into every shadowRoot.\n */\n protected createRenderRoot(): ShadowRoot {\n // Lits default createRenderRoot actually returns a ShadowRoot\n const root = super.createRenderRoot() as ShadowRoot;\n\n // now TS knows root.adoptedStyleSheets exists\n root.adoptedStyleSheets = [\n ...root.adoptedStyleSheets,\n ChatCustomElement.hideSheet,\n ];\n return root;\n }\n\n /**\n * This function is called before the render function of Carbon AI Chat is called. This function can return a Promise\n * which will cause Carbon AI Chat to wait for it before rendering.\n */\n @property({ attribute: false })\n onBeforeRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * This function is called after the render function of Carbon AI Chat is called.\n */\n @property({ attribute: false })\n onAfterRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * Called before a view change (chat opening/closing). The chat will hide the chat shell inside your custom element\n * to prevent invisible keyboard stops when the view change is complete.\n *\n * Use this callback to update your CSS class name values on this element before the view change happens if you want to add any open/close\n * animations to your custom element before the chat shell inner contents are hidden. It is async and so you can\n * tie it to native the AnimationEvent and only return when your animations have completed.\n *\n * A common pattern is to use this for when the chat is closing and to use onViewChange for when the chat opens.\n *\n * Note that this function can only be provided before Carbon AI Chat is loaded as it is registered before the\n * chat renders. After Carbon AI Chat is loaded, the callback will not be updated.\n */\n @property()\n onViewPreChange?: (event: BusEventViewPreChange) => Promise<void> | void;\n\n /**\n * Called when the chat view change is complete. If no callback is provided here, the default behavior will be to set\n * the chat shell to 0x0 size and set all inner contents aside from the launcher, if you are using it, to display: none.\n * The inner contents of the chat shell (aside from the launcher if you are using it) are always set to display: none\n * regardless of what is configured with this callback to prevent invisible tab stops and screen reader issues.\n *\n * Use this callback to update your className value when the chat has finished being opened or closed.\n *\n * You can provide a different callback here if you want custom animation behavior when the chat is opened or closed.\n * The animation behavior defined here will run in concert with the chat inside your custom container being hidden.\n *\n * If you want to run animations before the inner contents of the chat shell is shrunk and the inner contents are hidden,\n * make use of onViewPreChange.\n *\n * A common pattern is to use this for when the chat is opening and to use onViewPreChange for when the chat closes.\n *\n * Note that this function can only be provided before Carbon AI Chat is loaded as it is registered before the\n * chat renders. After Carbon AI Chat is loaded, the callback will not be updated.\n */\n @property()\n onViewChange?: (event: BusEventViewChange, instance: ChatInstance) => void;\n\n /**\n * Optional callback to render user defined responses. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, and element lifecycle.\n */\n @property({ attribute: false })\n renderUserDefinedResponse?: WCRenderUserDefinedResponse;\n\n /**\n * Optional callback to render custom message footers. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, and element lifecycle.\n */\n @property({ attribute: false })\n renderCustomMessageFooter?: WCRenderCustomMessageFooter;\n\n // markdown is declared on the FlattenedConfigElement base; the attributes\n // interface narrows its type.\n\n @state()\n private _userDefinedSlotNames: string[] = [];\n\n @state()\n private _writeableElementSlots: string[] = [];\n\n @state()\n private _customFooterSlotNames: string[] = [];\n\n /**\n * Active slot names for markdown-plugin output hosted at this element.\n * Populated when this element accepts the host-mount event; drained when\n * the matching unmount event fires.\n */\n @state()\n private _pluginSlotNames: string[] = [];\n\n /**\n * Page-level host elements created for plugin-output slots, keyed by slot\n * name. Created in this element's outer light DOM so consumer-loaded\n * stylesheets (e.g. KaTeX) reach the rendered HTML normally.\n */\n private _pluginHosts: Map<string, HTMLElement> = new Map();\n\n @state()\n private _instance!: ChatInstance;\n\n private defaultViewChangeHandler = (event: BusEventViewChange) => {\n if (event.newViewState.mainWindow) {\n this.classList.remove(\"cds-custom-aichat--hidden\");\n } else {\n this.classList.add(\"cds-custom-aichat--hidden\");\n }\n };\n\n private userDefinedHandler = (\n event: BusEventUserDefinedResponse | BusEventChunkUserDefinedResponse,\n ) => {\n const { slot } = event.data;\n if (!this._userDefinedSlotNames.includes(slot)) {\n this._userDefinedSlotNames = [...this._userDefinedSlotNames, slot];\n }\n };\n\n private customFooterHandler = (event: BusEventCustomFooterSlot) => {\n const { slotName } = event.data;\n if (!this._customFooterSlotNames.includes(slotName)) {\n this._customFooterSlotNames = [...this._customFooterSlotNames, slotName];\n }\n };\n\n private handlePluginHostMount = (event: Event) => {\n const detail = (\n event as CustomEvent<{\n slotName: string;\n html: string;\n isInline: boolean;\n }>\n ).detail;\n if (!detail?.slotName) {\n return;\n }\n if (!this._pluginSlotNames.includes(detail.slotName)) {\n this._pluginSlotNames = [...this._pluginSlotNames, detail.slotName];\n }\n // cds-custom-aichat-custom-element is always the outermost chat element in its\n // shadow chain; there is no further chat ancestor to defer to. Take\n // hosting unconditionally.\n event.preventDefault();\n let host = this._pluginHosts.get(detail.slotName);\n if (!host) {\n host = document.createElement(detail.isInline ? \"span\" : \"div\");\n host.setAttribute(\"slot\", detail.slotName);\n // Match `.cds-custom-aichat-markdown-stack > *:not(:first-child)` spacing;\n // shadow CSS doesn't reach this host (it lives in this element's\n // outer light DOM), so apply it inline. Inline output flows with\n // text and gets no extra spacing.\n if (!detail.isInline) {\n host.style.marginBlockStart = \"1rem\";\n }\n this._pluginHosts.set(detail.slotName, host);\n this.appendChild(host);\n }\n if (host.innerHTML !== detail.html) {\n host.innerHTML = detail.html;\n }\n };\n\n private handlePluginHostUpdate = (event: Event) => {\n const detail = (event as CustomEvent<{ slotName: string; html: string }>)\n .detail;\n if (!detail?.slotName) {\n return;\n }\n const host = this._pluginHosts.get(detail.slotName);\n if (host && host.innerHTML !== detail.html) {\n host.innerHTML = detail.html;\n }\n };\n\n private handlePluginHostUnmount = (event: Event) => {\n const detail = (event as CustomEvent<{ slotName: string }>).detail;\n if (!detail?.slotName) {\n return;\n }\n this._pluginSlotNames = this._pluginSlotNames.filter(\n (n) => n !== detail.slotName,\n );\n const host = this._pluginHosts.get(detail.slotName);\n if (host) {\n host.remove();\n this._pluginHosts.delete(detail.slotName);\n }\n };\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\n \"cds-custom-aichat-markdown-plugin-host-mount\",\n this.handlePluginHostMount,\n );\n this.addEventListener(\n \"cds-custom-aichat-markdown-plugin-host-update\",\n this.handlePluginHostUpdate,\n );\n this.addEventListener(\n \"cds-custom-aichat-markdown-plugin-host-unmount\",\n this.handlePluginHostUnmount,\n );\n }\n\n disconnectedCallback() {\n this.removeEventListener(\n \"cds-custom-aichat-markdown-plugin-host-mount\",\n this.handlePluginHostMount,\n );\n this.removeEventListener(\n \"cds-custom-aichat-markdown-plugin-host-update\",\n this.handlePluginHostUpdate,\n );\n this.removeEventListener(\n \"cds-custom-aichat-markdown-plugin-host-unmount\",\n this.handlePluginHostUnmount,\n );\n for (const host of this._pluginHosts.values()) {\n host.remove();\n }\n this._pluginHosts.clear();\n super.disconnectedCallback();\n }\n\n private onBeforeRenderOverride = async (instance: ChatInstance) => {\n this._instance = instance;\n if (this.onViewPreChange) {\n this._instance.on({\n type: BusEventType.VIEW_PRE_CHANGE,\n handler: this.onViewPreChange,\n });\n }\n this._instance.on({\n type: BusEventType.VIEW_CHANGE,\n handler: this.onViewChange || this.defaultViewChangeHandler,\n });\n\n if (!this.renderUserDefinedResponse) {\n // Legacy path: custom-element tracks slot names for manual slotting.\n // When renderUserDefinedResponse is set, the inner cds-custom-aichat-container handles everything.\n this._instance.on({\n type: BusEventType.USER_DEFINED_RESPONSE,\n handler: this.userDefinedHandler,\n });\n this._instance.on({\n type: BusEventType.CHUNK_USER_DEFINED_RESPONSE,\n handler: this.userDefinedHandler,\n });\n }\n\n if (!this.renderCustomMessageFooter) {\n // Legacy path: custom-element tracks slot names for manual slotting.\n // When renderCustomMessageFooter is set, the inner cds-custom-aichat-container handles everything.\n this._instance.on({\n type: BusEventType.CUSTOM_FOOTER_SLOT,\n handler: this.customFooterHandler,\n });\n }\n this.addWriteableElementSlots();\n await this.onBeforeRender?.(instance);\n };\n\n private addWriteableElementSlots() {\n this._writeableElementSlots = Object.keys(this._instance.writeableElements);\n }\n\n render() {\n return html`\n <cds-custom-aichat-container\n .config=${this.resolvedConfig}\n .header=${this.resolvedConfig.header}\n .onAfterRender=${this.onAfterRender}\n .onBeforeRender=${this.onBeforeRenderOverride}\n .element=${this}\n .renderUserDefinedResponse=${this.renderUserDefinedResponse}\n .renderCustomMessageFooter=${this.renderCustomMessageFooter}\n .markdown=${this.markdown as WCMarkdown | undefined}\n >\n ${this._writeableElementSlots.map(\n (slot) => html`<slot name=${slot} slot=${slot}></slot>`,\n )}\n ${this.renderUserDefinedResponse\n ? null\n : this._userDefinedSlotNames.map(\n (slot) => html`<slot name=${slot} slot=${slot}></slot>`,\n )}\n ${this.renderCustomMessageFooter\n ? null\n : this._customFooterSlotNames.map(\n (slot) =>\n html`<div slot=${slot}><slot name=${slot}></slot></div>`,\n )}\n ${this._pluginSlotNames.map(\n (slot) => html`<slot name=${slot} slot=${slot}></slot>`,\n )}\n </cds-custom-aichat-container>\n `;\n }\n}\n\n/**\n * Attributes interface for the cds-custom-aichat-custom-element web component.\n * This interface extends {@link PublicConfig} with additional component-specific props,\n * flattening all config properties as top-level properties for better TypeScript IntelliSense.\n *\n * @category Web component\n */\ninterface CdsAiChatCustomElementAttributes extends Omit<\n PublicConfig,\n \"markdown\"\n> {\n /**\n * Markdown rendering customization. Extends the framework-neutral\n * `PublicConfig.markdown` with web-component `customRenderers`.\n *\n * @experimental\n */\n markdown?: WCMarkdown;\n\n /**\n * This function is called before the render function of Carbon AI Chat is called. This function can return a Promise\n * which will cause Carbon AI Chat to wait for it before rendering.\n */\n onBeforeRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * This function is called after the render function of Carbon AI Chat is called.\n */\n onAfterRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * An optional listener for \"view:change\" events. Such a listener is required when using a custom element in order\n * to control the visibility of the Carbon AI Chat main window. If no callback is provided here, a default one will be\n * used that injects styling into the app that will show and hide the Carbon AI Chat main window and also change the\n * size of the custom element so it doesn't take up space when the main window is closed.\n *\n * You can provide a different callback here if you want custom behavior such as an animation when the main window\n * is opened or closed.\n *\n * Note that this function can only be provided before Carbon AI Chat is loaded. After Carbon AI Chat is loaded, the event\n * handler will not be updated.\n */\n onViewChange?: (event: BusEventViewChange, instance: ChatInstance) => void;\n\n /**\n * Optional callback to render user defined responses. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, streaming state, and element lifecycle.\n */\n renderUserDefinedResponse?: WCRenderUserDefinedResponse;\n\n /**\n * Optional callback to render custom message footers. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, and element lifecycle.\n */\n renderCustomMessageFooter?: WCRenderCustomMessageFooter;\n}\n\nexport { CdsAiChatCustomElementAttributes };\n\nexport default ChatCustomElement;\n"],"names":["ChatCustomElement","ChatCustomElement_1","FlattenedConfigElement","constructor","this","_userDefinedSlotNames","_writeableElementSlots","_customFooterSlotNames","_pluginSlotNames","_pluginHosts","Map","defaultViewChangeHandler","event","newViewState","mainWindow","classList","remove","add","userDefinedHandler","slot","data","includes","customFooterHandler","slotName","handlePluginHostMount","detail","preventDefault","host","get","document","createElement","isInline","setAttribute","style","marginBlockStart","set","appendChild","innerHTML","html","handlePluginHostUpdate","handlePluginHostUnmount","filter","n","delete","onBeforeRenderOverride","async","instance","_instance","onViewPreChange","on","type","BusEventType","VIEW_PRE_CHANGE","handler","VIEW_CHANGE","onViewChange","renderUserDefinedResponse","USER_DEFINED_RESPONSE","CHUNK_USER_DEFINED_RESPONSE","renderCustomMessageFooter","CUSTOM_FOOTER_SLOT","addWriteableElementSlots","onBeforeRender","createRenderRoot","root","super","adoptedStyleSheets","hideSheet","connectedCallback","addEventListener","disconnectedCallback","removeEventListener","values","clear","Object","keys","writeableElements","render","resolvedConfig","header","onAfterRender","markdown","map","CSSStyleSheet","replaceSync","__decorate","property","attribute","prototype","state","carbonElement","ChatCustomElement_default"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,IAAMA,oBAAiBC,sBAAvB,MAAMD,0BAA0BE;EAAhC,WAAAC;;IAoHUC,KAAAC,wBAAkC;IAGlCD,KAAAE,yBAAmC;IAGnCF,KAAAG,yBAAmC;IAQnCH,KAAAI,mBAA6B;IAO7BJ,KAAAK,eAAyC,IAAIC;IAK7CN,KAAAO,2BAA4BC;MAClC,IAAIA,MAAMC,aAAaC,YAAY;QACjCV,KAAKW,UAAUC,OAAO;AACxB,aAAO;QACLZ,KAAKW,UAAUE,IAAI;AACrB;;IAGMb,KAAAc,qBACNN;MAEA,OA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A,EADPI,WACuCzF,kBAAAwF,WAAA;;AAUhCH,WAAA,EADPI,WACgCzF,kBAAAwF,WAAA;;AA5I7BxF,oBAAiBC,sBAAAoF,WAAA,EADtBK,cAAc,gCACT1F;;AAiZN,IAAA2F,4BAAe3F;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/web-components/cds-custom-aichat-custom-element/index.ts"],"sourcesContent":["/*\n * Copyright IBM Corp. 2025, 2026\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @license\n */\n\n// Ensure the container custom element is registered whenever the\n// custom element module is imported by re-exporting its exports.\n// This prevents bundlers (and our own multi-entry Rollup build)\n// from pruning the side-effect-only import.\nexport { default as __cds-custom_aichat_container_register } from \"../cds-custom-aichat-container\";\nimport \"../cds-custom-aichat-container\";\n\nimport { html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\n\nimport { carbonElement } from \"@carbon/ai-chat-components/es-custom/globals/decorators/index.js\";\nimport { PublicConfig } from \"../../types/config/PublicConfig\";\nimport { FlattenedConfigElement } from \"../shared/FlattenedConfigElement\";\nimport { ChatInstance } from \"../../types/instance/ChatInstance\";\nimport {\n BusEventChunkUserDefinedResponse,\n BusEventCustomFooterSlot,\n BusEventType,\n BusEventUserDefinedResponse,\n BusEventViewChange,\n BusEventViewPreChange,\n} from \"../../types/events/eventBusTypes\";\nimport type {\n WCMarkdown,\n WCRenderCustomMessageFooter,\n WCRenderUserDefinedResponse,\n} from \"../../types/component/ChatContainer\";\n\n/**\n * cds-custom-aichat-custom-element will is a pass through to cds-custom-aichat-container. It takes any user_defined and writeable element\n * slotted content and forwards it to cds-custom-aichat-container. It also will setup the custom element with a default viewChange\n * pattern (e.g. hiding and showing the custom element when the chat should be open/closed) if a onViewChange property is not\n * defined. Finally, it registers the custom element with cds-custom-aichat-container so a default \"floating\" element will not be created.\n *\n * The custom element should be sized using external CSS. When hidden, the 'cds-custom-aichat--hidden' class is added to set dimensions to 0x0.\n */\n@carbonElement(\"cds-custom-aichat-custom-element\")\nclass ChatCustomElement extends FlattenedConfigElement {\n /**\n * Shared stylesheet for hiding styles.\n */\n private static hideSheet = new CSSStyleSheet();\n static {\n // Hide styles that override any external sizing. `replaceSync` is absent\n // in non-browser environments (e.g. the jsdom-based test environment), so\n // skip styling there rather than throwing at module-evaluation time.\n ChatCustomElement.hideSheet.replaceSync?.(`\n :host {\n display: block;\n }\n :host(.cds-custom-aichat--hidden) {\n width: 0 !important;\n height: 0 !important;\n min-width: 0 !important;\n min-height: 0 !important;\n max-width: 0 !important;\n max-height: 0 !important;\n inline-size: 0 !important;\n block-size: 0 !important;\n min-inline-size: 0 !important;\n min-block-size: 0 !important;\n max-inline-size: 0 !important;\n max-block-size: 0 !important;\n overflow: hidden !important;\n display: block !important;\n }\n `);\n }\n\n /**\n * Adopt our stylesheet into every shadowRoot.\n */\n protected createRenderRoot(): ShadowRoot {\n // Lits default createRenderRoot actually returns a ShadowRoot\n const root = super.createRenderRoot() as ShadowRoot;\n\n // now TS knows root.adoptedStyleSheets exists\n root.adoptedStyleSheets = [\n ...root.adoptedStyleSheets,\n ChatCustomElement.hideSheet,\n ];\n return root;\n }\n\n /**\n * This function is called before the render function of Carbon AI Chat is called. This function can return a Promise\n * which will cause Carbon AI Chat to wait for it before rendering.\n *\n * Use it to capture the {@link ChatInstance} so you can call instance methods later.\n *\n * @example\n * ```ts\n * const onBeforeRender = (instance: ChatInstance) => {\n * this.instance = instance;\n * };\n * // <cds-custom-aichat-custom-element .onBeforeRender=${onBeforeRender}></cds-custom-aichat-custom-element>\n * ```\n */\n @property({ attribute: false })\n onBeforeRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * This function is called after the render function of Carbon AI Chat is called.\n *\n * Like `onBeforeRender`, it receives the {@link ChatInstance}; use it when you need the instance only after the\n * first render has completed.\n */\n @property({ attribute: false })\n onAfterRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * Called before a view change (chat opening/closing). The chat will hide the chat shell inside your custom element\n * to prevent invisible keyboard stops when the view change is complete.\n *\n * Use this callback to update your CSS class name values on this element before the view change happens if you want to add any open/close\n * animations to your custom element before the chat shell inner contents are hidden. It is async and so you can\n * tie it to native the AnimationEvent and only return when your animations have completed.\n *\n * A common pattern is to use this for when the chat is closing and to use onViewChange for when the chat opens.\n *\n * Note that this function can only be provided before Carbon AI Chat is loaded as it is registered before the\n * chat renders. After Carbon AI Chat is loaded, the callback will not be updated.\n */\n @property()\n onViewPreChange?: (event: BusEventViewPreChange) => Promise<void> | void;\n\n /**\n * Called when the chat view change is complete. If no callback is provided here, the default behavior will be to set\n * the chat shell to 0x0 size and set all inner contents aside from the launcher, if you are using it, to display: none.\n * The inner contents of the chat shell (aside from the launcher if you are using it) are always set to display: none\n * regardless of what is configured with this callback to prevent invisible tab stops and screen reader issues.\n *\n * Use this callback to update your className value when the chat has finished being opened or closed.\n *\n * You can provide a different callback here if you want custom animation behavior when the chat is opened or closed.\n * The animation behavior defined here will run in concert with the chat inside your custom container being hidden.\n *\n * If you want to run animations before the inner contents of the chat shell is shrunk and the inner contents are hidden,\n * make use of onViewPreChange.\n *\n * A common pattern is to use this for when the chat is opening and to use onViewPreChange for when the chat closes.\n *\n * Note that this function can only be provided before Carbon AI Chat is loaded as it is registered before the\n * chat renders. After Carbon AI Chat is loaded, the callback will not be updated.\n */\n @property()\n onViewChange?: (event: BusEventViewChange, instance: ChatInstance) => void;\n\n /**\n * Optional callback to render user defined responses. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, and element lifecycle.\n */\n @property({ attribute: false })\n renderUserDefinedResponse?: WCRenderUserDefinedResponse;\n\n /**\n * Optional callback to render custom message footers. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, and element lifecycle.\n */\n @property({ attribute: false })\n renderCustomMessageFooter?: WCRenderCustomMessageFooter;\n\n // markdown is declared on the FlattenedConfigElement base; the attributes\n // interface narrows its type.\n\n @state()\n private _userDefinedSlotNames: string[] = [];\n\n @state()\n private _writeableElementSlots: string[] = [];\n\n @state()\n private _customFooterSlotNames: string[] = [];\n\n /**\n * Active slot names for markdown-plugin output hosted at this element.\n * Populated when this element accepts the host-mount event; drained when\n * the matching unmount event fires.\n */\n @state()\n private _pluginSlotNames: string[] = [];\n\n /**\n * Page-level host elements created for plugin-output slots, keyed by slot\n * name. Created in this element's outer light DOM so consumer-loaded\n * stylesheets (e.g. KaTeX) reach the rendered HTML normally.\n */\n private _pluginHosts: Map<string, HTMLElement> = new Map();\n\n @state()\n private _instance!: ChatInstance;\n\n private defaultViewChangeHandler = (event: BusEventViewChange) => {\n if (event.newViewState.mainWindow) {\n this.classList.remove(\"cds-custom-aichat--hidden\");\n } else {\n this.classList.add(\"cds-custom-aichat--hidden\");\n }\n };\n\n private userDefinedHandler = (\n event: BusEventUserDefinedResponse | BusEventChunkUserDefinedResponse,\n ) => {\n const { slot } = event.data;\n if (!this._userDefinedSlotNames.includes(slot)) {\n this._userDefinedSlotNames = [...this._userDefinedSlotNames, slot];\n }\n };\n\n private customFooterHandler = (event: BusEventCustomFooterSlot) => {\n const { slotName } = event.data;\n if (!this._customFooterSlotNames.includes(slotName)) {\n this._customFooterSlotNames = [...this._customFooterSlotNames, slotName];\n }\n };\n\n private handlePluginHostMount = (event: Event) => {\n const detail = (\n event as CustomEvent<{\n slotName: string;\n html: string;\n isInline: boolean;\n }>\n ).detail;\n if (!detail?.slotName) {\n return;\n }\n if (!this._pluginSlotNames.includes(detail.slotName)) {\n this._pluginSlotNames = [...this._pluginSlotNames, detail.slotName];\n }\n // cds-custom-aichat-custom-element is always the outermost chat element in its\n // shadow chain; there is no further chat ancestor to defer to. Take\n // hosting unconditionally.\n event.preventDefault();\n let host = this._pluginHosts.get(detail.slotName);\n if (!host) {\n host = document.createElement(detail.isInline ? \"span\" : \"div\");\n host.setAttribute(\"slot\", detail.slotName);\n // Match `.cds-custom-aichat-markdown-stack > *:not(:first-child)` spacing;\n // shadow CSS doesn't reach this host (it lives in this element's\n // outer light DOM), so apply it inline. Inline output flows with\n // text and gets no extra spacing.\n if (!detail.isInline) {\n host.style.marginBlockStart = \"1rem\";\n }\n this._pluginHosts.set(detail.slotName, host);\n this.appendChild(host);\n }\n if (host.innerHTML !== detail.html) {\n host.innerHTML = detail.html;\n }\n };\n\n private handlePluginHostUpdate = (event: Event) => {\n const detail = (event as CustomEvent<{ slotName: string; html: string }>)\n .detail;\n if (!detail?.slotName) {\n return;\n }\n const host = this._pluginHosts.get(detail.slotName);\n if (host && host.innerHTML !== detail.html) {\n host.innerHTML = detail.html;\n }\n };\n\n private handlePluginHostUnmount = (event: Event) => {\n const detail = (event as CustomEvent<{ slotName: string }>).detail;\n if (!detail?.slotName) {\n return;\n }\n this._pluginSlotNames = this._pluginSlotNames.filter(\n (n) => n !== detail.slotName,\n );\n const host = this._pluginHosts.get(detail.slotName);\n if (host) {\n host.remove();\n this._pluginHosts.delete(detail.slotName);\n }\n };\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener(\n \"cds-custom-aichat-markdown-plugin-host-mount\",\n this.handlePluginHostMount,\n );\n this.addEventListener(\n \"cds-custom-aichat-markdown-plugin-host-update\",\n this.handlePluginHostUpdate,\n );\n this.addEventListener(\n \"cds-custom-aichat-markdown-plugin-host-unmount\",\n this.handlePluginHostUnmount,\n );\n }\n\n disconnectedCallback() {\n this.removeEventListener(\n \"cds-custom-aichat-markdown-plugin-host-mount\",\n this.handlePluginHostMount,\n );\n this.removeEventListener(\n \"cds-custom-aichat-markdown-plugin-host-update\",\n this.handlePluginHostUpdate,\n );\n this.removeEventListener(\n \"cds-custom-aichat-markdown-plugin-host-unmount\",\n this.handlePluginHostUnmount,\n );\n for (const host of this._pluginHosts.values()) {\n host.remove();\n }\n this._pluginHosts.clear();\n super.disconnectedCallback();\n }\n\n private onBeforeRenderOverride = async (instance: ChatInstance) => {\n this._instance = instance;\n if (this.onViewPreChange) {\n this._instance.on({\n type: BusEventType.VIEW_PRE_CHANGE,\n handler: this.onViewPreChange,\n });\n }\n this._instance.on({\n type: BusEventType.VIEW_CHANGE,\n handler: this.onViewChange || this.defaultViewChangeHandler,\n });\n\n if (!this.renderUserDefinedResponse) {\n // Legacy path: custom-element tracks slot names for manual slotting.\n // When renderUserDefinedResponse is set, the inner cds-custom-aichat-container handles everything.\n this._instance.on({\n type: BusEventType.USER_DEFINED_RESPONSE,\n handler: this.userDefinedHandler,\n });\n this._instance.on({\n type: BusEventType.CHUNK_USER_DEFINED_RESPONSE,\n handler: this.userDefinedHandler,\n });\n }\n\n if (!this.renderCustomMessageFooter) {\n // Legacy path: custom-element tracks slot names for manual slotting.\n // When renderCustomMessageFooter is set, the inner cds-custom-aichat-container handles everything.\n this._instance.on({\n type: BusEventType.CUSTOM_FOOTER_SLOT,\n handler: this.customFooterHandler,\n });\n }\n this.addWriteableElementSlots();\n await this.onBeforeRender?.(instance);\n };\n\n private addWriteableElementSlots() {\n this._writeableElementSlots = Object.keys(this._instance.writeableElements);\n }\n\n render() {\n return html`\n <cds-custom-aichat-container\n .config=${this.resolvedConfig}\n .header=${this.resolvedConfig.header}\n .onAfterRender=${this.onAfterRender}\n .onBeforeRender=${this.onBeforeRenderOverride}\n .element=${this}\n .renderUserDefinedResponse=${this.renderUserDefinedResponse}\n .renderCustomMessageFooter=${this.renderCustomMessageFooter}\n .markdown=${this.markdown as WCMarkdown | undefined}\n >\n ${this._writeableElementSlots.map(\n (slot) => html`<slot name=${slot} slot=${slot}></slot>`,\n )}\n ${this.renderUserDefinedResponse\n ? null\n : this._userDefinedSlotNames.map(\n (slot) => html`<slot name=${slot} slot=${slot}></slot>`,\n )}\n ${this.renderCustomMessageFooter\n ? null\n : this._customFooterSlotNames.map(\n (slot) =>\n html`<div slot=${slot}><slot name=${slot}></slot></div>`,\n )}\n ${this._pluginSlotNames.map(\n (slot) => html`<slot name=${slot} slot=${slot}></slot>`,\n )}\n </cds-custom-aichat-container>\n `;\n }\n}\n\n/**\n * Attributes interface for the cds-custom-aichat-custom-element web component.\n * This interface extends {@link PublicConfig} with additional component-specific props,\n * flattening all config properties as top-level properties for better TypeScript IntelliSense.\n *\n * @category Web component\n */\ninterface CdsAiChatCustomElementAttributes extends Omit<\n PublicConfig,\n \"markdown\"\n> {\n /**\n * Markdown rendering customization. Extends the framework-neutral\n * `PublicConfig.markdown` with web-component `customRenderers`.\n *\n * @experimental\n */\n markdown?: WCMarkdown;\n\n /**\n * This function is called before the render function of Carbon AI Chat is called. This function can return a Promise\n * which will cause Carbon AI Chat to wait for it before rendering.\n */\n onBeforeRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * This function is called after the render function of Carbon AI Chat is called.\n */\n onAfterRender?: (instance: ChatInstance) => Promise<void> | void;\n\n /**\n * Called before a view change (the chat opening or closing) and awaited before the change proceeds. Use it to update\n * this element's CSS classes and run open/close animations to completion before the chat shell's inner contents are\n * hidden. A common pattern is to use this when the chat is closing and `onViewChange` when it opens.\n *\n * Note that this function can only be provided before Carbon AI Chat is loaded. After Carbon AI Chat is loaded, the\n * callback will not be updated.\n */\n onViewPreChange?: (event: BusEventViewPreChange) => Promise<void> | void;\n\n /**\n * An optional listener for \"view:change\" events. Such a listener is required when using a custom element in order\n * to control the visibility of the Carbon AI Chat main window. If no callback is provided here, a default one will be\n * used that injects styling into the app that will show and hide the Carbon AI Chat main window and also change the\n * size of the custom element so it doesn't take up space when the main window is closed.\n *\n * You can provide a different callback here if you want custom behavior such as an animation when the main window\n * is opened or closed.\n *\n * Note that this function can only be provided before Carbon AI Chat is loaded. After Carbon AI Chat is loaded, the event\n * handler will not be updated.\n */\n onViewChange?: (event: BusEventViewChange, instance: ChatInstance) => void;\n\n /**\n * Optional callback to render user defined responses. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, streaming state, and element lifecycle.\n */\n renderUserDefinedResponse?: WCRenderUserDefinedResponse;\n\n /**\n * Optional callback to render custom message footers. When provided, the inner cds-custom-aichat-container\n * manages all event listening, slot tracking, and element lifecycle.\n */\n renderCustomMessageFooter?: WCRenderCustomMessageFooter;\n}\n\nexport { CdsAiChatCustomElementAttributes };\n\nexport default ChatCustomElement;\n"],"names":["ChatCustomElement","ChatCustomElement_1","FlattenedConfigElement","constructor","this","_userDefinedSlotNames","_writeableElementSlots","_customFooterSlotNames","_pluginSlotNames","_pluginHosts","Map","defaultViewChangeHandler","event","newViewState","mainWindow","classList","remove","add","userDefinedHandler","slot","data","includes","customFooterHandler","slotName","handlePluginHostMount","detail","preventDefault","host","get","document","createElement","isInline","setAttribute","style","marginBlockStart","set","appendChild","innerHTML","html","handlePluginHostUpdate","handlePluginHostUnmount","filter","n","delete","onBeforeRenderOverride","async","instance","_instance","onViewPreChange","on","type","BusEventType","VIEW_PRE_CHANGE","handler","VIEW_CHANGE","onViewChange","renderUserDefinedResponse","USER_DEFINED_RESPONSE","CHUNK_USER_DEFINED_RESPONSE","renderCustomMessageFooter","CUSTOM_FOOTER_SLOT","addWriteableElementSlots","onBeforeRender","createRenderRoot","root","super","adoptedStyleSheets","hideSheet","connectedCallback","addEventListener","disconnectedCallback","removeEventListener","values","clear","Object","keys","writeableElements","render","resolvedConfig","header","onAfterRender","markdown","map","CSSStyleSheet","replaceSync","__decorate","property","attribute","prototype","state","carbonElement","ChatCustomElement_default"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,IAAMA,oBAAiBC,sBAAvB,MAAMD,0BAA0BE;EAAhC,WAAAC;;IAiIUC,KAAAC,wBAAkC;IAGlCD,KAAAE,yBAAmC;IAGnCF,KAAAG,yBAAmC;IAQnCH,KAAAI,mBAA6B;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S;EAAEC,WAAW;MACiCvF,kBAAAwF,WAAA;;AAMhDH,WAAA,EADPI,WAC4CzF,kBAAAwF,WAAA;;AAGrCH,WAAA,EADPI,WAC6CzF,kBAAAwF,WAAA;;AAGtCH,WAAA,EADPI,WAC6CzF,kBAAAwF,WAAA;;AAQtCH,WAAA,EADPI,WACuCzF,kBAAAwF,WAAA;;AAUhCH,WAAA,EADPI,WACgCzF,kBAAAwF,WAAA;;AAzJ7BxF,oBAAiBC,sBAAAoF,WAAA,EADtBK,cAAc,gCACT1F;;AAwaN,IAAA2F,4BAAe3F;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PersistedState, C as ChatContainerProps, B as BusEventViewPreChange, a as ChatInstance, b as BusEventViewChange } from './serverEntry-
|
|
2
|
-
export { A as AdditionalDataToAgent, c as AgentAvailability, d as AudioItem, e as AutoScrollOptions, f as BaseGenericItem, g as BaseMessageInput, h as BusEvent, i as BusEventChatReady, j as BusEventChunkUserDefinedResponse, k as BusEventClosePanelButtonClicked, l as BusEventCustomFooterSlot, m as BusEventCustomPanelClose, n as BusEventCustomPanelOpen, o as BusEventCustomPanelPreClose, p as BusEventCustomPanelPreOpen, q as BusEventFeedback, r as BusEventHeaderMenuClick, s as BusEventHistoryBegin, t as BusEventHistoryEnd, u as BusEventHumanAgentAreAnyAgentsOnline, v as BusEventHumanAgentEndChat, w as BusEventHumanAgentPreEndChat, x as BusEventHumanAgentPreReceive, y as BusEventHumanAgentPreSend, z as BusEventHumanAgentPreStartChat, D as BusEventHumanAgentReceive, E as BusEventHumanAgentSend, F as BusEventMessageItemCustom, G as BusEventPreReceive, H as BusEventPreReset, I as BusEventPreSend, J as BusEventReceive, K as BusEventReset, L as BusEventSend, M as BusEventStateChange, N as BusEventType, O as BusEventUserDefinedResponse, Q as BusEventWorkspaceClose, R as BusEventWorkspaceOpen, S as BusEventWorkspacePreClose, T as BusEventWorkspacePreOpen, U as ButtonItem, V as ButtonItemKind, W as ButtonItemType, X as CancellationReason, Y as CarbonTheme, Z as CardItem, _ as CarouselItem, $ as CatastrophicErrorPanelState, a0 as CdsAiChatContainerAttributes, a1 as CdsAiChatCustomElementAttributes, a2 as ChainOfThoughtStep, a3 as ChangeFunction, a4 as ChatContainerPropsMarkdown, a5 as ChatInstanceInput, a6 as ChatInstanceMessaging, a7 as ChatInstanceServiceDeskActions, a8 as ChatShortcutConfig, a9 as Chunk, aa as CompleteItemChunk, ab as ConnectToHumanAgentItem, ac as ConnectToHumanAgentItemTransferInfo, ad as ConnectingErrorInfo, ae as ConversationalSearchItem, af as ConversationalSearchItemCitation, ag as CornersType, ah as CustomMarkdownRenderers, ai as CustomMenuOption, aj as CustomPanelConfigOptions, ak as CustomPanelInstance, al as CustomPanelOpenOptions, am as CustomPanels, an as CustomSendMessageOptions, ao as DateItem, ap as DeepPartial, aq as DefaultCustomPanelConfigOptions, ar as DisclaimerPublicConfig, as as DisconnectedErrorInfo, at as EndChatInfo, au as ErrorType, av as EventBusHandler, aw as EventHandlers, ax as EventInput, ay as EventInputData, az as ExternalFileReference, aA as FeedbackInteractionType, aB as FileFieldValue, aC as FileStatusValue, aD as FileUpload, aE as FileUploadCapabilities, aF as FinalResponseChunk, aG as GenericItem, aH as GenericItemCustomFooterSlotOptions, aI as GenericItemMessageFeedbackCategories, aJ as GenericItemMessageFeedbackOptions, aK as GenericItemMessageOptions, aL as GridItem, aM as HeaderConfig, aN as HeaderMenuClickType, aO as HistoryConfig, aP as HistoryItem, aQ as HomeScreenConfig, aR as HomeScreenStarterButton, aS as HomeScreenStarterButtons, aT as HomeScreenState, aU as HorizontalCellAlignment, aV as HumanAgentMessageType, aW as HumanAgentsOnlineStatus, aX as IFrameItem, aY as IFrameItemDisplayOption, aZ as ImageItem, a_ as IncreaseOrDecrease, a$ as InlineErrorItem, b0 as InlineFile, b1 as InputConfig, b2 as ItemStreamingMetadata, b3 as KeyboardShortcuts, b4 as LanguagePack, b5 as LauncherCallToActionConfig, b6 as LauncherConfig, b7 as LayoutConfig, b8 as LayoutCustomProperties, b9 as MarkdownCustomRenderers, ba as MarkdownItPlugin, bb as MarkdownRendererCodeBlockArgs, bc as MarkdownRendererCodeBlockData, bd as MarkdownRendererTableArgs, be as MarkdownRendererTableData, bf as MediaFileAccessibility, bg as MediaItem, bh as MediaItemDimensions, bi as MediaSubtitleTrack, bj as MediaTranscript, bk as Message, bl as MessageErrorState, bm as MessageHistoryFeedback, bn as MessageInput, bo as MessageInputType, bp as MessageItemPanelInfo, bq as MessageOutput, br as MessageRequest, bs as MessageRequestHistory, bt as MessageResponse, bu as MessageResponseHistory, bv as MessageResponseOptions, bw as MessageResponseTypes, bx as MessageSendSource, by as MessageState, bz as MinimizeButtonIconType, bA as ObjectMap, bB as OnErrorData, bC as OnErrorType, bD as OptionItem, bE as OptionItemPreference, bF as PageObjectId, bG as PanelType, bH as PartialItemChunk, bI as PartialItemChunkWithId, bJ as PartialOrCompleteItemChunk, bK as PartialResponse, bL as PauseItem, bM as PerCornerConfig, bN as PersistedHumanAgentState, bO as PreviewCardItem, bP as PublicChatHumanAgentState, bQ as PublicChatState, bR as PublicConfig, bS as PublicConfigMarkdown, bT as PublicConfigMessaging, bU as PublicCustomPanelsState, bV as PublicDefaultCustomPanelState, bW as PublicHistoryPanelState, bX as PublicInputState, bY as PublicWorkspaceCustomPanelState, bZ as ReasoningStep, b_ as ReasoningStepOpenState, b$ as ReasoningSteps, c0 as RenderCustomMessageFooter, c1 as RenderCustomMessageFooterState, c2 as RenderUserDefinedResponse, c3 as RenderUserDefinedState, c4 as RenderWriteableElementResponse, c5 as ResolvedCornerConfig, c6 as ResponseUserProfile, c7 as ScreenShareState, c8 as SearchResult, c9 as SendOptions, ca as ServiceDesk, cb as ServiceDeskCallback, cc as ServiceDeskCapabilities, cd as ServiceDeskErrorInfo, ce as ServiceDeskFactoryParameters, cf as ServiceDeskPublicConfig, cg as SingleOption, ch as StartChatOptions, ci as StreamChunk, cj as StructuredData, ck as StructuredField, cl as StructuredFieldType, cm as StructuredFieldValue, cn as SystemMessageItem, co as SystemMessageVariant, cp as TestId, cq as TextItem, cr as TokenTree, cs as TypeAndHandler, ct as UploadConfig, cu as UpsertMessageUpdater, cv as UserDefinedItem, cw as UserMessageErrorInfo, cx as UserType, cy as VerticalCellAlignment, cz as VideoItem, cA as ViewChangeReason, cB as ViewState, cC as ViewType, cD as WCCustomMarkdownRenderers, cE as WCMarkdown, cF as WCRenderCustomMessageFooter, cG as WCRenderUserDefinedResponse, cH as WidthOptions, cI as WithBodyAndFooter, cJ as WithWidthOptions, cK as WorkspaceCustomPanelConfigOptions, cL as WriteableElementName, cM as WriteableElements, cN as enLanguagePack, cO as loadAllLazyDeps } from './serverEntry-
|
|
1
|
+
import { P as PersistedState, C as ChatContainerProps, B as BusEventViewPreChange, a as ChatInstance, b as BusEventViewChange } from './serverEntry-Byd0DXxW.js';
|
|
2
|
+
export { A as AdditionalDataToAgent, c as AgentAvailability, d as AudioItem, e as AutoScrollOptions, f as BaseGenericItem, g as BaseMessageInput, h as BusEvent, i as BusEventChatReady, j as BusEventChunkUserDefinedResponse, k as BusEventClosePanelButtonClicked, l as BusEventCustomFooterSlot, m as BusEventCustomPanelClose, n as BusEventCustomPanelOpen, o as BusEventCustomPanelPreClose, p as BusEventCustomPanelPreOpen, q as BusEventFeedback, r as BusEventHeaderMenuClick, s as BusEventHistoryBegin, t as BusEventHistoryEnd, u as BusEventHumanAgentAreAnyAgentsOnline, v as BusEventHumanAgentEndChat, w as BusEventHumanAgentPreEndChat, x as BusEventHumanAgentPreReceive, y as BusEventHumanAgentPreSend, z as BusEventHumanAgentPreStartChat, D as BusEventHumanAgentReceive, E as BusEventHumanAgentSend, F as BusEventMessageItemCustom, G as BusEventPreReceive, H as BusEventPreReset, I as BusEventPreSend, J as BusEventReceive, K as BusEventReset, L as BusEventSend, M as BusEventStateChange, N as BusEventType, O as BusEventUserDefinedResponse, Q as BusEventWorkspaceClose, R as BusEventWorkspaceOpen, S as BusEventWorkspacePreClose, T as BusEventWorkspacePreOpen, U as ButtonItem, V as ButtonItemKind, W as ButtonItemType, X as CancellationReason, Y as CarbonTheme, Z as CardItem, _ as CarouselItem, $ as CatastrophicErrorPanelState, a0 as CdsAiChatContainerAttributes, a1 as CdsAiChatCustomElementAttributes, a2 as ChainOfThoughtStep, a3 as ChangeFunction, a4 as ChatContainerPropsMarkdown, a5 as ChatInstanceInput, a6 as ChatInstanceMessaging, a7 as ChatInstanceServiceDeskActions, a8 as ChatShortcutConfig, a9 as Chunk, aa as CompleteItemChunk, ab as ConnectToHumanAgentItem, ac as ConnectToHumanAgentItemTransferInfo, ad as ConnectingErrorInfo, ae as ConversationalSearchItem, af as ConversationalSearchItemCitation, ag as CornersType, ah as CustomMarkdownRenderers, ai as CustomMenuOption, aj as CustomPanelConfigOptions, ak as CustomPanelInstance, al as CustomPanelOpenOptions, am as CustomPanels, an as CustomSendMessageOptions, ao as DateItem, ap as DeepPartial, aq as DefaultCustomPanelConfigOptions, ar as DisclaimerPublicConfig, as as DisconnectedErrorInfo, at as EndChatInfo, au as ErrorType, av as EventBusHandler, aw as EventHandlers, ax as EventInput, ay as EventInputData, az as ExternalFileReference, aA as FeedbackInteractionType, aB as FileFieldValue, aC as FileStatusValue, aD as FileUpload, aE as FileUploadCapabilities, aF as FinalResponseChunk, aG as GenericItem, aH as GenericItemCustomFooterSlotOptions, aI as GenericItemMessageFeedbackCategories, aJ as GenericItemMessageFeedbackOptions, aK as GenericItemMessageOptions, aL as GridItem, aM as HeaderConfig, aN as HeaderMenuClickType, aO as HistoryConfig, aP as HistoryItem, aQ as HomeScreenConfig, aR as HomeScreenStarterButton, aS as HomeScreenStarterButtons, aT as HomeScreenState, aU as HorizontalCellAlignment, aV as HumanAgentMessageType, aW as HumanAgentsOnlineStatus, aX as IFrameItem, aY as IFrameItemDisplayOption, aZ as ImageItem, a_ as IncreaseOrDecrease, a$ as InlineErrorItem, b0 as InlineFile, b1 as InputConfig, b2 as ItemStreamingMetadata, b3 as KeyboardShortcuts, b4 as LanguagePack, b5 as LauncherCallToActionConfig, b6 as LauncherConfig, b7 as LayoutConfig, b8 as LayoutCustomProperties, b9 as MarkdownCustomRenderers, ba as MarkdownItPlugin, bb as MarkdownRendererCodeBlockArgs, bc as MarkdownRendererCodeBlockData, bd as MarkdownRendererTableArgs, be as MarkdownRendererTableData, bf as MediaFileAccessibility, bg as MediaItem, bh as MediaItemDimensions, bi as MediaSubtitleTrack, bj as MediaTranscript, bk as Message, bl as MessageErrorState, bm as MessageHistoryFeedback, bn as MessageInput, bo as MessageInputType, bp as MessageItemPanelInfo, bq as MessageOutput, br as MessageRequest, bs as MessageRequestHistory, bt as MessageResponse, bu as MessageResponseHistory, bv as MessageResponseOptions, bw as MessageResponseTypes, bx as MessageSendSource, by as MessageState, bz as MinimizeButtonIconType, bA as ObjectMap, bB as OnErrorData, bC as OnErrorType, bD as OptionItem, bE as OptionItemPreference, bF as PageObjectId, bG as PanelType, bH as PartialItemChunk, bI as PartialItemChunkWithId, bJ as PartialOrCompleteItemChunk, bK as PartialResponse, bL as PauseItem, bM as PerCornerConfig, bN as PersistedHumanAgentState, bO as PreviewCardItem, bP as PublicChatHumanAgentState, bQ as PublicChatState, bR as PublicConfig, bS as PublicConfigMarkdown, bT as PublicConfigMessaging, bU as PublicCustomPanelsState, bV as PublicDefaultCustomPanelState, bW as PublicHistoryPanelState, bX as PublicInputState, bY as PublicWorkspaceCustomPanelState, bZ as ReasoningStep, b_ as ReasoningStepOpenState, b$ as ReasoningSteps, c0 as RenderCustomMessageFooter, c1 as RenderCustomMessageFooterState, c2 as RenderUserDefinedResponse, c3 as RenderUserDefinedState, c4 as RenderWriteableElementResponse, c5 as ResolvedCornerConfig, c6 as ResponseUserProfile, c7 as ScreenShareState, c8 as SearchResult, c9 as SendOptions, ca as ServiceDesk, cb as ServiceDeskCallback, cc as ServiceDeskCapabilities, cd as ServiceDeskErrorInfo, ce as ServiceDeskFactoryParameters, cf as ServiceDeskPublicConfig, cg as SingleOption, ch as StartChatOptions, ci as StreamChunk, cj as StructuredData, ck as StructuredField, cl as StructuredFieldType, cm as StructuredFieldValue, cn as SystemMessageItem, co as SystemMessageVariant, cp as TestId, cq as TextItem, cr as TokenTree, cs as TypeAndHandler, ct as UploadConfig, cu as UpsertMessageUpdater, cv as UserDefinedItem, cw as UserMessageErrorInfo, cx as UserType, cy as VerticalCellAlignment, cz as VideoItem, cA as ViewChangeReason, cB as ViewState, cC as ViewType, cD as WCCustomMarkdownRenderers, cE as WCMarkdown, cF as WCRenderCustomMessageFooter, cG as WCRenderUserDefinedResponse, cH as WidthOptions, cI as WithBodyAndFooter, cJ as WithWidthOptions, cK as WorkspaceCustomPanelConfigOptions, cL as WriteableElementName, cM as WriteableElements, cN as enLanguagePack, cO as loadAllLazyDeps } from './serverEntry-Byd0DXxW.js';
|
|
3
3
|
import React, { HTMLAttributes } from 'react';
|
|
4
4
|
export { ChainOfThoughtStepStatus } from '@carbon/ai-chat-components/es/components/chain-of-thought/defs.js';
|
|
5
5
|
import '@carbon/web-components/es/components/button/defs.js';
|
|
@@ -302,6 +302,12 @@ interface DefaultCustomPanelConfigOptions {
|
|
|
302
302
|
* panel can be returned to, or "close" to indicate the panel will not return.
|
|
303
303
|
*/
|
|
304
304
|
backButtonType?: "minimize" | "close";
|
|
305
|
+
/**
|
|
306
|
+
* Controls the position of the back button in the panel header.
|
|
307
|
+
* Use "start" to position it at the beginning in the navigation slot,
|
|
308
|
+
* or "end" to position it at the end in the toolbar actions.
|
|
309
|
+
*/
|
|
310
|
+
backButtonPosition?: "start" | "end";
|
|
305
311
|
/**
|
|
306
312
|
* Shows the AI gradient background on your panel. Can be used with in concert with showFrame.
|
|
307
313
|
*/
|
|
@@ -315,6 +321,15 @@ interface DefaultCustomPanelConfigOptions {
|
|
|
315
321
|
* width slot, set fullWidth to true.
|
|
316
322
|
*/
|
|
317
323
|
fullWidth?: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Make the main chat header visible while the panel is open.
|
|
326
|
+
*/
|
|
327
|
+
showChatHeader?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* When true, the panel will slide in/out from the side instead of from the bottom.
|
|
330
|
+
* By default, panels animate from the bottom.
|
|
331
|
+
*/
|
|
332
|
+
openFromSide?: boolean;
|
|
318
333
|
}
|
|
319
334
|
/**
|
|
320
335
|
* Options supported by the workspace custom panel implementation.
|
|
@@ -1620,7 +1635,11 @@ interface GenericItemMessageFeedbackOptions {
|
|
|
1620
1635
|
*/
|
|
1621
1636
|
interface GenericItemCustomFooterSlotOptions {
|
|
1622
1637
|
/**
|
|
1623
|
-
*
|
|
1638
|
+
* Identifier for this footer slot, passed to the `renderCustomMessageFooter` render function.
|
|
1639
|
+
*
|
|
1640
|
+
* This value **must be unique to this message** — every message that shows a footer needs its own
|
|
1641
|
+
* `slot_name`. Reusing the same value across messages collapses them onto a single slot, so only the first
|
|
1642
|
+
* message's footer renders. A per-message counter or UUID works well, e.g. `` `copy_footer_${id}` ``.
|
|
1624
1643
|
*/
|
|
1625
1644
|
slot_name: string;
|
|
1626
1645
|
/**
|
|
@@ -6319,11 +6338,29 @@ interface ChatContainerProps extends Omit<PublicConfig, "markdown"> {
|
|
|
6319
6338
|
/**
|
|
6320
6339
|
* This function is called before the render function of Carbon AI Chat is called. This function can return a Promise
|
|
6321
6340
|
* which will cause Carbon AI Chat to wait for it before rendering.
|
|
6341
|
+
*
|
|
6342
|
+
* Use it to capture the {@link ChatInstance} so you can call instance methods later.
|
|
6343
|
+
*
|
|
6344
|
+
* @example
|
|
6345
|
+
* ```tsx
|
|
6346
|
+
* function App() {
|
|
6347
|
+
* const [instance, setInstance] = useState<ChatInstance | null>(null);
|
|
6348
|
+
* return (
|
|
6349
|
+
* <ChatContainer
|
|
6350
|
+
* onBeforeRender={(chat) => setInstance(chat)}
|
|
6351
|
+
* messaging={messaging}
|
|
6352
|
+
* />
|
|
6353
|
+
* );
|
|
6354
|
+
* }
|
|
6355
|
+
* ```
|
|
6322
6356
|
*/
|
|
6323
6357
|
onBeforeRender?: (instance: ChatInstance) => Promise<void> | void;
|
|
6324
6358
|
/**
|
|
6325
6359
|
* This function is called after the render function of Carbon AI Chat is called. This function can return a Promise
|
|
6326
6360
|
* which will cause Carbon AI Chat to wait for it before rendering.
|
|
6361
|
+
*
|
|
6362
|
+
* Like {@link ChatContainerProps.onBeforeRender}, it receives the {@link ChatInstance}; use it when you need the
|
|
6363
|
+
* instance only after the first render has completed.
|
|
6327
6364
|
*/
|
|
6328
6365
|
onAfterRender?: (instance: ChatInstance) => Promise<void> | void;
|
|
6329
6366
|
/**
|
|
@@ -6366,10 +6403,23 @@ declare class ChatContainer extends FlattenedConfigElement {
|
|
|
6366
6403
|
/**
|
|
6367
6404
|
* This function is called before the render function of Carbon AI Chat is called. This function can return a Promise
|
|
6368
6405
|
* which will cause Carbon AI Chat to wait for it before rendering.
|
|
6406
|
+
*
|
|
6407
|
+
* Use it to capture the {@link ChatInstance} so you can call instance methods later.
|
|
6408
|
+
*
|
|
6409
|
+
* @example
|
|
6410
|
+
* ```ts
|
|
6411
|
+
* const onBeforeRender = (instance: ChatInstance) => {
|
|
6412
|
+
* this.instance = instance;
|
|
6413
|
+
* };
|
|
6414
|
+
* // <cds-aichat-container .onBeforeRender=${onBeforeRender}></cds-aichat-container>
|
|
6415
|
+
* ```
|
|
6369
6416
|
*/
|
|
6370
6417
|
onBeforeRender: (instance: ChatInstance) => Promise<void> | void;
|
|
6371
6418
|
/**
|
|
6372
6419
|
* This function is called after the render function of Carbon AI Chat is called.
|
|
6420
|
+
*
|
|
6421
|
+
* Like `onBeforeRender`, it receives the {@link ChatInstance}; use it when you need the instance only after the
|
|
6422
|
+
* first render has completed.
|
|
6373
6423
|
*/
|
|
6374
6424
|
onAfterRender: (instance: ChatInstance) => Promise<void> | void;
|
|
6375
6425
|
/**
|
|
@@ -6590,6 +6640,15 @@ interface CdsAiChatCustomElementAttributes extends Omit<PublicConfig, "markdown"
|
|
|
6590
6640
|
* This function is called after the render function of Carbon AI Chat is called.
|
|
6591
6641
|
*/
|
|
6592
6642
|
onAfterRender?: (instance: ChatInstance) => Promise<void> | void;
|
|
6643
|
+
/**
|
|
6644
|
+
* Called before a view change (the chat opening or closing) and awaited before the change proceeds. Use it to update
|
|
6645
|
+
* this element's CSS classes and run open/close animations to completion before the chat shell's inner contents are
|
|
6646
|
+
* hidden. A common pattern is to use this when the chat is closing and `onViewChange` when it opens.
|
|
6647
|
+
*
|
|
6648
|
+
* Note that this function can only be provided before Carbon AI Chat is loaded. After Carbon AI Chat is loaded, the
|
|
6649
|
+
* callback will not be updated.
|
|
6650
|
+
*/
|
|
6651
|
+
onViewPreChange?: (event: BusEventViewPreChange) => Promise<void> | void;
|
|
6593
6652
|
/**
|
|
6594
6653
|
* An optional listener for "view:change" events. Such a listener is required when using a custom element in order
|
|
6595
6654
|
* to control the visibility of the Carbon AI Chat main window. If no callback is provided here, a default one will be
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AdditionalDataToAgent, c as AgentAvailability, d as AudioItem, e as AutoScrollOptions, f as BaseGenericItem, g as BaseMessageInput, h as BusEvent, i as BusEventChatReady, j as BusEventChunkUserDefinedResponse, k as BusEventClosePanelButtonClicked, m as BusEventCustomPanelClose, n as BusEventCustomPanelOpen, o as BusEventCustomPanelPreClose, p as BusEventCustomPanelPreOpen, q as BusEventFeedback, r as BusEventHeaderMenuClick, s as BusEventHistoryBegin, t as BusEventHistoryEnd, u as BusEventHumanAgentAreAnyAgentsOnline, v as BusEventHumanAgentEndChat, w as BusEventHumanAgentPreEndChat, x as BusEventHumanAgentPreReceive, y as BusEventHumanAgentPreSend, z as BusEventHumanAgentPreStartChat, D as BusEventHumanAgentReceive, E as BusEventHumanAgentSend, F as BusEventMessageItemCustom, G as BusEventPreReceive, H as BusEventPreReset, I as BusEventPreSend, J as BusEventReceive, K as BusEventReset, L as BusEventSend, M as BusEventStateChange, N as BusEventType, O as BusEventUserDefinedResponse, b as BusEventViewChange, B as BusEventViewPreChange, Q as BusEventWorkspaceClose, R as BusEventWorkspaceOpen, S as BusEventWorkspacePreClose, T as BusEventWorkspacePreOpen, U as ButtonItem, V as ButtonItemKind, W as ButtonItemType, X as CancellationReason, Y as CarbonTheme, Z as CardItem, _ as CarouselItem, $ as CatastrophicErrorPanelState, a0 as CdsAiChatContainerAttributes, a1 as CdsAiChatCustomElementAttributes, a2 as ChainOfThoughtStep, a3 as ChangeFunction, a4 as ChatContainerPropsMarkdown, a as ChatInstance, a5 as ChatInstanceInput, a6 as ChatInstanceMessaging, a7 as ChatInstanceServiceDeskActions, a8 as ChatShortcutConfig, a9 as Chunk, aa as CompleteItemChunk, ab as ConnectToHumanAgentItem, ac as ConnectToHumanAgentItemTransferInfo, ad as ConnectingErrorInfo, ae as ConversationalSearchItem, af as ConversationalSearchItemCitation, ag as CornersType, ah as CustomMarkdownRenderers, ai as CustomMenuOption, aj as CustomPanelConfigOptions, ak as CustomPanelInstance, al as CustomPanelOpenOptions, am as CustomPanels, an as CustomSendMessageOptions, ao as DateItem, ap as DeepPartial, aq as DefaultCustomPanelConfigOptions, ar as DisclaimerPublicConfig, as as DisconnectedErrorInfo, at as EndChatInfo, au as ErrorType, av as EventBusHandler, aw as EventHandlers, ax as EventInput, ay as EventInputData, az as ExternalFileReference, aA as FeedbackInteractionType, aB as FileFieldValue, aC as FileStatusValue, aD as FileUpload, aE as FileUploadCapabilities, aF as FinalResponseChunk, aG as GenericItem, aI as GenericItemMessageFeedbackCategories, aJ as GenericItemMessageFeedbackOptions, aK as GenericItemMessageOptions, aL as GridItem, aM as HeaderConfig, aN as HeaderMenuClickType, aO as HistoryConfig, aP as HistoryItem, aQ as HomeScreenConfig, aR as HomeScreenStarterButton, aS as HomeScreenStarterButtons, aT as HomeScreenState, aU as HorizontalCellAlignment, aV as HumanAgentMessageType, aW as HumanAgentsOnlineStatus, aX as IFrameItem, aY as IFrameItemDisplayOption, aZ as ImageItem, a_ as IncreaseOrDecrease, a$ as InlineErrorItem, b0 as InlineFile, b1 as InputConfig, b2 as ItemStreamingMetadata, b3 as KeyboardShortcuts, b4 as LanguagePack, b5 as LauncherCallToActionConfig, b6 as LauncherConfig, b7 as LayoutConfig, b8 as LayoutCustomProperties, b9 as MarkdownCustomRenderers, ba as MarkdownItPlugin, bb as MarkdownRendererCodeBlockArgs, bc as MarkdownRendererCodeBlockData, bd as MarkdownRendererTableArgs, be as MarkdownRendererTableData, bf as MediaFileAccessibility, bg as MediaItem, bh as MediaItemDimensions, bi as MediaSubtitleTrack, bj as MediaTranscript, bk as Message, bl as MessageErrorState, bm as MessageHistoryFeedback, bn as MessageInput, bo as MessageInputType, bp as MessageItemPanelInfo, bq as MessageOutput, br as MessageRequest, bs as MessageRequestHistory, bt as MessageResponse, bu as MessageResponseHistory, bv as MessageResponseOptions, bw as MessageResponseTypes, bx as MessageSendSource, by as MessageState, bz as MinimizeButtonIconType, bA as ObjectMap, bB as OnErrorData, bC as OnErrorType, bD as OptionItem, bE as OptionItemPreference, bF as PageObjectId, bG as PanelType, bH as PartialItemChunk, bI as PartialItemChunkWithId, bJ as PartialOrCompleteItemChunk, bK as PartialResponse, bL as PauseItem, bN as PersistedHumanAgentState, P as PersistedState, bO as PreviewCardItem, bP as PublicChatHumanAgentState, bQ as PublicChatState, bR as PublicConfig, bS as PublicConfigMarkdown, bT as PublicConfigMessaging, bU as PublicCustomPanelsState, bV as PublicDefaultCustomPanelState, bW as PublicHistoryPanelState, bX as PublicInputState, bY as PublicWorkspaceCustomPanelState, bZ as ReasoningStep, b_ as ReasoningStepOpenState, b$ as ReasoningSteps, c0 as RenderCustomMessageFooter, c1 as RenderCustomMessageFooterState, c2 as RenderUserDefinedResponse, c3 as RenderUserDefinedState, c4 as RenderWriteableElementResponse, c6 as ResponseUserProfile, c7 as ScreenShareState, c8 as SearchResult, c9 as SendOptions, ca as ServiceDesk, cb as ServiceDeskCallback, cc as ServiceDeskCapabilities, cd as ServiceDeskErrorInfo, ce as ServiceDeskFactoryParameters, cf as ServiceDeskPublicConfig, cg as SingleOption, ch as StartChatOptions, ci as StreamChunk, cj as StructuredData, ck as StructuredField, cl as StructuredFieldType, cm as StructuredFieldValue, cn as SystemMessageItem, co as SystemMessageVariant, cp as TestId, cq as TextItem, cr as TokenTree, cs as TypeAndHandler, ct as UploadConfig, cu as UpsertMessageUpdater, cv as UserDefinedItem, cw as UserMessageErrorInfo, cx as UserType, cy as VerticalCellAlignment, cz as VideoItem, cA as ViewChangeReason, cB as ViewState, cC as ViewType, cD as WCCustomMarkdownRenderers, cE as WCMarkdown, cF as WCRenderCustomMessageFooter, cG as WCRenderUserDefinedResponse, cH as WidthOptions, cI as WithBodyAndFooter, cJ as WithWidthOptions, cK as WorkspaceCustomPanelConfigOptions, cL as WriteableElementName, cM as WriteableElements, cN as enLanguagePack, cO as loadAllLazyDeps } from './serverEntry-
|
|
1
|
+
export { A as AdditionalDataToAgent, c as AgentAvailability, d as AudioItem, e as AutoScrollOptions, f as BaseGenericItem, g as BaseMessageInput, h as BusEvent, i as BusEventChatReady, j as BusEventChunkUserDefinedResponse, k as BusEventClosePanelButtonClicked, m as BusEventCustomPanelClose, n as BusEventCustomPanelOpen, o as BusEventCustomPanelPreClose, p as BusEventCustomPanelPreOpen, q as BusEventFeedback, r as BusEventHeaderMenuClick, s as BusEventHistoryBegin, t as BusEventHistoryEnd, u as BusEventHumanAgentAreAnyAgentsOnline, v as BusEventHumanAgentEndChat, w as BusEventHumanAgentPreEndChat, x as BusEventHumanAgentPreReceive, y as BusEventHumanAgentPreSend, z as BusEventHumanAgentPreStartChat, D as BusEventHumanAgentReceive, E as BusEventHumanAgentSend, F as BusEventMessageItemCustom, G as BusEventPreReceive, H as BusEventPreReset, I as BusEventPreSend, J as BusEventReceive, K as BusEventReset, L as BusEventSend, M as BusEventStateChange, N as BusEventType, O as BusEventUserDefinedResponse, b as BusEventViewChange, B as BusEventViewPreChange, Q as BusEventWorkspaceClose, R as BusEventWorkspaceOpen, S as BusEventWorkspacePreClose, T as BusEventWorkspacePreOpen, U as ButtonItem, V as ButtonItemKind, W as ButtonItemType, X as CancellationReason, Y as CarbonTheme, Z as CardItem, _ as CarouselItem, $ as CatastrophicErrorPanelState, a0 as CdsAiChatContainerAttributes, a1 as CdsAiChatCustomElementAttributes, a2 as ChainOfThoughtStep, a3 as ChangeFunction, a4 as ChatContainerPropsMarkdown, a as ChatInstance, a5 as ChatInstanceInput, a6 as ChatInstanceMessaging, a7 as ChatInstanceServiceDeskActions, a8 as ChatShortcutConfig, a9 as Chunk, aa as CompleteItemChunk, ab as ConnectToHumanAgentItem, ac as ConnectToHumanAgentItemTransferInfo, ad as ConnectingErrorInfo, ae as ConversationalSearchItem, af as ConversationalSearchItemCitation, ag as CornersType, ah as CustomMarkdownRenderers, ai as CustomMenuOption, aj as CustomPanelConfigOptions, ak as CustomPanelInstance, al as CustomPanelOpenOptions, am as CustomPanels, an as CustomSendMessageOptions, ao as DateItem, ap as DeepPartial, aq as DefaultCustomPanelConfigOptions, ar as DisclaimerPublicConfig, as as DisconnectedErrorInfo, at as EndChatInfo, au as ErrorType, av as EventBusHandler, aw as EventHandlers, ax as EventInput, ay as EventInputData, az as ExternalFileReference, aA as FeedbackInteractionType, aB as FileFieldValue, aC as FileStatusValue, aD as FileUpload, aE as FileUploadCapabilities, aF as FinalResponseChunk, aG as GenericItem, aI as GenericItemMessageFeedbackCategories, aJ as GenericItemMessageFeedbackOptions, aK as GenericItemMessageOptions, aL as GridItem, aM as HeaderConfig, aN as HeaderMenuClickType, aO as HistoryConfig, aP as HistoryItem, aQ as HomeScreenConfig, aR as HomeScreenStarterButton, aS as HomeScreenStarterButtons, aT as HomeScreenState, aU as HorizontalCellAlignment, aV as HumanAgentMessageType, aW as HumanAgentsOnlineStatus, aX as IFrameItem, aY as IFrameItemDisplayOption, aZ as ImageItem, a_ as IncreaseOrDecrease, a$ as InlineErrorItem, b0 as InlineFile, b1 as InputConfig, b2 as ItemStreamingMetadata, b3 as KeyboardShortcuts, b4 as LanguagePack, b5 as LauncherCallToActionConfig, b6 as LauncherConfig, b7 as LayoutConfig, b8 as LayoutCustomProperties, b9 as MarkdownCustomRenderers, ba as MarkdownItPlugin, bb as MarkdownRendererCodeBlockArgs, bc as MarkdownRendererCodeBlockData, bd as MarkdownRendererTableArgs, be as MarkdownRendererTableData, bf as MediaFileAccessibility, bg as MediaItem, bh as MediaItemDimensions, bi as MediaSubtitleTrack, bj as MediaTranscript, bk as Message, bl as MessageErrorState, bm as MessageHistoryFeedback, bn as MessageInput, bo as MessageInputType, bp as MessageItemPanelInfo, bq as MessageOutput, br as MessageRequest, bs as MessageRequestHistory, bt as MessageResponse, bu as MessageResponseHistory, bv as MessageResponseOptions, bw as MessageResponseTypes, bx as MessageSendSource, by as MessageState, bz as MinimizeButtonIconType, bA as ObjectMap, bB as OnErrorData, bC as OnErrorType, bD as OptionItem, bE as OptionItemPreference, bF as PageObjectId, bG as PanelType, bH as PartialItemChunk, bI as PartialItemChunkWithId, bJ as PartialOrCompleteItemChunk, bK as PartialResponse, bL as PauseItem, bN as PersistedHumanAgentState, P as PersistedState, bO as PreviewCardItem, bP as PublicChatHumanAgentState, bQ as PublicChatState, bR as PublicConfig, bS as PublicConfigMarkdown, bT as PublicConfigMessaging, bU as PublicCustomPanelsState, bV as PublicDefaultCustomPanelState, bW as PublicHistoryPanelState, bX as PublicInputState, bY as PublicWorkspaceCustomPanelState, bZ as ReasoningStep, b_ as ReasoningStepOpenState, b$ as ReasoningSteps, c0 as RenderCustomMessageFooter, c1 as RenderCustomMessageFooterState, c2 as RenderUserDefinedResponse, c3 as RenderUserDefinedState, c4 as RenderWriteableElementResponse, c6 as ResponseUserProfile, c7 as ScreenShareState, c8 as SearchResult, c9 as SendOptions, ca as ServiceDesk, cb as ServiceDeskCallback, cc as ServiceDeskCapabilities, cd as ServiceDeskErrorInfo, ce as ServiceDeskFactoryParameters, cf as ServiceDeskPublicConfig, cg as SingleOption, ch as StartChatOptions, ci as StreamChunk, cj as StructuredData, ck as StructuredField, cl as StructuredFieldType, cm as StructuredFieldValue, cn as SystemMessageItem, co as SystemMessageVariant, cp as TestId, cq as TextItem, cr as TokenTree, cs as TypeAndHandler, ct as UploadConfig, cu as UpsertMessageUpdater, cv as UserDefinedItem, cw as UserMessageErrorInfo, cx as UserType, cy as VerticalCellAlignment, cz as VideoItem, cA as ViewChangeReason, cB as ViewState, cC as ViewType, cD as WCCustomMarkdownRenderers, cE as WCMarkdown, cF as WCRenderCustomMessageFooter, cG as WCRenderUserDefinedResponse, cH as WidthOptions, cI as WithBodyAndFooter, cJ as WithWidthOptions, cK as WorkspaceCustomPanelConfigOptions, cL as WriteableElementName, cM as WriteableElements, cN as enLanguagePack, cO as loadAllLazyDeps } from './serverEntry-Byd0DXxW.js';
|
|
2
2
|
export { ChainOfThoughtStepStatus } from '@carbon/ai-chat-components/es/components/chain-of-thought/defs.js';
|
|
3
3
|
import '@carbon/web-components/es/components/button/defs.js';
|
|
4
4
|
import '@carbon/ai-chat-components/es/react/chat-button.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/ai-chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0-rc.0",
|
|
4
4
|
"description": "Be sure to review the [chat documentation](https://chat.carbondesignsystem.com/tag/latest/docs/documents/Overview.html).",
|
|
5
5
|
"author": "IBM Corp",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@carbon/icons": "^11.53.0",
|
|
81
81
|
"@carbon/styles": "^1.105.0",
|
|
82
82
|
"@carbon/themes": "^11.58.0",
|
|
83
|
-
"@carbon/typedoc-theme": "^0.
|
|
83
|
+
"@carbon/typedoc-theme": "^0.5.0-rc.0",
|
|
84
84
|
"@carbon/web-components": "^2.54.0",
|
|
85
85
|
"@open-wc/testing": "4.0.0",
|
|
86
86
|
"@rollup/plugin-babel": "^7.0.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@types/use-sync-external-store": "^1.5.0",
|
|
103
103
|
"autoprefixer": "^10.4.21",
|
|
104
104
|
"babel-jest": "^30.0.0",
|
|
105
|
-
"concurrently": "^
|
|
105
|
+
"concurrently": "^10.0.0",
|
|
106
106
|
"fs-extra": "^11.3.2",
|
|
107
107
|
"globby": "^16.0.0",
|
|
108
108
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"rollup-plugin-dts": "^6.2.1",
|
|
118
118
|
"rollup-plugin-postcss": "^4.0.2",
|
|
119
119
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
120
|
-
"sass": "1.
|
|
120
|
+
"sass": "1.101.0",
|
|
121
121
|
"serve": "^14.2.6",
|
|
122
122
|
"terser": "^5.43.1",
|
|
123
123
|
"ts-jest": "^29.1.5",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"react-dom": ">=17.0.0 <20.0.0"
|
|
133
133
|
},
|
|
134
134
|
"dependencies": {
|
|
135
|
-
"@carbon/ai-chat-components": "^1.
|
|
135
|
+
"@carbon/ai-chat-components": "^1.6.0-rc.0",
|
|
136
136
|
"@carbon/icons": "^11.53.0",
|
|
137
137
|
"@ibm/telemetry-js": "^1.10.2",
|
|
138
138
|
"@lit/react": "^1.0.6",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"intl-messageformat": "^11.0.0",
|
|
145
145
|
"lit": "^3.1.0",
|
|
146
146
|
"lodash-es": "^4.18.1",
|
|
147
|
-
"markdown-it": "^14.
|
|
147
|
+
"markdown-it": "^14.2.0",
|
|
148
148
|
"tabbable": "^6.2.0",
|
|
149
149
|
"tslib": "^2.6.3",
|
|
150
150
|
"use-sync-external-store": "^1.2.0"
|
|
@@ -164,5 +164,5 @@
|
|
|
164
164
|
"url": "https://github.com/carbon-design-system/carbon-ai-chat/issues"
|
|
165
165
|
},
|
|
166
166
|
"homepage": "https://github.com/carbon-design-system/carbon-ai-chat#readme",
|
|
167
|
-
"gitHead": "
|
|
167
|
+
"gitHead": "180d9f7b7b8d6b33f418aa1caec1bfc0cc8b7a5a"
|
|
168
168
|
}
|