@chat21/chat21-web-widget 5.1.32-rc4 → 5.1.33

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.
Files changed (59) hide show
  1. package/.github/workflows/docker-community-push-latest.yml +13 -23
  2. package/.github/workflows/docker-image-tag-community-tag-push.yml +12 -22
  3. package/CHANGELOG.md +7 -50
  4. package/Dockerfile +5 -4
  5. package/angular.json +2 -5
  6. package/deploy_amazon_beta.sh +7 -17
  7. package/deploy_amazon_prod.sh +41 -0
  8. package/docs/changelog/this-branch.md +0 -36
  9. package/nginx.conf +2 -22
  10. package/package.json +1 -4
  11. package/src/app/app.component.ts +9 -10
  12. package/src/app/app.module.ts +0 -9
  13. package/src/app/component/conversation-detail/conversation/conversation.component.html +2 -8
  14. package/src/app/component/conversation-detail/conversation/conversation.component.scss +2 -12
  15. package/src/app/component/conversation-detail/conversation/conversation.component.ts +5 -45
  16. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +1 -1
  17. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +1 -10
  18. package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +0 -1
  19. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +79 -146
  20. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +13 -140
  21. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +7 -124
  22. package/src/app/component/last-message/last-message.component.ts +1 -4
  23. package/src/app/component/message/audio/audio.component.ts +5 -0
  24. package/src/app/component/message/bubble-message/bubble-message.component.html +1 -6
  25. package/src/app/component/message/bubble-message/bubble-message.component.ts +1 -2
  26. package/src/app/providers/global-settings.service.ts +0 -21
  27. package/src/app/providers/translator.service.ts +0 -2
  28. package/src/app/sass/_variables.scss +0 -3
  29. package/src/app/utils/globals.ts +1 -7
  30. package/src/assets/i18n/en.json +0 -1
  31. package/src/assets/i18n/es.json +0 -1
  32. package/src/assets/i18n/fr.json +0 -1
  33. package/src/assets/i18n/it.json +0 -1
  34. package/src/chat21-core/models/message.ts +1 -2
  35. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +2 -3
  36. package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +0 -12
  37. package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +1 -1
  38. package/src/chat21-core/utils/utils-message.ts +0 -7
  39. package/src/chat21-core/utils/utils.ts +2 -5
  40. package/src/launch.js +41 -32
  41. package/src/launch_template.js +41 -32
  42. package/tsconfig.json +0 -5
  43. package/src/app/component/message/audio-sync/audio-sync.component.html +0 -19
  44. package/src/app/component/message/audio-sync/audio-sync.component.scss +0 -65
  45. package/src/app/component/message/audio-sync/audio-sync.component.spec.ts +0 -23
  46. package/src/app/component/message/audio-sync/audio-sync.component.ts +0 -197
  47. package/src/app/providers/voice/STT&TTS/openai-voice.config.ts +0 -12
  48. package/src/app/providers/voice/STT&TTS/openai-voice.provider.ts +0 -171
  49. package/src/app/providers/voice/STT&TTS/speech-provider.abstract.ts +0 -39
  50. package/src/app/providers/voice/audio.types.ts +0 -34
  51. package/src/app/providers/voice/vad.service.spec.ts +0 -28
  52. package/src/app/providers/voice/vad.service.ts +0 -70
  53. package/src/app/providers/voice/voice.service.spec.ts +0 -60
  54. package/src/app/providers/voice/voice.service.ts +0 -294
  55. package/src/app/shims/onnxruntime-web-wasm.ts +0 -4
  56. package/src/assets/onnx/ort-wasm-simd-threaded.mjs +0 -59
  57. package/src/assets/onnx/ort-wasm-simd-threaded.wasm +0 -0
  58. package/src/assets/vad/silero_vad_legacy.onnx +0 -0
  59. package/src/assets/vad/vad.worklet.bundle.min.js +0 -1
@@ -1,10 +1,10 @@
1
1
  name: Docker Image Community latest CI
2
2
 
3
- on:
4
- push:
3
+ on:
4
+ push:
5
5
  branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
8
 
9
9
  jobs:
10
10
  push_to_registry:
