@aakash58/chatbot 1.1.19 → 1.1.21
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/.editorconfig +17 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +41 -0
- package/.vscode/settings.json +14 -0
- package/.vscode/tasks.json +60 -0
- package/README.md +298 -22
- package/angular.json +132 -0
- package/docs/PUBLISHING_GUIDE.md +104 -0
- package/package.json +75 -29
- package/projects/app-doohbot/public/assets/const/app-const.json +15 -0
- package/projects/app-doohbot/public/assets/const/doohclick_license.json +6 -0
- package/projects/app-doohbot/public/favicon.ico +0 -0
- package/projects/app-doohbot/src/app/app.config.ts +13 -0
- package/projects/app-doohbot/src/app/app.html +31 -0
- package/projects/app-doohbot/src/app/app.routes.ts +3 -0
- package/projects/app-doohbot/src/app/app.scss +279 -0
- package/projects/app-doohbot/src/app/app.spec.ts +23 -0
- package/projects/app-doohbot/src/app/app.ts +72 -0
- package/projects/app-doohbot/src/index.html +15 -0
- package/projects/app-doohbot/src/main.ts +6 -0
- package/projects/app-doohbot/src/styles.scss +15 -0
- package/projects/app-doohbot/tsconfig.app.json +15 -0
- package/projects/app-doohbot/tsconfig.spec.json +14 -0
- package/projects/doohbot/README.md +64 -0
- package/projects/doohbot/docs/README.md +140 -0
- package/projects/doohbot/ng-package.json +10 -0
- package/projects/doohbot/package.json +16 -0
- package/projects/doohbot/src/lib/app/chat/chat-ui-state.service.ts +194 -0
- package/projects/doohbot/src/lib/app/chat/chat.service.ts +547 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.html +27 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.scss +115 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-button/chat-button.component.ts +35 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.html +3 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.scss +20 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-footer/chat-footer.component.ts +12 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.html +34 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.scss +78 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-header/chat-header.component.ts +52 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.html +77 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.scss +346 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.ts +188 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.html +146 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.scss +187 -0
- package/projects/doohbot/src/lib/app/chat/components/chat-window/chat-window.component.ts +256 -0
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.html +17 -0
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.scss +59 -0
- package/projects/doohbot/src/lib/app/chat/components/message-input/message-input.component.ts +28 -0
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.html +138 -0
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.scss +436 -0
- package/projects/doohbot/src/lib/app/chat/components/message-list/message-list.component.ts +106 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-history.model.ts +57 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-request.model.ts +17 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-response.model.ts +9 -0
- package/projects/doohbot/src/lib/app/chat/model/chat-session.model.ts +14 -0
- package/{lib/app/chat/model/chat-stream-message.model.d.ts → projects/doohbot/src/lib/app/chat/model/chat-stream-message.model.ts} +6 -5
- package/projects/doohbot/src/lib/app/chat/model/chat-stream-response.model.ts +12 -0
- package/projects/doohbot/src/lib/app/chat/services/chat-api.service.ts +82 -0
- package/projects/doohbot/src/lib/app/chat/services/chat-audio.service.ts +44 -0
- package/projects/doohbot/src/lib/app/chat/services/chat-history.service.ts +303 -0
- package/projects/doohbot/src/lib/app/login/login-form.component.html +80 -0
- package/projects/doohbot/src/lib/app/login/login-form.component.scss +189 -0
- package/projects/doohbot/src/lib/app/login/login-form.component.ts +45 -0
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.html +81 -0
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.scss +179 -0
- package/projects/doohbot/src/lib/app/personalization/personalization-dialog.component.ts +217 -0
- package/projects/doohbot/src/lib/app/personalization/personalization.service.ts +197 -0
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.html +111 -0
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.scss +218 -0
- package/projects/doohbot/src/lib/app/personalization/sections/account/account-section.component.ts +121 -0
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.html +46 -0
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.scss +138 -0
- package/projects/doohbot/src/lib/app/personalization/sections/instructions/instructions-section.component.ts +28 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/color-picker-dialog.component.ts +92 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.html +198 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.scss +107 -0
- package/projects/doohbot/src/lib/app/personalization/sections/preferences/preferences-section.component.ts +103 -0
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.html +46 -0
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.scss +131 -0
- package/projects/doohbot/src/lib/app/personalization/sections/profile/profile-section.component.ts +23 -0
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.html +33 -0
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.scss +61 -0
- package/projects/doohbot/src/lib/app/personalization/sections/settings/setting-section.component.ts +20 -0
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.html +30 -0
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.scss +59 -0
- package/projects/doohbot/src/lib/app/personalization/sections/terms/terms-section.component.ts +12 -0
- package/projects/doohbot/src/lib/constant/doohbot-constant.ts +40 -0
- package/projects/doohbot/src/lib/constant/html-entities.ts +8 -0
- package/projects/doohbot/src/lib/constant/utf8.ts +9 -0
- package/projects/doohbot/src/lib/core/app-const.ts +63 -0
- package/projects/doohbot/src/lib/core/auth/account-api.service.ts +53 -0
- package/projects/doohbot/src/lib/core/auth/auth.service.ts +478 -0
- package/projects/doohbot/src/lib/core/auth/models/auth-result.model.ts +4 -0
- package/projects/doohbot/src/lib/core/auth/models/federated-login-request.model.ts +5 -0
- package/projects/doohbot/src/lib/core/auth/models/login-request.model.ts +6 -0
- package/projects/doohbot/src/lib/core/auth/storage.service.ts +113 -0
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.directive.ts +123 -0
- package/projects/doohbot/src/lib/core/directives/draggable/draggable-dialog.module.ts +9 -0
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.directive.ts +58 -0
- package/projects/doohbot/src/lib/core/directives/fullscreen/fullscreen.module.ts +9 -0
- package/projects/doohbot/src/lib/core/directives/popout/popout.directive.ts +169 -0
- package/projects/doohbot/src/lib/core/directives/popout/popout.module.ts +9 -0
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.directive.ts +197 -0
- package/projects/doohbot/src/lib/core/directives/resizable/resizable-dialog.module.ts +9 -0
- package/projects/doohbot/src/lib/core/enums/api-request-state.enum.ts +9 -0
- package/projects/doohbot/src/lib/core/environments/environment.prod.ts +14 -0
- package/projects/doohbot/src/lib/core/environments/environment.ts +14 -0
- package/projects/doohbot/src/lib/core/helpers/crypto-helper.service.ts +72 -0
- package/projects/doohbot/src/lib/core/http/http-stream.service.ts +105 -0
- package/projects/doohbot/src/lib/core/http/http.service.ts +148 -0
- package/projects/doohbot/src/lib/core/interceptors/auth.interceptor.ts +118 -0
- package/projects/doohbot/src/lib/core/interceptors/license.interceptor.ts +50 -0
- package/projects/doohbot/src/lib/core/models/api-config.model.ts +82 -0
- package/projects/doohbot/src/lib/core/models/api-request.model.ts +92 -0
- package/projects/doohbot/src/lib/core/models/api-response.model.ts +13 -0
- package/projects/doohbot/src/lib/core/models/doohbot-config.model.ts +109 -0
- package/{lib/core/models/license.model.d.ts → projects/doohbot/src/lib/core/models/license.model.ts} +27 -23
- package/projects/doohbot/src/lib/core/models/message.ts +18 -0
- package/projects/doohbot/src/lib/core/models/theme-config.model.ts +48 -0
- package/projects/doohbot/src/lib/core/services/core-config.service.ts +53 -0
- package/projects/doohbot/src/lib/core/services/doohbot-api.service.ts +207 -0
- package/projects/doohbot/src/lib/core/services/license.service.ts +171 -0
- package/projects/doohbot/src/lib/core/services/markdown.service.ts +73 -0
- package/projects/doohbot/src/lib/core/services/theme.service.ts +305 -0
- package/{lib/core/types/auth-mode.type.d.ts → projects/doohbot/src/lib/core/types/auth-mode.type.ts} +4 -4
- package/{lib/core/types/auth-status.type.d.ts → projects/doohbot/src/lib/core/types/auth-status.type.ts} +5 -4
- package/{lib/core/types/chat-stream.type.d.ts → projects/doohbot/src/lib/core/types/chat-stream.type.ts} +4 -4
- package/{lib/core/types/message-role.type.d.ts → projects/doohbot/src/lib/core/types/message-role.type.ts} +4 -4
- package/{lib/core/types/prompt-mode.type.d.ts → projects/doohbot/src/lib/core/types/prompt-mode.type.ts} +5 -4
- package/{lib/core/types/snackbar-error.type.d.ts → projects/doohbot/src/lib/core/types/snackbar-error.type.ts} +5 -4
- package/{lib/core/types/tenant-resolution-strategy.type.d.ts → projects/doohbot/src/lib/core/types/tenant-resolution-strategy.type.ts} +4 -4
- package/projects/doohbot/src/lib/core/utils/error-handler.util.ts +31 -0
- package/projects/doohbot/src/lib/core/utils/logger.service.ts +45 -0
- package/projects/doohbot/src/lib/doohbot-input.ts +19 -0
- package/projects/doohbot/src/lib/doohbot.component.html +34 -0
- package/projects/doohbot/src/lib/doohbot.component.scss +17 -0
- package/projects/doohbot/src/lib/doohbot.component.spec.ts +31 -0
- package/projects/doohbot/src/lib/doohbot.component.ts +545 -0
- package/projects/doohbot/src/lib/elements.ts +25 -0
- package/projects/doohbot/src/lib/predefined_messages.ts +14 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.html +9 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.scss +29 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.spec.ts +22 -0
- package/projects/doohbot/src/lib/shared/chips/chips.component.ts +20 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.html +29 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.scss +100 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.component.ts +42 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.service.ts +62 -0
- package/projects/doohbot/src/lib/shared/dialog/dialog.utils.ts +102 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.html +30 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.scss +53 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.spec.ts +22 -0
- package/projects/doohbot/src/lib/shared/dropdown-menu/dropdown-menu.component.ts +35 -0
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.html +16 -0
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.scss +45 -0
- package/projects/doohbot/src/lib/shared/input-dialog/input-dialog.component.ts +46 -0
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.html +5 -0
- 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 +22 -0
- package/projects/doohbot/src/lib/shared/menu-item/menu-item.component.ts +20 -0
- package/projects/doohbot/src/lib/shared/pipes/simple-markdown.pipe.ts +19 -0
- package/projects/doohbot/src/lib/shared/popout/popout.html +1 -0
- package/projects/doohbot/src/lib/shared/popout/popout.scss +0 -0
- package/projects/doohbot/src/lib/shared/popout/popout.spec.ts +23 -0
- package/projects/doohbot/src/lib/shared/popout/popout.ts +11 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.html +7 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.scss +125 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.spec.ts +21 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.component.ts +44 -0
- package/projects/doohbot/src/lib/shared/snackbar/snackbar.service.ts +54 -0
- package/{lib/shared/snackbar/snackbar.utils.d.ts → projects/doohbot/src/lib/shared/snackbar/snackbar.utils.ts} +49 -33
- package/projects/doohbot/src/lib/styles/_theme.scss +132 -0
- package/projects/doohbot/src/lib/styles/material-override.scss +302 -0
- package/projects/doohbot/src/lib/styles/utility.scss +588 -0
- package/projects/doohbot/src/public-api.ts +42 -0
- package/projects/doohbot/tsconfig.lib.json +15 -0
- package/projects/doohbot/tsconfig.lib.prod.json +11 -0
- package/projects/doohbot/tsconfig.spec.json +10 -0
- package/proxy.conf.json +8 -0
- package/publish.config.js +25 -0
- package/scripts/publishing/index.ts +67 -0
- package/scripts/publishing/pipeline/01-clean.ts +11 -0
- package/scripts/publishing/pipeline/02-validate-pre.ts +8 -0
- package/scripts/publishing/pipeline/03-build.ts +7 -0
- package/scripts/publishing/pipeline/04-validate-post.ts +8 -0
- package/scripts/publishing/pipeline/05-prepare-package.ts +29 -0
- package/scripts/publishing/pipeline/06-version.ts +23 -0
- package/scripts/publishing/pipeline/07-publish.ts +14 -0
- package/scripts/publishing/pipeline/08-cleanup.ts +5 -0
- package/scripts/publishing/types.ts +36 -0
- package/scripts/publishing/utils/command.ts +15 -0
- package/scripts/publishing/utils/config.ts +17 -0
- package/scripts/validate.ts +166 -0
- package/tsconfig.json +45 -0
- package/tsconfig.scripts.json +15 -0
- package/esm2022/aakash58-chatbot.mjs +0 -5
- package/esm2022/lib/app/chat/chat-ui-state.service.mjs +0 -170
- package/esm2022/lib/app/chat/chat.service.mjs +0 -445
- package/esm2022/lib/app/chat/components/chat-button/chat-button.component.mjs +0 -50
- package/esm2022/lib/app/chat/components/chat-footer/chat-footer.component.mjs +0 -12
- package/esm2022/lib/app/chat/components/chat-header/chat-header.component.mjs +0 -66
- package/esm2022/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.mjs +0 -186
- package/esm2022/lib/app/chat/components/chat-window/chat-window.component.mjs +0 -312
- package/esm2022/lib/app/chat/components/message-input/message-input.component.mjs +0 -36
- package/esm2022/lib/app/chat/components/message-list/message-list.component.mjs +0 -115
- package/esm2022/lib/app/chat/model/chat-history.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-request.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-response.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-session.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-stream-message.model.mjs +0 -2
- package/esm2022/lib/app/chat/model/chat-stream-response.model.mjs +0 -2
- package/esm2022/lib/app/chat/services/chat-api.service.mjs +0 -61
- package/esm2022/lib/app/chat/services/chat-audio.service.mjs +0 -50
- package/esm2022/lib/app/chat/services/chat-history.service.mjs +0 -252
- package/esm2022/lib/app/login/login-form.component.mjs +0 -46
- package/esm2022/lib/app/personalization/personalization-dialog.component.mjs +0 -194
- package/esm2022/lib/app/personalization/personalization.service.mjs +0 -149
- package/esm2022/lib/app/personalization/sections/account/account-section.component.mjs +0 -122
- package/esm2022/lib/app/personalization/sections/preferences/color-picker-dialog.component.mjs +0 -86
- package/esm2022/lib/app/personalization/sections/preferences/preferences-section.component.mjs +0 -115
- package/esm2022/lib/app/personalization/sections/profile/profile-section.component.mjs +0 -29
- package/esm2022/lib/app/personalization/sections/settings/setting-section.component.mjs +0 -30
- package/esm2022/lib/app/personalization/sections/terms/terms-section.component.mjs +0 -12
- package/esm2022/lib/constant/doohbot-constant.mjs +0 -28
- package/esm2022/lib/constant/html-entities.mjs +0 -9
- package/esm2022/lib/constant/utf8.mjs +0 -10
- package/esm2022/lib/core/app-const.mjs +0 -61
- package/esm2022/lib/core/auth/account-api.service.mjs +0 -40
- package/esm2022/lib/core/auth/auth.service.mjs +0 -391
- package/esm2022/lib/core/auth/models/auth-result.model.mjs +0 -3
- package/esm2022/lib/core/auth/models/federated-login-request.model.mjs +0 -6
- package/esm2022/lib/core/auth/models/login-request.model.mjs +0 -6
- package/esm2022/lib/core/auth/storage.service.mjs +0 -110
- package/esm2022/lib/core/directives/draggable/draggable-dialog.directive.mjs +0 -112
- package/esm2022/lib/core/directives/fullscreen/fullscreen.directive.mjs +0 -55
- package/esm2022/lib/core/directives/resizable/resizable-dialog.directive.mjs +0 -179
- package/esm2022/lib/core/environments/environment.mjs +0 -15
- package/esm2022/lib/core/environments/environment.prod.mjs +0 -15
- package/esm2022/lib/core/helpers/crypto-helper.service.mjs +0 -52
- package/esm2022/lib/core/http/http-stream.service.mjs +0 -97
- package/esm2022/lib/core/http/http.service.mjs +0 -103
- package/esm2022/lib/core/interceptors/auth.interceptor.mjs +0 -96
- package/esm2022/lib/core/interceptors/license.interceptor.mjs +0 -44
- package/esm2022/lib/core/models/api-config.model.mjs +0 -18
- package/esm2022/lib/core/models/api-request.model.mjs +0 -2
- package/esm2022/lib/core/models/api-response.model.mjs +0 -8
- package/esm2022/lib/core/models/doohbot-config.model.mjs +0 -18
- package/esm2022/lib/core/models/license.model.mjs +0 -2
- package/esm2022/lib/core/models/message.mjs +0 -2
- package/esm2022/lib/core/models/theme-config.model.mjs +0 -2
- package/esm2022/lib/core/services/core-config.service.mjs +0 -52
- package/esm2022/lib/core/services/license.service.mjs +0 -145
- package/esm2022/lib/core/services/markdown.service.mjs +0 -64
- package/esm2022/lib/core/services/theme.service.mjs +0 -248
- package/esm2022/lib/core/types/auth-mode.type.mjs +0 -2
- package/esm2022/lib/core/types/auth-status.type.mjs +0 -5
- package/esm2022/lib/core/types/chat-stream.type.mjs +0 -2
- package/esm2022/lib/core/types/message-role.type.mjs +0 -2
- package/esm2022/lib/core/types/prompt-mode.type.mjs +0 -5
- package/esm2022/lib/core/types/snackbar-error.type.mjs +0 -5
- package/esm2022/lib/core/types/tenant-resolution-strategy.type.mjs +0 -2
- package/esm2022/lib/core/utils/logger.service.mjs +0 -42
- package/esm2022/lib/doohbot-input.mjs +0 -20
- package/esm2022/lib/doohbot.component.mjs +0 -444
- package/esm2022/lib/predefined_messages.mjs +0 -15
- package/esm2022/lib/shared/chips/chips.component.mjs +0 -28
- package/esm2022/lib/shared/dialog/dialog.component.mjs +0 -36
- package/esm2022/lib/shared/dialog/dialog.service.mjs +0 -64
- package/esm2022/lib/shared/dialog/dialog.utils.mjs +0 -85
- package/esm2022/lib/shared/dropdown-menu/dropdown-menu.component.mjs +0 -29
- package/esm2022/lib/shared/input-dialog/input-dialog.component.mjs +0 -38
- package/esm2022/lib/shared/menu-item/menu-item.component.mjs +0 -24
- package/esm2022/lib/shared/pipes/simple-markdown.pipe.mjs +0 -27
- package/esm2022/lib/shared/snackbar/snackbar.component.mjs +0 -43
- package/esm2022/lib/shared/snackbar/snackbar.service.mjs +0 -46
- package/esm2022/lib/shared/snackbar/snackbar.utils.mjs +0 -43
- package/esm2022/public-api.mjs +0 -37
- package/fesm2022/aakash58-chatbot.mjs +0 -5193
- package/fesm2022/aakash58-chatbot.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/app/chat/chat-ui-state.service.d.ts +0 -96
- package/lib/app/chat/chat.service.d.ts +0 -88
- package/lib/app/chat/components/chat-button/chat-button.component.d.ts +0 -16
- package/lib/app/chat/components/chat-footer/chat-footer.component.d.ts +0 -5
- package/lib/app/chat/components/chat-header/chat-header.component.d.ts +0 -24
- package/lib/app/chat/components/chat-history-sidebar/chat-history-sidebar.component.d.ts +0 -49
- package/lib/app/chat/components/chat-window/chat-window.component.d.ts +0 -107
- package/lib/app/chat/components/message-input/message-input.component.d.ts +0 -12
- package/lib/app/chat/components/message-list/message-list.component.d.ts +0 -40
- package/lib/app/chat/model/chat-history.model.d.ts +0 -51
- package/lib/app/chat/model/chat-request.model.d.ts +0 -10
- package/lib/app/chat/model/chat-response.model.d.ts +0 -9
- package/lib/app/chat/model/chat-session.model.d.ts +0 -12
- package/lib/app/chat/model/chat-stream-response.model.d.ts +0 -10
- package/lib/app/chat/services/chat-api.service.d.ts +0 -30
- package/lib/app/chat/services/chat-audio.service.d.ts +0 -19
- package/lib/app/chat/services/chat-history.service.d.ts +0 -53
- package/lib/app/login/login-form.component.d.ts +0 -20
- package/lib/app/personalization/personalization-dialog.component.d.ts +0 -53
- package/lib/app/personalization/personalization.service.d.ts +0 -66
- package/lib/app/personalization/sections/account/account-section.component.d.ts +0 -30
- package/lib/app/personalization/sections/preferences/color-picker-dialog.component.d.ts +0 -17
- package/lib/app/personalization/sections/preferences/preferences-section.component.d.ts +0 -27
- package/lib/app/personalization/sections/profile/profile-section.component.d.ts +0 -17
- package/lib/app/personalization/sections/settings/setting-section.component.d.ts +0 -10
- package/lib/app/personalization/sections/terms/terms-section.component.d.ts +0 -5
- package/lib/constant/doohbot-constant.d.ts +0 -12
- package/lib/constant/html-entities.d.ts +0 -8
- package/lib/constant/utf8.d.ts +0 -9
- package/lib/core/app-const.d.ts +0 -11
- package/lib/core/auth/account-api.service.d.ts +0 -20
- package/lib/core/auth/auth.service.d.ts +0 -90
- package/lib/core/auth/models/auth-result.model.d.ts +0 -4
- package/lib/core/auth/models/federated-login-request.model.d.ts +0 -5
- package/lib/core/auth/models/login-request.model.d.ts +0 -6
- package/lib/core/auth/storage.service.d.ts +0 -21
- package/lib/core/directives/draggable/draggable-dialog.directive.d.ts +0 -23
- package/lib/core/directives/fullscreen/fullscreen.directive.d.ts +0 -14
- package/lib/core/directives/resizable/resizable-dialog.directive.d.ts +0 -30
- package/lib/core/environments/environment.d.ts +0 -7
- package/lib/core/environments/environment.prod.d.ts +0 -7
- package/lib/core/helpers/crypto-helper.service.d.ts +0 -12
- package/lib/core/http/http-stream.service.d.ts +0 -18
- package/lib/core/http/http.service.d.ts +0 -20
- package/lib/core/interceptors/auth.interceptor.d.ts +0 -18
- package/lib/core/interceptors/license.interceptor.d.ts +0 -11
- package/lib/core/models/api-config.model.d.ts +0 -58
- package/lib/core/models/api-request.model.d.ts +0 -77
- package/lib/core/models/api-response.model.d.ts +0 -6
- package/lib/core/models/doohbot-config.model.d.ts +0 -81
- package/lib/core/models/message.d.ts +0 -16
- package/lib/core/models/theme-config.model.d.ts +0 -28
- package/lib/core/services/core-config.service.d.ts +0 -23
- package/lib/core/services/license.service.d.ts +0 -33
- package/lib/core/services/markdown.service.d.ts +0 -8
- package/lib/core/services/theme.service.d.ts +0 -40
- package/lib/core/utils/logger.service.d.ts +0 -11
- package/lib/doohbot-input.d.ts +0 -19
- package/lib/doohbot.component.d.ts +0 -108
- package/lib/predefined_messages.d.ts +0 -2
- package/lib/shared/chips/chips.component.d.ts +0 -10
- package/lib/shared/dialog/dialog.component.d.ts +0 -19
- package/lib/shared/dialog/dialog.service.d.ts +0 -29
- package/lib/shared/dialog/dialog.utils.d.ts +0 -41
- package/lib/shared/dropdown-menu/dropdown-menu.component.d.ts +0 -11
- package/lib/shared/input-dialog/input-dialog.component.d.ts +0 -20
- package/lib/shared/menu-item/menu-item.component.d.ts +0 -9
- package/lib/shared/pipes/simple-markdown.pipe.d.ts +0 -10
- package/lib/shared/snackbar/snackbar.component.d.ts +0 -14
- package/lib/shared/snackbar/snackbar.service.d.ts +0 -19
- package/public-api.d.ts +0 -11
- /package/{src → projects/doohbot/src}/assets/bot.mp3 +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
EventEmitter,
|
|
4
|
+
Input,
|
|
5
|
+
OnInit,
|
|
6
|
+
OnChanges,
|
|
7
|
+
SimpleChanges,
|
|
8
|
+
Output,
|
|
9
|
+
} from '@angular/core';
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
11
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
12
|
+
import { DialogService } from '../../../../shared/dialog/dialog.service';
|
|
13
|
+
import { ChatSession, ChatSessionGroup } from '../../model/chat-session.model';
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
selector: 'app-chat-history-sidebar',
|
|
17
|
+
standalone: true,
|
|
18
|
+
imports: [CommonModule, MatIconModule],
|
|
19
|
+
templateUrl: './chat-history-sidebar.component.html',
|
|
20
|
+
styleUrls: ['./chat-history-sidebar.component.scss'],
|
|
21
|
+
})
|
|
22
|
+
export class ChatHistorySidebarComponent implements OnInit, OnChanges {
|
|
23
|
+
@Input() sessions: ChatSession[] = [];
|
|
24
|
+
@Input() isOpen: boolean = false;
|
|
25
|
+
@Input() userName: string = 'User';
|
|
26
|
+
@Input() isLoading: boolean = false;
|
|
27
|
+
@Input() hasMoreSessions: boolean = false;
|
|
28
|
+
@Input() isLoadingMore: boolean = false;
|
|
29
|
+
@Input() processingSessionId: string | null = null;
|
|
30
|
+
|
|
31
|
+
@Output() sessionSelected = new EventEmitter<ChatSession>();
|
|
32
|
+
@Output() sessionDeleted = new EventEmitter<string>();
|
|
33
|
+
@Output() closed = new EventEmitter<void>();
|
|
34
|
+
@Output() loadMore = new EventEmitter<void>();
|
|
35
|
+
@Output() refresh = new EventEmitter<void>();
|
|
36
|
+
@Output() sessionRenamed = new EventEmitter<{ sessionId: string; newTitle: string }>();
|
|
37
|
+
@Output() deleteAll = new EventEmitter<void>();
|
|
38
|
+
|
|
39
|
+
chatHistory: ChatSessionGroup[] = [];
|
|
40
|
+
|
|
41
|
+
constructor(private dialogService: DialogService) { }
|
|
42
|
+
|
|
43
|
+
ngOnInit(): void {
|
|
44
|
+
this.chatHistory = this.groupedSessions();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
48
|
+
if (changes['sessions']) {
|
|
49
|
+
this.chatHistory = this.groupedSessions();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
groupedSessions(): ChatSessionGroup[] {
|
|
54
|
+
const now = new Date();
|
|
55
|
+
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
56
|
+
const yesterday = new Date(today);
|
|
57
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
58
|
+
const weekAgo = new Date(today);
|
|
59
|
+
weekAgo.setDate(weekAgo.getDate() - 7);
|
|
60
|
+
|
|
61
|
+
const groups: ChatSessionGroup[] = [
|
|
62
|
+
{ label: 'Today', sessions: [] },
|
|
63
|
+
{ label: 'Yesterday', sessions: [] },
|
|
64
|
+
{ label: 'This Week', sessions: [] },
|
|
65
|
+
{ label: 'Older', sessions: [] },
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// Sort sessions by timestamp (newest first)
|
|
69
|
+
const sortedSessions = [...this.sessions].sort(
|
|
70
|
+
(a, b) => b.timestamp.getTime() - a.timestamp.getTime(),
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
sortedSessions.forEach((session) => {
|
|
74
|
+
const sessionDate = new Date(session.timestamp);
|
|
75
|
+
const sessionDayStart = new Date(
|
|
76
|
+
sessionDate.getFullYear(),
|
|
77
|
+
sessionDate.getMonth(),
|
|
78
|
+
sessionDate.getDate(),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
if (sessionDayStart.getTime() === today.getTime()) {
|
|
82
|
+
groups[0].sessions.push(session);
|
|
83
|
+
} else if (sessionDayStart.getTime() === yesterday.getTime()) {
|
|
84
|
+
groups[1].sessions.push(session);
|
|
85
|
+
} else if (sessionDayStart.getTime() >= weekAgo.getTime()) {
|
|
86
|
+
groups[2].sessions.push(session);
|
|
87
|
+
} else {
|
|
88
|
+
groups[3].sessions.push(session);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Filter out empty groups
|
|
93
|
+
return groups.filter((g) => g.sessions.length > 0);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
onSessionClick(session: ChatSession): void {
|
|
97
|
+
this.sessionSelected.emit(session);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
onEditClick(event: Event, session: ChatSession): void {
|
|
101
|
+
event.stopPropagation();
|
|
102
|
+
this.dialogService
|
|
103
|
+
.openInput({
|
|
104
|
+
title: 'Rename Conversation',
|
|
105
|
+
message: 'Enter a new title for this conversation:',
|
|
106
|
+
initialValue: session.title,
|
|
107
|
+
placeholder: 'New title...',
|
|
108
|
+
confirmText: 'Rename',
|
|
109
|
+
})
|
|
110
|
+
.subscribe((newTitle) => {
|
|
111
|
+
if (newTitle !== null && newTitle.trim() !== '' && newTitle !== session.title) {
|
|
112
|
+
this.sessionRenamed.emit({ sessionId: session.id, newTitle: newTitle.trim() });
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
onDeleteClick(event: Event, sessionId: string): void {
|
|
118
|
+
event.stopPropagation();
|
|
119
|
+
this.dialogService.confirmDelete('this conversation').subscribe((confirmed) => {
|
|
120
|
+
if (confirmed) {
|
|
121
|
+
this.sessionDeleted.emit(sessionId);
|
|
122
|
+
this.chatHistory = this.groupedSessions();
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
onClose(): void {
|
|
128
|
+
this.closed.emit();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
formatTime(date: Date): string {
|
|
132
|
+
return new Date(date).toLocaleTimeString('en-US', {
|
|
133
|
+
hour: 'numeric',
|
|
134
|
+
minute: '2-digit',
|
|
135
|
+
hour12: true,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
formatDate(date: Date): string {
|
|
140
|
+
return new Date(date).toLocaleDateString('en-US', {
|
|
141
|
+
month: 'short',
|
|
142
|
+
day: 'numeric',
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Handle scroll event for infinite scroll
|
|
148
|
+
*/
|
|
149
|
+
onScroll(event: Event): void {
|
|
150
|
+
const element = event.target as HTMLElement;
|
|
151
|
+
const scrollTop = element.scrollTop;
|
|
152
|
+
const scrollHeight = element.scrollHeight;
|
|
153
|
+
const clientHeight = element.clientHeight;
|
|
154
|
+
|
|
155
|
+
// Check if scrolled near bottom (within 100px)
|
|
156
|
+
const scrollBottom = scrollHeight - scrollTop - clientHeight;
|
|
157
|
+
if (scrollBottom < 100 && this.hasMoreSessions && !this.isLoadingMore && !this.isLoading) {
|
|
158
|
+
this.loadMore.emit();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Handle manual refresh
|
|
164
|
+
*/
|
|
165
|
+
onRefresh(): void {
|
|
166
|
+
this.refresh.emit();
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Handle clear all history
|
|
171
|
+
*/
|
|
172
|
+
onClearAllClick(): void {
|
|
173
|
+
this.dialogService
|
|
174
|
+
.open({
|
|
175
|
+
title: 'Clear All History',
|
|
176
|
+
message: 'Are you sure you want to delete all chat history? This action cannot be undone.',
|
|
177
|
+
confirmText: 'Clear All',
|
|
178
|
+
cancelText: 'Cancel',
|
|
179
|
+
confirmButtonColor: 'warn',
|
|
180
|
+
icon: 'delete_sweep',
|
|
181
|
+
})
|
|
182
|
+
.subscribe((confirmed: boolean | undefined) => {
|
|
183
|
+
if (confirmed) {
|
|
184
|
+
this.deleteAll.emit();
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
@if (isChatOpen) {
|
|
2
|
+
<div
|
|
3
|
+
draggableDialog
|
|
4
|
+
[enableDrag]="canDrag"
|
|
5
|
+
resizableDialog
|
|
6
|
+
[enableResize]="canResize"
|
|
7
|
+
class="chat-window"
|
|
8
|
+
[class.fullscreen]="isFullScreen"
|
|
9
|
+
[class.layout-sidebar]="buttonStyle.includes('sidebar')"
|
|
10
|
+
>
|
|
11
|
+
<!-- chat window header -->
|
|
12
|
+
<app-chat-header
|
|
13
|
+
[appHeaderLogoUrl]="appHeaderLogoUrl"
|
|
14
|
+
[isAuthenticated]="isAuthenticated"
|
|
15
|
+
[isFullScreen]="isFullScreen"
|
|
16
|
+
[settingsMenu]="settingsMenu"
|
|
17
|
+
[isNewChatDisabled]="messages.length === 0"
|
|
18
|
+
(toggleChat)="onToggleChat()"
|
|
19
|
+
(toggleFullScreen)="onToggleFullScreen()"
|
|
20
|
+
(toggleHistorySidebar)="onToggleHistorySidebar()"
|
|
21
|
+
(clearChat)="onClearChat()"
|
|
22
|
+
></app-chat-header>
|
|
23
|
+
|
|
24
|
+
<!-- Main Content Area: Toggle between Messages and History -->
|
|
25
|
+
<div class="chat-content-wrapper">
|
|
26
|
+
<!-- Chat History View -->
|
|
27
|
+
<app-chat-history-sidebar
|
|
28
|
+
[class.sidebar-closed]="!isHistorySidebarOpen"
|
|
29
|
+
[sessions]="chatSessions"
|
|
30
|
+
[isOpen]="isHistorySidebarOpen"
|
|
31
|
+
[userName]="chatHistoryUserName"
|
|
32
|
+
[isLoading]="isLoadingSessions"
|
|
33
|
+
[hasMoreSessions]="hasMoreSessions"
|
|
34
|
+
[isLoadingMore]="isLoadingMoreSessions"
|
|
35
|
+
[processingSessionId]="processingSessionId"
|
|
36
|
+
(sessionSelected)="onSessionSelected($event)"
|
|
37
|
+
(sessionDeleted)="onSessionDeleted($event)"
|
|
38
|
+
(loadMore)="loadMoreSessions.emit()"
|
|
39
|
+
(refresh)="refreshSessions.emit()"
|
|
40
|
+
(sessionRenamed)="onSessionRenamed($event)"
|
|
41
|
+
(deleteAll)="onDeleteAllSessions()"
|
|
42
|
+
(closed)="onToggleHistorySidebar()"
|
|
43
|
+
>
|
|
44
|
+
</app-chat-history-sidebar>
|
|
45
|
+
|
|
46
|
+
<!-- Messages View -->
|
|
47
|
+
<div class="messages-view" [class.hidden]="isHistorySidebarOpen && !isFullScreen">
|
|
48
|
+
<!-- Messages / Welcome Screen -->
|
|
49
|
+
@if (!showLoginForm) {
|
|
50
|
+
<app-message-list
|
|
51
|
+
[messages]="messages"
|
|
52
|
+
[isBotTyping]="isBotTyping"
|
|
53
|
+
[isStreaming]="isStreaming"
|
|
54
|
+
[appLogoUrl]="appLogoUrl"
|
|
55
|
+
[appSubtitle]="appSubtitle"
|
|
56
|
+
[welcomeDesc]="welcomeDesc"
|
|
57
|
+
[predefinedMessages]="predefinedMessages"
|
|
58
|
+
[botAvatarUrl]="botAvatarUrl"
|
|
59
|
+
[userAvatarUrl]="userAvatarUrl"
|
|
60
|
+
[userName]="userName"
|
|
61
|
+
[isAuthenticated]="isAuthenticated"
|
|
62
|
+
[isLoggingIn]="isLoggingIn"
|
|
63
|
+
[trackByMessageId]="trackByMessageId"
|
|
64
|
+
(suggestionClick)="onSuggestionClick($event)"
|
|
65
|
+
(loginClick)="onLoginClick()"
|
|
66
|
+
></app-message-list>
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@if (showSuggestionChips && isAuthenticated) {
|
|
70
|
+
<app-chips
|
|
71
|
+
[messages]="suggestedMessages"
|
|
72
|
+
[disabled]="isBotTyping"
|
|
73
|
+
(chipClick)="onSuggestionClick($event)"
|
|
74
|
+
></app-chips>
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
<!-- Chat Input: Only show when authenticated -->
|
|
78
|
+
@if (isAuthenticated) {
|
|
79
|
+
<app-message-input
|
|
80
|
+
[isBotTyping]="isBotTyping"
|
|
81
|
+
[hintText]="hintText"
|
|
82
|
+
(send)="onSend($event)"
|
|
83
|
+
(stop)="onStop()"
|
|
84
|
+
></app-message-input>
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
<!-- Login Form -->
|
|
88
|
+
@if (showLoginForm && !isAuthenticated) {
|
|
89
|
+
<app-login-form
|
|
90
|
+
[isLoggingIn]="isLoggingIn"
|
|
91
|
+
(loginSubmit)="onLoginSubmit($event)"
|
|
92
|
+
(cancel)="onCancelLogin()"
|
|
93
|
+
></app-login-form>
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
<!-- Auth error snackbar (login/logout errors only) -->
|
|
97
|
+
<!-- <app-snackbar
|
|
98
|
+
*ngIf="authError"
|
|
99
|
+
[message]="authError"
|
|
100
|
+
(closed)="onClearAuthError()"
|
|
101
|
+
></app-snackbar> -->
|
|
102
|
+
|
|
103
|
+
<!-- footer -->
|
|
104
|
+
<app-chat-footer></app-chat-footer>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
<mat-menu #settingsMenu="matMenu">
|
|
111
|
+
<!-- Personalization -->
|
|
112
|
+
@if (isAuthenticated) {
|
|
113
|
+
<button
|
|
114
|
+
mat-menu-item
|
|
115
|
+
(click)="onOpenPersonalization()"
|
|
116
|
+
style="display: flex; align-items: center"
|
|
117
|
+
>
|
|
118
|
+
<mat-icon>settings_suggest</mat-icon>
|
|
119
|
+
<span>Personalization</span>
|
|
120
|
+
</button>
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
<!-- Change Theme -->
|
|
124
|
+
|
|
125
|
+
<!-- Full-Screen Button -->
|
|
126
|
+
<button mat-menu-item (click)="onToggleFullScreen()" style="display: flex; align-items: center">
|
|
127
|
+
<mat-icon>{{ isFullScreen ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>
|
|
128
|
+
<span> {{ isFullScreen ? 'Minimize' : 'Expand' }}</span>
|
|
129
|
+
</button>
|
|
130
|
+
|
|
131
|
+
<!-- Clear Chat -->
|
|
132
|
+
@if (isAuthenticated && messages.length > 0) {
|
|
133
|
+
<button mat-menu-item (click)="onClearChat()" style="display: flex; align-items: center">
|
|
134
|
+
<mat-icon> clear_all</mat-icon>
|
|
135
|
+
<span>End Chat</span>
|
|
136
|
+
</button>
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
<!-- Logout -->
|
|
140
|
+
@if (isAuthenticated) {
|
|
141
|
+
<button mat-menu-item (click)="onLogout()" style="display: flex; align-items: center">
|
|
142
|
+
<mat-icon>logout</mat-icon>
|
|
143
|
+
<span>Logout</span>
|
|
144
|
+
</button>
|
|
145
|
+
}
|
|
146
|
+
</mat-menu>
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
/* Chat container */
|
|
4
|
+
.doohbot-container {
|
|
5
|
+
position: fixed;
|
|
6
|
+
bottom: 20px;
|
|
7
|
+
right: 20px;
|
|
8
|
+
z-index: 1000;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Chat window */
|
|
12
|
+
.chat-window {
|
|
13
|
+
width: clamp(400px, 30vw, 450px);
|
|
14
|
+
height: clamp(620px, 70vh, 660px);
|
|
15
|
+
background-color: var(--background-color);
|
|
16
|
+
// background-color: var(--mat-menu-bg) !important;
|
|
17
|
+
border-radius: 20px;
|
|
18
|
+
border-color: var(--border-color);
|
|
19
|
+
box-shadow: var(--border-shadow-color);
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
animation: slide-in 0.5s ease;
|
|
24
|
+
position: fixed;
|
|
25
|
+
right: 20px;
|
|
26
|
+
bottom: 20px;
|
|
27
|
+
user-select: none;
|
|
28
|
+
cursor: move;
|
|
29
|
+
|
|
30
|
+
// z-index: 999999 !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.chat-window:active {
|
|
34
|
+
cursor: grabbing;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (max-width: 768px) {
|
|
38
|
+
.chat-window {
|
|
39
|
+
width: 95%;
|
|
40
|
+
height: calc(100vh - 20px);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.chat-window.layout-sidebar {
|
|
45
|
+
height: 100vh;
|
|
46
|
+
top: 0;
|
|
47
|
+
bottom: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
width: clamp(400px, 25vw, 450px);
|
|
50
|
+
border-radius: 20px 0 0 20px;
|
|
51
|
+
animation: slide-in-sidebar 0.4s ease-out;
|
|
52
|
+
|
|
53
|
+
&.fullscreen {
|
|
54
|
+
width: 100vw;
|
|
55
|
+
height: 100vh;
|
|
56
|
+
border-radius: 0;
|
|
57
|
+
transform: none;
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes slide-in-sidebar {
|
|
64
|
+
from {
|
|
65
|
+
transform: translateX(100%);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
to {
|
|
69
|
+
transform: translateX(0);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (max-width: 480px) {
|
|
74
|
+
.chat-window {
|
|
75
|
+
width: 90%;
|
|
76
|
+
height: calc(100vh - 40px);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.chat-window.fullscreen {
|
|
81
|
+
width: 100vw;
|
|
82
|
+
height: 100vh;
|
|
83
|
+
border-radius: 0;
|
|
84
|
+
position: fixed;
|
|
85
|
+
top: 0;
|
|
86
|
+
left: 0;
|
|
87
|
+
transform: none;
|
|
88
|
+
user-select: none;
|
|
89
|
+
// z-index: 999999 !important;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Slide-in animation */
|
|
93
|
+
// @keyframes slide-in {
|
|
94
|
+
// from {
|
|
95
|
+
// transform: translateY(100%);
|
|
96
|
+
// opacity: 0;
|
|
97
|
+
// }
|
|
98
|
+
|
|
99
|
+
// to {
|
|
100
|
+
// transform: translateY(0);
|
|
101
|
+
// opacity: 1;
|
|
102
|
+
// }
|
|
103
|
+
// }
|
|
104
|
+
|
|
105
|
+
// Chat content wrapper - main content area
|
|
106
|
+
.chat-content-wrapper {
|
|
107
|
+
flex: 1;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
position: relative;
|
|
112
|
+
|
|
113
|
+
app-chat-history-sidebar {
|
|
114
|
+
height: 100%;
|
|
115
|
+
width: 100%; // Default mobile/popup behavior
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
flex: 1;
|
|
119
|
+
min-height: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Fullscreen specific layout overrides
|
|
124
|
+
.chat-window.fullscreen {
|
|
125
|
+
.chat-content-wrapper {
|
|
126
|
+
flex-direction: row; // Side-by-side in fullscreen
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
app-chat-history-sidebar {
|
|
130
|
+
width: 260px; // Fixed width sidebar
|
|
131
|
+
flex: 0 0 260px; // Don't shrink/grow
|
|
132
|
+
border-right: 1px solid var(--border-color);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
app-chat-history-sidebar.sidebar-closed {
|
|
136
|
+
display: none;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Messages view
|
|
141
|
+
.messages-view {
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-direction: column;
|
|
144
|
+
height: 100%;
|
|
145
|
+
width: 100%;
|
|
146
|
+
|
|
147
|
+
&.hidden {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Ensure message list takes available space
|
|
152
|
+
app-message-list,
|
|
153
|
+
app-login-form {
|
|
154
|
+
flex: 1;
|
|
155
|
+
min-height: 0; // Important for proper scrolling
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Keep snackbar and input at the bottom
|
|
159
|
+
app-snackbar {
|
|
160
|
+
flex-shrink: 0;
|
|
161
|
+
margin-top: auto;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
app-message-input {
|
|
165
|
+
flex-shrink: 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// <--- Theme Selector --->
|
|
170
|
+
|
|
171
|
+
.theme-selector {
|
|
172
|
+
display: flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
padding: 4px 12px;
|
|
175
|
+
gap: 8px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.theme-btn {
|
|
179
|
+
background: none;
|
|
180
|
+
border: none;
|
|
181
|
+
color: var(--white);
|
|
182
|
+
transition: color 0.2s ease;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.theme-btn.selected {
|
|
186
|
+
color: var(--primary-color);
|
|
187
|
+
}
|