@carbon/ai-chat-components 0.6.2 → 0.7.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/custom-elements.json +2611 -3856
- package/dist/16-BZMv8BLP.js +91 -0
- package/dist/16-DTIyOew7.js +91 -0
- package/dist/button-VYkJ5dwm.js +157 -0
- package/dist/button-skeleton-C44ojFOx.js +131 -0
- package/dist/card.min.js +193 -0
- package/dist/chain-of-thought.min.js +173 -155
- package/dist/chat-button.min.js +23 -23
- package/dist/checkbox-skeleton-B1dsTlWl.js +166 -0
- package/dist/{lit-element-DibNdm1l.js → class-map-CAQcKAyP.js} +38 -22
- package/dist/code-snippet.min.js +21 -21
- package/dist/codemirror-runtime-DjJTvK74.js +173 -0
- package/dist/{dockerfile-CKwmNxGw.js → dockerfile-C5Ju62-g.js} +21 -21
- package/dist/{factor-PwV725w2.js → factor-BLzOdeEw.js} +21 -21
- package/dist/feedback.min.js +68 -87
- package/dist/{icon-button-Ddd1Ihho.js → icon-button-B9XqYdUx.js} +33 -33
- package/dist/{icon-loader-DuM8rfP3.js → icon-loader-tzlfALFt.js} +23 -23
- package/dist/{if-defined-CbQ0hWcL.js → if-defined-DvPtK2Df.js} +22 -22
- package/dist/index--QAAkyqA.js +91 -0
- package/dist/{index-B1YAtZGR.js → index-1zAoDu0L.js} +21 -21
- package/dist/{index-BtI1vT4z.js → index-B6ll86Y6.js} +21 -21
- package/dist/index-B9DVtGsv.js +278 -0
- package/dist/index-BPU5uHmK.js +91 -0
- package/dist/index-BbWtDXd9.js +91 -0
- package/dist/index-BjsxSbgO.js +91 -0
- package/dist/index-BwI8x9E4.js +91 -0
- package/dist/index-C3KNlXVv.js +168 -0
- package/dist/index-CAdio42O.js +91 -0
- package/dist/index-CSMhs9Fm.js +91 -0
- package/dist/index-CU0IEHyz.js +91 -0
- package/dist/index-Cj-ZmC-W.js +91 -0
- package/dist/index-Ctl66nQF.js +91 -0
- package/dist/index-D7MLs7w5.js +91 -0
- package/dist/index-DH8wnvUn.js +91 -0
- package/dist/index-DWn_nnHo.js +91 -0
- package/dist/index-DpqlVRJ7.js +91 -0
- package/dist/index-Dx9Ms_uJ.js +91 -0
- package/dist/index-EwTPqhmw.js +91 -0
- package/dist/index-P1vutKel.js +91 -0
- package/dist/index-WQxGinYJ.js +91 -0
- package/dist/index-cK4rXRw-.js +91 -0
- package/dist/index-o-THaGga.js +91 -0
- package/dist/loading-icon-CRrLjNZH.js +106 -0
- package/dist/markdown.min.js +72 -70
- package/dist/{nsis-CWLatKhG.js → nsis-Biw-VyZu.js} +21 -21
- package/dist/processing.min.js +23 -23
- package/dist/{pug-DiwBvjDI.js → pug-BuYdIlne.js} +21 -21
- package/dist/reasoning-steps.min.js +69 -38
- package/dist/{state-B20s9hJU.js → state-CBq0UPBm.js} +21 -21
- package/dist/{table-runtime-CzipYmcB.js → table-runtime-CzXXhWmg.js} +86 -86
- package/dist/table.min.js +21 -21
- package/dist/text-input-VC8mmTlR.js +158 -0
- package/dist/toolbar.min.js +54 -56
- package/dist/workspace-shell.min.js +46 -51
- package/es/components/card/index.d.ts +11 -0
- package/es/components/{tile-container → card}/index.js +3 -1
- package/es/components/{tile-container → card}/index.js.map +1 -1
- package/es/components/card/src/card-footer.d.ts +43 -0
- package/es/components/card/src/card-footer.js +140 -0
- package/es/components/card/src/card-footer.js.map +1 -0
- package/es/components/card/src/card-footer.scss.js +13 -0
- package/es/components/card/src/card-footer.scss.js.map +1 -0
- package/es/components/card/src/card-steps.d.ts +28 -0
- package/es/components/card/src/card-steps.js +90 -0
- package/es/components/card/src/card-steps.js.map +1 -0
- package/es/components/{tile-container/src/tile-container.scss.js → card/src/card-steps.scss.js} +2 -2
- package/es/components/card/src/card-steps.scss.js.map +1 -0
- package/es/components/card/src/card.d.ts +27 -0
- package/es/components/card/src/card.js +65 -0
- package/es/components/card/src/card.js.map +1 -0
- package/es/components/card/src/card.scss.js +13 -0
- package/es/components/card/src/card.scss.js.map +1 -0
- package/es/components/chain-of-thought/defs.d.ts +54 -0
- package/es/components/chain-of-thought/{src/types.js → defs.js} +10 -1
- package/es/components/chain-of-thought/defs.js.map +1 -0
- package/es/components/chain-of-thought/index.d.ts +10 -4
- package/es/components/chain-of-thought/index.js +5 -3
- package/es/components/chain-of-thought/index.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +43 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.js +351 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js +13 -0
- package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +33 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +107 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js +13 -0
- package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js.map +1 -0
- package/es/components/chain-of-thought/src/chain-of-thought.d.ts +23 -69
- package/es/components/chain-of-thought/src/chain-of-thought.js +88 -145
- package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
- package/es/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
- package/es/components/chain-of-thought/src/tool-call-data.d.ts +33 -0
- package/es/components/chain-of-thought/src/tool-call-data.js +179 -0
- package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -0
- package/es/components/chain-of-thought/src/tool-call-data.scss.js +13 -0
- package/es/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -0
- package/es/components/chat-button/src/chat-button.d.ts +11 -3
- package/es/components/chat-button/src/chat-button.js +15 -11
- package/es/components/chat-button/src/chat-button.js.map +1 -1
- package/es/components/code-snippet/index.d.ts +2 -2
- package/es/components/code-snippet/index.js +1 -1
- package/es/components/code-snippet/src/code-snippet-card.d.ts +63 -0
- package/es/components/code-snippet/src/code-snippet-card.js +186 -0
- package/es/components/code-snippet/src/code-snippet-card.js.map +1 -0
- package/es/components/code-snippet/src/code-snippet.d.ts +32 -31
- package/es/components/code-snippet/src/code-snippet.js +115 -29
- package/es/components/code-snippet/src/code-snippet.js.map +1 -1
- package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
- package/es/components/feedback/index.d.ts +4 -7
- package/es/components/feedback/index.js +2 -4
- package/es/components/feedback/index.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.d.ts +9 -2
- package/es/components/feedback/src/feedback-buttons.js +24 -15
- package/es/components/feedback/src/feedback-buttons.js.map +1 -1
- package/es/components/feedback/src/feedback-buttons.template.d.ts +2 -2
- package/es/components/feedback/src/feedback-buttons.template.js.map +1 -1
- package/es/components/feedback/src/feedback.d.ts +9 -10
- package/es/components/feedback/src/feedback.js +35 -22
- package/es/components/feedback/src/feedback.js.map +1 -1
- package/es/components/feedback/src/feedback.scss.js +1 -1
- package/es/components/feedback/src/feedback.template.d.ts +2 -2
- package/es/components/feedback/src/feedback.template.js +4 -4
- package/es/components/feedback/src/feedback.template.js.map +1 -1
- package/es/components/markdown/index.d.ts +2 -2
- package/es/components/markdown/index.js +1 -1
- package/es/components/markdown/src/markdown-renderer.d.ts +4 -0
- package/es/components/markdown/src/markdown-renderer.js +16 -11
- package/es/components/markdown/src/markdown-renderer.js.map +1 -1
- package/es/components/markdown/src/markdown.d.ts +42 -14
- package/es/components/markdown/src/markdown.js +146 -42
- package/es/components/markdown/src/markdown.js.map +1 -1
- package/es/components/markdown/src/markdown.scss.js +1 -1
- package/es/components/markdown/src/markdown.template.d.ts +5 -2
- package/es/components/markdown/src/markdown.template.js +8 -3
- package/es/components/markdown/src/markdown.template.js.map +1 -1
- package/es/components/processing/src/processing.d.ts +8 -1
- package/es/components/processing/src/processing.js +7 -10
- package/es/components/processing/src/processing.js.map +1 -1
- package/es/components/processing/src/processing.scss.js +1 -1
- package/es/components/reasoning-steps/index.d.ts +4 -2
- package/es/components/reasoning-steps/index.js +3 -2
- package/es/components/reasoning-steps/index.js.map +1 -1
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.d.ts → reasoning-step.d.ts} +6 -7
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.js → reasoning-step.js} +24 -26
- package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.scss.js → reasoning-step.scss.js} +1 -1
- package/es/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +36 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +81 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +13 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js.map +1 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +3 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js +43 -0
- package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.d.ts → reasoning-steps.d.ts} +6 -1
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.js → reasoning-steps.js} +9 -6
- package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -0
- package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.scss.js → reasoning-steps.scss.js} +1 -1
- package/es/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -0
- package/es/components/table/index.d.ts +2 -2
- package/es/components/table/index.js +1 -1
- package/es/components/table/src/table-pagination.template.d.ts +1 -1
- package/es/components/table/src/{cds-aichat-table.d.ts → table.d.ts} +12 -90
- package/es/components/table/src/{cds-aichat-table.js → table.js} +69 -37
- package/es/components/table/src/table.js.map +1 -0
- package/es/components/table/src/table.template.d.ts +2 -2
- package/es/components/table/src/table.template.js +2 -2
- package/es/components/table/src/table.template.js.map +1 -1
- package/es/components/toolbar/src/toolbar.d.ts +4 -5
- package/es/components/toolbar/src/toolbar.js +51 -40
- package/es/components/toolbar/src/toolbar.js.map +1 -1
- package/es/components/toolbar/src/toolbar.scss.js +1 -1
- package/es/components/workspace-shell/index.d.ts +0 -1
- package/es/components/workspace-shell/index.js +0 -1
- package/es/components/workspace-shell/index.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -0
- package/es/components/workspace-shell/src/workspace-shell-body.js +3 -4
- package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +26 -5
- package/es/components/workspace-shell/src/workspace-shell-footer.js +101 -11
- package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +13 -0
- package/es/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell-header.d.ts +1 -0
- package/es/components/workspace-shell/src/workspace-shell-header.js +4 -4
- package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js +13 -0
- package/es/components/workspace-shell/src/workspace-shell-header.scss.js.map +1 -0
- package/es/components/workspace-shell/src/workspace-shell.d.ts +1 -2
- package/es/components/workspace-shell/src/workspace-shell.js +3 -30
- package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
- package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
- package/es/react/card.d.ts +9 -0
- package/es/react/card.js +43 -0
- package/es/react/card.js.map +1 -0
- package/es/react/chain-of-thought-step.d.ts +4 -0
- package/es/react/chain-of-thought-step.js +32 -0
- package/es/react/chain-of-thought-step.js.map +1 -0
- package/es/react/chain-of-thought-toggle.d.ts +6 -0
- package/es/react/chain-of-thought-toggle.js +31 -0
- package/es/react/chain-of-thought-toggle.js.map +1 -0
- package/es/react/chain-of-thought.d.ts +4 -4
- package/es/react/chain-of-thought.js +7 -3
- package/es/react/chain-of-thought.js.map +1 -1
- package/es/react/code-snippet-card.d.ts +4 -0
- package/es/react/{code-snippet-tile-container.js → code-snippet-card.js} +8 -7
- package/es/react/code-snippet-card.js.map +1 -0
- package/es/react/feedback-buttons.d.ts +2 -2
- package/es/react/feedback-buttons.js +2 -2
- package/es/react/feedback-buttons.js.map +1 -1
- package/es/react/feedback.d.ts +2 -2
- package/es/react/feedback.js +2 -2
- package/es/react/feedback.js.map +1 -1
- package/es/react/inline-notification.d.ts +4 -0
- package/es/react/inline-notification.js +28 -0
- package/es/react/inline-notification.js.map +1 -0
- package/es/react/markdown.d.ts +1 -1
- package/es/react/markdown.js +1 -1
- package/es/react/reasoning-step.d.ts +3 -5
- package/es/react/reasoning-step.js +6 -5
- package/es/react/reasoning-step.js.map +1 -1
- package/es/react/reasoning-steps-toggle.d.ts +6 -0
- package/es/react/reasoning-steps-toggle.js +31 -0
- package/es/react/reasoning-steps-toggle.js.map +1 -0
- package/es/react/reasoning-steps.d.ts +3 -2
- package/es/react/reasoning-steps.js +4 -3
- package/es/react/reasoning-steps.js.map +1 -1
- package/es/react/tag.d.ts +4 -0
- package/es/react/{tile-container.js → tag.js} +6 -6
- package/es/react/tag.js.map +1 -0
- package/es/react/tile.js +2 -2
- package/es/react/tile.js.map +1 -1
- package/es/react/tool-call-data.d.ts +4 -0
- package/es/react/tool-call-data.js +28 -0
- package/es/react/tool-call-data.js.map +1 -0
- package/es/react/workspace-shell.d.ts +11 -0
- package/es/react/workspace-shell.js +49 -0
- package/es/react/workspace-shell.js.map +1 -0
- package/package.json +3 -3
- package/dist/button-D0B6NYRE.js +0 -157
- package/dist/button-skeleton-DtWa12gC.js +0 -116
- package/dist/checkbox-skeleton-BRqpmcmn.js +0 -166
- package/dist/class-map-BFgXCWx_.js +0 -106
- package/dist/codemirror-runtime-DCCflgzA.js +0 -173
- package/dist/index-B6_FOiFX.js +0 -91
- package/dist/index-BBF0opyU.js +0 -91
- package/dist/index-BIpfdWsb.js +0 -91
- package/dist/index-BamxlG85.js +0 -91
- package/dist/index-BnJifpJy.js +0 -91
- package/dist/index-BychCoXU.js +0 -91
- package/dist/index-CBCqx8Ps.js +0 -91
- package/dist/index-CBqFie3c.js +0 -91
- package/dist/index-CDTaA9BR.js +0 -91
- package/dist/index-CQp4LKsc.js +0 -91
- package/dist/index-CmBp-bbC.js +0 -168
- package/dist/index-D0SnJ7Ma.js +0 -91
- package/dist/index-D4zxQxf2.js +0 -91
- package/dist/index-DMzbawFt.js +0 -91
- package/dist/index-DTqHKU78.js +0 -91
- package/dist/index-Dj8jVVfA.js +0 -91
- package/dist/index-DqC-5dY5.js +0 -91
- package/dist/index-LHYDalJY.js +0 -91
- package/dist/index-MyumuXWu.js +0 -91
- package/dist/index-hvhxkyxb.js +0 -91
- package/dist/index-tpV6AVN_.js +0 -91
- package/dist/index-zZ0xfJxK.js +0 -367
- package/dist/query-Sqf3k5tK.js +0 -101
- package/dist/radio-group-manager-BqksDnno.js +0 -91
- package/dist/repeat-Cu9vY9y8.js +0 -96
- package/dist/text-input-BlvU8QGo.js +0 -158
- package/dist/tile-container.min.js +0 -100
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.d.ts +0 -15
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js +0 -36
- package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js.map +0 -1
- package/es/components/chain-of-thought/src/chain-of-thought.template.d.ts +0 -5
- package/es/components/chain-of-thought/src/chain-of-thought.template.js +0 -206
- package/es/components/chain-of-thought/src/chain-of-thought.template.js.map +0 -1
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.d.ts +0 -10
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js +0 -50
- package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js.map +0 -1
- package/es/components/chain-of-thought/src/types.d.ts +0 -73
- package/es/components/chain-of-thought/src/types.js.map +0 -1
- package/es/components/code-snippet/src/code-snippet-tile-container.d.ts +0 -32
- package/es/components/code-snippet/src/code-snippet-tile-container.js +0 -143
- package/es/components/code-snippet/src/code-snippet-tile-container.js.map +0 -1
- package/es/components/feedback/src/cds-aichat-feedback-buttons.d.ts +0 -15
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js +0 -36
- package/es/components/feedback/src/cds-aichat-feedback-buttons.js.map +0 -1
- package/es/components/feedback/src/cds-aichat-feedback.d.ts +0 -15
- package/es/components/feedback/src/cds-aichat-feedback.js +0 -36
- package/es/components/feedback/src/cds-aichat-feedback.js.map +0 -1
- package/es/components/markdown/src/cds-aichat-markdown.d.ts +0 -13
- package/es/components/markdown/src/cds-aichat-markdown.js +0 -35
- package/es/components/markdown/src/cds-aichat-markdown.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.scss.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.js.map +0 -1
- package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.scss.js.map +0 -1
- package/es/components/table/src/cds-aichat-table.js.map +0 -1
- package/es/components/tile-container/index.d.ts +0 -1
- package/es/components/tile-container/src/styles.scss.js +0 -13
- package/es/components/tile-container/src/styles.scss.js.map +0 -1
- package/es/components/tile-container/src/tile-container.d.ts +0 -12
- package/es/components/tile-container/src/tile-container.js +0 -85
- package/es/components/tile-container/src/tile-container.js.map +0 -1
- package/es/components/tile-container/src/tile-container.scss.js.map +0 -1
- package/es/components/workspace-shell/src/styles.scss.js +0 -13
- package/es/components/workspace-shell/src/styles.scss.js.map +0 -1
- package/es/components/workspace-shell/src/workspace-shell-toolbar.d.ts +0 -22
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js +0 -61
- package/es/components/workspace-shell/src/workspace-shell-toolbar.js.map +0 -1
- package/es/react/code-snippet-tile-container.d.ts +0 -5
- package/es/react/code-snippet-tile-container.js.map +0 -1
- package/es/react/tile-container.d.ts +0 -4
- package/es/react/tile-container.js.map +0 -1
- package/dist/{16-Qupth_aH.js → 16-D66oSSKJ.js} +20 -20
- package/dist/{apl-BgtIAmDL.js → apl-Cq2qnGBp.js} +20 -20
- package/dist/{asciiarmor-tEIRKlaD.js → asciiarmor-Cb5hNJXm.js} +20 -20
- package/dist/{asn1-sXfvlwbA.js → asn1-ObfPhj90.js} +20 -20
- package/dist/{asterisk-CkP9KBn_.js → asterisk-CGEdhmtE.js} +20 -20
- package/dist/{carbon-element-CMnOQRY8.js → carbon-element-BHXvTuS8.js} +20 -20
- package/dist/{carbon-element-B18tSkZ6.js → carbon-element-CY_4MezR.js} +20 -20
- package/dist/{clike-Dz7-b3Bs.js → clike-D-W_e6Lj.js} +20 -20
- package/dist/{clojure-Cv2VjSR-.js → clojure-BKr3NaqS.js} +20 -20
- package/dist/{cmake-B7mApY_A.js → cmake-CCO4hHlz.js} +20 -20
- package/dist/{cobol-CLpo2wzU.js → cobol-BP7APbz-.js} +20 -20
- package/dist/{coffeescript-Cp4m_frl.js → coffeescript-DAdmYC08.js} +20 -20
- package/dist/{collection-helpers-CVjseChk.js → collection-helpers-CeBujCju.js} +20 -20
- package/dist/{commonlisp-DGHzJz_w.js → commonlisp-Bo8JYmEV.js} +20 -20
- package/dist/{crystal-D8zlcNoF.js → crystal-Bm8pGIh6.js} +20 -20
- package/dist/{css-gJR1aLn3.js → css-BJk1lVKu.js} +20 -20
- package/dist/{custom-element-Clzn_oL-.js → custom-element-DRG4IpGT.js} +20 -20
- package/dist/{cypher-CM68cGds.js → cypher-D-eVDQC7.js} +20 -20
- package/dist/{d-DS7hYUri.js → d-D9LdG4k3.js} +20 -20
- package/dist/{diff-BchMez5u.js → diff-DZtMXlRt.js} +20 -20
- package/dist/{dtd-B4jYcQ7M.js → dtd-BkbtUIcB.js} +20 -20
- package/dist/{dylan-DK2Dyib7.js → dylan-CCohaM4H.js} +20 -20
- package/dist/{ebnf-Cn6Vnzxw.js → ebnf-DtT6UrMv.js} +20 -20
- package/dist/{ecl-9PhKPFNU.js → ecl-C2GNxTt8.js} +20 -20
- package/dist/{eiffel-CqAx-iZ-.js → eiffel-BW4n6uyg.js} +20 -20
- package/dist/{elm-Cw3MFe2J.js → elm-B9lXrM6D.js} +20 -20
- package/dist/{erlang-DeNh2sjw.js → erlang-BKwBedv4.js} +20 -20
- package/dist/{fcl-Dku8gwKl.js → fcl-BGYmKRZe.js} +20 -20
- package/dist/{forth-ccFEopc8.js → forth-DTbOVELu.js} +20 -20
- package/dist/{fortran-C0Pd1bYf.js → fortran-Dr7q8x3V.js} +20 -20
- package/dist/{gas-C9KeMzH-.js → gas-CsCwQ5DC.js} +20 -20
- package/dist/{gherkin-CTd3ycq1.js → gherkin-CAJyZEc1.js} +20 -20
- package/dist/{groovy-C2OuB7B3.js → groovy-CpFdbfFQ.js} +20 -20
- package/dist/{haskell-CGuEw9Yh.js → haskell-V36thOn1.js} +20 -20
- package/dist/{haxe-Bpicn7Ma.js → haxe-CeQWqhmF.js} +20 -20
- package/dist/{http-C2Dl8BK6.js → http-Cm3L1exf.js} +20 -20
- package/dist/{idl-D0DUTXQY.js → idl-DyN-eyoA.js} +20 -20
- package/dist/{javascript-vBL1foWi.js → javascript-B7L-ezNz.js} +20 -20
- package/dist/{julia-YTKmImms.js → julia-B_bgxt8f.js} +20 -20
- package/dist/{livescript-BqlKQjy2.js → livescript-B0UjDUzz.js} +20 -20
- package/dist/{lua-DlwCIvBO.js → lua-Bs-1T_TR.js} +20 -20
- package/dist/{mathematica-Dv2FPQ3c.js → mathematica-QbiSkUw_.js} +20 -20
- package/dist/{mbox-BRYTWZIN.js → mbox-IxVDt6G7.js} +20 -20
- package/dist/{mirc-Bfe4ByuU.js → mirc--MFZdywV.js} +20 -20
- package/dist/{mllike-jcboaTW3.js → mllike-s7nUnXIp.js} +20 -20
- package/dist/{modelica-DyjAoT58.js → modelica-BCpZ0s1C.js} +20 -20
- package/dist/{mscgen-cDZZxW92.js → mscgen-Br8J94Pi.js} +20 -20
- package/dist/{mumps-BHJOz0VL.js → mumps-BsSCi6Lf.js} +20 -20
- package/dist/{nginx-C7Xm6ldH.js → nginx-ZiZlz_Vj.js} +20 -20
- package/dist/{ntriples-WgSzAP5x.js → ntriples-1fM-fgdb.js} +20 -20
- package/dist/{octave-D4LNKBtY.js → octave-nXauetiK.js} +20 -20
- package/dist/{oz-BoqKtF9D.js → oz-B13mLmyp.js} +20 -20
- package/dist/{pascal-Di4a6U4m.js → pascal-B_W4OXqj.js} +20 -20
- package/dist/{perl-DidNKejT.js → perl-a1VQ4XvC.js} +20 -20
- package/dist/{pig-BNb2vBfH.js → pig-BtQy1wID.js} +20 -20
- package/dist/{powershell-BKZXxjKi.js → powershell-uO49D63Q.js} +20 -20
- package/dist/{properties-DGvo0ocD.js → properties-BhuX6-mY.js} +20 -20
- package/dist/{protobuf-CO4RB5i_.js → protobuf-CNIIc7zI.js} +20 -20
- package/dist/{puppet-BuoIdj3c.js → puppet-ByObhsu2.js} +20 -20
- package/dist/{python-D0eLBtFd.js → python-PHhd4JZq.js} +20 -20
- package/dist/{q-C5wfDOE6.js → q-qVcarjaG.js} +20 -20
- package/dist/{r-B2NBzJ7Q.js → r-Cd28Rn61.js} +20 -20
- package/dist/{rpm-bppY7Ljs.js → rpm-tHd62SNx.js} +20 -20
- package/dist/{ruby-1BC0cOBU.js → ruby-BWVi67xq.js} +20 -20
- package/dist/{sas-BeMF8yJO.js → sas-BwjQFPr2.js} +20 -20
- package/dist/{scheme-CIQ0ih8s.js → scheme-Czr-sVIy.js} +20 -20
- package/dist/{settings-DtiFDQAJ.js → settings-C6RJ_X7P.js} +20 -20
- package/dist/{shell-Aikfsln6.js → shell-BetDWStl.js} +20 -20
- package/dist/{sieve-AcrCVYff.js → sieve-rrPKwsBh.js} +20 -20
- package/dist/{simple-mode-pAhBuoYJ.js → simple-mode-C8-rTa2M.js} +20 -20
- package/dist/{smalltalk-B2nQQuEp.js → smalltalk-YAI5xh7_.js} +20 -20
- package/dist/{solr-dRPr0Biz.js → solr-VDOKdk1b.js} +20 -20
- package/dist/{sparql-Cj99XEDx.js → sparql-zO1kYCog.js} +20 -20
- package/dist/{spreadsheet-sgTJtcQB.js → spreadsheet-6g8nHE2j.js} +20 -20
- package/dist/{sql-C8kOX3sr.js → sql-Biw9poPQ.js} +20 -20
- package/dist/{stex-7QvUJU5I.js → stex-THaXVwNW.js} +20 -20
- package/dist/{stylus-DkIl6udx.js → stylus-RHXL_HsJ.js} +20 -20
- package/dist/{swift-BjpHlYuP.js → swift-lfFyPRRo.js} +20 -20
- package/dist/{sync-CTB9Fa1m.js → sync-D5E2V6_l.js} +20 -20
- package/dist/{tcl-C1Yvc7pn.js → tcl-C4Tb2U0q.js} +20 -20
- package/dist/{textile-DKmSRPjM.js → textile-CnQDonvJ.js} +20 -20
- package/dist/{throttle-Bas3c59v.js → throttle-B7gS0Tg4.js} +20 -20
- package/dist/{tiddlywiki-DN1bYf4c.js → tiddlywiki-BPc4WZCH.js} +20 -20
- package/dist/{tiki-F3wxU3m-.js → tiki-D4dz8j1V.js} +20 -20
- package/dist/{toml-KiNov0Ms.js → toml-88vYtIh1.js} +20 -20
- package/dist/{troff-BZvX0oqw.js → troff-BgVjEoT-.js} +20 -20
- package/dist/{ttcn-BiJT56Tu.js → ttcn-DdYulzch.js} +20 -20
- package/dist/{ttcn-cfg-3VvAFBAY.js → ttcn-cfg-LwcHiYmJ.js} +20 -20
- package/dist/{turtle-BvExPgO5.js → turtle-CgiVr9yq.js} +20 -20
- package/dist/{vb-D2uTYiVC.js → vb-BWY0HckZ.js} +20 -20
- package/dist/{vbscript-DpTTELsB.js → vbscript-BBJV-ooB.js} +20 -20
- package/dist/{velocity-jIy5jhYQ.js → velocity-wom_bhlv.js} +20 -20
- package/dist/{verilog-CXOzQ6Od.js → verilog-BCY2xdlY.js} +20 -20
- package/dist/{vhdl-Dg-0Ynfd.js → vhdl-BjJYRa0a.js} +20 -20
- package/dist/{webidl-Elhmuz8r.js → webidl-KE8LT1tN.js} +20 -20
- package/dist/{xquery-EKuNgB1T.js → xquery-Ca5C9BJw.js} +20 -20
- package/dist/{yacas-CirFB63Y.js → yacas-DGeGvU7X.js} +20 -20
- package/dist/{z80-D_iQ-043.js → z80-CEYQTt8_.js} +20 -20
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
|
-
import { LitElement } from 'lit';
|
|
10
|
-
import { property
|
|
9
|
+
import { LitElement, html } from 'lit';
|
|
10
|
+
import { property } from 'lit/decorators.js';
|
|
11
11
|
import styles from './chain-of-thought.scss.js';
|
|
12
12
|
import prefix from '../../../globals/settings.js';
|
|
13
13
|
import { uuid } from '../../../globals/utils/uuid.js';
|
|
14
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
14
15
|
|
|
15
16
|
/*
|
|
16
17
|
* Copyright IBM Corp. 2025
|
|
@@ -20,13 +21,8 @@ import { uuid } from '../../../globals/utils/uuid.js';
|
|
|
20
21
|
*
|
|
21
22
|
* @license
|
|
22
23
|
*/
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
const formattedNumber = numberFormatter.format(stepNumber);
|
|
26
|
-
const formattedTitle = stepTitle || "";
|
|
27
|
-
return `${formattedNumber}: ${formattedTitle}`;
|
|
28
|
-
};
|
|
29
|
-
class ChainOfThoughtElement extends LitElement {
|
|
24
|
+
const stepSelector = `${prefix}-chain-of-thought-step`;
|
|
25
|
+
let CDSAIChatChainOfThought = class CDSAIChatChainOfThought extends LitElement {
|
|
30
26
|
constructor() {
|
|
31
27
|
super(...arguments);
|
|
32
28
|
/**
|
|
@@ -34,156 +30,103 @@ class ChainOfThoughtElement extends LitElement {
|
|
|
34
30
|
*/
|
|
35
31
|
this.open = false;
|
|
36
32
|
/**
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
this.steps = [];
|
|
40
|
-
/**
|
|
41
|
-
* Formatting for label of each step item.
|
|
42
|
-
*/
|
|
43
|
-
this.formatStepLabelText = formatStepLabelTextDefault;
|
|
44
|
-
/**
|
|
45
|
-
* Text string used to label step input.
|
|
46
|
-
*/
|
|
47
|
-
this.inputLabelText = "Input";
|
|
48
|
-
/**
|
|
49
|
-
* Text string used to label step output.
|
|
50
|
-
*/
|
|
51
|
-
this.outputLabelText = "Output";
|
|
52
|
-
/**
|
|
53
|
-
* Text string used to label the tool.
|
|
54
|
-
*/
|
|
55
|
-
this.toolLabelText = "Tool";
|
|
56
|
-
/**
|
|
57
|
-
* Text string used to label the button to open the chain of thought panel.
|
|
58
|
-
*/
|
|
59
|
-
this.explainabilityText = "Show chain of thought";
|
|
60
|
-
/**
|
|
61
|
-
* Text string used to label the succeeded status icon.
|
|
33
|
+
* When true, each child step should be fully controlled by the host.
|
|
62
34
|
*/
|
|
63
|
-
this.
|
|
35
|
+
this.controlled = false;
|
|
64
36
|
/**
|
|
65
|
-
*
|
|
37
|
+
* ID of the content panel. Useful for wiring to an external toggle.
|
|
66
38
|
*/
|
|
67
|
-
this.
|
|
68
|
-
/**
|
|
69
|
-
* Text string used to label the processing status icon.
|
|
70
|
-
*/
|
|
71
|
-
this.statusProcessingLabelText = "Processing";
|
|
72
|
-
/**
|
|
73
|
-
* Steps, but we add in whether the step is open or not.
|
|
74
|
-
*/
|
|
75
|
-
this._steps = [];
|
|
76
|
-
/**
|
|
77
|
-
* ID we use for a11y.
|
|
78
|
-
*/
|
|
79
|
-
this._chainOfThoughtPanelID = `${prefix}-chain-of-thought-panel-id-${uuid()}`;
|
|
39
|
+
this.panelId = `${prefix}-chain-of-thought-panel-id-${uuid()}`;
|
|
80
40
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
if (!this.hasAttribute("role")) {
|
|
43
|
+
this.setAttribute("role", "list");
|
|
44
|
+
}
|
|
45
|
+
this.addEventListener("chain-of-thought-step-toggled", this.handleStepToggle);
|
|
46
|
+
super.connectedCallback();
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
this.removeEventListener("chain-of-thought-step-toggled", this.handleStepToggle);
|
|
50
|
+
super.disconnectedCallback();
|
|
51
|
+
}
|
|
52
|
+
get steps() {
|
|
53
|
+
return this.querySelectorAll(stepSelector);
|
|
84
54
|
}
|
|
85
55
|
updated(changedProperties) {
|
|
86
|
-
if (changedProperties.has("
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}));
|
|
56
|
+
if (changedProperties.has("controlled")) {
|
|
57
|
+
this.propagateControlled();
|
|
58
|
+
}
|
|
59
|
+
if (changedProperties.has("open") &&
|
|
60
|
+
changedProperties.get("open") !== undefined) {
|
|
61
|
+
this.dispatchToggleEvent();
|
|
93
62
|
}
|
|
94
63
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
64
|
+
handleStepToggle(event) {
|
|
65
|
+
const { detail, target } = event;
|
|
66
|
+
this.onStepToggle?.(Boolean(detail?.open), target);
|
|
67
|
+
}
|
|
68
|
+
propagateControlled() {
|
|
69
|
+
this.steps.forEach((step) => {
|
|
70
|
+
if (this.controlled) {
|
|
71
|
+
step.setAttribute("data-parent-controlled", "");
|
|
72
|
+
step.setAttribute("controlled", "");
|
|
73
|
+
}
|
|
74
|
+
else if (step.hasAttribute("data-parent-controlled")) {
|
|
75
|
+
step.removeAttribute("data-parent-controlled");
|
|
76
|
+
step.removeAttribute("controlled");
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
dispatchToggleEvent() {
|
|
81
|
+
const detail = {
|
|
82
|
+
open: this.open,
|
|
83
|
+
panelId: this.panelId,
|
|
84
|
+
};
|
|
85
|
+
this.dispatchEvent(new CustomEvent("chain-of-thought-toggled", {
|
|
86
|
+
detail,
|
|
87
|
+
bubbles: true,
|
|
88
|
+
composed: true,
|
|
89
|
+
}));
|
|
90
|
+
const panel = this.shadowRoot?.getElementById(this.panelId) ?? this;
|
|
91
|
+
this.onToggle?.(this.open, panel);
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return html `
|
|
95
|
+
<div class="${prefix}--chain-of-thought">
|
|
96
|
+
<div
|
|
97
|
+
id=${this.panelId}
|
|
98
|
+
class="${prefix}--chain-of-thought-content"
|
|
99
|
+
aria-hidden=${this.open ? "false" : "true"}
|
|
100
|
+
?hidden=${!this.open}
|
|
101
|
+
>
|
|
102
|
+
<div class="${prefix}--chain-of-thought-inner-content">
|
|
103
|
+
<slot></slot>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
CDSAIChatChainOfThought.styles = styles;
|
|
109
111
|
__decorate([
|
|
110
|
-
property({ type:
|
|
111
|
-
],
|
|
112
|
+
property({ type: Boolean, reflect: true })
|
|
113
|
+
], CDSAIChatChainOfThought.prototype, "open", void 0);
|
|
112
114
|
__decorate([
|
|
113
|
-
property({ type:
|
|
114
|
-
],
|
|
115
|
+
property({ type: Boolean, reflect: true })
|
|
116
|
+
], CDSAIChatChainOfThought.prototype, "controlled", void 0);
|
|
115
117
|
__decorate([
|
|
116
|
-
property({ type: String, attribute: "
|
|
117
|
-
],
|
|
118
|
+
property({ type: String, attribute: "panel-id", reflect: true })
|
|
119
|
+
], CDSAIChatChainOfThought.prototype, "panelId", void 0);
|
|
118
120
|
__decorate([
|
|
119
121
|
property({ type: Function, attribute: false })
|
|
120
|
-
],
|
|
122
|
+
], CDSAIChatChainOfThought.prototype, "onToggle", void 0);
|
|
121
123
|
__decorate([
|
|
122
124
|
property({ type: Function, attribute: false })
|
|
123
|
-
],
|
|
124
|
-
__decorate([
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
reflect: true,
|
|
129
|
-
})
|
|
130
|
-
], ChainOfThoughtElement.prototype, "statusSucceededLabelText", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
property({
|
|
133
|
-
type: String,
|
|
134
|
-
attribute: "status-failed-label-text",
|
|
135
|
-
reflect: true,
|
|
136
|
-
})
|
|
137
|
-
], ChainOfThoughtElement.prototype, "statusFailedLabelText", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
property({
|
|
140
|
-
type: String,
|
|
141
|
-
attribute: "status-processing-label-text",
|
|
142
|
-
reflect: true,
|
|
143
|
-
})
|
|
144
|
-
], ChainOfThoughtElement.prototype, "statusProcessingLabelText", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
property({ type: String, attribute: "filter-placeholder-text" })
|
|
147
|
-
], ChainOfThoughtElement.prototype, "filterPlaceholderText", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
property({ type: String, attribute: "previous-page-text" })
|
|
150
|
-
], ChainOfThoughtElement.prototype, "previousPageText", void 0);
|
|
151
|
-
__decorate([
|
|
152
|
-
property({ type: String, attribute: "next-page-text" })
|
|
153
|
-
], ChainOfThoughtElement.prototype, "nextPageText", void 0);
|
|
154
|
-
__decorate([
|
|
155
|
-
property({ type: String, attribute: "items-per-page-text" })
|
|
156
|
-
], ChainOfThoughtElement.prototype, "itemsPerPageText", void 0);
|
|
157
|
-
__decorate([
|
|
158
|
-
property({ type: String, attribute: "locale" })
|
|
159
|
-
], ChainOfThoughtElement.prototype, "locale", void 0);
|
|
160
|
-
__decorate([
|
|
161
|
-
property({ type: Object, attribute: false })
|
|
162
|
-
], ChainOfThoughtElement.prototype, "getPaginationSupplementalText", void 0);
|
|
163
|
-
__decorate([
|
|
164
|
-
property({ type: Object, attribute: false })
|
|
165
|
-
], ChainOfThoughtElement.prototype, "getPaginationStatusText", void 0);
|
|
166
|
-
__decorate([
|
|
167
|
-
property({ type: String, attribute: "feedback" })
|
|
168
|
-
], ChainOfThoughtElement.prototype, "feedback", void 0);
|
|
169
|
-
__decorate([
|
|
170
|
-
property({ type: String, attribute: "show-less-text" })
|
|
171
|
-
], ChainOfThoughtElement.prototype, "showLessText", void 0);
|
|
172
|
-
__decorate([
|
|
173
|
-
property({ type: String, attribute: "show-more-text" })
|
|
174
|
-
], ChainOfThoughtElement.prototype, "showMoreText", void 0);
|
|
175
|
-
__decorate([
|
|
176
|
-
property({ type: String, attribute: "tooltip-content" })
|
|
177
|
-
], ChainOfThoughtElement.prototype, "tooltipContent", void 0);
|
|
178
|
-
__decorate([
|
|
179
|
-
property({ type: Object, attribute: false })
|
|
180
|
-
], ChainOfThoughtElement.prototype, "getLineCountText", void 0);
|
|
181
|
-
__decorate([
|
|
182
|
-
state()
|
|
183
|
-
], ChainOfThoughtElement.prototype, "_steps", void 0);
|
|
184
|
-
__decorate([
|
|
185
|
-
state()
|
|
186
|
-
], ChainOfThoughtElement.prototype, "_chainOfThoughtPanelID", void 0);
|
|
125
|
+
], CDSAIChatChainOfThought.prototype, "onStepToggle", void 0);
|
|
126
|
+
CDSAIChatChainOfThought = __decorate([
|
|
127
|
+
carbonElement("cds-aichat-chain-of-thought")
|
|
128
|
+
], CDSAIChatChainOfThought);
|
|
129
|
+
var CDSAIChatChainOfThought$1 = CDSAIChatChainOfThought;
|
|
187
130
|
|
|
188
|
-
export {
|
|
131
|
+
export { CDSAIChatChainOfThought, CDSAIChatChainOfThought$1 as default };
|
|
189
132
|
//# sourceMappingURL=chain-of-thought.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-of-thought.js","sources":["../../../../src/components/chain-of-thought/src/chain-of-thought.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain-of-thought.js","sources":["../../../../src/components/chain-of-thought/src/chain-of-thought.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG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EN,MAAM,CAAA;;;;;KAKzB;IACH;;AA1HO,uBAAA,CAAA,MAAM,GAAG,MAAH;AAMb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC7B,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACvB,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAMnB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE;AACN,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAM1D,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;AACZ,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAMlC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;AACR,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AA/BlC,uBAAuB,GAAA,UAAA,CAAA;IAD5B,aAAa,CAAC,6BAA6B;AACtC,CAAA,EAAA,uBAAuB,CA4H5B;AASD,gCAAe,uBAAuB;;;;"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { css } from 'lit';
|
|
9
9
|
|
|
10
|
-
var styles = css([":host{display:block
|
|
10
|
+
var styles = css([":host{display:block}:host([open]) .cds-aichat--chain-of-thought-content{display:block;max-block-size:-moz-fit-content;max-block-size:fit-content;opacity:1;overflow:visible}.cds-aichat--chain-of-thought-content{display:none;max-block-size:0;opacity:0;overflow:hidden;transition:all allow-discrete .11s cubic-bezier(0,0,.38,.9)}.cds-aichat--chain-of-thought-inner-content{background-color:var(--cds-layer-01,#f4f4f4);border:1px solid var(--cds-border-subtle-01,#c6c6c6);margin-block-start:.5rem}"]);
|
|
11
11
|
|
|
12
12
|
export { styles as default };
|
|
13
13
|
//# sourceMappingURL=chain-of-thought.scss.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
declare class CDSAIChatToolCallData extends LitElement {
|
|
3
|
+
static styles: any;
|
|
4
|
+
/**
|
|
5
|
+
* Plain text name of the tool.
|
|
6
|
+
*/
|
|
7
|
+
toolName: string;
|
|
8
|
+
/**
|
|
9
|
+
* Text string used to label step input.
|
|
10
|
+
*/
|
|
11
|
+
inputLabelText: string;
|
|
12
|
+
/**
|
|
13
|
+
* Text string used to label step output.
|
|
14
|
+
*/
|
|
15
|
+
outputLabelText: string;
|
|
16
|
+
/**
|
|
17
|
+
* Text string used to label the tool.
|
|
18
|
+
*/
|
|
19
|
+
toolLabelText: string;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
firstUpdated(): void;
|
|
22
|
+
private handleSlotChange;
|
|
23
|
+
private syncSlotContent;
|
|
24
|
+
private hasAssignedContent;
|
|
25
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
26
|
+
}
|
|
27
|
+
declare global {
|
|
28
|
+
interface HTMLElementTagNameMap {
|
|
29
|
+
"cds-aichat-tool-call-data": CDSAIChatToolCallData;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export { CDSAIChatToolCallData };
|
|
33
|
+
export default CDSAIChatToolCallData;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { __decorate } from 'tslib';
|
|
9
|
+
import { LitElement, html } from 'lit';
|
|
10
|
+
import { property, state } from 'lit/decorators.js';
|
|
11
|
+
import styles from './tool-call-data.scss.js';
|
|
12
|
+
import prefix from '../../../globals/settings.js';
|
|
13
|
+
import { carbonElement } from '../../../globals/decorators/carbon-element.js';
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* Copyright IBM Corp. 2025
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*
|
|
21
|
+
* @license
|
|
22
|
+
*/
|
|
23
|
+
const baseClass = `${prefix}--tool-call-data`;
|
|
24
|
+
let CDSAIChatToolCallData = class CDSAIChatToolCallData extends LitElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
/**
|
|
28
|
+
* Plain text name of the tool.
|
|
29
|
+
*/
|
|
30
|
+
this.toolName = "";
|
|
31
|
+
/**
|
|
32
|
+
* Text string used to label step input.
|
|
33
|
+
*/
|
|
34
|
+
this.inputLabelText = "Input";
|
|
35
|
+
/**
|
|
36
|
+
* Text string used to label step output.
|
|
37
|
+
*/
|
|
38
|
+
this.outputLabelText = "Output";
|
|
39
|
+
/**
|
|
40
|
+
* Text string used to label the tool.
|
|
41
|
+
*/
|
|
42
|
+
this.toolLabelText = "Tool";
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
this.hasDescriptionSlot = false;
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
this.hasInputSlot = false;
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
this.hasOutputSlot = false;
|
|
55
|
+
}
|
|
56
|
+
connectedCallback() {
|
|
57
|
+
super.connectedCallback();
|
|
58
|
+
queueMicrotask(() => this.syncSlotContent());
|
|
59
|
+
}
|
|
60
|
+
firstUpdated() {
|
|
61
|
+
this.syncSlotContent();
|
|
62
|
+
}
|
|
63
|
+
handleSlotChange(slot, event) {
|
|
64
|
+
const slotElement = event.target;
|
|
65
|
+
const nodes = slotElement.assignedNodes({ flatten: true });
|
|
66
|
+
const hasContent = this.hasAssignedContent(nodes);
|
|
67
|
+
if (slot === "description" && hasContent !== this.hasDescriptionSlot) {
|
|
68
|
+
this.hasDescriptionSlot = hasContent;
|
|
69
|
+
}
|
|
70
|
+
if (slot === "input" && hasContent !== this.hasInputSlot) {
|
|
71
|
+
this.hasInputSlot = hasContent;
|
|
72
|
+
}
|
|
73
|
+
if (slot === "output" && hasContent !== this.hasOutputSlot) {
|
|
74
|
+
this.hasOutputSlot = hasContent;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
syncSlotContent() {
|
|
78
|
+
const descriptionSlot = this.shadowRoot?.querySelector('slot[name="description"]');
|
|
79
|
+
const inputSlot = this.shadowRoot?.querySelector('slot[name="input"]');
|
|
80
|
+
const outputSlot = this.shadowRoot?.querySelector('slot[name="output"]');
|
|
81
|
+
if (descriptionSlot) {
|
|
82
|
+
this.hasDescriptionSlot = this.hasAssignedContent(descriptionSlot.assignedNodes({ flatten: true }));
|
|
83
|
+
}
|
|
84
|
+
if (inputSlot) {
|
|
85
|
+
this.hasInputSlot = this.hasAssignedContent(inputSlot.assignedNodes({ flatten: true }));
|
|
86
|
+
}
|
|
87
|
+
if (outputSlot) {
|
|
88
|
+
this.hasOutputSlot = this.hasAssignedContent(outputSlot.assignedNodes({ flatten: true }));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
hasAssignedContent(nodes) {
|
|
92
|
+
return nodes.some((node) => {
|
|
93
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
97
|
+
return Boolean(node.textContent?.trim());
|
|
98
|
+
}
|
|
99
|
+
return false;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
render() {
|
|
103
|
+
const hasToolName = Boolean(this.toolName);
|
|
104
|
+
const hasContent = hasToolName ||
|
|
105
|
+
this.hasDescriptionSlot ||
|
|
106
|
+
this.hasInputSlot ||
|
|
107
|
+
this.hasOutputSlot;
|
|
108
|
+
if (!hasContent) {
|
|
109
|
+
return html ``;
|
|
110
|
+
}
|
|
111
|
+
return html `
|
|
112
|
+
<div
|
|
113
|
+
class="${baseClass} ${baseClass}-description"
|
|
114
|
+
part="description"
|
|
115
|
+
?hidden=${!this.hasDescriptionSlot}
|
|
116
|
+
>
|
|
117
|
+
<slot
|
|
118
|
+
name="description"
|
|
119
|
+
@slotchange=${(event) => this.handleSlotChange("description", event)}
|
|
120
|
+
></slot>
|
|
121
|
+
</div>
|
|
122
|
+
${hasToolName
|
|
123
|
+
? html `<div class="${baseClass} ${baseClass}-toolName">
|
|
124
|
+
<div class="${baseClass}-label">${this.toolLabelText}</div>
|
|
125
|
+
${this.toolName}
|
|
126
|
+
</div>`
|
|
127
|
+
: null}
|
|
128
|
+
<div
|
|
129
|
+
class="${baseClass} ${baseClass}-input"
|
|
130
|
+
?hidden=${!this.hasInputSlot}
|
|
131
|
+
>
|
|
132
|
+
<div class="${baseClass}-label">${this.inputLabelText}</div>
|
|
133
|
+
<slot
|
|
134
|
+
name="input"
|
|
135
|
+
@slotchange=${(event) => this.handleSlotChange("input", event)}
|
|
136
|
+
></slot>
|
|
137
|
+
</div>
|
|
138
|
+
<div
|
|
139
|
+
class="${baseClass} ${baseClass}-output"
|
|
140
|
+
?hidden=${!this.hasOutputSlot}
|
|
141
|
+
>
|
|
142
|
+
<div class="${baseClass}-label">${this.outputLabelText}</div>
|
|
143
|
+
<slot
|
|
144
|
+
name="output"
|
|
145
|
+
@slotchange=${(event) => this.handleSlotChange("output", event)}
|
|
146
|
+
></slot>
|
|
147
|
+
</div>
|
|
148
|
+
`;
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
CDSAIChatToolCallData.styles = styles;
|
|
152
|
+
__decorate([
|
|
153
|
+
property({ type: String, attribute: "tool-name" })
|
|
154
|
+
], CDSAIChatToolCallData.prototype, "toolName", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({ type: String, attribute: "input-label-text", reflect: true })
|
|
157
|
+
], CDSAIChatToolCallData.prototype, "inputLabelText", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ type: String, attribute: "output-label-text", reflect: true })
|
|
160
|
+
], CDSAIChatToolCallData.prototype, "outputLabelText", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
property({ type: String, attribute: "tool-label-text", reflect: true })
|
|
163
|
+
], CDSAIChatToolCallData.prototype, "toolLabelText", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
state()
|
|
166
|
+
], CDSAIChatToolCallData.prototype, "hasDescriptionSlot", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
state()
|
|
169
|
+
], CDSAIChatToolCallData.prototype, "hasInputSlot", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
state()
|
|
172
|
+
], CDSAIChatToolCallData.prototype, "hasOutputSlot", void 0);
|
|
173
|
+
CDSAIChatToolCallData = __decorate([
|
|
174
|
+
carbonElement("cds-aichat-tool-call-data")
|
|
175
|
+
], CDSAIChatToolCallData);
|
|
176
|
+
var CDSAIChatToolCallData_default = CDSAIChatToolCallData;
|
|
177
|
+
|
|
178
|
+
export { CDSAIChatToolCallData, CDSAIChatToolCallData_default as default };
|
|
179
|
+
//# sourceMappingURL=tool-call-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-call-data.js","sources":["../../../../src/components/chain-of-thought/src/tool-call-data.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAUH,MAAM,SAAS,GAAG,CAAA,EAAG,MAAM,kBAAkB;AAG7C,IAAM,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AE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,IAAI,EAAE;AAC/C,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AAMzB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE;AAC9C,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,iBAAA,EAAA,MAAA,CAAA;AAM3B,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE;AAChD,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAMf,UAAA,CAAA;AADP,IAAA,KAAK;AAC6B,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,oBAAA,EAAA,MAAA,CAAA;AAM3B,UAAA,CAAA;AADP,IAAA,KAAK;AACuB,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAMrB,UAAA,CAAA;AADP,IAAA,KAAK;AACwB,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AA3C1B,qBAAqB,GAAA,UAAA,CAAA;IAD1B,aAAa,CAAC,2BAA2B;AACpC,CAAA,EAAA,qBAAqB,CA2K1B;AASD,oCAAe,qBAAqB;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
var styles = css([":host{display:block;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857)}.cds-aichat--tool-call-data{padding-block-end:1rem}.cds-aichat--tool-call-data:last-child{padding-block-end:0}.cds-aichat--tool-call-data-label{font-size:var(--cds-heading-01-font-size,.875rem);font-weight:var(--cds-heading-01-font-weight,600);letter-spacing:var(--cds-heading-01-letter-spacing,.16px);line-height:var(--cds-heading-01-line-height,1.42857)}"]);
|
|
11
|
+
|
|
12
|
+
export { styles as default };
|
|
13
|
+
//# sourceMappingURL=tool-call-data.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-call-data.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
|
@@ -14,8 +14,10 @@ export { CHAT_BUTTON_KIND, CHAT_BUTTON_TYPE, CHAT_BUTTON_SIZE, CHAT_BUTTON_TOOLT
|
|
|
14
14
|
type ChatButtonSize = CHAT_BUTTON_SIZE.SMALL | CHAT_BUTTON_SIZE.MEDIUM | CHAT_BUTTON_SIZE.LARGE;
|
|
15
15
|
/**
|
|
16
16
|
* Component extending the @carbon/web-components' button
|
|
17
|
+
*
|
|
18
|
+
* @element cds-aichat-button
|
|
17
19
|
*/
|
|
18
|
-
declare class
|
|
20
|
+
declare class CDSAIChatButton extends CDSButton {
|
|
19
21
|
static styles: any;
|
|
20
22
|
/**
|
|
21
23
|
* Specify whether the `ChatButton` should be rendered as a quick action button
|
|
@@ -23,10 +25,16 @@ declare class ChatButton extends CDSButton {
|
|
|
23
25
|
isQuickAction: boolean;
|
|
24
26
|
/**
|
|
25
27
|
* Button size.
|
|
28
|
+
* Options: "sm", "md", "lg".
|
|
26
29
|
*/
|
|
27
30
|
size: ChatButtonSize;
|
|
28
|
-
private readonly allowedSizes;
|
|
29
31
|
protected willUpdate(changedProps: PropertyValues<this>): void;
|
|
30
32
|
private _normalizeButtonState;
|
|
31
33
|
}
|
|
32
|
-
|
|
34
|
+
declare global {
|
|
35
|
+
interface HTMLElementTagNameMap {
|
|
36
|
+
"cds-aichat-button": CDSAIChatButton;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export { CDSAIChatButton };
|
|
40
|
+
export default CDSAIChatButton;
|
|
@@ -10,7 +10,6 @@ import { property, customElement } from 'lit/decorators.js';
|
|
|
10
10
|
import { CHAT_BUTTON_SIZE } from '../defs.js';
|
|
11
11
|
import CarbonButtonElement, { BUTTON_KIND } from '@carbon/web-components/es/components/button/button.js';
|
|
12
12
|
export { BUTTON_KIND as CHAT_BUTTON_KIND, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_ALIGNMENT, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_POSITION, BUTTON_TYPE as CHAT_BUTTON_TYPE } from '@carbon/web-components/es/components/button/button.js';
|
|
13
|
-
import prefix from '../../../globals/settings.js';
|
|
14
13
|
import styles from './chat-button.scss.js';
|
|
15
14
|
|
|
16
15
|
/**
|
|
@@ -23,14 +22,19 @@ import styles from './chat-button.scss.js';
|
|
|
23
22
|
*/
|
|
24
23
|
/**
|
|
25
24
|
* Component extending the @carbon/web-components' button
|
|
25
|
+
*
|
|
26
|
+
* @element cds-aichat-button
|
|
26
27
|
*/
|
|
27
|
-
let
|
|
28
|
+
let CDSAIChatButton = class CDSAIChatButton extends CarbonButtonElement {
|
|
28
29
|
constructor() {
|
|
29
30
|
super(...arguments);
|
|
30
31
|
/**
|
|
31
32
|
* Specify whether the `ChatButton` should be rendered as a quick action button
|
|
32
33
|
*/
|
|
33
34
|
this.isQuickAction = false;
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
34
38
|
this.allowedSizes = [
|
|
35
39
|
CHAT_BUTTON_SIZE.SMALL,
|
|
36
40
|
CHAT_BUTTON_SIZE.MEDIUM,
|
|
@@ -57,17 +61,17 @@ let ChatButton = class ChatButton extends CarbonButtonElement {
|
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
};
|
|
60
|
-
|
|
64
|
+
CDSAIChatButton.styles = styles;
|
|
61
65
|
__decorate([
|
|
62
66
|
property({ type: Boolean, attribute: "is-quick-action" })
|
|
63
|
-
],
|
|
67
|
+
], CDSAIChatButton.prototype, "isQuickAction", void 0);
|
|
64
68
|
__decorate([
|
|
65
|
-
property({ reflect: true })
|
|
66
|
-
],
|
|
67
|
-
|
|
68
|
-
customElement(
|
|
69
|
-
],
|
|
70
|
-
var AIChatButton =
|
|
69
|
+
property({ reflect: true, attribute: "size" })
|
|
70
|
+
], CDSAIChatButton.prototype, "size", void 0);
|
|
71
|
+
CDSAIChatButton = __decorate([
|
|
72
|
+
customElement("cds-aichat-button")
|
|
73
|
+
], CDSAIChatButton);
|
|
74
|
+
var AIChatButton = CDSAIChatButton;
|
|
71
75
|
|
|
72
|
-
export { CHAT_BUTTON_SIZE, AIChatButton as default };
|
|
76
|
+
export { CDSAIChatButton, CHAT_BUTTON_SIZE, AIChatButton as default };
|
|
73
77
|
//# sourceMappingURL=chat-button.js.map
|