@@ -12,22 +12,12 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
 
14
14
  steps:
15
- - name: Check out the repo
16
- uses: actions/checkout@v2
17
-
18
- - name: Set up Docker Buildx
19
- uses: docker/setup-buildx-action@v2
20
-
21
- - name: Log in to Docker Hub
22
- uses: docker/login-action@v2
23
- with:
24
- username: ${{ secrets.DOCKERHUB_USERNAME }}
25
- password: ${{ secrets.DOCKERHUB_TOKEN }}
26
-
27
- - name: Build and push multiarch Docker image
28
- uses: docker/build-push-action@v3
29
- with:
30
- context: .
31
- push: true
32
- platforms: linux/amd64,linux/arm64
33
- tags: chat21/chat21-web-widget:latest
15
+ - uses: actions/checkout@v2
16
+ name: Check out the repo
17
+ - uses: docker/build-push-action@v1
18
+ with:
19
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
20
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
21
+ repository: chat21/chat21-web-widget
22
+ push: true
23
+ tags: latest
@@ -3,30 +3,20 @@ name: Publish Docker Community image tags
3
3
  on:
4
4
  push:
5
5
  tags:
6
- - '**' # Trigger su qualsiasi tag
7
-
6
+ - '**' # Push events to every tag including hierarchical tags like
8
7
  jobs:
8
+
9
9
  push_to_registry:
10
10
  name: Push Docker image to Docker Hub
11
11
  runs-on: ubuntu-latest
12
-
13
12
  steps:
14
- - name: Check out the repo
15
- uses: actions/checkout@v2
16
-
17
- - name: Set up Docker Buildx
18
- uses: docker/setup-buildx-action@v2
19
-
20
- - name: Log in to Docker Hub
21
- uses: docker/login-action@v2
22
- with:
23
- username: ${{ secrets.DOCKERHUB_USERNAME }}
24
- password: ${{ secrets.DOCKERHUB_TOKEN }}
25
-
26
- - name: Build and push multiarch Docker image
27
- uses: docker/build-push-action@v3
28
- with:
29
- context: .
30
- push: true
31
- platforms: linux/amd64,linux/arm64
32
- tags: chat21/chat21-web-widget:${{ github.ref_name }}
13
+ - name: Check out the repo
14
+ uses: actions/checkout@v2
15
+ - name: Push to Docker Hub
16
+ uses: docker/build-push-action@v1
17
+ with:
18
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
19
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
20
+ repository: chat21/chat21-web-widget
21
+ push: true
22
+ tag_with_ref: true
package/CHANGELOG.md CHANGED
@@ -6,38 +6,17 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
- # 5.1.32-rc4
10
- - **added**: Pulsante “chiudi stream” (`.close-stream-button`) offset del contenuto e del foglio in fullscreen usando `--chat-footer-stream-button-height` solo mentre lo stream è in ascolto (`isStreamAudioActive`); variabili in `_variables.scss`.
11
- - **added**: `VoiceService.discardCurrentRecordingSegment()` — in arrivo un messaggio da altro mittente durante lo stream, si scarta il segmento WebM corrente (nessun upload) senza chiudere mic/VAD; `interruptStreamDueToPeerMessage()` nel footer non spegne più `isStreamAudioActive`.
12
- - **changed**: `#streamAudioAlert` — fascia superiore al footer con effetto vetro satinato (`backdrop-filter`, `color-mix` semi-trasparente).
13
-
14
- # 5.1.32-rc3
15
- - **changed**: `nginx.conf` (immagine Docker) — tipi MIME espliciti per `.mjs`, `.wasm`, `.onnx` e `default_type` a livello `http` (evita `text/plain` su moduli ONNX/VAD dietro deploy containerizzato).
16
- - **chore**: rimossi script di deploy Amazon beta/prod deprecati dal repository.
17
-
18
- # 5.1.32-rc2
19
- - **bug fixed**: minor streaming icon UI fixed
20
- - **changed**: Refactor UI pulsante stream audio nel conversation footer (layout / classi).
21
-
22
- # 5.1.32-rc1
23
- - **added**: Voice pipeline — VAD (`@ricky0123/vad-web`) with ONNX Runtime WASM served from `/assets/onnx` (`copy-onnx-wasm`), `VoiceService` with `audioSegment$` (WebM segments) and optional STT/TTS via unified OpenAI provider using `HttpClient`, transcript / error fields on segment payloads.
24
- - **added**: Stream audio UI in conversation footer — toggle, real-time volume stream and animated waveform (`volume$`); mic session lifecycle wired to upload segments on speech end.
25
- - **added**: `MessageModel.isJustRecived` — set when ingesting messages (MQTT/Firebase `addCommandMessage` for `command.type === "message"`, and default for non-command messages in `addedMessage` / `addedNew`) to distinguish “new in session” vs history.
26
- - **added**: `chat-audio-sync` for TTS messages — karaoke-style word sync to audio, full `message` input, typography aligned with text bubbles; skips animation when `isJustRecived === false`; after playback ends sets `message.isJustRecived = false` so replays show full text without re-animating.
27
- - **bug fixed**: `AnalyserNode.getByteFrequencyData` TypeScript error — `Uint8Array` created from an explicit `ArrayBuffer` for correct DOM typings.
28
- - **bug fixed**: `isStreamAudioActive` no longer derived from per-frame mic level (`volume > 1`), which caused the stream button / active state to flash continuously while listening.
9
+ # 5.1.33
10
+ - **bug fixed**: widget not loaded because blob block loading in lauch.js
11
+
12
+ # 5.1.31
13
+ - **bug fixed**: bug fix disabled user-typing with human and user-typing with human is not available
29
14
 
