@aakash58/chatbot 1.1.21 → 1.1.24
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/README.md +22 -298
- package/esm2022/aakash58-chatbot.mjs +5 -0
- package/esm2022/lib/app/chat/chat-ui-state.service.mjs +170 -0
- package/esm2022/lib/app/chat/chat.service.mjs +445 -0
- package/esm2022/lib/app/chat/components/chat-button/chat-button.component.mjs +50 -0
- package/esm2022/lib/app/chat/components/chat-footer/chat-footer.component.mjs +12 -0
- package/esm2022/lib/app/chat/components/chat-header/chat-header.component.mjs +66 -0
- package/esm2022/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.mjs +186 -0
- package/esm2022/lib/app/chat/components/chat-window/chat-window.component.mjs +312 -0
- package/esm2022/lib/app/chat/components/message-input/message-input.component.mjs +36 -0
- package/esm2022/lib/app/chat/components/message-list/message-list.component.mjs +115 -0
- package/esm2022/lib/app/chat/model/chat-history.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-request.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-response.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-session.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-stream-message.model.mjs +2 -0
- package/esm2022/lib/app/chat/model/chat-stream-response.model.mjs +2 -0
- package/esm2022/lib/app/chat/services/chat-api.service.mjs +61 -0
- package/esm2022/lib/app/chat/services/chat-audio.service.mjs +50 -0
- package/esm2022/lib/app/chat/services/chat-history.service.mjs +252 -0
- package/esm2022/lib/app/login/login-form.component.mjs +46 -0
- package/esm2022/lib/app/personalization/personalization-dialog.component.mjs +194 -0
- package/esm2022/lib/app/personalization/personalization.service.mjs +149 -0
- package/esm2022/lib/app/personalization/sections/account/account-section.component.mjs +122 -0
- package/esm2022/lib/app/personalization/sections/preferences/color-picker-dialog.component.mjs +86 -0
- package/esm2022/lib/app/personalization/sections/preferences/preferences-section.component.mjs +115 -0
- package/esm2022/lib/app/personalization/sections/profile/profile-section.component.mjs +29 -0
- package/esm2022/lib/app/personalization/sections/settings/setting-section.component.mjs +30 -0
- package/esm2022/lib/app/personalization/sections/terms/terms-section.component.mjs +12 -0
- package/esm2022/lib/constant/doohbot-constant.mjs +28 -0
- package/esm2022/lib/constant/html-entities.mjs +9 -0
- package/esm2022/lib/constant/utf8.mjs +10 -0
- package/esm2022/lib/core/app-const.mjs +61 -0
- package/esm2022/lib/core/auth/account-api.service.mjs +40 -0
- package/esm2022/lib/core/auth/auth.service.mjs +391 -0
- package/esm2022/lib/core/auth/models/auth-result.model.mjs +3 -0
- package/esm2022/lib/core/auth/models/federated-login-request.model.mjs +6 -0
- package/esm2022/lib/core/auth/models/login-request.model.mjs +6 -0
- package/esm2022/lib/core/auth/storage.service.mjs +110 -0
- package/esm2022/lib/core/directives/draggable/draggable-dialog.directive.mjs +112 -0
- package/esm2022/lib/core/directives/fullscreen/fullscreen.directive.mjs +55 -0
- package/esm2022/lib/core/directives/resizable/resizable-dialog.directive.mjs +179 -0
- package/esm2022/lib/core/environments/environment.mjs +15 -0
- package/esm2022/lib/core/environments/environment.prod.mjs +15 -0
- package/esm2022/lib/core/helpers/crypto-helper.service.mjs +52 -0
- package/esm2022/lib/core/http/http-stream.service.mjs +97 -0
- package/esm2022/lib/core/http/http.service.mjs +103 -0
- package/esm2022/lib/core/interceptors/auth.interceptor.mjs +96 -0
- package/esm2022/lib/core/interceptors/license.interceptor.mjs +44 -0
- package/esm2022/lib/core/models/api-config.model.mjs +18 -0
- package/esm2022/lib/core/models/api-request.model.mjs +2 -0
- package/esm2022/lib/core/models/api-response.model.mjs +8 -0
- package/esm2022/lib/core/models/doohbot-config.model.mjs +18 -0
- package/esm2022/lib/core/models/license.model.mjs +2 -0
- package/esm2022/lib/core/models/message.mjs +2 -0
- package/esm2022/lib/core/models/theme-config.model.mjs +2 -0
- package/esm2022/lib/core/services/core-config.service.mjs +52 -0
- package/esm2022/lib/core/services/license.service.mjs +145 -0
- package/esm2022/lib/core/services/markdown.service.mjs +64 -0
- package/esm2022/lib/core/services/theme.service.mjs +248 -0
- package/esm2022/lib/core/types/auth-mode.type.mjs +2 -0
- package/esm2022/lib/core/types/auth-status.type.mjs +5 -0
- package/esm2022/lib/core/types/chat-stream.type.mjs +2 -0
- package/esm2022/lib/core/types/message-role.type.mjs +2 -0
- package/esm2022/lib/core/types/prompt-mode.type.mjs +5 -0
- package/esm2022/lib/core/types/snackbar-error.type.mjs +5 -0
- package/esm2022/lib/core/types/tenant-resolution-strategy.type.mjs +2 -0
- package/esm2022/lib/core/utils/logger.service.mjs +42 -0
- package/esm2022/lib/doohbot-input.mjs +20 -0
- package/esm2022/lib/doohbot.component.mjs +444 -0
- package/esm2022/lib/predefined_messages.mjs +15 -0
- package/esm2022/lib/shared/chips/chips.component.mjs +28 -0
- package/esm2022/lib/shared/dialog/dialog.component.mjs +36 -0
- package/esm2022/lib/shared/dialog/dialog.service.mjs +64 -0
- package/esm2022/lib/shared/dialog/dialog.utils.mjs +85 -0
- package/esm2022/lib/shared/dropdown-menu/dropdown-menu.component.mjs +29 -0
- package/esm2022/lib/shared/input-dialog/input-dialog.component.mjs +38 -0
- package/esm2022/lib/shared/menu-item/menu-item.component.mjs +24 -0
- package/esm2022/lib/shared/pipes/simple-markdown.pipe.mjs +27 -0
- package/esm2022/lib/shared/snackbar/snackbar.component.mjs +43 -0
- package/esm2022/lib/shared/snackbar/snackbar.service.mjs +46 -0
- package/esm2022/lib/shared/snackbar/snackbar.utils.mjs +43 -0
- package/esm2022/public-api.mjs +37 -0
- package/fesm2022/aakash58-chatbot.mjs +5193 -0
- package/fesm2022/aakash58-chatbot.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/app/chat/chat-ui-state.service.d.ts +96 -0
- package/lib/app/chat/chat.service.d.ts +88 -0
- package/lib/app/chat/components/chat-button/chat-button.component.d.ts +16 -0
- package/lib/app/chat/components/chat-footer/chat-footer.component.d.ts +5 -0
- package/lib/app/chat/components/chat-header/chat-header.component.d.ts +24 -0
- package/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.d.ts +49 -0
- package/lib/app/chat/components/chat-window/chat-window.component.d.ts +107 -0
- package/lib/app/chat/components/message-input/message-input.component.d.ts +12 -0
- package/lib/app/chat/components/message-list/message-list.component.d.ts +40 -0
- package/lib/app/chat/model/chat-history.model.d.ts +51 -0
- package/lib/app/chat/model/chat-request.model.d.ts +10 -0
- package/lib/app/chat/model/chat-response.model.d.ts +9 -0
- package/lib/app/chat/model/chat-session.model.d.ts +12 -0
- package/{projects/doohbot/src/lib/app/chat/model/chat-stream-message.model.ts → lib/app/chat/model/chat-stream-message.model.d.ts} +5 -6
- package/lib/app/chat/model/chat-stream-response.model.d.ts +10 -0
- package/lib/app/chat/services/chat-api.service.d.ts +30 -0
- package/lib/app/chat/services/chat-audio.service.d.ts +19 -0
- package/lib/app/chat/services/chat-history.service.d.ts +53 -0
- package/lib/app/login/login-form.component.d.ts +20 -0
- package/lib/app/personalization/personalization-dialog.component.d.ts +53 -0
- package/lib/app/personalization/personalization.service.d.ts +66 -0
- package/lib/app/personalization/sections/account/account-section.component.d.ts +30 -0
- package/lib/app/personalization/sections/preferences/color-picker-dialog.component.d.ts +17 -0
- package/lib/app/personalization/sections/preferences/preferences-section.component.d.ts +27 -0
- package/lib/app/personalization/sections/profile/profile-section.component.d.ts +17 -0
- package/lib/app/personalization/sections/settings/setting-section.component.d.ts +10 -0
- package/lib/app/personalization/sections/terms/terms-section.component.d.ts +5 -0
- package/lib/constant/doohbot-constant.d.ts +12 -0
- package/lib/constant/html-entities.d.ts +8 -0
- package/lib/constant/utf8.d.ts +9 -0
- package/lib/core/app-const.d.ts +11 -0
- package/lib/core/auth/account-api.service.d.ts +20 -0
- package/lib/core/auth/auth.service.d.ts +90 -0
- package/lib/core/auth/models/auth-result.model.d.ts +4 -0
- package/lib/core/auth/models/federated-login-request.model.d.ts +5 -0
- package/lib/core/auth/models/login-request.model.d.ts +6 -0
- package/lib/core/auth/storage.service.d.ts +21 -0
- package/lib/core/directives/draggable/draggable-dialog.directive.d.ts +23 -0
- package/lib/core/directives/fullscreen/fullscreen.directive.d.ts +14 -0
- package/lib/core/directives/resizable/resizable-dialog.directive.d.ts +30 -0
- package/lib/core/environments/environment.d.ts +7 -0
- package/lib/core/environments/environment.prod.d.ts +7 -0
- package/lib/core/helpers/crypto-helper.service.d.ts +12 -0
- package/lib/core/http/http-stream.service.d.ts +18 -0
- package/lib/core/http/http.service.d.ts +20 -0
- package/lib/core/interceptors/auth.interceptor.d.ts +18 -0
- package/lib/core/interceptors/license.interceptor.d.ts +11 -0
- package/lib/core/models/api-config.model.d.ts +58 -0
- package/lib/core/models/api-request.model.d.ts +77 -0
- package/lib/core/models/api-response.model.d.ts +6 -0
- package/lib/core/models/doohbot-config.model.d.ts +81 -0
- package/{projects/doohbot/src/lib/core/models/license.model.ts → lib/core/models/license.model.d.ts} +23 -27
- package/lib/core/models/message.d.ts +16 -0
- package/lib/core/models/theme-config.model.d.ts +28 -0
- package/lib/core/services/core-config.service.d.ts +23 -0
- package/lib/core/services/license.service.d.ts +33 -0
- package/lib/core/services/markdown.service.d.ts +8 -0
- package/lib/core/services/theme.service.d.ts +40 -0
- package/{projects/doohbot/src/lib/core/types/auth-mode.type.ts → lib/core/types/auth-mode.type.d.ts} +4 -4
- package/{projects/doohbot/src/lib/core/types/auth-status.type.ts → lib/core/types/auth-status.type.d.ts} +4 -5
- package/{projects/doohbot/src/lib/core/types/chat-stream.type.ts → lib/core/types/chat-stream.type.d.ts} +4 -4
- package/{projects/doohbot/src/lib/core/types/message-role.type.ts → lib/core/types/message-role.type.d.ts} +4 -4
- package/{projects/doohbot/src/lib/core/types/prompt-mode.type.ts → lib/core/types/prompt-mode.type.d.ts} +4 -5
- package/{projects/doohbot/src/lib/core/types/snackbar-error.type.ts → lib/core/types/snackbar-error.type.d.ts} +4 -5
- package/{projects/doohbot/src/lib/core/types/tenant-resolution-strategy.type.ts → lib/core/types/tenant-resolution-strategy.type.d.ts} +4 -4
- package/lib/core/utils/logger.service.d.ts +11 -0
- package/lib/doohbot-input.d.ts +19 -0
- package/lib/doohbot.component.d.ts +108 -0
- package/lib/predefined_messages.d.ts +2 -0
- package/lib/shared/chips/chips.component.d.ts +10 -0
- package/lib/shared/dialog/dialog.component.d.ts +19 -0
- package/lib/shared/dialog/dialog.service.d.ts +29 -0
- package/lib/shared/dialog/dialog.utils.d.ts +41 -0
- package/lib/shared/dropdown-menu/dropdown-menu.component.d.ts +11 -0
- package/lib/shared/input-dialog/input-dialog.component.d.ts +20 -0
- package/lib/shared/menu-item/menu-item.component.d.ts +9 -0
- package/lib/shared/pipes/simple-markdown.pipe.d.ts +10 -0
- package/lib/shared/snackbar/snackbar.component.d.ts +14 -0
- package/lib/shared/snackbar/snackbar.service.d.ts +19 -0
- package/{projects/doohbot/src/lib/shared/snackbar/snackbar.utils.ts → lib/shared/snackbar/snackbar.utils.d.ts} +33 -49
- package/package.json +29 -75
- package/public-api.d.ts +11 -0
- package/.editorconfig +0 -17
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -41
- package/.vscode/settings.json +0 -14
- package/.vscode/tasks.json +0 -60
- package/angular.json +0 -132
- package/docs/PUBLISHING_GUIDE.md +0 -104
- package/projects/app-doohbot/public/assets/const/app-const.json +0 -15
- package/projects/app-doohbot/public/assets/const/doohclick_license.json +0 -6
- package/projects/app-doohbot/public/favicon.ico +0 -0
- package/projects/app-doohbot/src/app/app.config.ts +0 -13
- package/projects/app-doohbot/src/app/app.html +0 -31
- package/projects/app-doohbot/src/app/app.routes.ts +0 -3
- package/projects/app-doohbot/src/app/app.scss +0 -279
- package/projects/app-doohbot/src/app/app.spec.ts +0 -23
- package/projects/app-doohbot/src/app/app.ts +0 -72
- package/projects/app-doohbot/src/index.html +0 -15
- package/projects/app-doohbot/src/main.ts +0 -6
- package/projects/app-doohbot/src/styles.scss +0 -15
- package/projects/app-doohbot/tsconfig.app.json +0 -15
- package/projects/app-doohbot/tsconfig.spec.json +0 -14
- package/projects/doohbot/README.md +0 -64
- package/projects/doohbot/docs/README.md +0 -140
- package/projects/doohbot/ng-package.json +0 -10
- package/projects/doohbot/package.json +0 -16
- package/projects/doohbot/src/lib/app/chat/chat-ui-state.service.ts +0 -194
- package/projects/doohbot/src/lib/app/chat/chat.service.ts +0 -547
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.html +0 -27
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.scss +0 -115
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.ts +0 -35
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.html +0 -3
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +0 -20
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.ts +0 -12
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.html +0 -34
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.scss +0 -78
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.ts +0 -52
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.html +0 -77
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.scss +0 -346
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.ts +0 -188
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.html +0 -146
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.scss +0 -187
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.ts +0 -256
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.html +0 -17
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.scss +0 -59
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.ts +0 -28
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.html +0 -138
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.scss +0 -436
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.ts +0 -106
- package/projects/doohbot/src/lib/app/chat/model/chat-history.model.ts +0 -57
- package/projects/doohbot/src/lib/app/chat/model/chat-request.model.ts +0 -17
- package/projects/doohbot/src/lib/app/chat/model/chat-response.model.ts +0 -9
- package/projects/doohbot/src/lib/app/chat/model/chat-session.model.ts +0 -14
- package/projects/doohbot/src/lib/app/chat/model/chat-stream-response.model.ts +0 -12
- package/projects/doohbot/src/lib/app/chat/services/chat-api.service.ts +0 -82
- package/projects/doohbot/src/lib/app/chat/services/chat-audio.service.ts +0 -44
- package/projects/doohbot/src/lib/app/chat/services/chat-history.service.ts +0 -303
- package/projects/doohbot/src/lib/app/login/login-form.component.html +0 -80
- package/projects/doohbot/src/lib/app/login/login-form.component.scss +0 -189
- package/projects/doohbot/src/lib/app/login/login-form.component.ts +0 -45
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.html +0 -81
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.scss +0 -179
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.ts +0 -217
- package/projects/doohbot/src/lib/app/personalization/personalization.service.ts +0 -197
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.html +0 -111
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.scss +0 -218
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.ts +0 -121
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.html +0 -46
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.scss +0 -138
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.ts +0 -28
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/color-picker-dialog.component.ts +0 -92
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.html +0 -198
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +0 -107
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.ts +0 -103
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.html +0 -46
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.scss +0 -131
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.ts +0 -23
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.html +0 -33
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.scss +0 -61
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.ts +0 -20
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.html +0 -30
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.scss +0 -59
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.ts +0 -12
- package/projects/doohbot/src/lib/constant/doohbot-constant.ts +0 -40
- package/projects/doohbot/src/lib/constant/html-entities.ts +0 -8
- package/projects/doohbot/src/lib/constant/utf8.ts +0 -9
- package/projects/doohbot/src/lib/core/app-const.ts +0 -63
- package/projects/doohbot/src/lib/core/auth/account-api.service.ts +0 -53
- package/projects/doohbot/src/lib/core/auth/auth.service.ts +0 -478
- package/projects/doohbot/src/lib/core/auth/models/auth-result.model.ts +0 -4
- package/projects/doohbot/src/lib/core/auth/models/federated-login-request.model.ts +0 -5
- package/projects/doohbot/src/lib/core/auth/models/login-request.model.ts +0 -6
- package/projects/doohbot/src/lib/core/auth/storage.service.ts +0 -113
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.directive.ts +0 -123
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.module.ts +0 -9
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.directive.ts +0 -58
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.module.ts +0 -9
- package/projects/doohbot/src/lib/core/directives/popout/popout.directive.ts +0 -169
- package/projects/doohbot/src/lib/core/directives/popout/popout.module.ts +0 -9
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.directive.ts +0 -197
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.module.ts +0 -9
- package/projects/doohbot/src/lib/core/enums/api-request-state.enum.ts +0 -9
- package/projects/doohbot/src/lib/core/environments/environment.prod.ts +0 -14
- package/projects/doohbot/src/lib/core/environments/environment.ts +0 -14
- package/projects/doohbot/src/lib/core/helpers/crypto-helper.service.ts +0 -72
- package/projects/doohbot/src/lib/core/http/http-stream.service.ts +0 -105
- package/projects/doohbot/src/lib/core/http/http.service.ts +0 -148
- package/projects/doohbot/src/lib/core/interceptors/auth.interceptor.ts +0 -118
- package/projects/doohbot/src/lib/core/interceptors/license.interceptor.ts +0 -50
- package/projects/doohbot/src/lib/core/models/api-config.model.ts +0 -82
- package/projects/doohbot/src/lib/core/models/api-request.model.ts +0 -92
- package/projects/doohbot/src/lib/core/models/api-response.model.ts +0 -13
- package/projects/doohbot/src/lib/core/models/doohbot-config.model.ts +0 -109
- package/projects/doohbot/src/lib/core/models/message.ts +0 -18
- package/projects/doohbot/src/lib/core/models/theme-config.model.ts +0 -48
- package/projects/doohbot/src/lib/core/services/core-config.service.ts +0 -53
- package/projects/doohbot/src/lib/core/services/doohbot-api.service.ts +0 -207
- package/projects/doohbot/src/lib/core/services/license.service.ts +0 -171
- package/projects/doohbot/src/lib/core/services/markdown.service.ts +0 -73
- package/projects/doohbot/src/lib/core/services/theme.service.ts +0 -305
- package/projects/doohbot/src/lib/core/utils/error-handler.util.ts +0 -31
- package/projects/doohbot/src/lib/core/utils/logger.service.ts +0 -45
- package/projects/doohbot/src/lib/doohbot-input.ts +0 -19
- package/projects/doohbot/src/lib/doohbot.component.html +0 -34
- package/projects/doohbot/src/lib/doohbot.component.scss +0 -17
- package/projects/doohbot/src/lib/doohbot.component.spec.ts +0 -31
- package/projects/doohbot/src/lib/doohbot.component.ts +0 -545
- package/projects/doohbot/src/lib/elements.ts +0 -25
- package/projects/doohbot/src/lib/predefined_messages.ts +0 -14
- package/projects/doohbot/src/lib/shared/chips/chips.component.html +0 -9
- package/projects/doohbot/src/lib/shared/chips/chips.component.scss +0 -29
- package/projects/doohbot/src/lib/shared/chips/chips.component.spec.ts +0 -22
- package/projects/doohbot/src/lib/shared/chips/chips.component.ts +0 -20
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.html +0 -29
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.scss +0 -100
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.ts +0 -42
- package/projects/doohbot/src/lib/shared/dialog/dialog.service.ts +0 -62
- package/projects/doohbot/src/lib/shared/dialog/dialog.utils.ts +0 -102
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.html +0 -30
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +0 -53
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.spec.ts +0 -22
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.ts +0 -35
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.html +0 -16
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.scss +0 -45
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.ts +0 -46
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.html +0 -5
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.scss +0 -0
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.spec.ts +0 -22
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.ts +0 -20
- package/projects/doohbot/src/lib/shared/pipes/simple-markdown.pipe.ts +0 -19
- package/projects/doohbot/src/lib/shared/popout/popout.html +0 -1
- package/projects/doohbot/src/lib/shared/popout/popout.scss +0 -0
- package/projects/doohbot/src/lib/shared/popout/popout.spec.ts +0 -23
- package/projects/doohbot/src/lib/shared/popout/popout.ts +0 -11
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.html +0 -7
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.scss +0 -125
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.spec.ts +0 -21
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.ts +0 -44
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.service.ts +0 -54
- package/projects/doohbot/src/lib/styles/_theme.scss +0 -132
- package/projects/doohbot/src/lib/styles/material-override.scss +0 -302
- package/projects/doohbot/src/lib/styles/utility.scss +0 -588
- package/projects/doohbot/src/public-api.ts +0 -42
- package/projects/doohbot/tsconfig.lib.json +0 -15
- package/projects/doohbot/tsconfig.lib.prod.json +0 -11
- package/projects/doohbot/tsconfig.spec.json +0 -10
- package/proxy.conf.json +0 -8
- package/publish.config.js +0 -25
- package/scripts/publishing/index.ts +0 -67
- package/scripts/publishing/pipeline/01-clean.ts +0 -11
- package/scripts/publishing/pipeline/02-validate-pre.ts +0 -8
- package/scripts/publishing/pipeline/03-build.ts +0 -7
- package/scripts/publishing/pipeline/04-validate-post.ts +0 -8
- package/scripts/publishing/pipeline/05-prepare-package.ts +0 -29
- package/scripts/publishing/pipeline/06-version.ts +0 -23
- package/scripts/publishing/pipeline/07-publish.ts +0 -14
- package/scripts/publishing/pipeline/08-cleanup.ts +0 -5
- package/scripts/publishing/types.ts +0 -36
- package/scripts/publishing/utils/command.ts +0 -15
- package/scripts/publishing/utils/config.ts +0 -17
- package/scripts/validate.ts +0 -166
- package/tsconfig.json +0 -45
- package/tsconfig.scripts.json +0 -15
- /package/{projects/doohbot/src → src}/assets/bot.mp3 +0 -0
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
EventEmitter,
|
|
4
|
-
Input,
|
|
5
|
-
Output,
|
|
6
|
-
TrackByFunction,
|
|
7
|
-
OnDestroy,
|
|
8
|
-
OnInit,
|
|
9
|
-
SimpleChanges,
|
|
10
|
-
OnChanges,
|
|
11
|
-
} from '@angular/core';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
14
|
-
import { MatMenuModule } from '@angular/material/menu';
|
|
15
|
-
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
16
|
-
import { MessageListComponent } from '../message-list/message-list.component';
|
|
17
|
-
import { MessageInputComponent } from '../message-input/message-input.component';
|
|
18
|
-
import { inject } from '@angular/core';
|
|
19
|
-
import { ChatHistorySidebarComponent } from '../chat-history-sidebar/chat-history-sidebar.component';
|
|
20
|
-
import { FormsModule } from '@angular/forms';
|
|
21
|
-
import { AuthService } from '../../../../core/auth/auth.service';
|
|
22
|
-
import { DraggableDialogDirective } from '../../../../core/directives/draggable/draggable-dialog.directive';
|
|
23
|
-
import { ResizableDialogDirective } from '../../../../core/directives/resizable/resizable-dialog.directive';
|
|
24
|
-
import { Message } from '../../../../core/models/message';
|
|
25
|
-
import { DoohbotThemeConfig } from '../../../../core/models/theme-config.model';
|
|
26
|
-
import { ThemeService } from '../../../../core/services/theme.service';
|
|
27
|
-
import { ChatHeaderComponent } from '../chat-header/chat-header.component';
|
|
28
|
-
import { LoginFormComponent } from '../../../login/login-form.component';
|
|
29
|
-
import { ChatFooterComponent } from '../chat-footer/chat-footer.component';
|
|
30
|
-
import logger from '../../../../core/utils/logger.service';
|
|
31
|
-
import { Chips } from '../../../../shared/chips/chips.component';
|
|
32
|
-
import { ChatSession } from '../../model/chat-session.model';
|
|
33
|
-
import { PersonalizationDialogComponent } from '../../../personalization/personalization-dialog.component';
|
|
34
|
-
|
|
35
|
-
@Component({
|
|
36
|
-
selector: 'app-chat-window',
|
|
37
|
-
standalone: true,
|
|
38
|
-
imports: [
|
|
39
|
-
CommonModule,
|
|
40
|
-
MatIconModule,
|
|
41
|
-
MatMenuModule,
|
|
42
|
-
Chips,
|
|
43
|
-
MessageListComponent,
|
|
44
|
-
MessageInputComponent,
|
|
45
|
-
DraggableDialogDirective,
|
|
46
|
-
ResizableDialogDirective,
|
|
47
|
-
ChatHistorySidebarComponent,
|
|
48
|
-
ChatHeaderComponent,
|
|
49
|
-
LoginFormComponent,
|
|
50
|
-
ChatFooterComponent,
|
|
51
|
-
FormsModule,
|
|
52
|
-
MatDialogModule,
|
|
53
|
-
],
|
|
54
|
-
templateUrl: './chat-window.component.html',
|
|
55
|
-
styleUrls: ['./chat-window.component.scss'],
|
|
56
|
-
})
|
|
57
|
-
export class ChatWindowComponent implements OnInit, OnDestroy, OnChanges {
|
|
58
|
-
@Input() isChatOpen: boolean = false;
|
|
59
|
-
@Input() enableDrag: boolean = false;
|
|
60
|
-
@Input() enableResize: boolean = false;
|
|
61
|
-
@Input() isFullScreen: boolean = false;
|
|
62
|
-
@Input() isStreaming: boolean = true;
|
|
63
|
-
@Input() isAuthenticated: boolean = false;
|
|
64
|
-
@Input() appTitle: string = '';
|
|
65
|
-
@Input() appLogoUrl: string = '';
|
|
66
|
-
@Input() appTextLogoUrl: string = '';
|
|
67
|
-
@Input() appHeaderLogoUrl: string = '';
|
|
68
|
-
@Input() messages: Message[] = [];
|
|
69
|
-
@Input() isBotTyping: boolean = false;
|
|
70
|
-
@Input() appSubtitle: string = '';
|
|
71
|
-
@Input() welcomeDesc: string = '';
|
|
72
|
-
@Input() predefinedMessages: string[] = [];
|
|
73
|
-
@Input() suggestedMessages: string[] = [];
|
|
74
|
-
@Input() botAvatarUrl: string = '';
|
|
75
|
-
@Input() userAvatarUrl: string = '';
|
|
76
|
-
@Input() userName: string = '';
|
|
77
|
-
@Input() trackByMessageId: TrackByFunction<Message> = (index, item) => item.id ?? index;
|
|
78
|
-
@Input() hintText: string = '';
|
|
79
|
-
@Input() messageError: string | null = null;
|
|
80
|
-
@Input() showSuggestionChips: boolean = false;
|
|
81
|
-
@Input() isHistorySidebarOpen: boolean = false;
|
|
82
|
-
@Input() chatSessions: ChatSession[] = [];
|
|
83
|
-
@Input() chatHistoryUserName: string = 'User';
|
|
84
|
-
|
|
85
|
-
@Input() isLoggingIn: boolean = false;
|
|
86
|
-
@Input() authError: string | null = null;
|
|
87
|
-
@Input() authSuccess: string | null = null;
|
|
88
|
-
@Input() isLoadingSessions: boolean = false;
|
|
89
|
-
@Input() hasMoreSessions: boolean = false;
|
|
90
|
-
@Input() isLoadingMoreSessions: boolean = false;
|
|
91
|
-
@Input() processingSessionId: string | null = null;
|
|
92
|
-
@Input() themeConfig: DoohbotThemeConfig | undefined;
|
|
93
|
-
@Input() buttonStyle: string = 'fab';
|
|
94
|
-
|
|
95
|
-
@Output() toggleChat = new EventEmitter<void>();
|
|
96
|
-
@Output() toggleFullScreen = new EventEmitter<void>();
|
|
97
|
-
@Output() toggleHistorySidebar = new EventEmitter<void>();
|
|
98
|
-
@Output() openSettings = new EventEmitter<void>();
|
|
99
|
-
@Output() suggestionClick = new EventEmitter<string>();
|
|
100
|
-
@Output() send = new EventEmitter<string>();
|
|
101
|
-
@Output() stop = new EventEmitter<void>();
|
|
102
|
-
@Output() clearMessageError = new EventEmitter<void>();
|
|
103
|
-
@Output() clearChat = new EventEmitter<void>();
|
|
104
|
-
@Output() sessionSelected = new EventEmitter<ChatSession>();
|
|
105
|
-
@Output() sessionDeleted = new EventEmitter<string>();
|
|
106
|
-
@Output() loadMoreSessions = new EventEmitter<void>();
|
|
107
|
-
@Output() refreshSessions = new EventEmitter<void>();
|
|
108
|
-
@Output() sessionRenamed = new EventEmitter<{ sessionId: string; newTitle: string }>();
|
|
109
|
-
@Output() deleteAllSessions = new EventEmitter<void>();
|
|
110
|
-
|
|
111
|
-
@Output() loginSubmit = new EventEmitter<{
|
|
112
|
-
username: string;
|
|
113
|
-
password: string;
|
|
114
|
-
rememberMe: boolean;
|
|
115
|
-
}>();
|
|
116
|
-
@Output() logout = new EventEmitter<void>();
|
|
117
|
-
|
|
118
|
-
public themeService = inject(ThemeService);
|
|
119
|
-
public authService = inject(AuthService);
|
|
120
|
-
private dialog = inject(MatDialog);
|
|
121
|
-
|
|
122
|
-
// UI state
|
|
123
|
-
public showLoginForm = false;
|
|
124
|
-
|
|
125
|
-
public get canDrag(): boolean {
|
|
126
|
-
return this.enableDrag && this.buttonStyle === 'fab' && !this.isFullScreen;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
public get canResize(): boolean {
|
|
130
|
-
return this.enableResize && this.buttonStyle === 'fab' && !this.isFullScreen;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
constructor() {}
|
|
134
|
-
|
|
135
|
-
onToggleChat() {
|
|
136
|
-
this.toggleChat.emit();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
onToggleHistorySidebar() {
|
|
140
|
-
logger.log('History button clicked!');
|
|
141
|
-
this.toggleHistorySidebar.emit();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
onLoginClick() {
|
|
145
|
-
this.showLoginForm = true;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
onLoginSubmit(credentials: { username: string; password: string; rememberMe: boolean }) {
|
|
149
|
-
this.loginSubmit.emit(credentials);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
onCancelLogin() {
|
|
153
|
-
this.showLoginForm = false;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
onToggleFullScreen() {
|
|
157
|
-
this.toggleFullScreen.emit();
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
onOpenSettings() {
|
|
161
|
-
this.openSettings.emit();
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
onOpenPersonalization() {
|
|
165
|
-
this.dialog.open(PersonalizationDialogComponent, {
|
|
166
|
-
width: '1100px',
|
|
167
|
-
height: '700px',
|
|
168
|
-
maxWidth: '95vw',
|
|
169
|
-
panelClass: 'personalization-dialog-panel',
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
onSuggestionClick(text: string) {
|
|
174
|
-
this.suggestionClick.emit(text);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
onSend(text: string) {
|
|
178
|
-
this.send.emit(text);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
onStop() {
|
|
182
|
-
this.stop.emit();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
onClearMessageError() {
|
|
186
|
-
this.messageError = null;
|
|
187
|
-
this.clearMessageError.emit();
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
onClearAuthError() {
|
|
191
|
-
this.clearMessageError.emit();
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
onClearChat() {
|
|
195
|
-
this.clearChat.emit();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
onLogout() {
|
|
199
|
-
this.logout.emit();
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
onSessionSelected(session: ChatSession) {
|
|
203
|
-
this.sessionSelected.emit(session);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
onSessionDeleted(sessionId: string) {
|
|
207
|
-
this.sessionDeleted.emit(sessionId);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
onSessionRenamed(event: { sessionId: string; newTitle: string }) {
|
|
211
|
-
this.sessionRenamed.emit(event);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
onDeleteAllSessions() {
|
|
215
|
-
this.deleteAllSessions.emit();
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
onPopoutShown(win: Window) {
|
|
219
|
-
// Apply theme classes
|
|
220
|
-
const activeTheme = this.themeService.activeTheme();
|
|
221
|
-
logger.log('Popout shown, applying theme:', activeTheme);
|
|
222
|
-
|
|
223
|
-
const body = win.document.body;
|
|
224
|
-
// We cannot use renderer easily on another document without custom renderer factory,
|
|
225
|
-
// but native DOM manipulation is fine here since it's a separate window object.
|
|
226
|
-
body.classList.remove('light-theme', 'dark-theme');
|
|
227
|
-
body.classList.add(activeTheme);
|
|
228
|
-
|
|
229
|
-
// Apply CSS variables
|
|
230
|
-
this.themeService.applyCssVariables(body, this.themeConfig);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
ngOnInit() {
|
|
234
|
-
// Initialization logic if needed
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
238
|
-
//? Handle authentication status changes
|
|
239
|
-
if (changes['isAuthenticated']) {
|
|
240
|
-
if (this.isAuthenticated) {
|
|
241
|
-
this.showLoginForm = false;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
//? Handle logging in status changes
|
|
246
|
-
if (changes['isLoggingIn']) {
|
|
247
|
-
if (this.isLoggingIn) {
|
|
248
|
-
this.showLoginForm = false;
|
|
249
|
-
} else if (!this.isAuthenticated && !changes['isLoggingIn'].firstChange) {
|
|
250
|
-
this.showLoginForm = true;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
ngOnDestroy() {}
|
|
256
|
-
}
|
package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.html
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<!-- Chat Input -->
|
|
2
|
-
<div class="chat-input">
|
|
3
|
-
<div class="input-wrapper">
|
|
4
|
-
<input #messageInput type="text" [disabled]="isBotTyping" (keydown.enter)="
|
|
5
|
-
!isBotTyping && onSend(messageInput.value); !isBotTyping && (messageInput.value = '')
|
|
6
|
-
" [placeholder]="hintText" />
|
|
7
|
-
|
|
8
|
-
<button (click)="
|
|
9
|
-
isBotTyping ? onStop() : onSend(messageInput.value);
|
|
10
|
-
!isBotTyping && (messageInput.value = '')
|
|
11
|
-
">
|
|
12
|
-
<mat-icon [class.stop-icon]="isBotTyping">{{
|
|
13
|
-
isBotTyping ? 'stop_circle' : 'send'
|
|
14
|
-
}}</mat-icon>
|
|
15
|
-
</button>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.scss
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/* Chat input */
|
|
2
|
-
:host {
|
|
3
|
-
display: block;
|
|
4
|
-
width: 100%;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.chat-input {
|
|
8
|
-
display: flex;
|
|
9
|
-
padding: 10px;
|
|
10
|
-
border-top: 1px solid var(--border-top-color);
|
|
11
|
-
background-color: var(--background-color);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.chat-input .input-wrapper {
|
|
15
|
-
position: relative;
|
|
16
|
-
flex-grow: 1;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.chat-input input {
|
|
20
|
-
width: 100%;
|
|
21
|
-
background-color: var(--background-color);
|
|
22
|
-
border: 1px solid var(--border-color);
|
|
23
|
-
border-radius: 16px;
|
|
24
|
-
padding: 10px 50px 10px 15px;
|
|
25
|
-
/* Extra right padding to make room for the button */
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
color: var(--text-color);
|
|
28
|
-
caret-color: var(--hint-text-color);
|
|
29
|
-
font-family: var(--font-family);
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
|
|
32
|
-
&::placeholder {
|
|
33
|
-
color: var(--hint-text-color);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:focus {
|
|
37
|
-
border-color: var(--primary-color);
|
|
38
|
-
outline: none;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.chat-input button {
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 5px;
|
|
45
|
-
top: 50%;
|
|
46
|
-
transform: translateY(-50%);
|
|
47
|
-
background-color: transparent;
|
|
48
|
-
color: var(--primary-color);
|
|
49
|
-
border: none;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
display: flex;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
align-items: center;
|
|
54
|
-
// z-index: 2;
|
|
55
|
-
|
|
56
|
-
.stop-icon {
|
|
57
|
-
color: var(--red);
|
|
58
|
-
}
|
|
59
|
-
}
|
package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'app-message-input',
|
|
7
|
-
standalone: true,
|
|
8
|
-
imports: [CommonModule, MatIconModule],
|
|
9
|
-
templateUrl: './message-input.component.html',
|
|
10
|
-
styleUrls: ['./message-input.component.scss'],
|
|
11
|
-
})
|
|
12
|
-
export class MessageInputComponent {
|
|
13
|
-
@Input() isBotTyping: boolean = false;
|
|
14
|
-
@Input() hintText: string = 'Type a message...';
|
|
15
|
-
|
|
16
|
-
@Output() send = new EventEmitter<string>();
|
|
17
|
-
@Output() stop = new EventEmitter<void>();
|
|
18
|
-
|
|
19
|
-
onSend(text: string) {
|
|
20
|
-
if (text.trim()) {
|
|
21
|
-
this.send.emit(text);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
onStop() {
|
|
26
|
-
this.stop.emit();
|
|
27
|
-
}
|
|
28
|
-
}
|
package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.html
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
<div #chatMessages class="chat-messages">
|
|
2
|
-
<!-- Welcome Screen -->
|
|
3
|
-
@if (messages.length === 0 && !isBotTyping) {
|
|
4
|
-
<div class="welcome-screen">
|
|
5
|
-
<img [src]="appLogoUrl" alt="Welcome" class="welcome-image" style="border-radius: 0px" />
|
|
6
|
-
|
|
7
|
-
<!-- Only show greeting if authenticated -->
|
|
8
|
-
@if (userName && isAuthenticated) {
|
|
9
|
-
<div class="marquee-container">
|
|
10
|
-
<h2 class="welcome-greeting marquee-text">
|
|
11
|
-
Hi, {{ userName }}!
|
|
12
|
-
<span class="emoji">{{ appEmoji.waveHand }}</span>
|
|
13
|
-
</h2>
|
|
14
|
-
</div>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
<h3>{{ appSubtitle }}</h3>
|
|
18
|
-
<p>{{ welcomeDesc }}</p>
|
|
19
|
-
|
|
20
|
-
<!-- Predefined messages chips: Only show when authenticated -->
|
|
21
|
-
@if (isAuthenticated) {
|
|
22
|
-
<app-chips
|
|
23
|
-
[messages]="predefinedMessages"
|
|
24
|
-
[disabled]="isBotTyping"
|
|
25
|
-
(chipClick)="onPredefinedClick($event)"
|
|
26
|
-
></app-chips>
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@if (!isAuthenticated) {
|
|
30
|
-
<div class="auth-buttons-container" style="margin-top: 20px">
|
|
31
|
-
<button (click)="loginClick.emit()" class="auth-btn primary" [disabled]="isLoggingIn">
|
|
32
|
-
{{ isLoggingIn ? 'Logging in...' : 'Login' }}
|
|
33
|
-
</button>
|
|
34
|
-
</div>
|
|
35
|
-
}
|
|
36
|
-
</div>
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
<!-- Chat Messages -->
|
|
40
|
-
<div
|
|
41
|
-
*ngFor="let message of messages; trackBy: trackByMessageId"
|
|
42
|
-
class="message"
|
|
43
|
-
[class.user]="message.sender === 'user'"
|
|
44
|
-
[class.assistant]="message.sender === 'assistant'"
|
|
45
|
-
[class.streaming]="!message.completed && message.sender === 'assistant'"
|
|
46
|
-
>
|
|
47
|
-
<!-- Avatar (Assistant on Left) -->
|
|
48
|
-
@if (message.sender === 'assistant') {
|
|
49
|
-
<div class="avatar-container">
|
|
50
|
-
<img class="assistant-avatar" [src]="botAvatarUrl" alt="Bot Avatar" />
|
|
51
|
-
</div>
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
<!-- Message Bubble -->
|
|
55
|
-
<div class="message-content">
|
|
56
|
-
<!-- User chat bubble -->
|
|
57
|
-
@if (message.sender === 'user') {
|
|
58
|
-
<div class="user">
|
|
59
|
-
<span>{{ message.text }}</span>
|
|
60
|
-
<button class="copy-btn" (click)="copyMessage(message)" title="Copy message">
|
|
61
|
-
<mat-icon>{{ message.copied ? 'check' : 'content_copy' }}</mat-icon>
|
|
62
|
-
</button>
|
|
63
|
-
</div>
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
<!-- Assistant chat bubble -->
|
|
67
|
-
@if (message.sender === 'assistant') {
|
|
68
|
-
<div class="assistant">
|
|
69
|
-
@if (isStreaming && !message.isHistory) {
|
|
70
|
-
<!-- Show text/chunks if they exist -->
|
|
71
|
-
@if (message.chunks && message.chunks.length > 0) {
|
|
72
|
-
<span
|
|
73
|
-
*ngFor="let chunk of message.chunks; let i = index"
|
|
74
|
-
class="markdown-content"
|
|
75
|
-
[attr.data-index]="i"
|
|
76
|
-
[innerHTML]="chunk | Markdown"
|
|
77
|
-
></span>
|
|
78
|
-
} @else if (!message.completed) {
|
|
79
|
-
<div class="typing-indicator">
|
|
80
|
-
<span></span>
|
|
81
|
-
<span></span>
|
|
82
|
-
<span></span>
|
|
83
|
-
</div>
|
|
84
|
-
}
|
|
85
|
-
} @else {
|
|
86
|
-
<!-- Non-streaming or history -->
|
|
87
|
-
@if (message.text) {
|
|
88
|
-
<span class="markdown-content" [innerHTML]="message.text | Markdown"></span>
|
|
89
|
-
} @else if (!message.completed) {
|
|
90
|
-
<div class="typing-indicator">
|
|
91
|
-
<span></span>
|
|
92
|
-
<span></span>
|
|
93
|
-
<span></span>
|
|
94
|
-
</div>
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
@if (message.completed) {
|
|
98
|
-
<button class="copy-btn" (click)="copyMessage(message)" title="Copy message">
|
|
99
|
-
<mat-icon>{{ message.copied ? 'check' : 'content_copy' }}</mat-icon>
|
|
100
|
-
</button>
|
|
101
|
-
}
|
|
102
|
-
</div>
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
<!-- Show time below message -->
|
|
106
|
-
@if (message.sender === 'assistant' && message.completed) {
|
|
107
|
-
<div class="message-time">
|
|
108
|
-
{{ message.timestamp | date: 'shortTime' }}
|
|
109
|
-
</div>
|
|
110
|
-
}
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<!-- Avatar (User on Right) -->
|
|
114
|
-
@if (message.sender === 'user') {
|
|
115
|
-
<div class="avatar-container">
|
|
116
|
-
<img class="user-avatar" [src]="userAvatarUrl" alt="User Avatar" />
|
|
117
|
-
</div>
|
|
118
|
-
}
|
|
119
|
-
</div>
|
|
120
|
-
|
|
121
|
-
<!-- Standalone Typing Indicator (Fallback if no message added yet) -->
|
|
122
|
-
@if (isBotTyping && messages[messages.length - 1]?.sender !== 'assistant') {
|
|
123
|
-
<div class="message assistant">
|
|
124
|
-
<div class="avatar-container">
|
|
125
|
-
<img class="assistant-avatar" [src]="botAvatarUrl" alt="Bot Avatar" />
|
|
126
|
-
</div>
|
|
127
|
-
<div class="message-content">
|
|
128
|
-
<div class="assistant">
|
|
129
|
-
<div class="typing-indicator">
|
|
130
|
-
<span></span>
|
|
131
|
-
<span></span>
|
|
132
|
-
<span></span>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</div>
|
|
137
|
-
}
|
|
138
|
-
</div>
|