@visma-swno/gaia-chat-ui 4.1.0 → 4.2.0-beta.2

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 (155) hide show
  1. package/CHANGELOG.md +100 -100
  2. package/README.md +239 -55
  3. package/dist/app/app.d.ts +51 -15
  4. package/dist/chart-block-DYZfc12a.js +112 -0
  5. package/dist/components/{disclaimer → composer/disclaimer}/disclaimer.d.ts +2 -2
  6. package/dist/components/{message-composer → composer}/message-composer.d.ts +10 -13
  7. package/dist/components/{message-composer → composer}/resize-controller.d.ts +1 -1
  8. package/dist/components/conversation/activity-indicator/activity-indicator.d.ts +17 -0
  9. package/dist/components/conversation/conversation.d.ts +12 -25
  10. package/dist/components/conversation/conversation.styles.d.ts +1 -1
  11. package/dist/components/{markdown-content → conversation/markdown-content}/markdown-content.d.ts +5 -2
  12. package/dist/components/conversation/scroll-utils.d.ts +20 -0
  13. package/dist/components/{welcome-message → conversation/welcome-message}/welcome-message.d.ts +4 -5
  14. package/dist/components/feedback/feedback.d.ts +6 -7
  15. package/dist/components/layout/app-header/app-header.d.ts +25 -0
  16. package/dist/components/layout/connection-status-overlay/connection-status-overlay.d.ts +12 -0
  17. package/dist/components/{error-notification → layout/error-notification}/error-notification.d.ts +4 -4
  18. package/dist/components/message/message.d.ts +69 -3
  19. package/dist/components/message/renderers/chart-block/chart-block.d.ts +27 -0
  20. package/dist/components/message/renderers/chart-block/chart-block.styles.d.ts +2 -0
  21. package/dist/components/message/renderers/tool-approval-block.d.ts +17 -0
  22. package/dist/components/message/renderers/tool-status-block.d.ts +21 -0
  23. package/dist/components/message/renderers/tool-status-block.styles.d.ts +2 -0
  24. package/dist/components/{typing-indicator → message/renderers/typing-indicator}/typing-indicator.d.ts +2 -2
  25. package/dist/components/{avatar → primitives/avatar}/avatar.d.ts +3 -3
  26. package/dist/components/{button → primitives/button}/button.d.ts +2 -2
  27. package/dist/components/primitives/icon/icon-library.generated.d.ts +4 -0
  28. package/dist/components/primitives/icon/icon-registry.d.ts +35 -0
  29. package/dist/components/primitives/icon/icon.d.ts +16 -0
  30. package/dist/components/{popover → primitives/popover}/popover.d.ts +3 -2
  31. package/dist/components/primitives/popover/popover.styles.d.ts +2 -0
  32. package/dist/components/{spinner → primitives/spinner}/spinner.d.ts +2 -2
  33. package/dist/components/primitives/spinner/spinner.styles.d.ts +2 -0
  34. package/dist/components/shared/animations.styles.d.ts +14 -0
  35. package/dist/components/shared/error-boundary.d.ts +15 -0
  36. package/dist/components/shared/error-boundary.styles.d.ts +2 -0
  37. package/dist/components/shared/render-json-value.d.ts +2 -0
  38. package/dist/core/adapters/message-mapper.d.ts +136 -0
  39. package/dist/core/adapters/tool-utils.d.ts +67 -0
  40. package/dist/core/errors.d.ts +46 -0
  41. package/dist/core/messages.d.ts +72 -0
  42. package/dist/core/store/auth-coordinator.d.ts +29 -0
  43. package/dist/core/store/bootstrap-loader.d.ts +10 -0
  44. package/dist/core/store/chat-state-container.d.ts +19 -0
  45. package/dist/core/store/chat-store.d.ts +106 -0
  46. package/dist/core/store/config-manager.d.ts +36 -0
  47. package/dist/core/store/feedback-manager.d.ts +4 -0
  48. package/dist/core/store/index.d.ts +11 -0
  49. package/dist/core/store/session-manager.d.ts +39 -0
  50. package/dist/core/store/store-context.d.ts +12 -0
  51. package/dist/core/store/store-controller.d.ts +19 -0
  52. package/dist/core/store/support-manager.d.ts +30 -0
  53. package/dist/core/store/tool-registry.d.ts +23 -0
  54. package/dist/core/tools/echarts-tool.d.ts +3 -0
  55. package/dist/core/types.d.ts +62 -71
  56. package/dist/{da-BvesG8rb.js → da-BoJQ3AZC.js} +33 -14
  57. package/dist/echarts-1kWCFQ2W.js +44024 -0
  58. package/dist/{fi-BqDD90sr.js → fi-B10q-5gh.js} +33 -14
  59. package/dist/generated/locales/da.d.ts +29 -9
  60. package/dist/generated/locales/fi.d.ts +29 -9
  61. package/dist/generated/locales/nb.d.ts +29 -9
  62. package/dist/generated/locales/nl.d.ts +29 -9
  63. package/dist/generated/locales/sv.d.ts +29 -9
  64. package/dist/index-C_1azLkG.js +13371 -0
  65. package/dist/index.d.ts +4 -1
  66. package/dist/index.es.js +4 -2
  67. package/dist/index.umd.js +620 -395
  68. package/dist/learning-universe-DPQzFukl.js +5 -0
  69. package/dist/markdown-CD6L_ZXu.js +1628 -0
  70. package/dist/{nb-DKMbE0D8.js → nb-C-lyw_Di.js} +33 -14
  71. package/dist/{nl-rVeh1hpC.js → nl-C91EhoSO.js} +33 -14
  72. package/dist/services/agent-service.d.ts +154 -0
  73. package/dist/services/agent-subscriber.d.ts +42 -0
  74. package/dist/services/api-client.d.ts +84 -0
  75. package/dist/services/api-schemas.d.ts +205 -0
  76. package/dist/services/auth-service.d.ts +64 -0
  77. package/dist/services/index.d.ts +9 -0
  78. package/dist/services/run-coordinator.d.ts +57 -0
  79. package/dist/services/storage-service.d.ts +29 -0
  80. package/dist/services/support-service.d.ts +100 -1
  81. package/dist/services/thread-rehydrator.d.ts +9 -0
  82. package/dist/signalr-BjF2V9mZ.js +1776 -0
  83. package/dist/{sv--VXw-bL8.js → sv-B3z601zM.js} +33 -14
  84. package/dist/{core/events/public/app.d.ts → types/events.d.ts} +13 -6
  85. package/dist/types/frontend-tool.d.ts +43 -0
  86. package/dist/types/index.d.ts +9 -0
  87. package/dist/utils/polling-task.d.ts +9 -0
  88. package/dist/vsn-DOuzJWsl.js +29 -0
  89. package/package.json +122 -113
  90. package/dist/app/controllers/error-controller.d.ts +0 -10
  91. package/dist/auth/auth-errors.d.ts +0 -17
  92. package/dist/auth/auth-provider.d.ts +0 -10
  93. package/dist/auth/strategies/base-strategy.d.ts +0 -21
  94. package/dist/auth/strategies/null-auth-strategy.d.ts +0 -8
  95. package/dist/auth/strategies/visitor-token-strategy.d.ts +0 -9
  96. package/dist/auth/strategies/visma-token-strategy.d.ts +0 -9
  97. package/dist/auth/strategy-factory.d.ts +0 -13
  98. package/dist/auth/token-cache.d.ts +0 -17
  99. package/dist/auth/token-parser.d.ts +0 -6
  100. package/dist/auth/types.d.ts +0 -17
  101. package/dist/components/app-header/app-header.d.ts +0 -25
  102. package/dist/components/conversation/message-renderers.d.ts +0 -39
  103. package/dist/components/conversation/scroll-controller.d.ts +0 -47
  104. package/dist/components/icon/icon-library.d.ts +0 -40
  105. package/dist/components/icon/icon.d.ts +0 -19
  106. package/dist/components/shared/watch.d.ts +0 -11
  107. package/dist/components/source-list/source-list.d.ts +0 -15
  108. package/dist/core/context/app-context.d.ts +0 -49
  109. package/dist/core/effects/bootstrap-effect.d.ts +0 -13
  110. package/dist/core/effects/conversation-effect.d.ts +0 -14
  111. package/dist/core/effects/feedback-effect.d.ts +0 -12
  112. package/dist/core/effects/stream-effect.d.ts +0 -23
  113. package/dist/core/effects/stream-event-router.d.ts +0 -9
  114. package/dist/core/effects/support-effect.d.ts +0 -33
  115. package/dist/core/effects/task-runner.d.ts +0 -5
  116. package/dist/core/errors/app-error.d.ts +0 -14
  117. package/dist/core/events/transport/sse.d.ts +0 -74
  118. package/dist/core/events/transport/ws.d.ts +0 -33
  119. package/dist/core/state/index.d.ts +0 -9
  120. package/dist/core/state/root-reducer.d.ts +0 -18
  121. package/dist/core/state/slices/config-slice.d.ts +0 -19
  122. package/dist/core/state/slices/messages-slice.d.ts +0 -34
  123. package/dist/core/state/slices/session-slice.d.ts +0 -36
  124. package/dist/core/state/slices/ui-slice.d.ts +0 -28
  125. package/dist/core/state/store.d.ts +0 -11
  126. package/dist/core/utils/message-factory.d.ts +0 -14
  127. package/dist/index-CRx8bU5z.js +0 -7847
  128. package/dist/infra/http/api-client.d.ts +0 -13
  129. package/dist/infra/http/api-error.d.ts +0 -21
  130. package/dist/infra/http/auth-header-strategy.d.ts +0 -14
  131. package/dist/infra/http/guards.d.ts +0 -5
  132. package/dist/infra/signalr/signalr-error.d.ts +0 -4
  133. package/dist/infra/sse/sse.d.ts +0 -1
  134. package/dist/infra/sse/stream-error.d.ts +0 -5
  135. package/dist/infra/storage/bootstrap-config-storage.d.ts +0 -9
  136. package/dist/infra/storage/conversation-id-storage.d.ts +0 -7
  137. package/dist/infra/storage/types.d.ts +0 -5
  138. package/dist/infra/storage/visitor-token-storage.d.ts +0 -7
  139. package/dist/services/bootstrap-service.d.ts +0 -23
  140. package/dist/services/chat-service.d.ts +0 -30
  141. package/dist/services/feedback-service.d.ts +0 -12
  142. /package/dist/components/{disclaimer → composer/disclaimer}/disclaimer.styles.d.ts +0 -0
  143. /package/dist/components/{message-composer → composer}/message-composer.styles.d.ts +0 -0
  144. /package/dist/components/{app-header/app-header.styles.d.ts → conversation/activity-indicator/activity-indicator.styles.d.ts} +0 -0
  145. /package/dist/components/{markdown-content → conversation/markdown-content}/markdown-content.styles.d.ts +0 -0
  146. /package/dist/components/{welcome-message → conversation/welcome-message}/welcome-message.styles.d.ts +0 -0
  147. /package/dist/components/{avatar/avatar.styles.d.ts → layout/app-header/app-header.styles.d.ts} +0 -0
  148. /package/dist/components/{button/button.styles.d.ts → layout/connection-status-overlay/connection-status-overlay.styles.d.ts} +0 -0
  149. /package/dist/components/{error-notification → layout/error-notification}/error-notification.styles.d.ts +0 -0
  150. /package/dist/components/{icon/icon.styles.d.ts → message/renderers/tool-approval-block.styles.d.ts} +0 -0
  151. /package/dist/components/{typing-indicator → message/renderers/typing-indicator}/typing-indicator.styles.d.ts +0 -0
  152. /package/dist/components/{popover/popover.styles.d.ts → primitives/avatar/avatar.styles.d.ts} +0 -0
  153. /package/dist/components/{source-list/source-list.styles.d.ts → primitives/button/button.styles.d.ts} +0 -0
  154. /package/dist/components/{spinner/spinner.styles.d.ts → primitives/icon/icon.styles.d.ts} +0 -0
  155. /package/dist/{core/types → types}/host-context.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,100 +1,100 @@