30
15
  # 5.1.30
31
16
  - **bug fixed**: startHidden is not working properly
32
17
 
33
- # 5.1.30-rc3
34
- - **bug fixed**: bug fix user-typing with human is not available
35
-
36
- # 5.1.30-rc2
37
- - **bug fixed**: bug fix disabled user-typing with human
38
-
39
- # 5.1.30-rc1
40
- - **bug fixed**: startHidden is not working properly
18
+ # 5.1.28
19
+ - **bug fixed**: header option menu is deactivated on mobile
41
20
 
42
21
  # 5.1.28
43
22
  - **bug fixed**: fixed Bot/Human conversation detection by correctly classifying bot replies
@@ -49,22 +28,8 @@
49
28
  - **changed**: Set the default autoStart value to false
50
29
  - **added**: Added the open widget loading spinner
51
30
  - **changed**: Load the widget without authentication and display the speech bubble
52
-
53
- # 5.1.27-rc3
54
- - **bug fixed**: fixed Bot/Human conversation detection by correctly classifying bot replies
55
-
56
- # 5.1.27-rc2
57
- - **bug fixed**: centralized fullscreen management on mobile and handled the case of the closed widget that remained fullscreen
58
-
59
- # 5.1.27-rc1
60
- - **added**: closeChatInConversation parameters
61
- - **added**: close chat button under textarea footer component
62
-
63
- # 5.1.26-rc6
64
31
  - **changed**: mobile always opens fullscreen and ignores legacy stored size”.
65
32
  - **changed**: changed user-typing
66
-
67
- # 5.1.26-rc5
68
33
  - **changed**: Hide the resize-widget button when on mobile
69
34
  - **added**: added "I'm thinking" when the bot responds
70
35
 
@@ -126,14 +91,6 @@
126
91
  - **bug-fixed**: check showEmojiFooterButton to enable/disable emojii
127
92
  - **bug-fixed**: markdown is fired as an emojii and blocked by isEmojii check fn
128
93
 
129
- <<<<<<< HEAD
130
- =======
131
- # 5.1.7-rc7
132
- - **bug-fixed**: button new_conversation always appear. added subscription to conversationAdded
133
-
134
- # 5.1.7-rc6
135
- - **added**: Added MAX_ATTACHMENT_ERROR error message when uploading a file larger than 10 MB
136
- >>>>>>> master-pre
137
94
 
138
95
  # 5.1.7-rc5
139
96
  - **bug-fixed**: bug fixed BUTTON STYLES
package/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
  ### STAGE 1: Build ###
2
2
 
3
3
  # We label our stage as ‘builder’
