@tylertech/forge-ai 0.15.3-dev.1 → 0.16.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/MIGRATION.md +192 -0
- package/README.md +76 -2
- package/custom-elements.json +5442 -15097
- package/dist/_virtual/_@oxc-project_runtime@0.154.0/helpers/esm/decorate.mjs +9 -0
- package/dist/ai-agent-info/ai-agent-info.mjs +4 -78
- package/dist/ai-agent-info/ai-agent-info2.mjs +55 -0
- package/dist/ai-agent-info/index.d.ts +1 -1
- package/dist/ai-agent-info/index.mjs +1 -5
- package/dist/ai-agent-selector/ai-agent-selector.d.ts +2 -2
- package/dist/ai-agent-selector/ai-agent-selector.mjs +4 -439
- package/dist/ai-agent-selector/ai-agent-selector2.mjs +344 -0
- package/dist/ai-agent-selector/index.mjs +1 -5
- package/dist/ai-artifact/ai-artifact.mjs +4 -39
- package/dist/ai-artifact/ai-artifact2.mjs +31 -0
- package/dist/ai-artifact/index.d.ts +1 -1
- package/dist/ai-artifact/index.mjs +1 -5
- package/dist/ai-artifact-card/ai-artifact-card.mjs +4 -142
- package/dist/ai-artifact-card/ai-artifact-card2.mjs +103 -0
- package/dist/ai-artifact-card/index.d.ts +1 -1
- package/dist/ai-artifact-card/index.mjs +1 -5
- package/dist/ai-artifact-card-group/ai-artifact-card-group.mjs +4 -137
- package/dist/ai-artifact-card-group/ai-artifact-card-group2.mjs +100 -0
- package/dist/ai-artifact-card-group/index.d.ts +1 -1
- package/dist/ai-artifact-card-group/index.mjs +1 -5
- package/dist/ai-assistant-response/ai-assistant-response.d.ts +1 -2
- package/dist/ai-assistant-response/ai-assistant-response.mjs +4 -236
- package/dist/ai-assistant-response/ai-assistant-response2.mjs +137 -0
- package/dist/ai-assistant-response/index.d.ts +1 -1
- package/dist/ai-assistant-response/index.mjs +1 -5
- package/dist/ai-canvas/ai-canvas.d.ts +3 -3
- package/dist/ai-canvas/ai-canvas.mjs +4 -95
- package/dist/ai-canvas/ai-canvas2.mjs +74 -0
- package/dist/ai-canvas/index.d.ts +1 -1
- package/dist/ai-canvas/index.mjs +1 -5
- package/dist/ai-chain-of-thought/ai-chain-of-thought.mjs +4 -45
- package/dist/ai-chain-of-thought/ai-chain-of-thought2.mjs +35 -0
- package/dist/ai-chain-of-thought/index.d.ts +5 -5
- package/dist/ai-chain-of-thought/index.mjs +6 -17
- package/dist/ai-chain-of-thought/thought-base/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-base/thought-base.mjs +4 -43
- package/dist/ai-chain-of-thought/thought-base/thought-base2.mjs +31 -0
- package/dist/ai-chain-of-thought/thought-detail/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-detail/thought-detail.mjs +4 -34
- package/dist/ai-chain-of-thought/thought-detail/thought-detail2.mjs +26 -0
- package/dist/ai-chain-of-thought/thought-image/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-image/thought-image.mjs +4 -43
- package/dist/ai-chain-of-thought/thought-image/thought-image2.mjs +30 -0
- package/dist/ai-chain-of-thought/thought-search-result/index.mjs +1 -5
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.mjs +4 -62
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result2.mjs +45 -0
- package/dist/ai-chat-header/ai-chat-header.d.ts +7 -5
- package/dist/ai-chat-header/ai-chat-header.mjs +4 -439
- package/dist/ai-chat-header/ai-chat-header2.mjs +319 -0
- package/dist/ai-chat-header/index.d.ts +2 -2
- package/dist/ai-chat-header/index.mjs +1 -5
- package/dist/ai-chat-interface/ai-chat-interface.d.ts +1 -0
- package/dist/ai-chat-interface/ai-chat-interface.mjs +4 -103
- package/dist/ai-chat-interface/ai-chat-interface2.mjs +73 -0
- package/dist/ai-chat-interface/index.mjs +1 -5
- package/dist/ai-client-message/ai-client-message.d.ts +5 -6
- package/dist/ai-client-message/ai-client-message.mjs +4 -112
- package/dist/ai-client-message/ai-client-message2.mjs +76 -0
- package/dist/ai-client-message/index.mjs +1 -5
- package/dist/ai-context-chip/ai-context-chip.d.ts +1 -1
- package/dist/ai-context-chip/ai-context-chip.mjs +4 -169
- package/dist/ai-context-chip/ai-context-chip2.mjs +113 -0
- package/dist/ai-context-chip/index.mjs +1 -5
- package/dist/ai-context-items/ai-context-items.d.ts +11 -5
- package/dist/ai-context-items/ai-context-items.mjs +4 -78
- package/dist/ai-context-items/ai-context-items2.mjs +53 -0
- package/dist/ai-context-items/index.d.ts +1 -1
- package/dist/ai-context-items/index.mjs +1 -5
- package/dist/ai-conversations-panel/ai-conversations-panel.d.ts +2 -2
- package/dist/ai-conversations-panel/ai-conversations-panel.mjs +4 -632
- package/dist/ai-conversations-panel/ai-conversations-panel2.mjs +531 -0
- package/dist/ai-conversations-panel/index.mjs +1 -5
- package/dist/ai-copy-button/ai-copy-button.mjs +4 -116
- package/dist/ai-copy-button/ai-copy-button2.mjs +88 -0
- package/dist/ai-copy-button/index.mjs +1 -5
- package/dist/ai-dialog/ai-dialog.mjs +4 -304
- package/dist/ai-dialog/ai-dialog2.mjs +237 -0
- package/dist/ai-dialog/index.d.ts +1 -1
- package/dist/ai-dialog/index.mjs +1 -5
- package/dist/ai-disclaimer/ai-disclaimer.mjs +4 -70
- package/dist/ai-disclaimer/ai-disclaimer2.mjs +46 -0
- package/dist/ai-disclaimer/index.d.ts +1 -1
- package/dist/ai-disclaimer/index.mjs +1 -5
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.mjs +4 -80
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group2.mjs +51 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.d.ts +5 -1
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.mjs +4 -330
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item2.mjs +280 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.mjs +4 -26
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator2.mjs +19 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu.d.ts +5 -0
- package/dist/ai-dropdown-menu/ai-dropdown-menu.mjs +4 -351
- package/dist/ai-dropdown-menu/ai-dropdown-menu2.mjs +268 -0
- package/dist/ai-dropdown-menu/index.d.ts +1 -0
- package/dist/ai-dropdown-menu/index.mjs +5 -10
- package/dist/ai-dropdown-menu/navigation-controller.d.ts +9 -1
- package/dist/ai-dropdown-menu/navigation-controller.mjs +214 -204
- package/dist/ai-dropdown-menu/selection-manager.mjs +202 -182
- package/dist/ai-edit-thread/ai-edit-thread.d.ts +1 -1
- package/dist/ai-edit-thread/ai-edit-thread.mjs +4 -137
- package/dist/ai-edit-thread/ai-edit-thread2.mjs +96 -0
- package/dist/ai-edit-thread/index.d.ts +1 -1
- package/dist/ai-edit-thread/index.mjs +1 -5
- package/dist/ai-empty-state/ai-empty-state.mjs +4 -38
- package/dist/ai-empty-state/ai-empty-state2.mjs +28 -0
- package/dist/ai-empty-state/index.d.ts +1 -1
- package/dist/ai-empty-state/index.mjs +1 -5
- package/dist/ai-error-message/ai-error-message.mjs +4 -80
- package/dist/ai-error-message/ai-error-message2.mjs +62 -0
- package/dist/ai-error-message/index.mjs +1 -5
- package/dist/ai-fab/ai-fab.mjs +4 -81
- package/dist/ai-fab/ai-fab2.mjs +54 -0
- package/dist/ai-fab/index.d.ts +1 -1
- package/dist/ai-fab/index.mjs +1 -5
- package/dist/ai-file-picker/ai-file-picker.d.ts +1 -0
- package/dist/ai-file-picker/ai-file-picker.mjs +4 -224
- package/dist/ai-file-picker/ai-file-picker2.mjs +172 -0
- package/dist/ai-file-picker/index.mjs +1 -4
- package/dist/ai-gradient-container/ai-gradient-container.mjs +4 -61
- package/dist/ai-gradient-container/ai-gradient-container2.mjs +38 -0
- package/dist/ai-gradient-container/index.d.ts +1 -1
- package/dist/ai-gradient-container/index.mjs +1 -5
- package/dist/ai-icon/ai-icon.d.ts +3 -0
- package/dist/ai-icon/ai-icon.mjs +4 -71
- package/dist/ai-icon/ai-icon2.mjs +41 -0
- package/dist/ai-icon/index.d.ts +1 -1
- package/dist/ai-icon/index.mjs +1 -5
- package/dist/ai-message-thread/ai-message-thread.d.ts +4 -3
- package/dist/ai-message-thread/ai-message-thread.mjs +4 -360
- package/dist/ai-message-thread/ai-message-thread2.mjs +279 -0
- package/dist/ai-message-thread/index.mjs +1 -5
- package/dist/ai-modal/ai-modal.mjs +4 -178
- package/dist/ai-modal/ai-modal2.mjs +141 -0
- package/dist/ai-modal/index.mjs +1 -4
- package/dist/ai-prompt/ai-prompt.d.ts +10 -6
- package/dist/ai-prompt/ai-prompt.mjs +4 -534
- package/dist/ai-prompt/ai-prompt2.mjs +438 -0
- package/dist/ai-prompt/index.mjs +1 -5
- package/dist/ai-reasoning/ai-reasoning.mjs +4 -44
- package/dist/ai-reasoning/ai-reasoning2.mjs +35 -0
- package/dist/ai-reasoning/index.d.ts +2 -2
- package/dist/ai-reasoning/index.mjs +4 -8
- package/dist/ai-reasoning/reasoning-content/index.d.ts +1 -1
- package/dist/ai-reasoning/reasoning-content/index.mjs +1 -5
- package/dist/ai-reasoning/reasoning-content/reasoning-content.mjs +4 -90
- package/dist/ai-reasoning/reasoning-content/reasoning-content2.mjs +68 -0
- package/dist/ai-reasoning-header/ai-reasoning-header.d.ts +7 -1
- package/dist/ai-reasoning-header/ai-reasoning-header.mjs +4 -68
- package/dist/ai-reasoning-header/ai-reasoning-header2.mjs +51 -0
- package/dist/ai-reasoning-header/index.d.ts +1 -1
- package/dist/ai-reasoning-header/index.mjs +1 -5
- package/dist/ai-response-message/ai-response-message.mjs +4 -25
- package/dist/ai-response-message/ai-response-message2.mjs +17 -0
- package/dist/ai-response-message/index.mjs +1 -5
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar.d.ts +1 -1
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar.mjs +4 -230
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar2.mjs +171 -0
- package/dist/ai-response-message-toolbar/index.mjs +1 -5
- package/dist/ai-sidebar/ai-sidebar.d.ts +4 -4
- package/dist/ai-sidebar/ai-sidebar.mjs +4 -256
- package/dist/ai-sidebar/ai-sidebar2.mjs +211 -0
- package/dist/ai-sidebar/index.d.ts +2 -2
- package/dist/ai-sidebar/index.mjs +1 -5
- package/dist/ai-slash-command-menu/ai-slash-command-menu.d.ts +2 -1
- package/dist/ai-slash-command-menu/ai-slash-command-menu.mjs +4 -200
- package/dist/ai-slash-command-menu/ai-slash-command-menu2.mjs +160 -0
- package/dist/ai-slash-command-menu/index.mjs +1 -5
- package/dist/ai-spinner/ai-spinner.mjs +4 -41
- package/dist/ai-spinner/ai-spinner2.mjs +29 -0
- package/dist/ai-spinner/index.d.ts +1 -1
- package/dist/ai-spinner/index.mjs +1 -5
- package/dist/ai-steps/ai-steps.mjs +4 -163
- package/dist/ai-steps/ai-steps2.mjs +133 -0
- package/dist/ai-steps/index.d.ts +1 -1
- package/dist/ai-steps/index.mjs +1 -5
- package/dist/ai-suggestions/ai-suggestions.d.ts +2 -5
- package/dist/ai-suggestions/ai-suggestions.mjs +4 -164
- package/dist/ai-suggestions/ai-suggestions2.mjs +125 -0
- package/dist/ai-suggestions/index.d.ts +2 -1
- package/dist/ai-suggestions/index.mjs +1 -5
- package/dist/ai-thinking-indicator/ai-thinking-indicator.d.ts +2 -1
- package/dist/ai-thinking-indicator/ai-thinking-indicator.mjs +4 -160
- package/dist/ai-thinking-indicator/ai-thinking-indicator2.mjs +143 -0
- package/dist/ai-thinking-indicator/index.d.ts +1 -1
- package/dist/ai-thinking-indicator/index.mjs +1 -5
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.d.ts +2 -2
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.mjs +4 -152
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu2.mjs +109 -0
- package/dist/ai-thread-actions-menu/index.d.ts +1 -1
- package/dist/ai-thread-actions-menu/index.mjs +1 -5
- package/dist/ai-threads-search/ai-threads-search.d.ts +3 -4
- package/dist/ai-threads-search/ai-threads-search.mjs +4 -602
- package/dist/ai-threads-search/ai-threads-search2.mjs +495 -0
- package/dist/ai-threads-search/index.d.ts +1 -1
- package/dist/ai-threads-search/index.mjs +1 -5
- package/dist/ai-tool-call/ai-tool-call.d.ts +21 -0
- package/dist/ai-tool-call/ai-tool-call.mjs +4 -0
- package/dist/ai-tool-call/ai-tool-call2.mjs +132 -0
- package/dist/{ai-chatbot → ai-tool-call}/create-tool-renderer.d.ts +1 -1
- package/dist/ai-tool-call/create-tool-renderer.mjs +10 -0
- package/dist/ai-tool-call/index.d.ts +6 -0
- package/dist/ai-tool-call/index.mjs +5 -0
- package/dist/{ai-chatbot → ai-tool-call}/tool-canvas.d.ts +1 -1
- package/dist/ai-tool-call/tool-canvas.mjs +135 -0
- package/dist/ai-tool-call/utils.d.ts +12 -0
- package/dist/ai-tool-call/utils.mjs +20 -0
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator.d.ts +1 -1
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator.mjs +4 -331
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator2.mjs +225 -0
- package/dist/ai-tool-call-indicator/index.mjs +1 -5
- package/dist/ai-user-message/ai-user-message.mjs +4 -151
- package/dist/ai-user-message/ai-user-message2.mjs +105 -0
- package/dist/ai-user-message/index.mjs +1 -5
- package/dist/ai-user-message-toolbar/ai-user-message-toolbar.mjs +4 -160
- package/dist/ai-user-message-toolbar/ai-user-message-toolbar2.mjs +102 -0
- package/dist/ai-user-message-toolbar/index.mjs +1 -5
- package/dist/ai-voice-input/ai-voice-input.d.ts +1 -1
- package/dist/ai-voice-input/ai-voice-input.mjs +4 -113
- package/dist/ai-voice-input/ai-voice-input2.mjs +92 -0
- package/dist/ai-voice-input/index.d.ts +1 -1
- package/dist/ai-voice-input/index.mjs +1 -5
- package/dist/core/drag-controller.mjs +196 -221
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.mjs +7 -8
- package/dist/core/overlay/index.mjs +1 -4
- package/dist/core/overlay/overlay.d.ts +1 -1
- package/dist/core/overlay/overlay.mjs +4 -180
- package/dist/core/overlay/overlay2.mjs +146 -0
- package/dist/core/popover/index.mjs +1 -4
- package/dist/core/popover/popover.mjs +4 -98
- package/dist/core/popover/popover2.mjs +71 -0
- package/dist/core/resize-controller.mjs +132 -154
- package/dist/core/tooltip/index.mjs +1 -4
- package/dist/core/tooltip/tooltip.mjs +4 -279
- package/dist/core/tooltip/tooltip2.mjs +213 -0
- package/dist/index.d.ts +45 -53
- package/dist/index.mjs +100 -214
- package/dist/jsx.d.ts +895 -0
- package/dist/tools/ai-data-table/ai-data-table.d.ts +1 -2
- package/dist/tools/ai-data-table/ai-data-table.mjs +4 -257
- package/dist/tools/ai-data-table/ai-data-table2.mjs +185 -0
- package/dist/tools/ai-data-table/index.d.ts +0 -1
- package/dist/tools/ai-data-table/index.mjs +1 -6
- package/dist/tools/ai-paginator/ai-paginator.d.ts +14 -0
- package/dist/tools/ai-paginator/ai-paginator.mjs +4 -115
- package/dist/tools/ai-paginator/ai-paginator2.mjs +90 -0
- package/dist/tools/ai-paginator/index.mjs +1 -4
- package/dist/tools/ai-steps/ai-steps.d.ts +2 -3
- package/dist/tools/ai-steps/ai-steps.mjs +4 -49
- package/dist/tools/ai-steps/ai-steps2.mjs +30 -0
- package/dist/tools/ai-steps/index.d.ts +0 -1
- package/dist/tools/ai-steps/index.mjs +1 -6
- package/dist/tools/index.d.ts +3 -3
- package/dist/tools/index.mjs +7 -12
- package/dist/types/chat.d.ts +102 -0
- package/dist/types/feature.d.ts +1 -0
- package/dist/types/file.d.ts +36 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.mjs +0 -0
- package/dist/types/thread.d.ts +14 -0
- package/dist/types/tool.d.ts +197 -0
- package/dist/utils/csv-utils.mjs +37 -57
- package/dist/utils/delete-thread-controller.d.ts +1 -1
- package/dist/utils/delete-thread-controller.mjs +48 -71
- package/dist/utils/dom.d.ts +14 -0
- package/dist/utils/dom.mjs +30 -0
- package/dist/utils/format.d.ts +9 -0
- package/dist/utils/format.mjs +27 -0
- package/dist/utils/index.d.ts +9 -6
- package/dist/utils/index.mjs +6 -16
- package/dist/utils/infinite-scroll-controller.mjs +88 -94
- package/dist/utils/keyboard-navigation-controller.mjs +62 -70
- package/dist/utils/markdown-stream-controller.mjs +48 -0
- package/dist/utils/markdown.d.ts +10 -1
- package/dist/utils/markdown.mjs +261 -40
- package/dist/utils/storage-utils.mjs +30 -24
- package/package.json +40 -104
- package/dist/ai-agent-info/ai-agent-info.scss.mjs +0 -4
- package/dist/ai-agent-selector/ai-agent-selector.scss.mjs +0 -4
- package/dist/ai-artifact/ai-artifact.scss.mjs +0 -4
- package/dist/ai-artifact-card/ai-artifact-card.scss.mjs +0 -283
- package/dist/ai-artifact-card-group/ai-artifact-card-group.scss.mjs +0 -173
- package/dist/ai-assistant-response/ai-assistant-response.scss.mjs +0 -4
- package/dist/ai-attachment/ai-attachment.d.ts +0 -39
- package/dist/ai-attachment/ai-attachment.mjs +0 -130
- package/dist/ai-attachment/ai-attachment.scss.mjs +0 -4
- package/dist/ai-attachment/index.d.ts +0 -1
- package/dist/ai-attachment/index.mjs +0 -5
- package/dist/ai-button/ai-button.d.ts +0 -21
- package/dist/ai-button/ai-button.mjs +0 -68
- package/dist/ai-button/ai-button.scss.mjs +0 -4
- package/dist/ai-button/index.d.ts +0 -1
- package/dist/ai-button/index.mjs +0 -5
- package/dist/ai-canvas/ai-canvas.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/ai-chain-of-thought.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-base/thought-base.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-detail/thought-detail.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-image/thought-image.scss.mjs +0 -4
- package/dist/ai-chain-of-thought/thought-search-result/thought-search-result.scss.mjs +0 -4
- package/dist/ai-chat-header/ai-chat-header.scss.mjs +0 -4
- package/dist/ai-chat-interface/ai-chat-interface.scss.mjs +0 -4
- package/dist/ai-chatbot/ag-ui-adapter.d.ts +0 -24
- package/dist/ai-chatbot/ag-ui-adapter.mjs +0 -388
- package/dist/ai-chatbot/agent-adapter.d.ts +0 -310
- package/dist/ai-chatbot/agent-adapter.mjs +0 -221
- package/dist/ai-chatbot/agent-runner.d.ts +0 -41
- package/dist/ai-chatbot/agent-runner.mjs +0 -265
- package/dist/ai-chatbot/ai-chatbot-base.d.ts +0 -179
- package/dist/ai-chatbot/ai-chatbot-base.mjs +0 -684
- package/dist/ai-chatbot/ai-chatbot-tool-call.d.ts +0 -19
- package/dist/ai-chatbot/ai-chatbot-tool-call.mjs +0 -182
- package/dist/ai-chatbot/ai-chatbot-tool-call.scss.mjs +0 -4
- package/dist/ai-chatbot/ai-chatbot.d.ts +0 -196
- package/dist/ai-chatbot/ai-chatbot.mjs +0 -502
- package/dist/ai-chatbot/ai-chatbot.scss.mjs +0 -4
- package/dist/ai-chatbot/create-tool-renderer.mjs +0 -16
- package/dist/ai-chatbot/event-emitter.d.ts +0 -43
- package/dist/ai-chatbot/event-emitter.mjs +0 -81
- package/dist/ai-chatbot/file-upload-manager.d.ts +0 -27
- package/dist/ai-chatbot/file-upload-manager.mjs +0 -106
- package/dist/ai-chatbot/http-agent-with-credentials.d.ts +0 -8
- package/dist/ai-chatbot/http-agent-with-credentials.mjs +0 -14
- package/dist/ai-chatbot/index.d.ts +0 -18
- package/dist/ai-chatbot/index.mjs +0 -40
- package/dist/ai-chatbot/markdown-stream-controller.mjs +0 -50
- package/dist/ai-chatbot/message-state-controller.d.ts +0 -72
- package/dist/ai-chatbot/message-state-controller.mjs +0 -392
- package/dist/ai-chatbot/request-serialization.d.ts +0 -33
- package/dist/ai-chatbot/request-serialization.mjs +0 -31
- package/dist/ai-chatbot/tool-canvas.mjs +0 -128
- package/dist/ai-chatbot/types.d.ts +0 -582
- package/dist/ai-chatbot/utils.d.ts +0 -49
- package/dist/ai-chatbot/utils.mjs +0 -114
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.d.ts +0 -190
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.mjs +0 -986
- package/dist/ai-chatbot-launcher/ai-chatbot-launcher.scss.mjs +0 -4
- package/dist/ai-chatbot-launcher/index.d.ts +0 -1
- package/dist/ai-chatbot-launcher/index.mjs +0 -5
- package/dist/ai-client-message/ai-client-message.scss.mjs +0 -4
- package/dist/ai-confirmation-prompt/ai-confirmation-prompt.d.ts +0 -34
- package/dist/ai-confirmation-prompt/ai-confirmation-prompt.mjs +0 -134
- package/dist/ai-confirmation-prompt/ai-confirmation-prompt.scss.mjs +0 -4
- package/dist/ai-confirmation-prompt/index.d.ts +0 -1
- package/dist/ai-confirmation-prompt/index.mjs +0 -5
- package/dist/ai-context-chip/ai-context-chip.scss.mjs +0 -4
- package/dist/ai-context-items/ai-context-items.scss.mjs +0 -4
- package/dist/ai-conversations-panel/ai-conversations-panel.scss.mjs +0 -4
- package/dist/ai-copy-button/ai-copy-button.scss.mjs +0 -4
- package/dist/ai-dialog/ai-dialog.scss.mjs +0 -4
- package/dist/ai-disclaimer/ai-disclaimer.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item-group.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu-item.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu-separator.scss.mjs +0 -4
- package/dist/ai-dropdown-menu/ai-dropdown-menu.scss.mjs +0 -4
- package/dist/ai-edit-thread/ai-edit-thread.scss.mjs +0 -4
- package/dist/ai-embedded-chat/ai-embedded-chat.d.ts +0 -64
- package/dist/ai-embedded-chat/ai-embedded-chat.mjs +0 -173
- package/dist/ai-embedded-chat/ai-embedded-chat.scss.mjs +0 -4
- package/dist/ai-embedded-chat/index.d.ts +0 -1
- package/dist/ai-embedded-chat/index.mjs +0 -5
- package/dist/ai-empty-state/ai-empty-state.scss.mjs +0 -4
- package/dist/ai-error-message/ai-error-message.scss.mjs +0 -4
- package/dist/ai-fab/ai-fab.scss.mjs +0 -4
- package/dist/ai-file-picker/ai-file-picker.scss.mjs +0 -4
- package/dist/ai-floating-chat/ai-floating-chat.d.ts +0 -53
- package/dist/ai-floating-chat/ai-floating-chat.mjs +0 -147
- package/dist/ai-floating-chat/ai-floating-chat.scss.mjs +0 -4
- package/dist/ai-floating-chat/index.d.ts +0 -1
- package/dist/ai-floating-chat/index.mjs +0 -5
- package/dist/ai-gradient-container/ai-gradient-container.scss.mjs +0 -4
- package/dist/ai-icon/ai-icon.scss.mjs +0 -4
- package/dist/ai-icon-button/ai-icon-button.d.ts +0 -19
- package/dist/ai-icon-button/ai-icon-button.mjs +0 -66
- package/dist/ai-icon-button/ai-icon-button.scss.mjs +0 -4
- package/dist/ai-icon-button/index.d.ts +0 -1
- package/dist/ai-icon-button/index.mjs +0 -5
- package/dist/ai-message-thread/ai-message-thread.scss.mjs +0 -4
- package/dist/ai-modal/ai-modal.scss.mjs +0 -4
- package/dist/ai-prompt/ai-prompt.scss.mjs +0 -4
- package/dist/ai-prompt/prompt-button/index.d.ts +0 -1
- package/dist/ai-prompt/prompt-button/index.mjs +0 -5
- package/dist/ai-prompt/prompt-button/prompt-button.d.ts +0 -16
- package/dist/ai-prompt/prompt-button/prompt-button.mjs +0 -40
- package/dist/ai-prompt/prompt-button/prompt-button.scss.mjs +0 -4
- package/dist/ai-reasoning/ai-reasoning.scss.mjs +0 -4
- package/dist/ai-reasoning/reasoning-content/reasoning-content.scss.mjs +0 -4
- package/dist/ai-reasoning-header/ai-reasoning-header.scss.mjs +0 -4
- package/dist/ai-response-message/ai-response-message.scss.mjs +0 -4
- package/dist/ai-response-message-toolbar/ai-response-message-toolbar.scss.mjs +0 -4
- package/dist/ai-sidebar/ai-sidebar.scss.mjs +0 -4
- package/dist/ai-sidebar-chat/ai-sidebar-chat.d.ts +0 -54
- package/dist/ai-sidebar-chat/ai-sidebar-chat.mjs +0 -163
- package/dist/ai-sidebar-chat/ai-sidebar-chat.scss.mjs +0 -4
- package/dist/ai-sidebar-chat/index.d.ts +0 -1
- package/dist/ai-sidebar-chat/index.mjs +0 -5
- package/dist/ai-slash-command-menu/ai-slash-command-menu.scss.mjs +0 -4
- package/dist/ai-spinner/ai-spinner.scss.mjs +0 -4
- package/dist/ai-steps/ai-steps.scss.mjs +0 -4
- package/dist/ai-suggestions/ai-suggestions.scss.mjs +0 -500
- package/dist/ai-thinking-indicator/ai-thinking-indicator.scss.mjs +0 -143
- package/dist/ai-thread-actions-menu/ai-thread-actions-menu.scss.mjs +0 -4
- package/dist/ai-threads/ai-threads.d.ts +0 -82
- package/dist/ai-threads/ai-threads.mjs +0 -343
- package/dist/ai-threads/ai-threads.scss.mjs +0 -4
- package/dist/ai-threads/index.d.ts +0 -1
- package/dist/ai-threads/index.mjs +0 -5
- package/dist/ai-threads-search/ai-threads-search.scss.mjs +0 -4
- package/dist/ai-tool-call-indicator/ai-tool-call-indicator.scss.mjs +0 -4
- package/dist/ai-user-message/ai-user-message.scss.mjs +0 -4
- package/dist/ai-user-message-toolbar/ai-user-message-toolbar.scss.mjs +0 -4
- package/dist/ai-voice-input/ai-voice-input.scss.mjs +0 -4
- package/dist/core/canvas-controller.d.ts +0 -81
- package/dist/core/canvas-controller.mjs +0 -221
- package/dist/core/chatbot-core-controller.d.ts +0 -57
- package/dist/core/chatbot-core-controller.mjs +0 -545
- package/dist/core/overlay/overlay.scss.mjs +0 -4
- package/dist/core/popover/popover.scss.mjs +0 -4
- package/dist/core/tooltip/tooltip.scss.mjs +0 -4
- package/dist/tools/ai-data-table/ai-data-table-definition.d.ts +0 -2
- package/dist/tools/ai-data-table/ai-data-table-definition.mjs +0 -43
- package/dist/tools/ai-data-table/ai-data-table.scss.mjs +0 -4
- package/dist/tools/ai-mcp-app/ai-mcp-app.d.ts +0 -70
- package/dist/tools/ai-mcp-app/ai-mcp-app.mjs +0 -589
- package/dist/tools/ai-mcp-app/ai-mcp-app.scss.mjs +0 -4
- package/dist/tools/ai-mcp-app/index.d.ts +0 -3
- package/dist/tools/ai-mcp-app/index.mjs +0 -6
- package/dist/tools/ai-mcp-app/mcp-app-bridge-controller.d.ts +0 -60
- package/dist/tools/ai-mcp-app/mcp-app-bridge-controller.mjs +0 -147
- package/dist/tools/ai-mcp-app/mcp-app-bridge-types.d.ts +0 -124
- package/dist/tools/ai-mcp-app/mcp-app-bridge.d.ts +0 -41
- package/dist/tools/ai-mcp-app/mcp-app-bridge.mjs +0 -293
- package/dist/tools/ai-mcp-app/mcp-app-context.d.ts +0 -46
- package/dist/tools/ai-mcp-app/mcp-app-context.mjs +0 -5
- package/dist/tools/ai-paginator/ai-paginator.scss.mjs +0 -4
- package/dist/tools/ai-steps/ai-steps-definition.d.ts +0 -2
- package/dist/tools/ai-steps/ai-steps-definition.mjs +0 -51
- package/dist/tools/ai-steps/ai-steps.scss.mjs +0 -4
- package/dist/utils/inert-outside.d.ts +0 -7
- package/dist/utils/inert-outside.mjs +0 -28
- package/dist/utils.d.ts +0 -32
- package/dist/utils.mjs +0 -57
- /package/dist/{ai-chatbot → utils}/markdown-stream-controller.d.ts +0 -0
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { SubscriptionManager } from "./event-emitter.mjs";
|
|
2
|
-
import { generateId } from "./utils.mjs";
|
|
3
|
-
class AgentRunner {
|
|
4
|
-
constructor() {
|
|
5
|
-
}
|
|
6
|
-
static async run(config) {
|
|
7
|
-
const {
|
|
8
|
-
adapter,
|
|
9
|
-
tools,
|
|
10
|
-
prompt,
|
|
11
|
-
mode = "one-shot",
|
|
12
|
-
maxTurns = 20,
|
|
13
|
-
onStart,
|
|
14
|
-
onDelta,
|
|
15
|
-
onToolCall,
|
|
16
|
-
onComplete
|
|
17
|
-
} = config;
|
|
18
|
-
await this.#ensureConnected(adapter);
|
|
19
|
-
if (tools) {
|
|
20
|
-
adapter.setTools(tools);
|
|
21
|
-
}
|
|
22
|
-
const userMessage = this.#createUserMessage(prompt);
|
|
23
|
-
return this.#executePrompt(adapter, userMessage, tools, mode, maxTurns, {
|
|
24
|
-
onStart,
|
|
25
|
-
onDelta,
|
|
26
|
-
onToolCall,
|
|
27
|
-
onComplete
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
static #executePrompt(adapter, userMessage, tools, mode, maxTurns, callbacks) {
|
|
31
|
-
return new Promise((resolve, reject) => {
|
|
32
|
-
const state = {
|
|
33
|
-
mode,
|
|
34
|
-
maxTurns,
|
|
35
|
-
turns: 0,
|
|
36
|
-
messages: [userMessage],
|
|
37
|
-
currentMessage: null,
|
|
38
|
-
toolCalls: [],
|
|
39
|
-
toolResultMessages: /* @__PURE__ */ new Map(),
|
|
40
|
-
pendingToolExecutions: /* @__PURE__ */ new Set(),
|
|
41
|
-
runFinished: false,
|
|
42
|
-
hasTextResponse: false,
|
|
43
|
-
hasErrors: false,
|
|
44
|
-
resolved: false,
|
|
45
|
-
subscriptions: new SubscriptionManager(),
|
|
46
|
-
onToolCall: callbacks.onToolCall,
|
|
47
|
-
resolve,
|
|
48
|
-
reject
|
|
49
|
-
};
|
|
50
|
-
state.subscriptions.add(
|
|
51
|
-
adapter.onMessageStart(this.#createMessageStartHandler(state, callbacks.onStart)),
|
|
52
|
-
adapter.onMessageDelta(this.#createMessageDeltaHandler(state, callbacks.onDelta)),
|
|
53
|
-
adapter.onRunFinished(this.#createFinishHandler(state, callbacks.onComplete)),
|
|
54
|
-
adapter.onError(this.#createErrorHandler(state)),
|
|
55
|
-
adapter.onToolCall(this.#createToolCallHandler(adapter, tools, state))
|
|
56
|
-
);
|
|
57
|
-
adapter.sendMessage([userMessage]);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
static async #ensureConnected(adapter) {
|
|
61
|
-
if (!adapter.isConnected) {
|
|
62
|
-
await adapter.connect();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
static #createUserMessage(prompt) {
|
|
66
|
-
return {
|
|
67
|
-
id: generateId(),
|
|
68
|
-
role: "user",
|
|
69
|
-
content: prompt,
|
|
70
|
-
timestamp: Date.now(),
|
|
71
|
-
status: "complete"
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
static #createMessageStartHandler(state, onStart) {
|
|
75
|
-
return (event) => {
|
|
76
|
-
state.turns++;
|
|
77
|
-
state.currentMessage = {
|
|
78
|
-
id: event.messageId,
|
|
79
|
-
role: "assistant",
|
|
80
|
-
content: "",
|
|
81
|
-
timestamp: Date.now(),
|
|
82
|
-
status: "streaming"
|
|
83
|
-
};
|
|
84
|
-
onStart?.(event.messageId);
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
static #createMessageDeltaHandler(state, onDelta) {
|
|
88
|
-
return (event) => {
|
|
89
|
-
if (state.currentMessage) {
|
|
90
|
-
state.currentMessage.content = (state.currentMessage.content ?? "") + event.delta;
|
|
91
|
-
if (event.delta.trim().length > 0) {
|
|
92
|
-
state.hasTextResponse = true;
|
|
93
|
-
}
|
|
94
|
-
onDelta?.(event.delta);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
static #createFinishHandler(state, onComplete) {
|
|
99
|
-
return () => {
|
|
100
|
-
state.runFinished = true;
|
|
101
|
-
this.#tryFinish(state, onComplete);
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
static #createErrorHandler(state) {
|
|
105
|
-
return (event) => {
|
|
106
|
-
if (state.resolved) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
state.resolved = true;
|
|
110
|
-
state.subscriptions.unsubscribe();
|
|
111
|
-
state.reject(new Error(event.message));
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
static #createToolCallHandler(adapter, tools, state) {
|
|
115
|
-
return async (event) => {
|
|
116
|
-
await this.#executeToolCall(event, tools, state, adapter);
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
static #createToolResponse(toolName, handlerReturn) {
|
|
120
|
-
if (typeof handlerReturn === "string") {
|
|
121
|
-
return handlerReturn;
|
|
122
|
-
}
|
|
123
|
-
if (handlerReturn && typeof handlerReturn === "object") {
|
|
124
|
-
return handlerReturn;
|
|
125
|
-
}
|
|
126
|
-
return `Tool '${toolName}' executed successfully`;
|
|
127
|
-
}
|
|
128
|
-
static #buildMessageHistory(state) {
|
|
129
|
-
const messages = [...state.messages];
|
|
130
|
-
if (state.currentMessage) {
|
|
131
|
-
const assistantMessage = {
|
|
132
|
-
...state.currentMessage,
|
|
133
|
-
status: "complete",
|
|
134
|
-
toolCalls: state.toolCalls.filter((tc) => tc.messageId === state.currentMessage?.id)
|
|
135
|
-
};
|
|
136
|
-
messages.push(assistantMessage);
|
|
137
|
-
}
|
|
138
|
-
for (const toolCall of state.toolCalls) {
|
|
139
|
-
if (toolCall.status === "complete" || toolCall.status === "error") {
|
|
140
|
-
let toolMessage = state.toolResultMessages.get(toolCall.id);
|
|
141
|
-
if (!toolMessage) {
|
|
142
|
-
toolMessage = {
|
|
143
|
-
id: generateId(),
|
|
144
|
-
role: "tool",
|
|
145
|
-
content: JSON.stringify(toolCall.result),
|
|
146
|
-
timestamp: Date.now(),
|
|
147
|
-
status: "complete",
|
|
148
|
-
toolCallId: toolCall.id
|
|
149
|
-
};
|
|
150
|
-
state.toolResultMessages.set(toolCall.id, toolMessage);
|
|
151
|
-
}
|
|
152
|
-
messages.push(toolMessage);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return messages;
|
|
156
|
-
}
|
|
157
|
-
static async #executeToolCall(event, tools, state, adapter) {
|
|
158
|
-
const execution = (async () => {
|
|
159
|
-
let result;
|
|
160
|
-
const toolDef = tools?.find((t) => t.name === event.name);
|
|
161
|
-
const toolCall = {
|
|
162
|
-
id: event.id,
|
|
163
|
-
messageId: state.currentMessage?.id ?? "",
|
|
164
|
-
name: event.name,
|
|
165
|
-
args: event.args,
|
|
166
|
-
status: "executing",
|
|
167
|
-
type: toolDef ? "client" : "agent"
|
|
168
|
-
};
|
|
169
|
-
state.toolCalls.push(toolCall);
|
|
170
|
-
state.onToolCall?.(toolCall);
|
|
171
|
-
if (toolDef?.handler) {
|
|
172
|
-
try {
|
|
173
|
-
const context = {
|
|
174
|
-
args: event.args,
|
|
175
|
-
toolCallId: event.id,
|
|
176
|
-
toolName: event.name,
|
|
177
|
-
signal: void 0
|
|
178
|
-
};
|
|
179
|
-
const handlerReturn = await toolDef.handler(context);
|
|
180
|
-
result = this.#createToolResponse(event.name, handlerReturn);
|
|
181
|
-
} catch (error) {
|
|
182
|
-
const err = error;
|
|
183
|
-
console.error(`Tool handler error [${event.name}]:`, err);
|
|
184
|
-
result = { error: err.message };
|
|
185
|
-
toolCall.status = "error";
|
|
186
|
-
toolCall.result = result;
|
|
187
|
-
state.hasErrors = true;
|
|
188
|
-
if (state.mode === "multi-turn") {
|
|
189
|
-
state.runFinished = false;
|
|
190
|
-
state.hasTextResponse = false;
|
|
191
|
-
const messages = this.#buildMessageHistory(state);
|
|
192
|
-
adapter.sendToolResult(event.id, result, messages);
|
|
193
|
-
}
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
} else {
|
|
197
|
-
result = this.#createToolResponse(event.name);
|
|
198
|
-
}
|
|
199
|
-
toolCall.status = "complete";
|
|
200
|
-
toolCall.result = result;
|
|
201
|
-
if (state.mode === "multi-turn") {
|
|
202
|
-
state.runFinished = false;
|
|
203
|
-
state.hasTextResponse = false;
|
|
204
|
-
const messages = this.#buildMessageHistory(state);
|
|
205
|
-
adapter.sendToolResult(event.id, result, messages);
|
|
206
|
-
}
|
|
207
|
-
})();
|
|
208
|
-
state.pendingToolExecutions.add(execution);
|
|
209
|
-
execution.finally(() => {
|
|
210
|
-
state.pendingToolExecutions.delete(execution);
|
|
211
|
-
this.#tryFinish(state);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
static #tryFinish(state, onComplete) {
|
|
215
|
-
if (state.resolved || state.pendingToolExecutions.size > 0) {
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
const shouldFinish = state.mode === "one-shot" && state.runFinished || state.mode === "multi-turn" && state.runFinished && (state.hasTextResponse || state.turns >= state.maxTurns);
|
|
219
|
-
if (!shouldFinish) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
state.resolved = true;
|
|
223
|
-
state.subscriptions.unsubscribe();
|
|
224
|
-
const messages = this.#buildMessageHistory(state);
|
|
225
|
-
const finalMessage = state.currentMessage ? this.#buildSuccessResult(state) : this.#buildEmptyMessage();
|
|
226
|
-
let stoppedReason;
|
|
227
|
-
if (state.hasErrors) {
|
|
228
|
-
stoppedReason = "error";
|
|
229
|
-
} else if (state.mode === "one-shot") {
|
|
230
|
-
stoppedReason = "one-shot-complete";
|
|
231
|
-
} else if (state.turns >= state.maxTurns) {
|
|
232
|
-
stoppedReason = "max-turns";
|
|
233
|
-
} else {
|
|
234
|
-
stoppedReason = "text-response";
|
|
235
|
-
}
|
|
236
|
-
const result = {
|
|
237
|
-
messages,
|
|
238
|
-
finalMessage,
|
|
239
|
-
toolCalls: state.toolCalls,
|
|
240
|
-
turns: state.turns,
|
|
241
|
-
success: !state.hasErrors,
|
|
242
|
-
stoppedReason
|
|
243
|
-
};
|
|
244
|
-
onComplete?.(result);
|
|
245
|
-
state.resolve(result);
|
|
246
|
-
}
|
|
247
|
-
static #buildSuccessResult(state) {
|
|
248
|
-
return {
|
|
249
|
-
...state.currentMessage,
|
|
250
|
-
status: "complete"
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
static #buildEmptyMessage() {
|
|
254
|
-
return {
|
|
255
|
-
id: generateId(),
|
|
256
|
-
role: "assistant",
|
|
257
|
-
content: "",
|
|
258
|
-
timestamp: Date.now(),
|
|
259
|
-
status: "complete"
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
export {
|
|
264
|
-
AgentRunner
|
|
265
|
-
};
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
import { Ref } from 'lit/directives/ref.js';
|
|
3
|
-
import { AgentInfo } from '../ai-agent-info';
|
|
4
|
-
import { ForgeAiChatHeaderAgentChangeEventData } from '../ai-chat-header';
|
|
5
|
-
import { AiMessageThreadComponent, ForgeAiMessageThreadThumbsEventData } from '../ai-message-thread';
|
|
6
|
-
import { ForgeAiAttachmentRemoveEventData } from '../ai-attachment';
|
|
7
|
-
import { ForgeAiFilePickerChangeEventData, ForgeAiFilePickerErrorEventData } from '../ai-file-picker';
|
|
8
|
-
import { AiPromptComponent, ForgeAiPromptCommandEventData, ForgeAiPromptSendEventData } from '../ai-prompt';
|
|
9
|
-
import { ForgeAiSuggestionsEventData, Suggestion } from '../ai-suggestions';
|
|
10
|
-
import { ForgeAiVoiceInputResultEvent } from '../ai-voice-input';
|
|
11
|
-
import { AgentAdapter } from './agent-adapter.js';
|
|
12
|
-
import { ChatbotCoreController } from '../core/chatbot-core-controller.js';
|
|
13
|
-
import { Agent, ChatMessage, ClientMessageInput, ContextItem, HeadingLevel, MessageItem, SlashCommand, ThreadState, ToolCall, AnyToolDefinition } from './types.js';
|
|
14
|
-
export type FeatureToggle = 'on' | 'off';
|
|
15
|
-
export declare abstract class AiChatbotBase extends LitElement {
|
|
16
|
-
#private;
|
|
17
|
-
protected abstract _messageThreadRef: Ref<AiMessageThreadComponent>;
|
|
18
|
-
protected abstract _promptRef: Ref<AiPromptComponent>;
|
|
19
|
-
adapter?: AgentAdapter;
|
|
20
|
-
fileUpload: FeatureToggle;
|
|
21
|
-
maxFileSize: number;
|
|
22
|
-
acceptedFileTypes: string;
|
|
23
|
-
voiceInput: FeatureToggle;
|
|
24
|
-
placeholder: string;
|
|
25
|
-
suggestions?: Suggestion[];
|
|
26
|
-
enableReactions: boolean;
|
|
27
|
-
titleText: string;
|
|
28
|
-
headingLevel: HeadingLevel;
|
|
29
|
-
debugMode: boolean;
|
|
30
|
-
disclaimerText: string | null | undefined;
|
|
31
|
-
debugCommand: FeatureToggle;
|
|
32
|
-
exportOption: FeatureToggle;
|
|
33
|
-
clearOption: FeatureToggle;
|
|
34
|
-
agentInfo?: AgentInfo;
|
|
35
|
-
agents: Agent[];
|
|
36
|
-
selectedAgentId?: string;
|
|
37
|
-
contextItems: ContextItem[];
|
|
38
|
-
mcpAppSandboxUrl?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Theme fed into an MCP-app widget's `hostContext.theme`. The chatbot's own appearance
|
|
41
|
-
* comes from Forge tokens and is unaffected. Set this whenever the app switches between
|
|
42
|
-
* light and dark: it is the signal that re-sends `theme` and the Forge-derived
|
|
43
|
-
* `styles.variables` to widgets, since token changes alone can't be detected. Absent →
|
|
44
|
-
* follows `prefers-color-scheme`.
|
|
45
|
-
*/
|
|
46
|
-
mcpAppTheme?: 'light' | 'dark';
|
|
47
|
-
private _mcpAppHost;
|
|
48
|
-
/**
|
|
49
|
-
* Sends `ui/resource-teardown` to mounted MCP-app widgets (all, or only `toolCallIds`) and
|
|
50
|
-
* releases them immediately, without waiting for acks. The adapter then drops any state it
|
|
51
|
-
* holds for them (e.g. a pending model context).
|
|
52
|
-
*/
|
|
53
|
-
protected _teardownMcpAppViews({ toolCallIds }?: {
|
|
54
|
-
toolCallIds?: string[];
|
|
55
|
-
}): void;
|
|
56
|
-
protected _coreController: ChatbotCoreController;
|
|
57
|
-
protected get _isStreaming(): boolean;
|
|
58
|
-
protected get _isUploading(): boolean;
|
|
59
|
-
protected get _tools(): Map<string, AnyToolDefinition>;
|
|
60
|
-
protected get _messageItems(): MessageItem[];
|
|
61
|
-
protected get _toolCalls(): ToolCall[];
|
|
62
|
-
protected get _hasMessages(): boolean;
|
|
63
|
-
protected get _allContextItems(): ContextItem[];
|
|
64
|
-
connectedCallback(): void;
|
|
65
|
-
disconnectedCallback(): void;
|
|
66
|
-
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
67
|
-
protected _onConnected(): void;
|
|
68
|
-
protected get _slashCommands(): SlashCommand[];
|
|
69
|
-
protected _handleSlashCommand(evt: CustomEvent<ForgeAiPromptCommandEventData>): void;
|
|
70
|
-
protected _handleInfo(): void;
|
|
71
|
-
protected _handleAgentChange(event: CustomEvent<ForgeAiChatHeaderAgentChangeEventData>): void;
|
|
72
|
-
protected _handleDebugToggle(): void;
|
|
73
|
-
protected _handleAttachmentRemove(evt: CustomEvent<ForgeAiAttachmentRemoveEventData>): void;
|
|
74
|
-
protected _handleContextChipRemove(evt: CustomEvent<{
|
|
75
|
-
id: string;
|
|
76
|
-
item: ContextItem;
|
|
77
|
-
}>): void;
|
|
78
|
-
protected _handlePromptContextRemove(evt: CustomEvent<{
|
|
79
|
-
id: string;
|
|
80
|
-
item: ContextItem;
|
|
81
|
-
}>): void;
|
|
82
|
-
protected _handleSend(evt: CustomEvent<ForgeAiPromptSendEventData>): Promise<void>;
|
|
83
|
-
protected _handleStop(): void;
|
|
84
|
-
protected _handleCancel(): void;
|
|
85
|
-
protected _handleCopy(evt: CustomEvent<{
|
|
86
|
-
messageId: string;
|
|
87
|
-
}>): Promise<void>;
|
|
88
|
-
protected _handleUserCopy(evt: CustomEvent<{
|
|
89
|
-
messageId: string;
|
|
90
|
-
}>): Promise<void>;
|
|
91
|
-
protected _handleUserResend(evt: CustomEvent<{
|
|
92
|
-
messageId: string;
|
|
93
|
-
}>): void;
|
|
94
|
-
protected _handleUserEdit(evt: CustomEvent<{
|
|
95
|
-
messageId: string;
|
|
96
|
-
content: string;
|
|
97
|
-
}>): void;
|
|
98
|
-
protected _handleResend(evt: CustomEvent<{
|
|
99
|
-
messageId: string;
|
|
100
|
-
}>): void;
|
|
101
|
-
protected _handleFeedback(evt: CustomEvent<ForgeAiMessageThreadThumbsEventData>, type: 'positive' | 'negative'): void;
|
|
102
|
-
protected _handleThumbsUp(evt: CustomEvent<ForgeAiMessageThreadThumbsEventData>): void;
|
|
103
|
-
protected _handleThumbsDown(evt: CustomEvent<ForgeAiMessageThreadThumbsEventData>): void;
|
|
104
|
-
protected _handleFileSelect(evt: CustomEvent<ForgeAiFilePickerChangeEventData>): void;
|
|
105
|
-
protected _handleFileError(evt: CustomEvent<ForgeAiFilePickerErrorEventData>): void;
|
|
106
|
-
protected _handleSuggestionSelect(evt: CustomEvent<ForgeAiSuggestionsEventData>): Promise<void>;
|
|
107
|
-
protected _handleVoiceInputResult(evt: CustomEvent<ForgeAiVoiceInputResultEvent>): void;
|
|
108
|
-
/**
|
|
109
|
-
* Clears all messages from the chat.
|
|
110
|
-
*
|
|
111
|
-
* This is a lower-level operation that removes message history without
|
|
112
|
-
* the semantic meaning of "starting a new conversation". For user-facing
|
|
113
|
-
* "new chat" actions, prefer {@link startNewChat} which provides
|
|
114
|
-
* conversation-level cleanup.
|
|
115
|
-
*
|
|
116
|
-
* @returns true if messages were cleared, false if prevented via event.preventDefault()
|
|
117
|
-
* @fires forge-ai-chatbot-clear - Cancelable event fired before clearing
|
|
118
|
-
*/
|
|
119
|
-
clearMessages(): boolean;
|
|
120
|
-
/**
|
|
121
|
-
* Starts a new chat conversation.
|
|
122
|
-
*
|
|
123
|
-
* This clears all messages and resets the conversation to a fresh state.
|
|
124
|
-
* Use this when the user explicitly wants to begin a new conversation.
|
|
125
|
-
*
|
|
126
|
-
* Contrast with {@link clearMessages}, which fires events and can be prevented.
|
|
127
|
-
* This method does not fire events - it's meant for programmatic use.
|
|
128
|
-
* For user-initiated actions, use event handlers that fire events before calling this.
|
|
129
|
-
*
|
|
130
|
-
* Subclasses may override this to add conversation-specific cleanup like
|
|
131
|
-
* resetting thread IDs or closing panels.
|
|
132
|
-
*/
|
|
133
|
-
startNewChat(): void;
|
|
134
|
-
getMessages(): ChatMessage[];
|
|
135
|
-
setMessages(messages: ChatMessage[]): void;
|
|
136
|
-
/**
|
|
137
|
-
* Inserts or upserts a client-only status message into the thread - never sent to
|
|
138
|
-
* the agent adapter and never included in the conversation history the adapter sees.
|
|
139
|
-
* Use this for host-driven UI feedback (e.g. "Your session expired", upload progress)
|
|
140
|
-
* instead of splicing {@link getMessages}/{@link setMessages} directly.
|
|
141
|
-
*
|
|
142
|
-
* Safe to call at any time, including while a response is streaming - it never
|
|
143
|
-
* finalizes or otherwise touches the in-progress response.
|
|
144
|
-
*
|
|
145
|
-
* @param message - Content and optional kind ('text' | 'info' | 'warning' | 'error' | 'success'),
|
|
146
|
-
* header, and actions. Pass the same `id` on a later call to upsert (replace) a
|
|
147
|
-
* previously added message.
|
|
148
|
-
* @returns The message id (generated if not provided).
|
|
149
|
-
*/
|
|
150
|
-
addClientMessage(message: ClientMessageInput): string;
|
|
151
|
-
/**
|
|
152
|
-
* Removes a client-only message previously added via {@link addClientMessage}.
|
|
153
|
-
* No-ops if no message with that id exists. Safe to call at any time, including
|
|
154
|
-
* while a response is streaming. Removal is never automatic - call this when your
|
|
155
|
-
* host logic determines the message is no longer relevant.
|
|
156
|
-
*/
|
|
157
|
-
removeClientMessage(id: string): void;
|
|
158
|
-
sendMessage(content: string, files?: File[]): Promise<void>;
|
|
159
|
-
abort(): void;
|
|
160
|
-
/**
|
|
161
|
-
* Re-sends the Forge-derived `styles.variables` to every MCP-app widget. Call after
|
|
162
|
-
* changing Forge tokens without a light/dark switch (e.g. a brand change); for light/dark,
|
|
163
|
-
* set {@link mcpAppTheme} instead.
|
|
164
|
-
*/
|
|
165
|
-
refreshMcpAppStyles(): void;
|
|
166
|
-
scrollToBottom({ behavior }?: {
|
|
167
|
-
behavior?: ScrollBehavior;
|
|
168
|
-
}): Promise<void>;
|
|
169
|
-
abstract focus(): void;
|
|
170
|
-
getThreadState(): ThreadState;
|
|
171
|
-
getSelectedAgent(): Agent | undefined;
|
|
172
|
-
setThreadState(threadState: ThreadState): Promise<void>;
|
|
173
|
-
protected _dispatchHostEvent(config: {
|
|
174
|
-
type: string;
|
|
175
|
-
detail?: unknown;
|
|
176
|
-
cancelable?: boolean;
|
|
177
|
-
}): CustomEvent;
|
|
178
|
-
protected _handleExport(): void;
|
|
179
|
-
}
|