1
- # Changelog
2
-
3
- ## [4.1.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v4.0.0...web-component@v4.1.0) (2026-01-23)
4
-
5
-
6
- ### Features
7
-
8
- * **web-component:** support fullscreen layout up to any size ([#1643](https://github.com/visma-swno/vsn-assistant/issues/1643)) ([e8be725](https://github.com/visma-swno/vsn-assistant/commit/e8be725c288ef0262b316f4a8d4891c4516bb537)), closes [#1619](https://github.com/visma-swno/vsn-assistant/issues/1619)
9
- * **web-component:** update chat button labels and tooltips for clarity ([#1682](https://github.com/visma-swno/vsn-assistant/issues/1682)) ([4954481](https://github.com/visma-swno/vsn-assistant/commit/4954481edd93eb9f10689d97666149379da0263f))
10
-
11
-
12
- ### Bug Fixes
13
-
14
- * upgrade set-cookie-parser to 2.7.2 to address CVE ([#1532](https://github.com/visma-swno/vsn-assistant/issues/1532)) ([abc2a91](https://github.com/visma-swno/vsn-assistant/commit/abc2a91f24c1ea4c9800f086616ad486eb7b7843)), closes [#1355](https://github.com/visma-swno/vsn-assistant/issues/1355)
15
- * **webcomponent:** prevent text break for any character in tables ([#1681](https://github.com/visma-swno/vsn-assistant/issues/1681)) ([26160fb](https://github.com/visma-swno/vsn-assistant/commit/26160fb70a0f72fe010e93f5b1af5d8dd8c3a300)), closes [#1668](https://github.com/visma-swno/vsn-assistant/issues/1668)
16
-
17
- ## [4.0.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v3.0.0...web-component@v4.0.0) (2025-12-02)
18
-
19
-
20
- ### Features
21
-
22
- * add Dutch and Finnish language support ([#1488](https://github.com/visma-swno/vsn-assistant/issues/1488)) ([1e2bf12](https://github.com/visma-swno/vsn-assistant/commit/1e2bf12b9fb544a248b1e666d2684efbceb9a93c))
23
- * add icon component ([#1209](https://github.com/visma-swno/vsn-assistant/issues/1209)) ([ec48ccd](https://github.com/visma-swno/vsn-assistant/commit/ec48ccd63c1737388168a40431b28d6dd7cd2931))
24
- * add popover/tooltip component for icon buttons ([#1169](https://github.com/visma-swno/vsn-assistant/issues/1169)) ([#1318](https://github.com/visma-swno/vsn-assistant/issues/1318)) ([9eeed50](https://github.com/visma-swno/vsn-assistant/commit/9eeed50f2b502f618dd0a11dcc244e6cc8cd486d))
25
- * implement Host Context API for context-aware conversations ([#1313](https://github.com/visma-swno/vsn-assistant/issues/1313)) ([3a7a973](https://github.com/visma-swno/vsn-assistant/commit/3a7a9733c4f6d6c21d1952c137a36e7f3ccc88f0))
26
- * **support:** web-component sends outbound support requests over HTTP ([#1435](https://github.com/visma-swno/vsn-assistant/issues/1435)) ([0f6c5a0](https://github.com/visma-swno/vsn-assistant/commit/0f6c5a0693f21bab2f312d3d987d7ce16eea763b))
27
- * **web-component:** support relative image sources ([#1487](https://github.com/visma-swno/vsn-assistant/issues/1487)) ([6ccc8f9](https://github.com/visma-swno/vsn-assistant/commit/6ccc8f91a1305c13422f1ffa7e444b5cb92ba7b7))
28
-
29
-
30
- ### Bug Fixes
31
-
32
- * add white background ([#1207](https://github.com/visma-swno/vsn-assistant/issues/1207)) ([9fb01d4](https://github.com/visma-swno/vsn-assistant/commit/9fb01d4b0579f195915243ed5e39d0d726d43b65)), closes [#1202](https://github.com/visma-swno/vsn-assistant/issues/1202)
33
- * **deps:** bump js-yaml from 4.1.0 to 4.1.1 in /web-component ([#1408](https://github.com/visma-swno/vsn-assistant/issues/1408)) ([475aa18](https://github.com/visma-swno/vsn-assistant/commit/475aa1893ce03351785a1031cab3f4bf29fa1c53))
34
- * popover is hidden when slot element is disabled ([#1334](https://github.com/visma-swno/vsn-assistant/issues/1334)) ([fe78b8f](https://github.com/visma-swno/vsn-assistant/commit/fe78b8fc936b06db2b91d504ee4cb62c73963a46))
35
- * re-add supporthub methods so support both old and new gaia-chat ([#1438](https://github.com/visma-swno/vsn-assistant/issues/1438)) ([ae86b2d](https://github.com/visma-swno/vsn-assistant/commit/ae86b2d76bf05050e213f24c499130475c4c6a15))
36
-
37
-
38
- ### Build System
39
-
40
- * **deps-dev:** bump happy-dom from 19.0.2 to 20.0.0 in /web-component in the npm_and_yarn group across 1 directory ([#1187](https://github.com/visma-swno/vsn-assistant/issues/1187)) ([1aab790](https://github.com/visma-swno/vsn-assistant/commit/1aab790aac45be55497fe29ddc82ca542e30ef69))
41
-
42
- ## [3.0.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v2.1.3...web-component@v3.0.0) (2025-10-14)
43
-
44
-
45
- ### ⚠ BREAKING CHANGES
46
-
47
- * The authentication system has been completely redesigned for better flexibility and security.
48
- * **deps-dev:** <a href="https://redirect.github.com/capricorn86/happy-dom/issues/1620">#1620</a> Release v18.0.0</li> <li>See full diff in <a href="https://github.com/capricorn86/happy-dom/compare/v18.0.1...v19.0.2">compare view</a></li> </ul> </details> <br />
49
-
50
- ### Features
51
-
52
- * add on-demand callback for token refresh ([#1192](https://github.com/visma-swno/vsn-assistant/issues/1192)) ([e5d6918](https://github.com/visma-swno/vsn-assistant/commit/e5d6918a9dc3eacecb2a4df77e724b9a53805a85))
53
-
54
-
55
- ### Bug Fixes
56
-
57
- * add fixed container sizes ([#1188](https://github.com/visma-swno/vsn-assistant/issues/1188)) ([b2b30c9](https://github.com/visma-swno/vsn-assistant/commit/b2b30c91da672beff532409436ab3037f53c66bc))
58
-
59
-
60
- ### Build System
61
-
62
- * **deps-dev:** bump happy-dom from 18.0.1 to 19.0.2 in /web-component ([#1158](https://github.com/visma-swno/vsn-assistant/issues/1158)) ([8eb4203](https://github.com/visma-swno/vsn-assistant/commit/8eb420315bbf0f2daae0b121570aba374c5af7a5))
63
-
64
- ## [2.1.3](https://github.com/visma-swno/vsn-assistant/compare/web-component@v2.1.2...web-component@v2.1.3) (2025-09-26)
65
-
66
-
67
- ### Bug Fixes
68
-
69
- * support dynamic locale updates ([#1148](https://github.com/visma-swno/vsn-assistant/issues/1148)) ([d57b277](https://github.com/visma-swno/vsn-assistant/commit/d57b2773b66f31f8fe09b6e92a62aeb76842db64))
70
-
71
- ## 2.1.2 (2025-09-25)
72
-
73
-
74
- ### Features
75
-
76
- * add custom token expiry timer ([#1111](https://github.com/visma-swno/vsn-assistant/issues/1111)) ([f9e8a0c](https://github.com/visma-swno/vsn-assistant/commit/f9e8a0cfbcb67bbce6259582fe65f8478efe86ca))
77
- * chat sends optional partner id ([#1066](https://github.com/visma-swno/vsn-assistant/issues/1066)) ([6ffcbbb](https://github.com/visma-swno/vsn-assistant/commit/6ffcbbbcd39411269e2e1e5cb991922989e781fa))
78
- * make web component closeable ([#1069](https://github.com/visma-swno/vsn-assistant/issues/1069)) ([adbf47c](https://github.com/visma-swno/vsn-assistant/commit/adbf47cb91f70d1e67e33bd2a15df83b5c1ce965))
79
- * **wc:** complete overhaul of the web component ([#1006](https://github.com/visma-swno/vsn-assistant/issues/1006)) ([51bc5b4](https://github.com/visma-swno/vsn-assistant/commit/51bc5b4875c28eb18ee78d9a8bb5f167f45aa1ab))
80
-
81
-
82
- ### Bug Fixes
83
-
84
- * add custom prompt for support feedback ([#1082](https://github.com/visma-swno/vsn-assistant/issues/1082)) ([d0098ae](https://github.com/visma-swno/vsn-assistant/commit/d0098aef43939455c3b0de9324c65ec696b0a4b2))
85
- * add fallback for operator image ([#1081](https://github.com/visma-swno/vsn-assistant/issues/1081)) ([a2fd4ee](https://github.com/visma-swno/vsn-assistant/commit/a2fd4ee8ad4af4872bda9678402f15ced4de930b))
86
- * add padding for macOS overlay scrollbars ([#1073](https://github.com/visma-swno/vsn-assistant/issues/1073)) ([7a837d9](https://github.com/visma-swno/vsn-assistant/commit/7a837d91c46c6a53b7a540c1f827292bffe87b85))
87
- * add support for swedish and danish ([#1113](https://github.com/visma-swno/vsn-assistant/issues/1113)) ([904ff26](https://github.com/visma-swno/vsn-assistant/commit/904ff26a553a3ac8c611268e6dd41e90a442fa39))
88
- * display error message when profile is incorrect ([#1108](https://github.com/visma-swno/vsn-assistant/issues/1108)) ([59c8008](https://github.com/visma-swno/vsn-assistant/commit/59c800804ad3aebb6ce3c8ebb21325cf7dc7d7a0))
89
- * move icons to icon-folder ([#1061](https://github.com/visma-swno/vsn-assistant/issues/1061)) ([e83abf2](https://github.com/visma-swno/vsn-assistant/commit/e83abf270f648b6a4a6d8e18ed7dc03a31b6c73d))
90
- * replace rem with px ([#1102](https://github.com/visma-swno/vsn-assistant/issues/1102)) ([5e08cb8](https://github.com/visma-swno/vsn-assistant/commit/5e08cb81df94edbdd026817d59849a1e98284e8a))
91
- * reset state on principal change ([#1060](https://github.com/visma-swno/vsn-assistant/issues/1060)) ([369f12a](https://github.com/visma-swno/vsn-assistant/commit/369f12a0f13308dfab5e414e8c146236a5ef7afe))
92
- * scope down error controller ([#1070](https://github.com/visma-swno/vsn-assistant/issues/1070)) ([8c51382](https://github.com/visma-swno/vsn-assistant/commit/8c51382fd0716b90fe7150a8ec53e7c6ced83928))
93
- * services dynamically change base url ([#1118](https://github.com/visma-swno/vsn-assistant/issues/1118)) ([bc0e59e](https://github.com/visma-swno/vsn-assistant/commit/bc0e59e401b598e4a0c4fd82c4376735b2eb985a))
94
- * set min height for message list ([#1086](https://github.com/visma-swno/vsn-assistant/issues/1086)) ([df9159a](https://github.com/visma-swno/vsn-assistant/commit/df9159a50d10b56da0df79b7094716d885ca924c))
95
- * sse parsing in Safari browser ([#1063](https://github.com/visma-swno/vsn-assistant/issues/1063)) ([9c5d33d](https://github.com/visma-swno/vsn-assistant/commit/9c5d33d61edf3ef86775df3985ff95adcbc20de6))
96
-
97
-
98
- ### Reverts
99
-
100
- * style: add inline padding for scrollbar in Safari ([#1080](https://github.com/visma-swno/vsn-assistant/issues/1080)) ([b4fa513](https://github.com/visma-swno/vsn-assistant/commit/b4fa51393e66e1fbd2cc2d2beebcf5eecc5ae773))
1
+ # Changelog
2
+
3
+ ## [4.1.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v4.0.0...web-component@v4.1.0) (2026-01-23)
4
+
5
+
6
+ ### Features
7
+
8
+ * **web-component:** support fullscreen layout up to any size ([#1643](https://github.com/visma-swno/vsn-assistant/issues/1643)) ([e8be725](https://github.com/visma-swno/vsn-assistant/commit/e8be725c288ef0262b316f4a8d4891c4516bb537)), closes [#1619](https://github.com/visma-swno/vsn-assistant/issues/1619)
9
+ * **web-component:** update chat button labels and tooltips for clarity ([#1682](https://github.com/visma-swno/vsn-assistant/issues/1682)) ([4954481](https://github.com/visma-swno/vsn-assistant/commit/4954481edd93eb9f10689d97666149379da0263f))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * upgrade set-cookie-parser to 2.7.2 to address CVE ([#1532](https://github.com/visma-swno/vsn-assistant/issues/1532)) ([abc2a91](https://github.com/visma-swno/vsn-assistant/commit/abc2a91f24c1ea4c9800f086616ad486eb7b7843)), closes [#1355](https://github.com/visma-swno/vsn-assistant/issues/1355)
15
+ * **webcomponent:** prevent text break for any character in tables ([#1681](https://github.com/visma-swno/vsn-assistant/issues/1681)) ([26160fb](https://github.com/visma-swno/vsn-assistant/commit/26160fb70a0f72fe010e93f5b1af5d8dd8c3a300)), closes [#1668](https://github.com/visma-swno/vsn-assistant/issues/1668)
16
+
17
+ ## [4.0.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v3.0.0...web-component@v4.0.0) (2025-12-02)
18
+
19
+
20
+ ### Features
21
+
22
+ * add Dutch and Finnish language support ([#1488](https://github.com/visma-swno/vsn-assistant/issues/1488)) ([1e2bf12](https://github.com/visma-swno/vsn-assistant/commit/1e2bf12b9fb544a248b1e666d2684efbceb9a93c))
23
+ * add icon component ([#1209](https://github.com/visma-swno/vsn-assistant/issues/1209)) ([ec48ccd](https://github.com/visma-swno/vsn-assistant/commit/ec48ccd63c1737388168a40431b28d6dd7cd2931))
24
+ * add popover/tooltip component for icon buttons ([#1169](https://github.com/visma-swno/vsn-assistant/issues/1169)) ([#1318](https://github.com/visma-swno/vsn-assistant/issues/1318)) ([9eeed50](https://github.com/visma-swno/vsn-assistant/commit/9eeed50f2b502f618dd0a11dcc244e6cc8cd486d))
25
+ * implement Host Context API for context-aware conversations ([#1313](https://github.com/visma-swno/vsn-assistant/issues/1313)) ([3a7a973](https://github.com/visma-swno/vsn-assistant/commit/3a7a9733c4f6d6c21d1952c137a36e7f3ccc88f0))
26
+ * **support:** web-component sends outbound support requests over HTTP ([#1435](https://github.com/visma-swno/vsn-assistant/issues/1435)) ([0f6c5a0](https://github.com/visma-swno/vsn-assistant/commit/0f6c5a0693f21bab2f312d3d987d7ce16eea763b))
27
+ * **web-component:** support relative image sources ([#1487](https://github.com/visma-swno/vsn-assistant/issues/1487)) ([6ccc8f9](https://github.com/visma-swno/vsn-assistant/commit/6ccc8f91a1305c13422f1ffa7e444b5cb92ba7b7))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * add white background ([#1207](https://github.com/visma-swno/vsn-assistant/issues/1207)) ([9fb01d4](https://github.com/visma-swno/vsn-assistant/commit/9fb01d4b0579f195915243ed5e39d0d726d43b65)), closes [#1202](https://github.com/visma-swno/vsn-assistant/issues/1202)
33
+ * **deps:** bump js-yaml from 4.1.0 to 4.1.1 in /web-component ([#1408](https://github.com/visma-swno/vsn-assistant/issues/1408)) ([475aa18](https://github.com/visma-swno/vsn-assistant/commit/475aa1893ce03351785a1031cab3f4bf29fa1c53))
34
+ * popover is hidden when slot element is disabled ([#1334](https://github.com/visma-swno/vsn-assistant/issues/1334)) ([fe78b8f](https://github.com/visma-swno/vsn-assistant/commit/fe78b8fc936b06db2b91d504ee4cb62c73963a46))
35
+ * re-add supporthub methods so support both old and new gaia-chat ([#1438](https://github.com/visma-swno/vsn-assistant/issues/1438)) ([ae86b2d](https://github.com/visma-swno/vsn-assistant/commit/ae86b2d76bf05050e213f24c499130475c4c6a15))
36
+
37
+
38
+ ### Build System
39
+
40
+ * **deps-dev:** bump happy-dom from 19.0.2 to 20.0.0 in /web-component in the npm_and_yarn group across 1 directory ([#1187](https://github.com/visma-swno/vsn-assistant/issues/1187)) ([1aab790](https://github.com/visma-swno/vsn-assistant/commit/1aab790aac45be55497fe29ddc82ca542e30ef69))
41
+
42
+ ## [3.0.0](https://github.com/visma-swno/vsn-assistant/compare/web-component@v2.1.3...web-component@v3.0.0) (2025-10-14)
43
+
44
+
45
+ ### ⚠ BREAKING CHANGES
46
+
47
+ * The authentication system has been completely redesigned for better flexibility and security.
48
+ * **deps-dev:** <a href="https://redirect.github.com/capricorn86/happy-dom/issues/1620">#1620</a> Release v18.0.0</li> <li>See full diff in <a href="https://github.com/capricorn86/happy-dom/compare/v18.0.1...v19.0.2">compare view</a></li> </ul> </details> <br />
49
+
50
+ ### Features
51
+
52
+ * add on-demand callback for token refresh ([#1192](https://github.com/visma-swno/vsn-assistant/issues/1192)) ([e5d6918](https://github.com/visma-swno/vsn-assistant/commit/e5d6918a9dc3eacecb2a4df77e724b9a53805a85))
53
+
54
+
55
+ ### Bug Fixes
56
+
57
+ * add fixed container sizes ([#1188](https://github.com/visma-swno/vsn-assistant/issues/1188)) ([b2b30c9](https://github.com/visma-swno/vsn-assistant/commit/b2b30c91da672beff532409436ab3037f53c66bc))
58
+
59
+
60
+ ### Build System
61
+
62
+ * **deps-dev:** bump happy-dom from 18.0.1 to 19.0.2 in /web-component ([#1158](https://github.com/visma-swno/vsn-assistant/issues/1158)) ([8eb4203](https://github.com/visma-swno/vsn-assistant/commit/8eb420315bbf0f2daae0b121570aba374c5af7a5))
63
+
64
+ ## [2.1.3](https://github.com/visma-swno/vsn-assistant/compare/web-component@v2.1.2...web-component@v2.1.3) (2025-09-26)
65
+
66
+
67
+ ### Bug Fixes
68
+
69
+ * support dynamic locale updates ([#1148](https://github.com/visma-swno/vsn-assistant/issues/1148)) ([d57b277](https://github.com/visma-swno/vsn-assistant/commit/d57b2773b66f31f8fe09b6e92a62aeb76842db64))
70
+
71
+ ## 2.1.2 (2025-09-25)
72
+
73
+
74
+ ### Features
75
+
76
+ * add custom token expiry timer ([#1111](https://github.com/visma-swno/vsn-assistant/issues/1111)) ([f9e8a0c](https://github.com/visma-swno/vsn-assistant/commit/f9e8a0cfbcb67bbce6259582fe65f8478efe86ca))
77
+ * chat sends optional partner id ([#1066](https://github.com/visma-swno/vsn-assistant/issues/1066)) ([6ffcbbb](https://github.com/visma-swno/vsn-assistant/commit/6ffcbbbcd39411269e2e1e5cb991922989e781fa))
78
+ * make web component closeable ([#1069](https://github.com/visma-swno/vsn-assistant/issues/1069)) ([adbf47c](https://github.com/visma-swno/vsn-assistant/commit/adbf47cb91f70d1e67e33bd2a15df83b5c1ce965))
79
+ * **wc:** complete overhaul of the web component ([#1006](https://github.com/visma-swno/vsn-assistant/issues/1006)) ([51bc5b4](https://github.com/visma-swno/vsn-assistant/commit/51bc5b4875c28eb18ee78d9a8bb5f167f45aa1ab))
80
+
81
+
82
+ ### Bug Fixes
83
+
84
+ * add custom prompt for support feedback ([#1082](https://github.com/visma-swno/vsn-assistant/issues/1082)) ([d0098ae](https://github.com/visma-swno/vsn-assistant/commit/d0098aef43939455c3b0de9324c65ec696b0a4b2))
85
+ * add fallback for operator image ([#1081](https://github.com/visma-swno/vsn-assistant/issues/1081)) ([a2fd4ee](https://github.com/visma-swno/vsn-assistant/commit/a2fd4ee8ad4af4872bda9678402f15ced4de930b))
86
+ * add padding for macOS overlay scrollbars ([#1073](https://github.com/visma-swno/vsn-assistant/issues/1073)) ([7a837d9](https://github.com/visma-swno/vsn-assistant/commit/7a837d91c46c6a53b7a540c1f827292bffe87b85))
87
+ * add support for swedish and danish ([#1113](https://github.com/visma-swno/vsn-assistant/issues/1113)) ([904ff26](https://github.com/visma-swno/vsn-assistant/commit/904ff26a553a3ac8c611268e6dd41e90a442fa39))
88
+ * display error message when profile is incorrect ([#1108](https://github.com/visma-swno/vsn-assistant/issues/1108)) ([59c8008](https://github.com/visma-swno/vsn-assistant/commit/59c800804ad3aebb6ce3c8ebb21325cf7dc7d7a0))
89
+ * move icons to icon-folder ([#1061](https://github.com/visma-swno/vsn-assistant/issues/1061)) ([e83abf2](https://github.com/visma-swno/vsn-assistant/commit/e83abf270f648b6a4a6d8e18ed7dc03a31b6c73d))
90
+ * replace rem with px ([#1102](https://github.com/visma-swno/vsn-assistant/issues/1102)) ([5e08cb8](https://github.com/visma-swno/vsn-assistant/commit/5e08cb81df94edbdd026817d59849a1e98284e8a))
91
+ * reset state on principal change ([#1060](https://github.com/visma-swno/vsn-assistant/issues/1060)) ([369f12a](https://github.com/visma-swno/vsn-assistant/commit/369f12a0f13308dfab5e414e8c146236a5ef7afe))
92
+ * scope down error controller ([#1070](https://github.com/visma-swno/vsn-assistant/issues/1070)) ([8c51382](https://github.com/visma-swno/vsn-assistant/commit/8c51382fd0716b90fe7150a8ec53e7c6ced83928))
93
+ * services dynamically change base url ([#1118](https://github.com/visma-swno/vsn-assistant/issues/1118)) ([bc0e59e](https://github.com/visma-swno/vsn-assistant/commit/bc0e59e401b598e4a0c4fd82c4376735b2eb985a))
94
+ * set min height for message list ([#1086](https://github.com/visma-swno/vsn-assistant/issues/1086)) ([df9159a](https://github.com/visma-swno/vsn-assistant/commit/df9159a50d10b56da0df79b7094716d885ca924c))
95
+ * sse parsing in Safari browser ([#1063](https://github.com/visma-swno/vsn-assistant/issues/1063)) ([9c5d33d](https://github.com/visma-swno/vsn-assistant/commit/9c5d33d61edf3ef86775df3985ff95adcbc20de6))
96
+
97
+
98
+ ### Reverts
99
+
100
+ * style: add inline padding for scrollbar in Safari ([#1080](https://github.com/visma-swno/vsn-assistant/issues/1080)) ([b4fa513](https://github.com/visma-swno/vsn-assistant/commit/b4fa51393e66e1fbd2cc2d2beebcf5eecc5ae773))
package/README.md CHANGED
@@ -1,55 +1,239 @@
1
- # @visma-swno/gaia-chat-ui
2
-
3
- Web component library for the GAiA Assistant Chat UI, built with Lit for Visma Software Nordic products.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @visma-swno/gaia-chat-ui
9
- ```
10
-
11
- **Note:** This package requires `lit` as a peer dependency:
12
-
13
- ```bash
14
- npm install lit@^3.3.0
15
- ```
16
-
17
- ## Usage
18
-
19
- ```javascript
20
- import '@visma-swno/gaia-chat-ui';
21
- ```
22
-
23
- ```html
24
- <gaia-chat
25
- profile-id="YOUR_PROFILE_ID"
26
- base-url="https://api.assistant.vsn.dev"
27
- auth-strategy="visitor"
28
- >
29
- </gaia-chat>
30
- ```
31
-
32
- For authenticated Visma users, switch to the Visma strategy and provide a token provider. Implement caching and refresh: reuse a valid token until shortly before its `exp` claim, then silently refresh.
33
-
34
- ```html
35
- <gaia-chat
36
- id="assistant"
37
- profile-id="YOUR_PROFILE_ID"
38
- base-url="https://api.assistant.vsn.dev"
39
- auth-strategy="visma"
40
- >
41
- </gaia-chat>
42
- <script type="module">
43
- const assistant = document.getElementById('assistant');
44
-
45
- assistant.tokenProvider = async () => {
46
- const res = await fetch('/api/auth/assistant-token');
47
- const { token } = await res.json();
48
- return token;
49
- };
50
- </script>
51
- ```
52
-
53
- ## Documentation
54
-
55
- For detailed documentation and development instructions, see the [main repository](https://github.com/visma-swno/vsn-assistant).
1
+ # @visma-swno/gaia-chat-ui
2
+
3
+ Web component library for the GAiA Assistant Chat UI, built with [Lit](https://lit.dev/) for Visma Software Nordic products.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @visma-swno/gaia-chat-ui
9
+ ```
10
+
11
+ `lit` is an external dependency and must be available in your bundle:
12
+
13
+ ```bash
14
+ npm install lit@^3.3.0
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```javascript
20
+ import '@visma-swno/gaia-chat-ui';
21
+ ```
22
+
23
+ ### Visitor Mode (Anonymous)
24
+
25
+ ```html
26
+ <gaia-chat
27
+ profile-id="YOUR_PROFILE_ID"
28
+ base-url="https://api.assistant.vsn.dev"
29
+ auth-strategy="visitor"
30
+ ></gaia-chat>
31
+ ```
32
+
33
+ ### Visma Connect Mode (Authenticated)
34
+
35
+ Provide a `tokenProvider` that returns a valid OAuth access token. Implement caching and refresh: reuse a valid token until shortly before its `exp` claim, then silently refresh.
36
+
37
+ ```html
38
+ <gaia-chat
39
+ id="assistant"
40
+ profile-id="YOUR_PROFILE_ID"
41
+ base-url="https://api.assistant.vsn.dev"
42
+ auth-strategy="visma"
43
+ ></gaia-chat>
44
+
45
+ <script type="module">
46
+ const assistant = document.getElementById('assistant');
47
+
48
+ assistant.tokenProvider = async () => {
49
+ const res = await fetch('/api/auth/assistant-token');
50
+ const { token } = await res.json();
51
+ return token;
52
+ };
53
+ </script>
54
+ ```
55
+
56
+ ## Properties
57
+
58
+ | Property / Attribute | Type | Default | Description |
59
+ | ----------------------- | ----------------------- | ------------------------------------------ | ------------------------------------------------------------ |
60
+ | `base-url` | `string` | `'https://api.assistant.stag.vsn.dev'` | Backend API base URL. |
61
+ | `profile-id` | `string` | `'default'` | Assistant profile identifier. |
62
+ | `auth-strategy` | `'visitor' \| 'visma'` | `'visitor'` | Authentication strategy. |
63
+ | `closeable` | `boolean` | `true` | Show a close button in the header. |
64
+ | `selected-model` | `string` | `''` | Override the default AI model. Must be in the profile's allowed overrides. |
65
+ | `enable-charts` | `boolean` | `false` | Enable inline chart rendering via the built-in echarts tool. |
66
+ | `tokenProvider` | `() => Promise<string>` | — | Async function returning an OAuth access token (Visma mode). Set via JS. |
67
+ | `hostContextProvider` | `HostContextProvider` | — | Async function returning application context per message. Set via JS. |
68
+ | `tools` | `FrontendTool[]` | `[]` | Frontend tool definitions sent to the agent. Set via JS. |
69
+
70
+ ## Events
71
+
72
+ All events bubble and are composed (cross shadow DOM).
73
+
74
+ | Event | Detail Type | Description |
75
+ | ---------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------- |
76
+ | `conversation-cleared` | `void` | User cleared the conversation. |
77
+ | `message-sent` | `{ message: string; channel: 'assistant' \| 'support' }` | User sent a message. |
78
+ | `tool-call-approved` | `{ messageId: string }` | User approved a tool call. |
79
+ | `tool-call-declined` | `{ messageId: string }` | User declined a tool call. |
80
+ | `feedback-submitted` | `{ rating: number; comment: string \| null }` | User submitted feedback. |
81
+ | `close-requested` | `void` | User clicked the close button. |
82
+ | `tool-call` | `{ toolCallId: string; toolCallName: string; arguments: Record<string, unknown> \| string \| null; result: unknown }` | A frontend tool call was executed. |
83
+
84
+ ```javascript
85
+ document.querySelector('gaia-chat').addEventListener('message-sent', (e) => {
86
+ console.log('User sent:', e.detail.message);
87
+ });
88
+ ```
89
+
90
+ ## Methods
91
+
92
+ | Method | Description |
93
+ | -------------------- | ------------------------------------------------- |
94
+ | `clearConversation()`| Clear the current conversation and reset the chat.|
95
+ | `stopSupport()` | Stop any active support session. |
96
+
97
+ ## Host Context Provider
98
+
99
+ Provide dynamic application context with each message. The agent and its plugins can use this context for personalized responses.
100
+
101
+ ```javascript
102
+ const chat = document.querySelector('gaia-chat');
103
+
104
+ chat.hostContextProvider = async () => ({
105
+ customerId: getCurrentCustomerId(),
106
+ companyId: getCurrentCompanyId(),
107
+ partnerId: getPartnerId(),
108
+ data: {
109
+ environment: 'production',
110
+ userRole: getUserRole(),
111
+ },
112
+ });
113
+ ```
114
+
115
+ ### HostContext
116
+
117
+ ```typescript
118
+ interface HostContext {
119
+ customerId?: string;
120
+ companyId?: string;
121
+ partnerId?: string;
122
+ data?: Record<string, unknown>;
123
+ }
124
+
125
+ type HostContextProvider = () => HostContext | Promise<HostContext | null> | null;
126
+ ```
127
+
128
+ ## Frontend Tools
129
+
130
+ Register custom tools that the agent can invoke. Tool results are returned to the agent and a `tool-call` event is dispatched to the host.
131
+
132
+ ```javascript
133
+ const chat = document.querySelector('gaia-chat');
134
+
135
+ chat.tools = [
136
+ {
137
+ name: 'getInvoice',
138
+ description: 'Retrieve an invoice by ID',
139
+ parameters: {
140
+ type: 'object',
141
+ properties: {
142
+ invoiceId: { type: 'string', description: 'The invoice ID' },
143
+ },
144
+ required: ['invoiceId'],
145
+ },
146
+ },
147
+ ];
148
+
149
+ chat.addEventListener('tool-call', (e) => {
150
+ const { toolCallName, arguments: args } = e.detail;
151
+ // Handle the tool call and return data to the agent
152
+ });
153
+ ```
154
+
155
+ ### FrontendTool
156
+
157
+ ```typescript
158
+ interface FrontendTool {
159
+ name: string;
160
+ description: string;
161
+ parameters: JSONSchema7; // JSON Schema draft-07, must be type: 'object'
162
+ }
163
+ ```
164
+
165
+ ## Charts
166
+
167
+ Set `enable-charts` to enable the built-in echarts frontend tool. When enabled, the agent can render inline charts using [Apache ECharts](https://echarts.apache.org/).
168
+
169
+ ```html
170
+ <gaia-chat enable-charts></gaia-chat>
171
+ ```
172
+
173
+ ## Icon Registry
174
+
175
+ Register custom SVG icons for use in the component:
176
+
177
+ ```javascript
178
+ import { registerIcons } from '@visma-swno/gaia-chat-ui';
179
+
180
+ registerIcons({ 'my-icon': '<svg>...</svg>' });
181
+ ```
182
+
183
+ ## Styling
184
+
185
+ The component exposes CSS custom properties prefixed with `--gaia-` for theming. Set these on the `<gaia-chat>` element or any ancestor.
186
+
187
+ ### Typography
188
+
189
+ | Property | Description |
190
+ | -------------------------------- | ------------------ |
191
+ | `--gaia-font-family` | Font family |
192
+ | `--gaia-font-size-xs` … `3xl` | Font sizes |
193
+ | `--gaia-line-height-xs` … `3xl` | Line heights |
194
+ | `--gaia-font-weight-regular` | Regular weight |
195
+ | `--gaia-font-weight-medium` | Medium weight |
196
+ | `--gaia-font-weight-semibold` | Semibold weight |
197
+ | `--gaia-font-weight-bold` | Bold weight |
198
+
199
+ ### Colors
200
+
201
+ | Property group | Examples |
202
+ | ------------------------------- | ------------------------------------------------------------ |
203
+ | `--gaia-color-surface-*` | `page`, `primary`, `action`, `action-hover`, `error`, `success`, `information`, `warning`, `disabled`, `selected` |
204
+ | `--gaia-color-text-*` | `headings`, `body`, `body-secondary`, `action`, `action-hover`, `disabled`, `error`, `success`, `link-visited` |
205
+ | `--gaia-color-border-*` | `primary`, `secondary`, `tertiary`, `action`, `action-hover`, `focus`, `error`, `success` |
206
+ | `--gaia-color-icon-*` | `primary`, `action`, `action-hover`, `disabled`, `error`, `success`, `on-action`, `on-primary` |
207
+ | `--gaia-color-message-*` | `user`, `system`, `operator` |
208
+ | `--gaia-color-neutral-*` | `10` through `100` |
209
+
210
+ ### Example
211
+
212
+ ```css
213
+ gaia-chat {
214
+ --gaia-font-family: 'Inter', sans-serif;
215
+ --gaia-color-surface-page: #ffffff;
216
+ --gaia-color-surface-action: #0066cc;
217
+ --gaia-color-text-body: #1a1a1a;
218
+ --gaia-color-message-user: #e6f0ff;
219
+ }
220
+ ```
221
+
222
+ ## Localization
223
+
224
+ The component reads the `lang` attribute (on itself or `<html>`) and responds to changes at runtime. Supported locales are bundled with the component.
225
+
226
+ ```html
227
+ <gaia-chat lang="nb"></gaia-chat>
228
+ ```
229
+
230
+ ## Exports
231
+
232
+ ```typescript
233
+ import { ChatApp, ToolCallEvent, registerIcons } from '@visma-swno/gaia-chat-ui';
234
+ import type { FrontendTool, HostContext, HostContextProvider } from '@visma-swno/gaia-chat-ui';
235
+ ```
236
+
237
+ ## Documentation
238
+
239
+ For development instructions and architecture details, see the [main repository](https://github.com/visma-swno/vsn-assistant).
package/dist/app/app.d.ts CHANGED
@@ -1,37 +1,73 @@
1
1
  import { PropertyValues } from 'lit';
2
- import { TokenProvider } from '../auth/types';
3
- import { HostContextProvider } from '../core/types/host-context';
4
- import { StrategyType } from '../auth/strategy-factory';
2
+ import { StrategyType } from '../core/store';
3
+ import { TokenFetcher } from '../services/auth-service';
4
+ import { FrontendTool, HostContextProvider } from '../types';
5
5
  import { BaseElement } from '../components/shared/base-element';
6
+ /**
7
+ * Root chat widget component.
8
+ *
9
+ * Bootstraps services, manages authentication, and renders the chat UI.
10
+ * Embed in any page to add AI-powered chat with support handoff.
11
+ *
12
+ * @element gaia-chat
13
+ *
14
+ * @fires {ConversationClearedEvent} conversation-cleared - When the user clears the conversation
15
+ * @fires {MessageSentEvent} message-sent - When the user sends a message
16
+ * @fires {ToolCallApprovedEvent} tool-call-approved - When the user approves a tool call
17
+ * @fires {ToolCallDeclinedEvent} tool-call-declined - When the user declines a tool call
18
+ * @fires {FeedbackSubmittedEvent} feedback-submitted - When the user submits feedback
19
+ * @fires {CloseRequestedEvent} close-requested - When the user clicks the close button
20
+ * @fires {ToolCallEvent} tool-call - When a frontend tool call is executed
21
+ *
22
+ * @example
23
+ * ```html
24
+ * <gaia-chat
25
+ * base-url="https://api.assistant.stag.vsn.dev"
26
+ * profile-id="default"
27
+ * auth-strategy="visitor"
28
+ * ></gaia-chat>
29
+ * ```
30
+ */
6
31
  export declare class ChatApp extends BaseElement {
7
32
  static styles: import('lit').CSSResult[];
33
+ /** Backend API base URL. */
8
34
  baseUrl: string;
35
+ /** Assistant profile identifier. */
9
36
  profileId: string;
10
37
  /**
11
- * @deprecated Use hostContextProvider instead
38
+ * Partner ID for support handoff.
39
+ * @deprecated Use hostContextProvider instead.
12
40
  */
13
41
  supportPartnerId?: string;
14
- tokenProvider?: TokenProvider;
42
+ /** Async function that returns an OAuth access token for Visma Connect auth. */
43
+ tokenProvider?: TokenFetcher;
44
+ /** Async function that returns application context sent with each message. */
15
45
  hostContextProvider?: HostContextProvider;
46
+ /** Authentication strategy: "visitor" (anonymous) or "visma" (Visma Connect). */
16
47
  authStrategy: StrategyType;
48
+ /** Whether to show a close button in the header. */
17
49
  closeable: boolean;
50
+ /** Override the default AI model. Must be in the profile's allowed overrides list. */
51
+ selectedModel: string;
52
+ /** Frontend tool definitions sent to the agent. */
53
+ tools: FrontendTool[];
54
+ /** Enable inline chart rendering for the echarts frontend tool. */
55
+ enableCharts: boolean;
56
+ private get activeLang();
18
57
  private langObserver?;
19
58
  private store;
20
- private bootstrapEffect;
21
- private streamEffect;
22
- private supportEffect;
23
- private conversationEffect;
24
- private feedbackEffect;
25
- private state;
26
- private isConnectedToSupport;
27
- private unsubscribe?;
28
- private strategyFactory;
29
- private authProvider;
59
+ private storeState;
60
+ private unsubscribeStore?;
30
61
  private apiClient;
31
62
  connectedCallback(): void;
32
63
  disconnectedCallback(): void;
33
64
  private handleAuthChanged;
34
65
  willUpdate(changedProperties: PropertyValues): void;
66
+ private applySelectedModel;
67
+ /** Clears the current conversation and resets the chat. */
68
+ clearConversation(): void;
69
+ /** Stops any active support session. */
70
+ stopSupport(): void;
35
71
  render(): import('lit-html').TemplateResult<1>;
36
72
  }
37
73
  declare global {