4
- FROM --platform=$BUILDPLATFORM node:20.12.2-alpine3.19 as builder
4
+ FROM node:20.12.2-alpine3.19 as builder
5
5
 
6
6
  COPY package.json package-lock.json ./
7
7
 
@@ -15,11 +15,12 @@ COPY . .
15
15
 
16
16
  ## Build the angular app in production mode and store the artifacts in dist folder
17
17
 
18
-
19
18
  RUN npx ng build --configuration="prod" --output-path=dist --base-href=./ --output-hashing=none
20
19
 
20
+
21
21
  ### STAGE 2: Setup ###
22
- FROM --platform=$BUILDPLATFORM nginx:1.14.1-alpine
22
+
23
+ FROM nginx:1.14.1-alpine
23
24
 
24
25
  ## Copy our default nginx config
25
26
  COPY nginx.conf /etc/nginx/nginx.conf
@@ -32,4 +33,4 @@ COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html
32
33
 
33
34
  RUN echo "Chat21 Web Widget Started!!"
34
35
 
35
- CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/widget-config-template.json > /usr/share/nginx/html/widget-config.json && exec nginx -g 'daemon off;'"]
36
+ CMD ["/bin/sh", "-c", "envsubst < /usr/share/nginx/html/widget-config-template.json > /usr/share/nginx/html/widget-config.json && exec nginx -g 'daemon off;'"]
package/angular.json CHANGED
@@ -44,8 +44,7 @@
44
44
  "src/environments/real_data/widget-config-docker.json",
45
45
  "src/environments/real_data/widget-config-native-mqtt.json",
46
46
  "src/environments/real_data/widget-config-native-prod.json",
47
- "src/environments/real_data/widget-config-aws-stage.json",
48
- "src/environments/real_data/widget-config-aws-aruba.json"
47
+ "src/environments/real_data/widget-config-aws-stage.json"
49
48
  ],
50
49
  "styles": [
51
50
  "src/app/sass/styles.scss"
@@ -60,9 +59,7 @@
60
59
  "idb",
61
60
  "accept-language-parser",
62
61
  "file-saver",
63
- "dayjs",
64
- "onnxruntime-web",
65
- "@ricky0123/vad-web"
62
+ "dayjs"
66
63
  ],
67
64
  "sourceMap": true,
68
65
  "optimization": false,
@@ -2,16 +2,8 @@
2
2
  version=`node -e 'console.log(require("./package.json").version)'`
3
3
  echo "version $version"
4
4
 
5
- npm i
6
-
7
- cp src/environments/real_data/environment.pre.ts src/environments/environment.pre.ts
8
-
9
5
  ng build --configuration="pre" --aot=true --base-href
10
6
 
11
- ### SET HASHING : START ###
12
- cp ./src/launch_template.js ./dist/browser/launch.js
13
- node ./src/build_launch.js
14
- ### SET HASHING : END ###
15
7
 
16
8
  # ########## --->>>> NATIVE-MQTT folder START <<<<<------ ########## #
17
9
 
@@ -31,17 +23,15 @@ node ./src/build_launch.js
31
23
 
32
24
 
33
25
  # ########## --->>>> FIREBASE folder START <<<<<------ ########## #
34
- cd dist/browser
35
- aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300 --exclude='launch.js' #7days
36
- aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
37
- aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control max-age=300 --exclude='launch.js' #7days
38
- aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
39
- cd ../..
26
+ cd dist
27
+ aws s3 sync . s3://tiledesk-widget-pre/v5/$version/ --cache-control max-age=300
28
+ aws s3 sync . s3://tiledesk-widget-pre/v5/ --cache-control max-age=300
29
+ cd ..
40
30
 
41
- aws cloudfront create-invalidation --distribution-id E2V5O0YPR61V8P --paths "/*"
42
-
43
- git restore src/environments/environment.pre.ts
31
+ #aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
32
+ cd ..
44
33
 
34
+ aws cloudfront create-invalidation --distribution-id E2V5O0YPR61V8P --paths "/*"
45
35
  # echo new version deployed $NEW_VER/$NEW_BUILD/ on s3://tiledesk-widget-pre/v2
46
36
  echo new version deployed $version/ on s3://tiledesk-widget-pre/v5 and s3://tiledesk-widget-pre/v5/$version/
47
37
  echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-widget-pre/v5/index.html
@@ -0,0 +1,41 @@
1
+ # npm version patch
2
+ version=`node -e 'console.log(require("./package.json").version)'`
3
+ echo "version $version"
4
+
5
+ npm i
6
+
7
+ cp src/environments/real_data/environment.prod.ts src/environments/environment.prod.ts
8
+
9
+ # --build-optimizer=false if localstorage is disabled (webview) appears https://github.com/firebase/angularfire/issues/970
10
+ ng build --configuration="prod" --aot=true
11
+ ##--base-href='./v5/' --output-hashing none
12
+
13
+ ### SET HASHING : START ###
14
+ cp ./src/launch_template.js ./dist/browser/launch.js
15
+ node ./src/build_launch.js
16
+ ### SET HASHING : END ###
17
+
18
+ #### FIREBASE #####
19
+ # cd dist
20
+ # # aws s3 sync . s3://tiledesk-widget/v5/latest/
21
+ # aws s3 sync . s3://tiledesk-widget/v5/$version/ --cache-control max-age=300
22
+ # aws s3 sync . s3://tiledesk-widget/v5/ --cache-control max-age=300
23
+ # cd ..
24
+
25
+ # #### MQTT #####
26
+ cd dist/browser
27
+ # aws s3 sync . s3://tiledesk-widget/v5/latest/
28
+ aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control max-age=86400 --exclude='launch.js' #8days
29
+ aws s3 sync . s3://tiledesk-widget/v6/$version/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
30
+ #aws s3 sync . s3://tiledesk-widget/v6/ --cache-control max-age=86400 --exclude='launch.js' #8days
31
+ #aws s3 sync . s3://tiledesk-widget/v6/ --cache-control "no-store,no-cache,private" --exclude='*' --include='launch.js'
32
+ cd ../..
33
+
34
+ aws cloudfront create-invalidation --distribution-id E3EJDWEHY08CZZ --paths "/*"
35
+
36
+ git restore src/environments/environment.prod.ts
37
+
38
+ echo new version deployed $version on s3://tiledesk-widget/v6
39
+ echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-widget/v6/index.html
40
+ echo https://widget.tiledesk.com/v6/index.html
41
+ echo https://widget.tiledesk.com/v6/$version/index.html
@@ -45,39 +45,3 @@ Questo branch migliora il feedback in conversazione e rende il comportamento del
45
45
  - Il callout non compare quando il widget e' aperto o quando la preview nuovo messaggio e' attiva.
46
46
  - La UI della conversazione indica chiaramente se l'ultimo responder e' bot o umano.
47
47
  - "Sto pensando..." compare solo nelle conversazioni bot e ha un comportamento prevedibile.
48
- # This branch: identificazione bot o umano
49
-
50
- ## Obiettivo
51
-
52
- In questo branch e' stata introdotta una logica esplicita per capire, all'apertura della conversazione, se l'ultimo responder lato server e' un **bot** oppure un **umano**.
53
-
54
- ## Come viene fatta l'identificazione
55
-
56
- - La valutazione parte dai messaggi gia' caricati in conversazione.
57
- - Viene cercato l'**ultimo messaggio ricevuto dal server** (non inviato dal client corrente).
58
- - Quel messaggio viene classificato con una funzione dedicata (`classifyMessageSenderKind`) che usa piu' segnali:
59
- - `attributes.flowAttributes.chatbot_id` (quando presente indica bot)
60
- - pattern del mittente (es. `senderId` con prefisso bot, quando applicabile)
61
- - informazioni del mittente (`sender_fullname` e metadati associati)
62
-
63
- ## Regola speciale per messaggi di sistema
64
-
65
- Se l'ultimo messaggio utile e' di tipo `system`, viene fatto un controllo aggiuntivo:
66
-
67
- - se in `attributes` e' presente un evento con `messagelabel.key = MEMBER_JOINED_GROUP`
68
- - e rappresenta il passaggio della conversazione a un operatore
69
-
70
- allora la conversazione viene forzata a **Umano** anche se altri indizi potrebbero suggerire bot.
71
-
72
- ## Risultato in UI
73
-
74
- - In apertura conversazione viene mostrato un badge con stato:
75
- - `Bot`
76
- - `Umano`
77
- - Questo stato viene ricalcolato al variare dei messaggi ricevuti.
78
-
79
- ## Effetto sui feedback utente
80
-
81
- - Il messaggio temporaneo `"sto pensando..."` viene mostrato solo quando la conversazione risulta di tipo **Bot**.
82
- - Alla ricezione della prima risposta dal server, `"sto pensando..."` viene nascosto **immediatamente**.
83
- - Non e' previsto alcun tempo minimo di visualizzazione del messaggio.
package/nginx.conf CHANGED
@@ -5,38 +5,18 @@ events {
5
5
  }
6
6
 
7
7
  http {
8
- include /etc/nginx/mime.types;
9
- default_type application/octet-stream;
10
-
11
8
  server {
12
9
  listen 80;
13
10
  server_name localhost;
14
11
 
15
12
  root /usr/share/nginx/html;
16
13
  index index.html index.htm;
14
+ include /etc/nginx/mime.types;
17
15
 
18
16
  gzip on;
19
17
  gzip_min_length 1000;
20
18
  gzip_proxied expired no-cache no-store private auth;
21
- gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript application/wasm;
22
-
23
- # ONNX Runtime (.mjs), WASM e modelli VAD: il browser rifiuta moduli ES con Content-Type: text/plain
24
- location ~* \.mjs$ {
25
- root /usr/share/nginx/html;
26
- default_type application/javascript;
27
- charset utf-8;
28
- add_header Cache-Control "public, max-age=31536000, immutable";
29
- }
30
- location ~* \.wasm$ {
31
- root /usr/share/nginx/html;
32
- default_type application/wasm;
33
- add_header Cache-Control "public, max-age=31536000, immutable";
34
- }
35
- location ~* \.onnx$ {
36
- root /usr/share/nginx/html;
37
- default_type application/octet-stream;
38
- add_header Cache-Control "public, max-age=31536000, immutable";
39
- }
19
+ gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
40
20
 
41
21
  location / {
42
22
  try_files $uri $uri/ /index.html;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.1.32-rc4",
4
+ "version": "5.1.33",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -10,7 +10,6 @@
10
10
  },
11
11
  "scripts": {
12
12
  "ng": "ng",
13
- "copy-onnx-wasm": "mkdir -p src/assets/onnx && cp node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.mjs node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.wasm src/assets/onnx/",
14
13
  "start": "ng serve",
15
14
  "build": "ng build",
16
15
  "test": "ng test",
@@ -33,7 +32,6 @@
33
32
  "@ctrl/ngx-emoji-mart": "^9.2.0",
34
33
  "@ngx-translate/core": "^16.0.4",
35
34
  "@ngx-translate/http-loader": "^16.0.1",
36
- "@ricky0123/vad-web": "^0.0.30",
37
35
  "accept-language-parser": "^1.5.0",
38
36
  "bootstrap": "^5.1.3",
39
37
  "dayjs": "^1.11.7",
@@ -42,7 +40,6 @@
42
40
  "humanize-duration-ts": "^2.1.1",
43
41
  "marked": "^16.3.0",
44
42
  "ngx-logger": "^5.0.11",
45
- "onnxruntime-web": "^1.24.3",
46
43
  "replace": "^1.2.2",
47
44
  "rxjs": "^7.8.2",
48
45
  "source-map-explorer": "^2.5.3",
@@ -106,16 +106,17 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
106
106
 
107
107
  forceDisconnect: boolean = false;
108
108
 
109
- //network status
110
- isOnline: boolean = true;
111
- loading: boolean = false;
112
- private calloutScheduleTimeout: any = null;
113
-
114
109
  // alert error message
115
110
  isShowErrorMessage: boolean = false;
116
111
  errorMessage: string = '';
117
112
  errorKeyMessage: string = null;
118
113
  errorParams: Record<string, any> = {};
114
+
115
+ //network status
116
+ isOnline: boolean = true;
117
+
118
+ loading: boolean = false;
119
+ private calloutScheduleTimeout: any = null;
119
120
 
120
121
  private logger: LoggerService = LoggerInstance.getInstance();
121
122
  constructor(
@@ -169,13 +170,13 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
169
170
  if (conversation.attributes && conversation.attributes['subtype'] === 'info') {
170
171
  return;
171
172
  }
172
- if (conversation.is_new && that.isInitialized) {
173
+ if (conversation.is_new && this.isInitialized) {
173
174
  that.manageTabNotification(false, 'conv-added')
174
175
  // this.soundMessage();
175
176
  }
176
- if(this.g.isOpen === false && conversation.sender !== this.g.senderId && !isInfo(conversation)){
177
- that.g.isOpenNewMessage = true;
177
+ if(this.g.isOpen === false){
178
178
  that.lastConversation = conversation;
179
+ that.g.isOpenNewMessage = true;
179
180
  }
180
181
  } else {
181
182
  //widget closed
@@ -223,7 +224,6 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
223
224
  that.lastConversation = conversation;
224
225
  that.g.isOpenNewMessage = true;
225
226
  that.logger.debug('[APP-COMP] lastconversationnn', that.lastConversation)
226
- that.logger.debug('[APP-COMP] lastconversationnn message' + JSON.stringify(that.lastConversation?.attributes?.commands))
227
227
  }
228
228
  let badgeNewConverstionNumber = that.conversationsHandlerService.countIsNew()
229
229
  that.g.setParameter('conversationsBadge', badgeNewConverstionNumber);
@@ -2319,7 +2319,6 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
2319
2319
  this.el.nativeElement.style.setProperty('--chat-header-height', this.g.hideHeaderConversation? '0px': null)
2320
2320
  this.el.nativeElement.style.setProperty('--font-size-bubble-message', this.g.fontSize)
2321
2321
  this.el.nativeElement.style.setProperty('--font-family-bubble-message', this.g.fontFamily)
2322
- this.el.nativeElement.style.setProperty('--chat-footer-close-button-height', this.g.closeChatInConversation? '30px': '0px')
2323
2322
 
2324
2323
  }
2325
2324
 
@@ -25,7 +25,6 @@ import { InfoMessageComponent } from './component/message/info-message/info-mess
25
25
  import { HtmlComponent } from './component/message/html/html.component';
26
26
  import { FrameComponent } from './component/message/frame/frame.component';
27
27
  import { AudioComponent } from './component/message/audio/audio.component';
28
- import { AudioSyncComponent } from './component/message/audio-sync/audio-sync.component';
29
28
  import { UserTypingComponent } from './../chat21-core/utils/user-typing/user-typing.component';
30
29
  /** MESSAGE ATTACHMENTS COMPONENTS */
31
30
  import { MessageAttachmentComponent } from './component/message-attachment/message-attachment.component';
@@ -137,11 +136,6 @@ import { Rules } from './utils/rules';
137
136
  import { ScriptService } from 'src/chat21-core/providers/scripts/script.service';
138
137
  import { CarouselComponent } from './component/message/carousel/carousel.component';
139
138
  import { BrandService } from './providers/brand.service';
140
- import { OpenAiVoiceProviderService } from './providers/voice/STT&TTS/openai-voice.provider';
141
- import {
142
- SpeechToTextProvider,
143
- TextToSpeechProvider,
144
- } from './providers/voice/STT&TTS/speech-provider.abstract';
145
139
  import { ErrorAlertComponent } from './component/error-alert/error-alert.component';
146
140
  import { ConfirmCloseComponent } from './modals/confirm-close/confirm-close.component';
147
141
 
@@ -306,7 +300,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
306
300
  LinkButtonComponent,
307
301
  TextButtonComponent,
308
302
  AudioComponent,
309
- AudioSyncComponent,
310
303
  UserTypingComponent,
311
304
  /**DIRECTIVES */
312
305
  HtmlEntitiesEncodePipe,
@@ -412,8 +405,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
412
405
  WaitingService,
413
406
  ScriptService,
414
407
  BrandService,
415
- { provide: SpeechToTextProvider, useExisting: OpenAiVoiceProviderService },
416
- { provide: TextToSpeechProvider, useExisting: OpenAiVoiceProviderService },
417
408
  provideHttpClient(withInterceptorsFromDi())
418
409
  ],
419
410
  bootstrap: [AppComponent]
@@ -4,8 +4,7 @@
4
4
  <div id="chat21-conversation-component"
5
5
  #afConversationComponent
6
6
  tabindex="1500"
7
- aria-modal="true"
8
- [class.chat21-conversation--close-stream-active]="closeStreamButtonActiveForSheetBottom()">
7
+ aria-modal="true">
9
8
 
10
9
  <!-- HEADER -->
11
10
  <chat-conversation-header
@@ -67,7 +66,6 @@
67
66
  [showThinkingMessage]="showThinkingMessage"
68
67
  [lastServerSenderKind]="lastServerSenderKind"
69
68
  [fullscreenMode]="g?.fullscreenMode"
70
- [isStreamAudioActive]="isStreamAudioActive"
71
69
  [translationMap]="translationMapContent"
72
70
  [stylesMap]="stylesMap"
73
71
  (onBeforeMessageRender)="onBeforeMessageRenderFN($event)"
@@ -134,14 +132,12 @@
134
132
  [showAttachmentFooterButton]="g?.showAttachmentFooterButton"
135
133
  [showEmojiFooterButton]="g?.showEmojiFooterButton"
136
134
  [showAudioRecorderFooterButton]="g?.showAudioRecorderFooterButton"
137
- [showAudioStreamFooterButton]="g?.showAudioStreamFooterButton"
138
135
  [hideTextAreaContent]="(g?.singleConversation && hideTextAreaContent) || (isConversationArchived && !g?.allowReopen)"
139
136
  [isConversationArchived]="isConversationArchived"
140
137
  [hideTextReply]="hideFooterTextReply"
141
138
  [isMobile]="g?.isMobile"
142
139
  [isEmojiiPickerShow]="isEmojiiPickerShow"
143
140
  [footerMessagePlaceholder]="footerMessagePlaceholder"
144
- [closeChatInConversation]="g?.closeChatInConversation"
145
141
  [fileUploadAccept]="g?.fileUploadAccept"
146
142
  [dropEvent]="dropEvent"
147
143
  [poweredBy]="g?.poweredBy"
@@ -152,9 +148,7 @@
152
148
  (onAfterSendMessage)="onAfterSendMessageFN($event)"
153
149
  (onChangeTextArea)="onChangeTextArea($event)"
154
150
  (onAttachmentFileButtonClicked)="onAttachmentFileButtonClicked($event)"
155
- (onNewConversationButtonClicked)="onNewConversationButtonClickedFN($event)"
156
- (onStreamAudioActiveChange)="onStreamAudioActiveChange($event)"
157
- (onCloseChatButtonClicked)="onCloseChatButtonClickedFN($event)">
151
+ (onNewConversationButtonClicked)="onNewConversationButtonClickedFN($event)">
158
152
  </chat-conversation-footer>
159
153
 
160
154
  </div>
@@ -137,7 +137,7 @@
137
137
  #dropZone_container{
138
138
  position: absolute;
139
139
  top: 52px;
140
- bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height) + var(--chat-footer-close-button-height));
140
+ bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height));
141
141
  left: 0;
142
142
  right: 0;
143
143
  background-color: rgba(240,248,255,0.6);
@@ -240,17 +240,7 @@ dialog:-internal-dialog-in-top-layer{
240
240
 
241
241
 
242
242
  ::ng-deep .chat21-sheet-content{
243
- bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height) + var(--chat-footer-close-button-height) + 34px)!important;
244
- }
245
-
246
- /* Con `.close-stream-button` (stream in ascolto): spazio per alert stream sopra il footer */
247
- #chat21-conversation-component.chat21-conversation--close-stream-active ::ng-deep .chat21-sheet-content {
248
- bottom: calc(
249
- var(--chat-footer-logo-height) +
250
- var(--chat-footer-height) +
251
- var(--chat-footer-stream-button-height) +
252
- 34px
253
- ) !important;
243
+ bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height) + 34px)!important;
254
244
  }
255
245
 
256
246
  }