graphdb-workbench 3.2.0-TR2 → 3.2.0-TR4

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 (246) hide show
  1. package/dist/12358.4be185f89eebea9c35bf.bundle.js +3 -0
  2. package/dist/12358.4be185f89eebea9c35bf.bundle.js.map +1 -0
  3. package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js → 12396.a1b7856e86d52282f34c.bundle.js} +2 -2
  4. package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js.map → 12396.a1b7856e86d52282f34c.bundle.js.map} +1 -1
  5. package/dist/{15535.7b170e17ee0a58970ab6.bundle.js → 15535.c58319cba275ee5baa90.bundle.js} +2 -2
  6. package/dist/{15535.7b170e17ee0a58970ab6.bundle.js.map → 15535.c58319cba275ee5baa90.bundle.js.map} +1 -1
  7. package/dist/{16162.67e7c1f5f313481b1e80.bundle.js → 16162.2dc986d04777c8ae9489.bundle.js} +2 -2
  8. package/dist/{16162.67e7c1f5f313481b1e80.bundle.js.map → 16162.2dc986d04777c8ae9489.bundle.js.map} +1 -1
  9. package/dist/19402.7f6ea977348338acc824.bundle.js +2 -0
  10. package/dist/19402.7f6ea977348338acc824.bundle.js.map +1 -0
  11. package/dist/{20287.dd5bc263fe26adf34965.bundle.js → 20287.7cfc312df157f5bdea97.bundle.js} +2 -2
  12. package/dist/{20287.dd5bc263fe26adf34965.bundle.js.map → 20287.7cfc312df157f5bdea97.bundle.js.map} +1 -1
  13. package/dist/{21136.b7efcb40fb956ff1109c.bundle.js → 21136.67a9bcf4bb0c201d3fd1.bundle.js} +2 -2
  14. package/dist/{21136.b7efcb40fb956ff1109c.bundle.js.map → 21136.67a9bcf4bb0c201d3fd1.bundle.js.map} +1 -1
  15. package/dist/21142.7f8327c28d939fa26009.bundle.js +2 -0
  16. package/dist/21142.7f8327c28d939fa26009.bundle.js.map +1 -0
  17. package/dist/{21170.7832554eab9eaade6ffb.bundle.js → 21170.cecdf25699f68d4cf749.bundle.js} +2 -2
  18. package/dist/{21170.7832554eab9eaade6ffb.bundle.js.map → 21170.cecdf25699f68d4cf749.bundle.js.map} +1 -1
  19. package/dist/21195.e2c1fc69631041b97f8e.bundle.js +2 -0
  20. package/dist/21195.e2c1fc69631041b97f8e.bundle.js.map +1 -0
  21. package/dist/{25747.c01110e23b922cdd3d9e.bundle.js → 25747.c3dc5503ad696af5d5a3.bundle.js} +2 -2
  22. package/dist/{25747.c01110e23b922cdd3d9e.bundle.js.map → 25747.c3dc5503ad696af5d5a3.bundle.js.map} +1 -1
  23. package/dist/{27580.5a421770ab66d2dedc37.bundle.js → 27580.d038d43102a3e9eec97d.bundle.js} +2 -2
  24. package/dist/{27580.5a421770ab66d2dedc37.bundle.js.map → 27580.d038d43102a3e9eec97d.bundle.js.map} +1 -1
  25. package/dist/29350.d2791feedf54d2e4b7b6.bundle.js +2 -0
  26. package/dist/29350.d2791feedf54d2e4b7b6.bundle.js.map +1 -0
  27. package/dist/{31636.54e2817f8ae3998a34b3.bundle.js → 31636.fc6eba63d6d985d31673.bundle.js} +2 -2
  28. package/dist/{31636.54e2817f8ae3998a34b3.bundle.js.map → 31636.fc6eba63d6d985d31673.bundle.js.map} +1 -1
  29. package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js → 32489.e9af1ec463e2d4136732.bundle.js} +2 -2
  30. package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js.map → 32489.e9af1ec463e2d4136732.bundle.js.map} +1 -1
  31. package/dist/{34330.4b46c3a52d19f05fc0b2.bundle.js → 34330.990c99ea37f6cca46bad.bundle.js} +2 -2
  32. package/dist/34330.990c99ea37f6cca46bad.bundle.js.map +1 -0
  33. package/dist/{34495.be67c06c39909114bbe4.bundle.js → 34495.06c9997d58d0b0ba7152.bundle.js} +2 -2
  34. package/dist/{34495.be67c06c39909114bbe4.bundle.js.map → 34495.06c9997d58d0b0ba7152.bundle.js.map} +1 -1
  35. package/dist/36633.eba4270db7fdcf1aad4c.bundle.js +2 -0
  36. package/dist/36633.eba4270db7fdcf1aad4c.bundle.js.map +1 -0
  37. package/dist/36665.69d43b057bcfc55df3b5.bundle.js +2 -0
  38. package/dist/36665.69d43b057bcfc55df3b5.bundle.js.map +1 -0
  39. package/dist/{38360.efec913bb97c3b8588a4.bundle.js → 38360.ca92a04a1afcf9cfea7f.bundle.js} +2 -2
  40. package/dist/{38360.efec913bb97c3b8588a4.bundle.js.map → 38360.ca92a04a1afcf9cfea7f.bundle.js.map} +1 -1
  41. package/dist/{38644.800252af49cd67310834.bundle.js → 38644.29dbfb38e4089efa6697.bundle.js} +2 -2
  42. package/dist/{38644.800252af49cd67310834.bundle.js.map → 38644.29dbfb38e4089efa6697.bundle.js.map} +1 -1
  43. package/dist/{38843.29e34a5e5293cee51566.bundle.js → 38843.4b11f56e93f60fbe4e0a.bundle.js} +2 -2
  44. package/dist/{38843.29e34a5e5293cee51566.bundle.js.map → 38843.4b11f56e93f60fbe4e0a.bundle.js.map} +1 -1
  45. package/dist/{39518.0ca97879b92271d7c5e2.bundle.js → 39518.c577d83ed591fada064c.bundle.js} +2 -2
  46. package/dist/{39518.0ca97879b92271d7c5e2.bundle.js.map → 39518.c577d83ed591fada064c.bundle.js.map} +1 -1
  47. package/dist/{39539.7cea6717cc3a5ba91617.bundle.js → 39539.463ec29e136b100c0abe.bundle.js} +2 -2
  48. package/dist/{39539.7cea6717cc3a5ba91617.bundle.js.map → 39539.463ec29e136b100c0abe.bundle.js.map} +1 -1
  49. package/dist/40516.3cfaf1ff4704c038f944.bundle.js +2 -0
  50. package/dist/40516.3cfaf1ff4704c038f944.bundle.js.map +1 -0
  51. package/dist/{41453.4ae219d972a187c36bfc.bundle.js → 41453.241761ce8ff75036e5e0.bundle.js} +2 -2
  52. package/dist/{41453.4ae219d972a187c36bfc.bundle.js.map → 41453.241761ce8ff75036e5e0.bundle.js.map} +1 -1
  53. package/dist/{42129.0314e45b4b818b01b71f.bundle.js → 42129.f67dc6029cdab567bf54.bundle.js} +2 -2
  54. package/dist/{42129.0314e45b4b818b01b71f.bundle.js.map → 42129.f67dc6029cdab567bf54.bundle.js.map} +1 -1
  55. package/dist/42143.6c37997677f5ec643731.bundle.js +2 -0
  56. package/dist/42143.6c37997677f5ec643731.bundle.js.map +1 -0
  57. package/dist/{44444.02026ff20e2a843dc05b.bundle.js → 44444.a1b29c2329c7d4a39cc5.bundle.js} +2 -2
  58. package/dist/{44444.02026ff20e2a843dc05b.bundle.js.map → 44444.a1b29c2329c7d4a39cc5.bundle.js.map} +1 -1
  59. package/dist/44874.b16be286176dfe4aa766.bundle.js +2 -0
  60. package/dist/44874.b16be286176dfe4aa766.bundle.js.map +1 -0
  61. package/dist/49539.63984d5b37bc8b9a7244.bundle.js +2 -0
  62. package/dist/49539.63984d5b37bc8b9a7244.bundle.js.map +1 -0
  63. package/dist/{51087.b072d1c0e53403535283.bundle.js → 51087.1e118e7fe32a8c09d6cb.bundle.js} +2 -2
  64. package/dist/51087.1e118e7fe32a8c09d6cb.bundle.js.map +1 -0
  65. package/dist/{55217.4769c1f0615e364d8c2a.bundle.js → 55217.98a70cf01c4b7a826e82.bundle.js} +2 -2
  66. package/dist/55217.98a70cf01c4b7a826e82.bundle.js.map +1 -0
  67. package/dist/{55862.5e8602827fbf72e60cc2.bundle.js → 55862.1c3f1e807c8a05b1b6ed.bundle.js} +2 -2
  68. package/dist/{55862.5e8602827fbf72e60cc2.bundle.js.map → 55862.1c3f1e807c8a05b1b6ed.bundle.js.map} +1 -1
  69. package/dist/{58306.94b9336f68d11bdd72f0.bundle.js → 58306.a45182d200e3f8793644.bundle.js} +2 -2
  70. package/dist/{58306.94b9336f68d11bdd72f0.bundle.js.map → 58306.a45182d200e3f8793644.bundle.js.map} +1 -1
  71. package/dist/60039.5f9e955234f5eaf33372.bundle.js +2 -0
  72. package/dist/60039.5f9e955234f5eaf33372.bundle.js.map +1 -0
  73. package/dist/63415.7a4dfa072b5665c5995b.bundle.js +2 -0
  74. package/dist/63415.7a4dfa072b5665c5995b.bundle.js.map +1 -0
  75. package/dist/64118.edc8ed6671017d09ff4e.bundle.js +2 -0
  76. package/dist/64118.edc8ed6671017d09ff4e.bundle.js.map +1 -0
  77. package/dist/67232.bc980f2f0df606493105.bundle.js +2 -0
  78. package/dist/67232.bc980f2f0df606493105.bundle.js.map +1 -0
  79. package/dist/{67888.772326168aed83cbad9c.bundle.js → 67888.e21c0e4c70be6214fcd7.bundle.js} +2 -2
  80. package/dist/{67888.772326168aed83cbad9c.bundle.js.map → 67888.e21c0e4c70be6214fcd7.bundle.js.map} +1 -1
  81. package/dist/70938.c489d3ca5b00ad297139.bundle.js +2 -0
  82. package/dist/70938.c489d3ca5b00ad297139.bundle.js.map +1 -0
  83. package/dist/71920.c171884910616d02e2c6.bundle.js +2 -0
  84. package/dist/71920.c171884910616d02e2c6.bundle.js.map +1 -0
  85. package/dist/{72379.8a3290df05f18f8c65bd.bundle.js → 72379.cb41e26c33271a25816e.bundle.js} +2 -2
  86. package/dist/{72379.8a3290df05f18f8c65bd.bundle.js.map → 72379.cb41e26c33271a25816e.bundle.js.map} +1 -1
  87. package/dist/{73667.52fdbdadddafe9e9559b.bundle.js → 73667.ad957853dba08fd3be30.bundle.js} +2 -2
  88. package/dist/{73667.52fdbdadddafe9e9559b.bundle.js.map → 73667.ad957853dba08fd3be30.bundle.js.map} +1 -1
  89. package/dist/{73793.7e812bab1754ddd5efb5.bundle.js → 73793.79a311b387e5db776506.bundle.js} +2 -2
  90. package/dist/{73793.7e812bab1754ddd5efb5.bundle.js.map → 73793.79a311b387e5db776506.bundle.js.map} +1 -1
  91. package/dist/73964.7a3038b5726d50c1a051.bundle.js +2 -0
  92. package/dist/73964.7a3038b5726d50c1a051.bundle.js.map +1 -0
  93. package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js → 75282.8be5dde957dc6452c86a.bundle.js} +2 -2
  94. package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js.map → 75282.8be5dde957dc6452c86a.bundle.js.map} +1 -1
  95. package/dist/75849.0f6bab8b5749be998286.bundle.js +2 -0
  96. package/dist/75849.0f6bab8b5749be998286.bundle.js.map +1 -0
  97. package/dist/76013.9e71103dbb91bd9a558c.bundle.js +2 -0
  98. package/dist/76013.9e71103dbb91bd9a558c.bundle.js.map +1 -0
  99. package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js → 78250.dd9bdc3db3ca0c84b25a.bundle.js} +2 -2
  100. package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js.map → 78250.dd9bdc3db3ca0c84b25a.bundle.js.map} +1 -1
  101. package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js +2 -0
  102. package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js.map +1 -0
  103. package/dist/{79329.3d912887ba7e96090fb4.bundle.js → 79329.24a5e42cccee5055311a.bundle.js} +2 -2
  104. package/dist/{79329.3d912887ba7e96090fb4.bundle.js.map → 79329.24a5e42cccee5055311a.bundle.js.map} +1 -1
  105. package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js → 82926.02f08566fe1f948d9e1f.bundle.js} +2 -2
  106. package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js.map → 82926.02f08566fe1f948d9e1f.bundle.js.map} +1 -1
  107. package/dist/85609.68438b4955212d5fcb84.bundle.js +2 -0
  108. package/dist/85609.68438b4955212d5fcb84.bundle.js.map +1 -0
  109. package/dist/85788.501c7244b890d519f8cf.bundle.js +2 -0
  110. package/dist/85788.501c7244b890d519f8cf.bundle.js.map +1 -0
  111. package/dist/86142.04f4e4759998d4c37ccd.bundle.js +2 -0
  112. package/dist/86142.04f4e4759998d4c37ccd.bundle.js.map +1 -0
  113. package/dist/{89695.4ee87c52d4088115c51e.bundle.js → 89695.b7e90a123bc2875ccae4.bundle.js} +2 -2
  114. package/dist/89695.b7e90a123bc2875ccae4.bundle.js.map +1 -0
  115. package/dist/{9062.3541de664710a36fdac7.bundle.js → 9062.e1ad16e157f04b8c9dd8.bundle.js} +2 -2
  116. package/dist/{9062.3541de664710a36fdac7.bundle.js.map → 9062.e1ad16e157f04b8c9dd8.bundle.js.map} +1 -1
  117. package/dist/96089.4317e132ef8cc0033f83.bundle.js +2 -0
  118. package/dist/96089.4317e132ef8cc0033f83.bundle.js.map +1 -0
  119. package/dist/{99448.384b74c734331e5f8909.bundle.js → 99448.93e01a6a24e4a1cb0546.bundle.js} +2 -2
  120. package/dist/{99448.384b74c734331e5f8909.bundle.js.map → 99448.93e01a6a24e4a1cb0546.bundle.js.map} +1 -1
  121. package/dist/css/ttyg/chat-item-details.css +1 -1
  122. package/dist/css/ttyg/chat-panel.css +1 -1
  123. package/dist/i18n/locale-en.json +5 -1
  124. package/dist/i18n/locale-fr.json +5 -1
  125. package/dist/index.html +8 -8
  126. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  127. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  128. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  129. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  130. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  131. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  132. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  133. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  134. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  135. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  136. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  137. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  138. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  139. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  140. package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
  141. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  142. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  143. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  144. package/dist/js/angular/security/templates/user.html +2 -2
  145. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  146. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  147. package/dist/js/angular/ttyg/templates/chat-item-detail.html +5 -5
  148. package/dist/js/angular/ttyg/templates/chat-list.html +2 -2
  149. package/dist/js/angular/ttyg/templates/chat-panel.html +12 -7
  150. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  151. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
  152. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  153. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  154. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  155. package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js → legacyWorkbench.ecf6300fd72cfffbcdb6.js} +3 -3
  156. package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.map → legacyWorkbench.ecf6300fd72cfffbcdb6.js.map} +1 -1
  157. package/dist/pages/aclmanagement.html +2 -2
  158. package/dist/pages/autocomplete.html +1 -1
  159. package/dist/pages/choose-repository-type.html +1 -1
  160. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  161. package/dist/pages/create-index.html +1 -1
  162. package/dist/pages/dependencies.html +1 -1
  163. package/dist/pages/domainRangeInfo.html +2 -2
  164. package/dist/pages/edit.html +1 -1
  165. package/dist/pages/explore.html +1 -1
  166. package/dist/pages/export.html +1 -1
  167. package/dist/pages/find.html +1 -1
  168. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  169. package/dist/pages/graphs-visualizations.html +7 -7
  170. package/dist/pages/guides.html +1 -1
  171. package/dist/pages/import.html +2 -2
  172. package/dist/pages/jdbc-create.html +1 -1
  173. package/dist/pages/login.html +1 -1
  174. package/dist/pages/monitor/backup-and-restore.html +1 -1
  175. package/dist/pages/monitor/queries.html +1 -1
  176. package/dist/pages/monitor/resources.html +1 -1
  177. package/dist/pages/namespaces.html +2 -2
  178. package/dist/pages/plugins.html +1 -1
  179. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  180. package/dist/pages/rdfrank.html +2 -2
  181. package/dist/pages/repositories.html +1 -1
  182. package/dist/pages/repository.html +1 -1
  183. package/dist/pages/similarity-indexes.html +1 -1
  184. package/dist/pages/sparql-editor.html +1 -1
  185. package/dist/pages/sparql-template-create.html +1 -1
  186. package/dist/pages/ux-test1.html +2 -2
  187. package/dist/pages/webapi.html +2 -2
  188. package/dist/plugins.js +1 -1
  189. package/dist/res/swagger5/index.html +11 -11
  190. package/package.json +1 -1
  191. package/dist/12358.2061f29dc113149946a3.bundle.js +0 -3
  192. package/dist/12358.2061f29dc113149946a3.bundle.js.map +0 -1
  193. package/dist/19402.07424b4b7c9dd775d860.bundle.js +0 -2
  194. package/dist/19402.07424b4b7c9dd775d860.bundle.js.map +0 -1
  195. package/dist/21142.ec45fad4d52b36961d17.bundle.js +0 -2
  196. package/dist/21142.ec45fad4d52b36961d17.bundle.js.map +0 -1
  197. package/dist/21195.caae6cc33d755ad52df4.bundle.js +0 -2
  198. package/dist/21195.caae6cc33d755ad52df4.bundle.js.map +0 -1
  199. package/dist/29350.9976c09d5cdaa48ecb19.bundle.js +0 -2
  200. package/dist/29350.9976c09d5cdaa48ecb19.bundle.js.map +0 -1
  201. package/dist/34330.4b46c3a52d19f05fc0b2.bundle.js.map +0 -1
  202. package/dist/36633.bd17a2028ef302870ec4.bundle.js +0 -2
  203. package/dist/36633.bd17a2028ef302870ec4.bundle.js.map +0 -1
  204. package/dist/36665.eda6cfdf545f2608a6c7.bundle.js +0 -2
  205. package/dist/36665.eda6cfdf545f2608a6c7.bundle.js.map +0 -1
  206. package/dist/40516.734b24eead67142c4045.bundle.js +0 -2
  207. package/dist/40516.734b24eead67142c4045.bundle.js.map +0 -1
  208. package/dist/42143.c11e5c28f2b8e9952dbb.bundle.js +0 -2
  209. package/dist/42143.c11e5c28f2b8e9952dbb.bundle.js.map +0 -1
  210. package/dist/44874.5854c207bbe2c4f2438e.bundle.js +0 -2
  211. package/dist/44874.5854c207bbe2c4f2438e.bundle.js.map +0 -1
  212. package/dist/49539.d253a79e8b9710776e48.bundle.js +0 -2
  213. package/dist/49539.d253a79e8b9710776e48.bundle.js.map +0 -1
  214. package/dist/51087.b072d1c0e53403535283.bundle.js.map +0 -1
  215. package/dist/55217.4769c1f0615e364d8c2a.bundle.js.map +0 -1
  216. package/dist/60039.cb9262af0bc63b635c76.bundle.js +0 -2
  217. package/dist/60039.cb9262af0bc63b635c76.bundle.js.map +0 -1
  218. package/dist/63415.81af22cc29be1144e07f.bundle.js +0 -2
  219. package/dist/63415.81af22cc29be1144e07f.bundle.js.map +0 -1
  220. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js +0 -2
  221. package/dist/64118.fb6952c8ef6fc9117f35.bundle.js.map +0 -1
  222. package/dist/67232.e76f40f9d09e64ebb365.bundle.js +0 -2
  223. package/dist/67232.e76f40f9d09e64ebb365.bundle.js.map +0 -1
  224. package/dist/70938.6d0055f916f6d1bc91bb.bundle.js +0 -2
  225. package/dist/70938.6d0055f916f6d1bc91bb.bundle.js.map +0 -1
  226. package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js +0 -2
  227. package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js.map +0 -1
  228. package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js +0 -2
  229. package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js.map +0 -1
  230. package/dist/75849.bd0bdefa903741034a71.bundle.js +0 -2
  231. package/dist/75849.bd0bdefa903741034a71.bundle.js.map +0 -1
  232. package/dist/76013.3211939a02cf4fb2529e.bundle.js +0 -2
  233. package/dist/76013.3211939a02cf4fb2529e.bundle.js.map +0 -1
  234. package/dist/7928.7900a3911c83495d74dd.bundle.js +0 -2
  235. package/dist/7928.7900a3911c83495d74dd.bundle.js.map +0 -1
  236. package/dist/85609.680b755726c66ea1de34.bundle.js +0 -2
  237. package/dist/85609.680b755726c66ea1de34.bundle.js.map +0 -1
  238. package/dist/85788.4e0818c48b6f29153db4.bundle.js +0 -2
  239. package/dist/85788.4e0818c48b6f29153db4.bundle.js.map +0 -1
  240. package/dist/86142.c29959b68edc59a9b696.bundle.js +0 -2
  241. package/dist/86142.c29959b68edc59a9b696.bundle.js.map +0 -1
  242. package/dist/89695.4ee87c52d4088115c51e.bundle.js.map +0 -1
  243. package/dist/96089.7e28823f34c450de1f7e.bundle.js +0 -2
  244. package/dist/96089.7e28823f34c450de1f7e.bundle.js.map +0 -1
  245. /package/dist/{12358.2061f29dc113149946a3.bundle.js.LICENSE.txt → 12358.4be185f89eebea9c35bf.bundle.js.LICENSE.txt} +0 -0
  246. /package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.LICENSE.txt → legacyWorkbench.ecf6300fd72cfffbcdb6.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"42143.c11e5c28f2b8e9952dbb.bundle.js","mappings":"oHAAA,MAAMA,EAAiC,gCAEvCC,eAAeC,IAAI,aAAc,CAC7B,CACIC,eAAgB,yBAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WACtBC,EAASF,EAASE,OAClBC,EAAaH,EAASG,WACtBC,EAAeJ,EAASI,aACxBC,EAAsBL,EAASK,oBAC/BC,EAA+BL,EAAWM,wBAAwB,iCACxE,IAAIC,EACJ,MAAO,CACH,CACIX,eAAgB,oBAChBE,QAAS,CACLU,QAAS,4CACTC,MAAO,4BAEHX,EAAQY,WAAa,CAAC,EAAI,CAAEC,MAAOlB,MACpCK,EACHc,IAAK,SACLC,gBAAiBb,EAAWM,wBAAwB,uBAEpDQ,eAAWC,EACXC,KAAOC,GAAU,KAGbV,EAAqCH,EA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SACNC,WAAW,GACZlE,KAgCX,OA5BIA,EAAQmE,cACRL,EAAMM,KACF,CACItE,eAAgB,0BAChBE,QAAS+D,QAAQC,OAAO,CAAC,EAAG,CACxBnD,MAAO,IACRb,KAKf8D,EAAMM,KACF,CACItE,eAAgB,yBAA0BE,QAAS,IAAIA,IAI3D,CACIF,eAAgB,iCAAkCE,QAAS,IAAIA,IAEnE,CACIF,eAAgB,gCAAiCE,QAAS,IAAIA,IAElE,CACIF,eAAgB,uBAAwBE,QAAS,IAAIA,KAItD8D,K","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/guides/steps/complex/import-rdf-file/plugin.js"],"sourcesContent":["const IMPORT_FILE_DEFAULT_STEP_TITLE = \"guide.step-action.import-file\";\n\nPluginRegistry.add('guide.step', [\n {\n guideBlockName: 'import-upload-rdf-file',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const toastr = services.toastr;\n const $translate = services.$translate;\n const $interpolate = services.$interpolate;\n const EventEmitterService = services.EventEmitterService;\n const importSettingsButtonSelector = GuideUtils.getGuideElementSelector('import-settings-import-button');\n let filesForUploadSelectedSubscription;\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.import_rdf_file.content',\n class: 'upload-rdf-file-button',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: IMPORT_FILE_DEFAULT_STEP_TITLE }),\n ...options,\n url: 'import',\n elementSelector: GuideUtils.getGuideElementSelector('uploadRdfFileButton'),\n // Disable default behavior of service when element is clicked.\n advanceOn: undefined,\n show: (guide) => () => {\n // Subscribes to event \"filesForUploadSelected\", when the step is showing, this will give opportunity\n // to canceling uploading if user not choose correct file.\n filesForUploadSelectedSubscription = EventEmitterService.subscribe('filesForUploadSelected', ((eventData) => {\n const uploadedFiles = eventData.files || [];\n if (uploadedFiles.some((uploadedFile) => uploadedFile.name === options.resourceFile)) {\n // When tha correct file is selected, the guide can continue.\n\n // Check for duplicated name, if import button for guide rdf data exist.\n if (GuideUtils.isVisible(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile))) {\n GuideUtils.getOrWaitFor('.confirm-duplicate-files-dialog')\n .then(() => guide.next());\n } else {\n GuideUtils.getOrWaitFor(importSettingsButtonSelector)\n .then(() => guide.next());\n }\n } else {\n // Canceling the automatic uploading of files\n // because the guide rdf file is not selected.\n eventData.cancel = true;\n }\n }));\n },\n hide: () => () => {\n if (filesForUploadSelectedSubscription) {\n filesForUploadSelectedSubscription();\n }\n },\n onNextValidate: () => {\n return Promise.allSettled([GuideUtils.getOrWaitFor('.confirm-duplicate-files-dialog'), GuideUtils.getOrWaitFor(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile))])\n .then(([confirmDialogPromise, importButtonPromise]) => {\n // There are two ways to exit this step:\n // if the duplication dialog is opened\n // or if the import button for the guide file is displayed.\n // The first scenario indicates that the user is trying to upload the same file,\n // while the second scenario suggests\n // that the guide has been started more than once.\n if ('rejected' === confirmDialogPromise.status && 'rejected' === importButtonPromise.status) {\n GuideUtils.noNextErrorToast(toastr, $translate, $interpolate, 'guide.step_plugin.import_rdf_file.file-must-be-uploaded', options);\n return false;\n }\n return true;\n });\n },\n onNextClick: (guide) => {\n GuideUtils.getOrWaitFor(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile))\n .then((element) => {\n // If we have file import button for the guide rdf file,\n // this indicates that we go through this step for the second time.\n // This can happen if the user starts the guide for the second time.\n element.click();\n })\n .catch((error) => {\n // This shouldn't be happening.\n console.log(error);\n })\n .finally(() => guide.next());\n }\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'import-confirm-duplicate-files',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.import_rdf_file.confirm_duplicate_files_dialog.content',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: IMPORT_FILE_DEFAULT_STEP_TITLE }),\n placement: 'bottom',\n class: 'import-file-button',\n ...options,\n url: 'import',\n elementSelector: GuideUtils.getElementSelector('.confirm-duplicate-files-dialog .confirm-overwrite-btn'),\n skipFromHistory: true,\n // Checks whether the confirm dialog is currently open.\n showOn: () => GuideUtils.isVisible(GuideUtils.getElementSelector('.confirm-duplicate-files-dialog')),\n onNextClick: () => GuideUtils.clickOnElement('.confirm-duplicate-files-dialog .confirm-overwrite-btn')(),\n onPreviousClick: () => {\n if (GuideUtils.isVisible(GuideUtils.getElementSelector('.confirm-duplicate-files-dialog'))) {\n return GuideUtils.clickOnElement('.confirm-duplicate-files-dialog .cancel-btn');\n }\n return Promise.resolve();\n }\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'import-click-on-import-button',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const importSettingsButtonSelector = GuideUtils.getGuideElementSelector('import-settings-import-button');\n return [\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.import_rdf_file.import-settings.import.button.content',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: IMPORT_FILE_DEFAULT_STEP_TITLE }),\n placement: 'top',\n class: 'import-settings-import-file-button',\n ...options,\n elementSelector: importSettingsButtonSelector,\n onPreviousClick: () => new Promise(function (resolve) {\n GuideUtils.clickOnGuideElement('import-settings-cancel-button')()\n .then(() => resolve());\n }),\n beforeShowPromise: () => services.GuideUtils.deferredShow(300)()\n .then(() => GuideUtils.getOrWaitFor(importSettingsButtonSelector, 3)\n .catch((error) => {\n services.toastr.error(services.$translate.instant('guide.unexpected.error.message'));\n return Promise.reject(error);\n })\n ),\n onNextClick: () => GuideUtils.clickOnGuideElement('import-settings-import-button')(),\n canBePaused: false\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'import-show-progress',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n return [\n {\n guideBlockName: 'read-only-element',\n options: {\n content: 'guide.step_plugin.import_status_info.content',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : { title: IMPORT_FILE_DEFAULT_STEP_TITLE }),\n class: 'import-status-info',\n ...options,\n url: 'import',\n elementSelector: '.import-resource-message',\n beforeShowPromise: () => {\n if (GuideUtils.isVisible('.import-resource-message')) {\n return Promise.resolve();\n }\n return GuideUtils.waitFor('.import-resource-message', 10);\n },\n onPreviousClick: () => GuideUtils.getOrWaitFor(GuideUtils.getGuideElementSelector('import-file-' + options.resourceFile), 10)\n .then((element) => { element.click() })\n }\n }\n ]\n }\n },\n {\n guideBlockName: 'import-rdf-file',\n getSteps: (options, services) => {\n options.mainAction = 'import-file';\n\n const steps = [\n {\n guideBlockName: 'click-main-menu',\n options: angular.extend({}, {\n menu: 'import',\n showIntro: true\n }, options)\n }\n ];\n\n if (options.resourcePath) {\n steps.push(\n {\n guideBlockName: 'download-guide-resource',\n options: angular.extend({}, {\n title: ''\n }, options)\n }\n );\n }\n\n steps.push(...[\n {\n guideBlockName: 'import-upload-rdf-file', options: {...options}\n },\n // This step is optional and will only appear if the file we want to upload has already been uploaded.\n // If the file is already uploaded, a confirmation dialog will be opened, and this step will display the confirm button of the dialog.\n {\n guideBlockName: 'import-confirm-duplicate-files', options: {...options}\n },\n {\n guideBlockName: 'import-click-on-import-button', options: {...options}\n },\n {\n guideBlockName: 'import-show-progress', options: {...options}\n }\n ]);\n\n return steps;\n }\n }\n]);\n"],"names":["IMPORT_FILE_DEFAULT_STEP_TITLE","PluginRegistry","add","guideBlockName","getSteps","options","services","GuideUtils","toastr","$translate","$interpolate","EventEmitterService","importSettingsButtonSelector","getGuideElementSelector","filesForUploadSelectedSubscription","content","class","mainAction","title","url","elementSelector","advanceOn","undefined","show","guide","subscribe","eventData","files","some","uploadedFile","name","resourceFile","isVisible","getOrWaitFor","then","next","cancel","hide","onNextValidate","Promise","allSettled","confirmDialogPromise","importButtonPromise","status","noNextErrorToast","onNextClick","element","click","catch","error","console","log","finally","placement","getElementSelector","skipFromHistory","showOn","clickOnElement","onPreviousClick","resolve","clickOnGuideElement","beforeShowPromise","deferredShow","instant","reject","canBePaused","waitFor","steps","angular","extend","menu","showIntro","resourcePath","push"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=44874;export const __webpack_ids__=[44874,49539,71920];export const __webpack_modules__={44874:(e,t,n)=>{n.r(t);var a=n(38940),E=n(71920);function A(e,t,n,A,o){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/agent-select-menu.html",scope:{},link:n=>{n.agentOptionsList=[],n.selectedAgent=void 0,n.onAgentSelected=(a,s)=>{if(!s.isCompatible)return a.stopPropagation(),void a.preventDefault();if(_(s),o.saveAgent(s),n.selectedAgent=s,e.selectAgent(s),s.isRepositoryDeleted){const n=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.title"),a=t.instant("ttyg.agent.agent_select_menu.configure_agent_modal.body");A.openConfirmation(n,a,()=>e.emit(E.TTYGEventName.EDIT_AGENT,s))}};const _=e=>{n.agentOptionsList.forEach(t=>{t.selected=t.data.agent===e})},s=e=>{_(e),n.selectedAgent=e},i=[];i.push(e.onAgentsListChanged(t=>{var E;E=t,n.agentOptionsList=E.agents.map(e=>new a.SelectMenuOptionsModel({value:e.id,label:e.name,data:{agent:e}})),(()=>{let t;const a=o.getAgentId();a&&n.agentOptionsList.forEach(e=>{e.data.agent.id===a&&(t=e.data.agent)}),!t&&n.agentOptionsList[0]&&(t=n.agentOptionsList[0].data.agent),s(t),e.selectAgent(t)})()})),i.push(e.subscribe(E.TTYGEventName.AGENT_DELETED,t=>{n.selectedAgent&&n.selectedAgent.id===t.id&&(n.selectedAgent.isDeleted=!0,e.selectAgent(n.selectedAgent))})),i.push(e.onSelectedAgentChanged(s)),n.$on("$destroy",()=>{i.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.agent-select-menu",[]).directive("agentSelectMenu",A),A.$inject=["TTYGContextService","$translate","$sce","ModalService","TTYGStorageService"]},71920:(e,t,n)=>{n.r(t),n.d(t,{TTYGEventName:()=>A});var a=n(98980);function E(e){let t,n,E,o,_,s={},i=!1;const T=()=>(0,a.cloneDeep)(t),c=()=>(0,a.cloneDeep)(n),d=e=>{n=(0,a.cloneDeep)(e),p(A.CHAT_LIST_UPDATED,c())},l=()=>(0,a.cloneDeep)(E),C=()=>(0,a.cloneDeep)(o),g=()=>(0,a.cloneDeep)(s),r=e=>!!s[e],D=()=>i,p=(t,n)=>{e.emitSync(t,(0,a.cloneDeep)(n))},S=(t,n)=>e.subscribeSync(t,e=>n(e));return{resetContext:()=>{t=void 0,n=void 0,E=void 0,o=void 0,s={},_=void 0,i=!1},emit:p,subscribe:S,getChats:c,updateChats:d,addChat:e=>{n.appendChat(e),d(n)},replaceChat:(e,t)=>{n.replaceChat(e,t),d(n)},onChatsListChanged:e=>(n&&angular.isFunction(e)&&e(c()),S(A.CHAT_LIST_UPDATED,t=>e(t))),getSelectedChat:l,selectChat:e=>{E&&E.id===e.id||(E=(0,a.cloneDeep)(e),p(A.SELECT_CHAT,l()))},deselectChat:()=>{E=void 0,p(A.SELECT_CHAT,l())},deleteChat:e=>{n.deleteChat(e),d(n)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(l()),S(A.SELECT_CHAT,t=>e(t))),updateSelectedChat:e=>{E&&E.id&&e&&E.id!==e.id||(E=(0,a.cloneDeep)(e),p(A.SELECTED_CHAT_UPDATED,l()))},onSelectedChatUpdated:e=>(E&&angular.isFunction(e)&&e(l()),S(A.SELECTED_CHAT_UPDATED,t=>e(t))),onLastMessageReceived:e=>(E&&angular.isFunction(e)&&e(l()),S(A.LAST_MESSAGE_RECEIVED,t=>e(t))),updateAgents:e=>{t=(0,a.cloneDeep)(e),p(A.AGENT_LIST_UPDATED,T())},onAgentsListChanged:e=>(t&&angular.isFunction(e)&&e(T()),S(A.AGENT_LIST_UPDATED,t=>e(t))),getAgents:T,getAgent:e=>{if(t)return(0,a.cloneDeep)(t.getAgent(e))},selectAgent:e=>{o=(0,a.cloneDeep)(e),p(A.AGENT_SELECTED,C())},getSelectedAgent:C,onSelectedAgentChanged:e=>(o&&angular.isFunction(e)&&e(C()),S(A.AGENT_SELECTED,t=>e(t))),getDefaultAgent:()=>(0,a.cloneDeep)(_),setDefaultAgent:e=>{_=e},setCanModifyAgent:e=>{i=(0,a.cloneDeep)(e),p(A.CAN_MODIFY_AGENT_UPDATED,D())},getCanModifyAgent:D,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(D()),S(A.CAN_MODIFY_AGENT_UPDATED,t=>e(t))),hasExplainResponse:r,toggleExplainResponse:e=>{r(e)&&(s[e].expanded=!s[e].expanded,p(A.EXPLAIN_RESPONSE_CACHE_UPDATED,g()))},getExplainResponse:e=>(0,a.cloneDeep)(s[e]),addExplainResponseCache:e=>{s[e.answerId]=(0,a.cloneDeep)(e),p(A.EXPLAIN_RESPONSE_CACHE_UPDATED,g())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(g()),S(A.EXPLAIN_RESPONSE_CACHE_UPDATED,t=>e(t)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",E),E.$inject=["EventEmitterService","TTYGService"];const A={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}}};
2
- //# sourceMappingURL=44874.5854c207bbe2c4f2438e.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"44874.5854c207bbe2c4f2438e.bundle.js","mappings":"sKAYA,SAASA,EAAyBC,EAAoBC,EAAYC,EAAMC,EAAcC,GAClF,MAAO,CACHC,SAAU,IACVC,YAAa,mDACbC,MAAO,CACP,EACAC,KAAOC,IAMHA,EAAOC,iBAAmB,GAM1BD,EAAOE,mBAAgBC,EAevBH,EAAOI,gBAAkB,CAACC,EAAQC,KAC9B,IAAKA,EAAMC,aAKP,OAFAF,EAAOG,uBACPH,EAAOI,iBAOX,GAJAC,EAAeJ,GACfX,EAAmBgB,UAAUL,GAC7BN,EAAOE,cAAgBI,EACvBf,EAAmBqB,YAAYN,GAC3BA,EAAMO,oBAAqB,CAC3B,MAAMC,EAAQtB,EAAWuB,QAAQ,4DAC3BC,EAAiBxB,EAAWuB,QAAQ,2DAC1CrB,EAAauB,iBAAiBH,EAAOE,EACjC,IAAMzB,EAAmB2B,KAAKC,EAAAA,cAAcC,WAAYd,GAEhE,GAWJ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B,0BAErBtC,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/directives/agent-select-menu.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["import {SelectMenuOptionsModel} from \"../../models/form-fields\";\nimport {TTYGEventName} from \"../services/ttyg-context.service\";\n\nconst modules = [\n];\n\nangular\n .module('graphdb.framework.ttyg.directives.agent-select-menu', modules)\n .directive('agentSelectMenu', AgentSelectMenuComponent);\n\nAgentSelectMenuComponent.$inject = ['TTYGContextService', '$translate', '$sce', 'ModalService', 'TTYGStorageService'];\n\nfunction AgentSelectMenuComponent(TTYGContextService, $translate, $sce, ModalService, TTYGStorageService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/ttyg/templates/agent-select-menu.html',\n scope: {\n },\n link: ($scope) => {\n\n // =========================\n // Public variables\n // =========================\n\n $scope.agentOptionsList = [];\n\n /**\n * Selected agent ID.\n * @type {AgentModel|undefined}\n */\n $scope.selectedAgent = undefined;\n\n // =========================\n // Private variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Handles the agent selection.\n * @param {Event} $event - The DOM event triggered by the selection.\n * @param {AgentModel} agent - The selected agent instance.\n */\n $scope.onAgentSelected = ($event, agent) => {\n if (!agent.isCompatible) {\n // Prevents the dropdown from closing if the selected agent is not compatible\n // by stopping event propagation and preventing the default action.\n $event.stopPropagation();\n $event.preventDefault();\n return;\n }\n markAsSelected(agent);\n TTYGStorageService.saveAgent(agent);\n $scope.selectedAgent = agent;\n TTYGContextService.selectAgent(agent);\n if (agent.isRepositoryDeleted) {\n const title = $translate.instant('ttyg.agent.agent_select_menu.configure_agent_modal.title');\n const confirmMessage = $translate.instant('ttyg.agent.agent_select_menu.configure_agent_modal.body');\n ModalService.openConfirmation(title, confirmMessage,\n () => TTYGContextService.emit(TTYGEventName.EDIT_AGENT, agent)\n );\n }\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Marks the given agent as selected and deselects the rest.\n * @param {AgentModel} agent\n */\n const markAsSelected = (agent) => {\n $scope.agentOptionsList.forEach((agentOption) => {\n agentOption.selected = agentOption.data.agent === agent;\n });\n };\n\n /**\n * Handles the agent list change event.\n * @param {AgentListModel} agents\n */\n const onAgentListChanged = (agents) => {\n buildAgentOptionsModel(agents);\n selectLastUsedOrDefaultAgent();\n };\n\n /**\n * Function to select the most recently used agent (according to local store) or selects the first in the list\n * if no recent agent is available.\n *\n * @function\n */\n const selectLastUsedOrDefaultAgent = () => {\n let selectedAgent;\n const storedAgentId = TTYGStorageService.getAgentId();\n\n if (storedAgentId) {\n // If saved in the LocalStore, the user has selected it, so select it here\n $scope.agentOptionsList.forEach((agent) => {\n if (agent.data.agent.id === storedAgentId) {\n selectedAgent = agent.data.agent\n }\n });\n }\n\n // Otherwise, select the first in the option list\n if (!selectedAgent && $scope.agentOptionsList[0]) {\n selectedAgent = $scope.agentOptionsList[0].data.agent;\n }\n onSelectedAgentChanged(selectedAgent);\n TTYGContextService.selectAgent(selectedAgent);\n }\n\n /**\n * Handles the agent deleted event.\n * @param {AgentModel} deletedAgent - the deleted agent\n */\n const onAgentDeleted = (deletedAgent) => {\n if ($scope.selectedAgent && $scope.selectedAgent.id === deletedAgent.id) {\n $scope.selectedAgent.isDeleted = true;\n TTYGContextService.selectAgent($scope.selectedAgent);\n }\n };\n\n /**\n * Handles the selection of an agent. When an agent is selected by the user from this menu, the agent is then\n * saved in the local storage. When the TTYG view is initialized, the selected agent is retrieved from the\n * local and its details loaded through the API. Then this component is updated to reflect the selected agent.\n * @param {AgentModel} agent\n */\n const onSelectedAgentChanged = (agent) => {\n markAsSelected(agent);\n $scope.selectedAgent = agent;\n };\n\n /**\n * Builds the agent options model which is used to display the agents in the select menu.\n * @param {AgentListModel} agentsListModel\n */\n const buildAgentOptionsModel = (agentsListModel) => {\n $scope.agentOptionsList = agentsListModel.agents.map((agent) => {\n return new SelectMenuOptionsModel({\n value: agent.id,\n label: agent.name,\n data: {\n agent: agent\n }\n });\n });\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n const subscriptions = [];\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n subscriptions.push(TTYGContextService.onAgentsListChanged(onAgentListChanged));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.AGENT_DELETED, onAgentDeleted));\n subscriptions.push(TTYGContextService.onSelectedAgentChanged(onSelectedAgentChanged));\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n\n // =========================\n // Initialization\n // =========================\n\n function initialize() {\n // buildAgentOptionsModel();\n }\n initialize();\n }\n };\n}\n","import {cloneDeep} from 'lodash';\n\nangular\n .module('graphdb.framework.ttyg.services.ttygcontext', [])\n .factory('TTYGContextService', TTYGContextService);\n\nTTYGContextService.$inject = ['EventEmitterService', 'TTYGService'];\n\nfunction TTYGContextService(EventEmitterService) {\n\n /**\n * The list of agents.\n * @type {AgentListModel}\n * @private\n */\n let _agents = undefined;\n\n /**\n * The ChatsListModel.\n * @type {ChatsListModel}\n * @private\n */\n let _chats = undefined;\n\n /**\n * The currently selected in the UI chat which is used for conversation.\n * @type {ChatModel|undefined}\n * @private\n */\n let _selectedChat = undefined;\n\n /**\n * The currently selected in the UI agent which is used for conversation.\n * @type {AgentModel|undefined}\n * @private\n */\n let _selectedAgent = undefined;\n\n /**\n * Stores information about loaded explain responses.\n * The key is the answer ID, and the value is an instance of {@see ExplainResponseModel} that holds the explanation message.\n *\n * @type {{[key: string]: ExplainResponseModel}}\n */\n let _explainCache = {};\n\n /**\n * The default agent values.\n * @type {AgentModel|undefined}\n * @private\n */\n let _defaultAgent = undefined;\n\n let _canModifyAgent = false;\n\n const resetContext = () => {\n _agents = undefined;\n _chats = undefined;\n _selectedChat = undefined;\n _selectedAgent = undefined;\n _explainCache = {};\n _defaultAgent = undefined;\n _canModifyAgent = false;\n };\n\n /**\n * @return {Promise<AgentModel>}\n */\n const getDefaultAgent = () => {\n return cloneDeep(_defaultAgent);\n };\n\n const setDefaultAgent = (agent) => {\n _defaultAgent = agent;\n };\n\n /**\n * @return {AgentListModel}\n */\n const getAgents = () => {\n return cloneDeep(_agents);\n };\n\n const getAgent = (agentId) => {\n if (_agents) {\n return cloneDeep(_agents.getAgent(agentId));\n }\n };\n\n /**\n * @return {ChatsListModel}\n */\n const getChats = () => {\n return cloneDeep(_chats);\n };\n\n /**\n * @param {ChatsListModel} chats\n */\n const updateChats = (chats) => {\n _chats = cloneDeep(chats);\n emit(TTYGEventName.CHAT_LIST_UPDATED, getChats());\n };\n\n /**\n * Deletes the chat with the provided <code>chatId</code>.\n * @param {ChatModel} chat\n */\n const deleteChat = (chat) => {\n _chats.deleteChat(chat);\n updateChats(_chats);\n };\n\n const addChat = (newChat) => {\n _chats.appendChat(newChat);\n updateChats(_chats);\n };\n\n const replaceChat = (newChat, oldChat) => {\n _chats.replaceChat(newChat, oldChat);\n updateChats(_chats);\n };\n\n /** Subscribes to the 'chatListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onChatsListChanged = (callback) => {\n if (_chats && angular.isFunction(callback)) {\n callback(getChats());\n }\n return subscribe(TTYGEventName.CHAT_LIST_UPDATED, (chats) => callback(chats));\n };\n\n /**\n * @return {ChatModel}\n */\n const getSelectedChat = () => {\n return cloneDeep(_selectedChat);\n };\n\n /**\n * Updates the selected chat with the provided <code>selectedChat</code> and emits the 'selectChat' event\n * to notify listeners that a new chat has been selected.\n *\n * @param {ChatModel} selectedChat - The chat object to select.\n */\n const selectChat = (selectedChat) => {\n if (!_selectedChat || _selectedChat.id !== selectedChat.id) {\n _selectedChat = cloneDeep(selectedChat);\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n }\n };\n\n const deselectChat = () => {\n _selectedChat = undefined;\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n };\n\n /**\n * Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatChanged = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECT_CHAT, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the selected chat and emits the 'selectChatUpdated' event to notify listeners that a property\n * of the selected chat has changed.\n *\n * If the ID of the passed chat differs from the current selected chat, no action will occur.\n *\n * The selected chat can be updated through {@link TTYGContextService#selectChat}.\n *\n * @param {ChatModel} chat - The chat object that is being updated.\n */\n const updateSelectedChat = (chat) => {\n if (!_selectedChat || !_selectedChat.id || !chat || _selectedChat.id === chat.id) {\n _selectedChat = cloneDeep(chat);\n emit(TTYGEventName.SELECTED_CHAT_UPDATED, getSelectedChat());\n }\n };\n\n /** Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatUpdated = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECTED_CHAT_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /** Subscribes to the 'lastMessageReceived' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onLastMessageReceived = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.LAST_MESSAGE_RECEIVED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @param {AgentListModel} agents\n */\n const updateAgents = (agents) => {\n _agents = cloneDeep(agents);\n emit(TTYGEventName.AGENT_LIST_UPDATED, getAgents());\n };\n\n /**\n * Subscribes to the 'agentListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onAgentsListChanged = (callback) => {\n if (_agents && angular.isFunction(callback)) {\n callback(getAgents());\n }\n return subscribe(TTYGEventName.AGENT_LIST_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @return {AgentModel}\n */\n const getSelectedAgent = () => {\n return cloneDeep(_selectedAgent);\n };\n\n /**\n * Updates the selected agent with the provided <code>selectedAgent</code> and emits the 'agentSelected' event\n * to notify listeners that a new agent has been selected.\n *\n * @param {AgentModel} selectedAgent - The instance of selected agent.\n */\n const selectAgent = (selectedAgent) => {\n _selectedAgent = cloneDeep(selectedAgent);\n emit(TTYGEventName.AGENT_SELECTED, getSelectedAgent());\n };\n\n const _getExplainResponseCache = () => {\n return cloneDeep(_explainCache);\n };\n\n /**\n * Gets the explain response.\n * @param {string} answerId\n * @return {ExplainResponseModel}\n */\n const getExplainResponse = (answerId) => {\n return cloneDeep(_explainCache[answerId]);\n };\n\n /**\n * Adds the <code>explainResponse</code> into the explain response cache.\n *\n * @param {ExplainResponseModel} explainResponse\n */\n const addExplainResponseCache = (explainResponse) => {\n _explainCache[explainResponse.answerId] = cloneDeep(explainResponse);\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n };\n\n const hasExplainResponse = (answerId) => {\n return !!_explainCache[answerId];\n };\n\n const toggleExplainResponse = (answerId) => {\n if (hasExplainResponse(answerId)) {\n _explainCache[answerId].expanded = !_explainCache[answerId].expanded;\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n }\n };\n\n /**\n * Subscribes to the 'explainResponseCacheUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onExplainResponseCacheUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(_getExplainResponseCache());\n }\n return subscribe(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, (explainResponses) => callback(explainResponses));\n };\n\n /**\n * Subscribes to the 'agentSelected' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedAgentChanged = (callback) => {\n if (_selectedAgent && angular.isFunction(callback)) {\n callback(getSelectedAgent());\n }\n return subscribe(TTYGEventName.AGENT_SELECTED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the \"canModifyAgent\" flag and emits the 'canModifyAgentUpdated' event to notify listeners that the canModifyAgent flag is changed.\n *\n * @param {boolean} canModifyAgent\n */\n const setCanModifyAgent = (canModifyAgent) => {\n _canModifyAgent = cloneDeep(canModifyAgent);\n emit(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, getCanModifyAgent());\n };\n\n const getCanModifyAgent = () => {\n return _canModifyAgent;\n };\n\n /**\n * Subscribes to the 'canModifyAgentUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onCanUpdateAgentUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getCanModifyAgent());\n }\n return subscribe(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, (canModifyAgent) => callback(canModifyAgent));\n };\n\n /**\n * Emits an event with a deep-cloned payload using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to emit. It must be a value from {@link TTYGEventName}.\n * @param {*} payload - The data to emit with the event. The payload is deep-cloned before emission.\n */\n const emit = (tTYGEventName, payload) => {\n EventEmitterService.emitSync(tTYGEventName, cloneDeep(payload));\n };\n\n /**\n * Subscribes to an event with the specified callback using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to subscribe to. It must be a value from {@link TTYGEventName}.\n * @param {function} callback - The function to call when the event is emitted.\n * @return {function} - Returns a function that can be called to unsubscribe from the event.\n */\n const subscribe = (tTYGEventName, callback) => {\n return EventEmitterService.subscribeSync(tTYGEventName, (payload) => callback(payload));\n };\n\n return {\n resetContext,\n emit,\n subscribe,\n // chats\n getChats,\n updateChats,\n addChat,\n replaceChat,\n onChatsListChanged,\n getSelectedChat,\n selectChat,\n deselectChat,\n deleteChat,\n onSelectedChatChanged,\n updateSelectedChat,\n onSelectedChatUpdated,\n onLastMessageReceived,\n // agents\n updateAgents,\n onAgentsListChanged,\n getAgents,\n getAgent,\n selectAgent,\n getSelectedAgent,\n onSelectedAgentChanged,\n getDefaultAgent,\n setDefaultAgent,\n setCanModifyAgent,\n getCanModifyAgent,\n onCanUpdateAgentUpdated,\n // chat explain\n hasExplainResponse,\n toggleExplainResponse,\n getExplainResponse,\n addExplainResponseCache,\n onExplainResponseCacheUpdated\n };\n}\n\nexport const TTYGEventName = {\n /**\n * Emitting the \"createChat\" event triggers a backend request to create a new chat.\n */\n CREATE_CHAT: 'createChat',\n\n /**\n * This event is emitted when a chat is successfully created.\n */\n CREATE_CHAT_SUCCESSFUL: 'chatCreated',\n\n /**\n * This event is emitted when the creation of a chat fails.\n */\n CREATE_CHAT_FAILURE: 'chatCreationFailed',\n\n RENAME_CHAT: 'renameChat',\n RENAME_CHAT_SUCCESSFUL: 'chatRenamed',\n RENAME_CHAT_FAILURE: 'chatRenamedFailure',\n\n /**\n * Emitting the \"selectChat\" event when the selected chat has been changed.\n */\n SELECT_CHAT: 'selectChat',\n\n /**\n * Emitting the \"selectChatUpdated\" event when the selected chat has been updated.\n */\n SELECTED_CHAT_UPDATED: 'selectChatUpdated',\n\n /**\n * Emitting the \"lastMessageReceived\" event when the final answer message has been received.\n */\n LAST_MESSAGE_RECEIVED: 'lastMessageReceived',\n\n /**\n * This event will be emitted when the chat delete request is in progress. The payload will contain the chat ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_CHAT: 'deletingChat',\n\n /**\n * This event will be emitted when the delete chat process is triggered but before the chat delete request is sent.\n */\n DELETE_CHAT: 'deleteChat',\n\n /**\n * This event will be emitted when the chat was successfully deleted.\n */\n DELETE_CHAT_SUCCESSFUL: 'chatDeleted',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n\n /**\n * This event is emitted when the deletion of a chat fails.\n */\n DELETE_CHAT_FAILURE: 'chatDeletedFailure',\n\n CHAT_EXPORT: 'chatExport',\n CHAT_EXPORT_SUCCESSFUL: 'chatExportSuccess',\n CHAT_EXPORT_FAILURE: 'chatExportFailure',\n CHAT_LIST_UPDATED: 'chatListUpdated',\n\n /**\n * Emitting the \"askQuestion\" event triggers a request to the backend to retrieve an answer to a question.\n */\n ASK_QUESTION: 'askQuestion',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n ASK_QUESTION_FAILURE: 'askQuestionFailure',\n\n /**\n * Emitting the \"continueChatRun\" event triggers a request to the backend to retrieve more remaining answers from the same chat run.\n */\n CONTINUE_CHAT_RUN: 'continueChatRun',\n\n /**\n * Emitting the \"loadChats\" event will trigger an action to loads all chats from backend server.\n */\n LOAD_CHATS: 'loadChats',\n LOAD_CHAT_SUCCESSFUL: 'loadChatSuccess',\n LOAD_CHAT_FAILURE: 'loadChatFailure',\n\n AGENT_LIST_UPDATED: 'agentListUpdated',\n\n /**\n * This event will be emitted when the create agent process is triggered through the UI but before the agent create\n * request is sent. This is used to open the agent settings dialog.\n */\n OPEN_AGENT_SETTINGS: 'openAgentSettings',\n\n /**\n * This event will be emitted when an agent needs to be edited.\n */\n EDIT_AGENT: 'editAgent',\n\n /**\n * This event will be emitted when an agent needs to be cloned.\n */\n CLONE_AGENT: 'cloneAgent',\n\n /**\n * This event will be emitted when the delete agent process is triggered but before the agent delete request is sent.\n */\n DELETE_AGENT: 'deleteAgent',\n\n /**\n * This event will be emitted when the agent was successfully deleted.\n */\n AGENT_DELETED: 'agentDeleted',\n\n /**\n * This event will be emitted when the agent delete request is in progress. The payload will contain the agent ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_AGENT: 'deletingAgent',\n\n /**\n * This event will be emitted when an agent is selected by the user through the UI.\n */\n AGENT_SELECTED: 'agentSelected',\n\n /**\n * This event will trigger the opening of the similarity view.\n */\n GO_TO_CREATE_SIMILARITY_VIEW: \"goToCreateSimilarityView\",\n\n /**\n * This event will trigger the opening of the connectors view.\n */\n GO_TO_CONNECTORS_VIEW: \"goToConnectorsView\",\n\n /**\n * This event will trigger the opening of the \"Autocomplete index\" view.\n */\n GO_TO_AUTOCOMPLETE_INDEX_VIEW: \"goToAutocompleteIndexView\",\n\n /**\n * This event will trigger fetching a new explanation of how the answer was generated.\n */\n EXPLAIN_RESPONSE: \"explainResponse\",\n\n /**\n * This event will be emitted when the cache with explain responses changed.\n */\n EXPLAIN_RESPONSE_CACHE_UPDATED: \"explainResponseCacheUpdated\",\n\n /**\n * This event will trigger the opening of the sparql view.\n */\n GO_TO_SPARQL_EDITOR: \"openQueryInSparqlEditor\",\n\n CAN_MODIFY_AGENT_UPDATED: \"canModifyAgentUpdated\",\n};\n"],"names":["AgentSelectMenuComponent","TTYGContextService","$translate","$sce","ModalService","TTYGStorageService","restrict","templateUrl","scope","link","$scope","agentOptionsList","selectedAgent","undefined","onAgentSelected","$event","agent","isCompatible","stopPropagation","preventDefault","markAsSelected","saveAgent","selectAgent","isRepositoryDeleted","title","instant","confirmMessage","openConfirmation","emit","TTYGEventName","EDIT_AGENT","forEach","agentOption","selected","data","onSelectedAgentChanged","subscriptions","push","onAgentsListChanged","agents","agentsListModel","map","SelectMenuOptionsModel","value","id","label","name","selectLastUsedOrDefaultAgent","storedAgentId","getAgentId","subscribe","AGENT_DELETED","deletedAgent","isDeleted","$on","removeAllSubscribers","subscription","angular","module","directive","$inject","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","getChats","updateChats","chats","CHAT_LIST_UPDATED","getSelectedChat","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","callback","subscribeSync","resetContext","addChat","newChat","appendChat","replaceChat","oldChat","onChatsListChanged","isFunction","selectChat","selectedChat","SELECT_CHAT","deselectChat","deleteChat","chat","onSelectedChatChanged","updateSelectedChat","SELECTED_CHAT_UPDATED","onSelectedChatUpdated","onLastMessageReceived","LAST_MESSAGE_RECEIVED","updateAgents","AGENT_LIST_UPDATED","getAgent","agentId","AGENT_SELECTED","getDefaultAgent","setDefaultAgent","setCanModifyAgent","canModifyAgent","CAN_MODIFY_AGENT_UPDATED","onCanUpdateAgentUpdated","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","factory","CREATE_CHAT","CREATE_CHAT_SUCCESSFUL","CREATE_CHAT_FAILURE","RENAME_CHAT","RENAME_CHAT_SUCCESSFUL","RENAME_CHAT_FAILURE","DELETING_CHAT","DELETE_CHAT","DELETE_CHAT_SUCCESSFUL","DELETE_CHAT_FAILURE","CHAT_EXPORT","CHAT_EXPORT_SUCCESSFUL","CHAT_EXPORT_FAILURE","ASK_QUESTION","ASK_QUESTION_FAILURE","CONTINUE_CHAT_RUN","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","OPEN_AGENT_SETTINGS","CLONE_AGENT","DELETE_AGENT","DELETING_AGENT","GO_TO_CREATE_SIMILARITY_VIEW","GO_TO_CONNECTORS_VIEW","GO_TO_AUTOCOMPLETE_INDEX_VIEW","EXPLAIN_RESPONSE","GO_TO_SPARQL_EDITOR"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=49539;export const __webpack_ids__=[49539,71920];export const __webpack_modules__={71920:(e,t,E)=>{E.r(t),E.d(t,{TTYGEventName:()=>_});var n=E(98980);function a(e){let t,E,a,A,T,C={},o=!1;const c=()=>(0,n.cloneDeep)(t),d=()=>(0,n.cloneDeep)(E),i=e=>{E=(0,n.cloneDeep)(e),g(_.CHAT_LIST_UPDATED,d())},D=()=>(0,n.cloneDeep)(a),l=()=>(0,n.cloneDeep)(A),S=()=>(0,n.cloneDeep)(C),s=e=>!!C[e],p=()=>o,g=(t,E)=>{e.emitSync(t,(0,n.cloneDeep)(E))},L=(t,E)=>e.subscribeSync(t,e=>E(e));return{resetContext:()=>{t=void 0,E=void 0,a=void 0,A=void 0,C={},T=void 0,o=!1},emit:g,subscribe:L,getChats:d,updateChats:i,addChat:e=>{E.appendChat(e),i(E)},replaceChat:(e,t)=>{E.replaceChat(e,t),i(E)},onChatsListChanged:e=>(E&&angular.isFunction(e)&&e(d()),L(_.CHAT_LIST_UPDATED,t=>e(t))),getSelectedChat:D,selectChat:e=>{a&&a.id===e.id||(a=(0,n.cloneDeep)(e),g(_.SELECT_CHAT,D()))},deselectChat:()=>{a=void 0,g(_.SELECT_CHAT,D())},deleteChat:e=>{E.deleteChat(e),i(E)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(D()),L(_.SELECT_CHAT,t=>e(t))),updateSelectedChat:e=>{a&&a.id&&e&&a.id!==e.id||(a=(0,n.cloneDeep)(e),g(_.SELECTED_CHAT_UPDATED,D()))},onSelectedChatUpdated:e=>(a&&angular.isFunction(e)&&e(D()),L(_.SELECTED_CHAT_UPDATED,t=>e(t))),onLastMessageReceived:e=>(a&&angular.isFunction(e)&&e(D()),L(_.LAST_MESSAGE_RECEIVED,t=>e(t))),updateAgents:e=>{t=(0,n.cloneDeep)(e),g(_.AGENT_LIST_UPDATED,c())},onAgentsListChanged:e=>(t&&angular.isFunction(e)&&e(c()),L(_.AGENT_LIST_UPDATED,t=>e(t))),getAgents:c,getAgent:e=>{if(t)return(0,n.cloneDeep)(t.getAgent(e))},selectAgent:e=>{A=(0,n.cloneDeep)(e),g(_.AGENT_SELECTED,l())},getSelectedAgent:l,onSelectedAgentChanged:e=>(A&&angular.isFunction(e)&&e(l()),L(_.AGENT_SELECTED,t=>e(t))),getDefaultAgent:()=>(0,n.cloneDeep)(T),setDefaultAgent:e=>{T=e},setCanModifyAgent:e=>{o=(0,n.cloneDeep)(e),g(_.CAN_MODIFY_AGENT_UPDATED,p())},getCanModifyAgent:p,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(p()),L(_.CAN_MODIFY_AGENT_UPDATED,t=>e(t))),hasExplainResponse:s,toggleExplainResponse:e=>{s(e)&&(C[e].expanded=!C[e].expanded,g(_.EXPLAIN_RESPONSE_CACHE_UPDATED,S()))},getExplainResponse:e=>(0,n.cloneDeep)(C[e]),addExplainResponseCache:e=>{C[e.answerId]=(0,n.cloneDeep)(e),g(_.EXPLAIN_RESPONSE_CACHE_UPDATED,S())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(S()),L(_.EXPLAIN_RESPONSE_CACHE_UPDATED,t=>e(t)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",a),a.$inject=["EventEmitterService","TTYGService"];const _={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}}};
2
- //# sourceMappingURL=49539.d253a79e8b9710776e48.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"49539.d253a79e8b9710776e48.bundle.js","mappings":"kLAQA,SAASA,EAAmBC,GAOxB,IAAIC,EAOAC,EAOAC,EAOAC,EAeAC,EAPAC,EAAgB,CAAC,EASjBC,GAAkB,EAEtB,MAwBMC,EAAYA,KACPC,EAAAA,EAAAA,WAAUR,GAYfS,EAAWA,KACND,EAAAA,EAAAA,WAAUP,GAMfS,EAAeC,IACjBV,GAASO,EAAAA,EAAAA,WAAUG,GACnBC,EAAKC,EAAcC,kBAAmBL,MAqCpCM,EAAkBA,KACbP,EAAAA,EAAAA,WAAUN,GAmGfc,EAAmBA,KACdR,EAAAA,EAAAA,WAAUL,GAcfc,EAA2BA,KACtBT,EAAAA,EAAAA,WAAUH,GAsBfa,EAAsBC,KACfd,EAAcc,GA8CrBC,EAAoBA,IACfd,EAsBLM,EAAOA,CAACS,EAAeC,KACzBvB,EAAoBwB,SAASF,GAAeb,EAAAA,EAAAA,WAAUc,KAUpDE,EAAYA,CAACH,EAAeI,IACvB1B,EAAoB2B,cAAcL,EAAgBC,GAAYG,EAASH,IAGlF,MAAO,CACHK,aAnTiBA,KACjB3B,OAAU4B,EACV3B,OAAS2B,EACT1B,OAAgB0B,EAChBzB,OAAiByB,EACjBvB,EAAgB,CAAC,EACjBD,OAAgBwB,EAChBtB,GAAkB,GA6SlBM,OACAY,YAEAf,WACAC,cACAmB,QA/PaC,IACb7B,EAAO8B,WAAWD,GAClBpB,EAAYT,IA8PZ+B,YA3PgBA,CAACF,EAASG,KAC1BhC,EAAO+B,YAAYF,EAASG,GAC5BvB,EA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,oBAAqB,oBACrB5E,kBAAmB,kBAKnB6E,aAAc,cAKdC,qBAAsB,qBAKtBC,kBAAmB,kBAKnBC,WAAY,YACZC,qBAAsB,kBACtBC,kBAAmB,kBAEnB5C,mBAAoB,mBAMpB6C,oBAAqB,oBAKrBC,WAAY,YAKZC,YAAa,aAKbC,aAAc,cAKdC,cAAe,eAMfC,eAAgB,gBAKhB5C,eAAgB,gBAKhB6C,6BAA8B,2BAK9BC,sBAAuB,qBAKvBC,8BAA+B,4BAK/BC,iBAAkB,kBAKlBrC,+BAAgC,8BAKhCsC,oBAAqB,0BAErB1C,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["import {cloneDeep} from 'lodash';\n\nangular\n .module('graphdb.framework.ttyg.services.ttygcontext', [])\n .factory('TTYGContextService', TTYGContextService);\n\nTTYGContextService.$inject = ['EventEmitterService', 'TTYGService'];\n\nfunction TTYGContextService(EventEmitterService) {\n\n /**\n * The list of agents.\n * @type {AgentListModel}\n * @private\n */\n let _agents = undefined;\n\n /**\n * The ChatsListModel.\n * @type {ChatsListModel}\n * @private\n */\n let _chats = undefined;\n\n /**\n * The currently selected in the UI chat which is used for conversation.\n * @type {ChatModel|undefined}\n * @private\n */\n let _selectedChat = undefined;\n\n /**\n * The currently selected in the UI agent which is used for conversation.\n * @type {AgentModel|undefined}\n * @private\n */\n let _selectedAgent = undefined;\n\n /**\n * Stores information about loaded explain responses.\n * The key is the answer ID, and the value is an instance of {@see ExplainResponseModel} that holds the explanation message.\n *\n * @type {{[key: string]: ExplainResponseModel}}\n */\n let _explainCache = {};\n\n /**\n * The default agent values.\n * @type {AgentModel|undefined}\n * @private\n */\n let _defaultAgent = undefined;\n\n let _canModifyAgent = false;\n\n const resetContext = () => {\n _agents = undefined;\n _chats = undefined;\n _selectedChat = undefined;\n _selectedAgent = undefined;\n _explainCache = {};\n _defaultAgent = undefined;\n _canModifyAgent = false;\n };\n\n /**\n * @return {Promise<AgentModel>}\n */\n const getDefaultAgent = () => {\n return cloneDeep(_defaultAgent);\n };\n\n const setDefaultAgent = (agent) => {\n _defaultAgent = agent;\n };\n\n /**\n * @return {AgentListModel}\n */\n const getAgents = () => {\n return cloneDeep(_agents);\n };\n\n const getAgent = (agentId) => {\n if (_agents) {\n return cloneDeep(_agents.getAgent(agentId));\n }\n };\n\n /**\n * @return {ChatsListModel}\n */\n const getChats = () => {\n return cloneDeep(_chats);\n };\n\n /**\n * @param {ChatsListModel} chats\n */\n const updateChats = (chats) => {\n _chats = cloneDeep(chats);\n emit(TTYGEventName.CHAT_LIST_UPDATED, getChats());\n };\n\n /**\n * Deletes the chat with the provided <code>chatId</code>.\n * @param {ChatModel} chat\n */\n const deleteChat = (chat) => {\n _chats.deleteChat(chat);\n updateChats(_chats);\n };\n\n const addChat = (newChat) => {\n _chats.appendChat(newChat);\n updateChats(_chats);\n };\n\n const replaceChat = (newChat, oldChat) => {\n _chats.replaceChat(newChat, oldChat);\n updateChats(_chats);\n };\n\n /** Subscribes to the 'chatListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onChatsListChanged = (callback) => {\n if (_chats && angular.isFunction(callback)) {\n callback(getChats());\n }\n return subscribe(TTYGEventName.CHAT_LIST_UPDATED, (chats) => callback(chats));\n };\n\n /**\n * @return {ChatModel}\n */\n const getSelectedChat = () => {\n return cloneDeep(_selectedChat);\n };\n\n /**\n * Updates the selected chat with the provided <code>selectedChat</code> and emits the 'selectChat' event\n * to notify listeners that a new chat has been selected.\n *\n * @param {ChatModel} selectedChat - The chat object to select.\n */\n const selectChat = (selectedChat) => {\n if (!_selectedChat || _selectedChat.id !== selectedChat.id) {\n _selectedChat = cloneDeep(selectedChat);\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n }\n };\n\n const deselectChat = () => {\n _selectedChat = undefined;\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n };\n\n /**\n * Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatChanged = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECT_CHAT, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the selected chat and emits the 'selectChatUpdated' event to notify listeners that a property\n * of the selected chat has changed.\n *\n * If the ID of the passed chat differs from the current selected chat, no action will occur.\n *\n * The selected chat can be updated through {@link TTYGContextService#selectChat}.\n *\n * @param {ChatModel} chat - The chat object that is being updated.\n */\n const updateSelectedChat = (chat) => {\n if (!_selectedChat || !_selectedChat.id || !chat || _selectedChat.id === chat.id) {\n _selectedChat = cloneDeep(chat);\n emit(TTYGEventName.SELECTED_CHAT_UPDATED, getSelectedChat());\n }\n };\n\n /** Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatUpdated = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECTED_CHAT_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /** Subscribes to the 'lastMessageReceived' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onLastMessageReceived = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.LAST_MESSAGE_RECEIVED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @param {AgentListModel} agents\n */\n const updateAgents = (agents) => {\n _agents = cloneDeep(agents);\n emit(TTYGEventName.AGENT_LIST_UPDATED, getAgents());\n };\n\n /**\n * Subscribes to the 'agentListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onAgentsListChanged = (callback) => {\n if (_agents && angular.isFunction(callback)) {\n callback(getAgents());\n }\n return subscribe(TTYGEventName.AGENT_LIST_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @return {AgentModel}\n */\n const getSelectedAgent = () => {\n return cloneDeep(_selectedAgent);\n };\n\n /**\n * Updates the selected agent with the provided <code>selectedAgent</code> and emits the 'agentSelected' event\n * to notify listeners that a new agent has been selected.\n *\n * @param {AgentModel} selectedAgent - The instance of selected agent.\n */\n const selectAgent = (selectedAgent) => {\n _selectedAgent = cloneDeep(selectedAgent);\n emit(TTYGEventName.AGENT_SELECTED, getSelectedAgent());\n };\n\n const _getExplainResponseCache = () => {\n return cloneDeep(_explainCache);\n };\n\n /**\n * Gets the explain response.\n * @param {string} answerId\n * @return {ExplainResponseModel}\n */\n const getExplainResponse = (answerId) => {\n return cloneDeep(_explainCache[answerId]);\n };\n\n /**\n * Adds the <code>explainResponse</code> into the explain response cache.\n *\n * @param {ExplainResponseModel} explainResponse\n */\n const addExplainResponseCache = (explainResponse) => {\n _explainCache[explainResponse.answerId] = cloneDeep(explainResponse);\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n };\n\n const hasExplainResponse = (answerId) => {\n return !!_explainCache[answerId];\n };\n\n const toggleExplainResponse = (answerId) => {\n if (hasExplainResponse(answerId)) {\n _explainCache[answerId].expanded = !_explainCache[answerId].expanded;\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n }\n };\n\n /**\n * Subscribes to the 'explainResponseCacheUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onExplainResponseCacheUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(_getExplainResponseCache());\n }\n return subscribe(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, (explainResponses) => callback(explainResponses));\n };\n\n /**\n * Subscribes to the 'agentSelected' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedAgentChanged = (callback) => {\n if (_selectedAgent && angular.isFunction(callback)) {\n callback(getSelectedAgent());\n }\n return subscribe(TTYGEventName.AGENT_SELECTED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the \"canModifyAgent\" flag and emits the 'canModifyAgentUpdated' event to notify listeners that the canModifyAgent flag is changed.\n *\n * @param {boolean} canModifyAgent\n */\n const setCanModifyAgent = (canModifyAgent) => {\n _canModifyAgent = cloneDeep(canModifyAgent);\n emit(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, getCanModifyAgent());\n };\n\n const getCanModifyAgent = () => {\n return _canModifyAgent;\n };\n\n /**\n * Subscribes to the 'canModifyAgentUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onCanUpdateAgentUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getCanModifyAgent());\n }\n return subscribe(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, (canModifyAgent) => callback(canModifyAgent));\n };\n\n /**\n * Emits an event with a deep-cloned payload using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to emit. It must be a value from {@link TTYGEventName}.\n * @param {*} payload - The data to emit with the event. The payload is deep-cloned before emission.\n */\n const emit = (tTYGEventName, payload) => {\n EventEmitterService.emitSync(tTYGEventName, cloneDeep(payload));\n };\n\n /**\n * Subscribes to an event with the specified callback using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to subscribe to. It must be a value from {@link TTYGEventName}.\n * @param {function} callback - The function to call when the event is emitted.\n * @return {function} - Returns a function that can be called to unsubscribe from the event.\n */\n const subscribe = (tTYGEventName, callback) => {\n return EventEmitterService.subscribeSync(tTYGEventName, (payload) => callback(payload));\n };\n\n return {\n resetContext,\n emit,\n subscribe,\n // chats\n getChats,\n updateChats,\n addChat,\n replaceChat,\n onChatsListChanged,\n getSelectedChat,\n selectChat,\n deselectChat,\n deleteChat,\n onSelectedChatChanged,\n updateSelectedChat,\n onSelectedChatUpdated,\n onLastMessageReceived,\n // agents\n updateAgents,\n onAgentsListChanged,\n getAgents,\n getAgent,\n selectAgent,\n getSelectedAgent,\n onSelectedAgentChanged,\n getDefaultAgent,\n setDefaultAgent,\n setCanModifyAgent,\n getCanModifyAgent,\n onCanUpdateAgentUpdated,\n // chat explain\n hasExplainResponse,\n toggleExplainResponse,\n getExplainResponse,\n addExplainResponseCache,\n onExplainResponseCacheUpdated\n };\n}\n\nexport const TTYGEventName = {\n /**\n * Emitting the \"createChat\" event triggers a backend request to create a new chat.\n */\n CREATE_CHAT: 'createChat',\n\n /**\n * This event is emitted when a chat is successfully created.\n */\n CREATE_CHAT_SUCCESSFUL: 'chatCreated',\n\n /**\n * This event is emitted when the creation of a chat fails.\n */\n CREATE_CHAT_FAILURE: 'chatCreationFailed',\n\n RENAME_CHAT: 'renameChat',\n RENAME_CHAT_SUCCESSFUL: 'chatRenamed',\n RENAME_CHAT_FAILURE: 'chatRenamedFailure',\n\n /**\n * Emitting the \"selectChat\" event when the selected chat has been changed.\n */\n SELECT_CHAT: 'selectChat',\n\n /**\n * Emitting the \"selectChatUpdated\" event when the selected chat has been updated.\n */\n SELECTED_CHAT_UPDATED: 'selectChatUpdated',\n\n /**\n * Emitting the \"lastMessageReceived\" event when the final answer message has been received.\n */\n LAST_MESSAGE_RECEIVED: 'lastMessageReceived',\n\n /**\n * This event will be emitted when the chat delete request is in progress. The payload will contain the chat ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_CHAT: 'deletingChat',\n\n /**\n * This event will be emitted when the delete chat process is triggered but before the chat delete request is sent.\n */\n DELETE_CHAT: 'deleteChat',\n\n /**\n * This event will be emitted when the chat was successfully deleted.\n */\n DELETE_CHAT_SUCCESSFUL: 'chatDeleted',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n\n /**\n * This event is emitted when the deletion of a chat fails.\n */\n DELETE_CHAT_FAILURE: 'chatDeletedFailure',\n\n CHAT_EXPORT: 'chatExport',\n CHAT_EXPORT_SUCCESSFUL: 'chatExportSuccess',\n CHAT_EXPORT_FAILURE: 'chatExportFailure',\n CHAT_LIST_UPDATED: 'chatListUpdated',\n\n /**\n * Emitting the \"askQuestion\" event triggers a request to the backend to retrieve an answer to a question.\n */\n ASK_QUESTION: 'askQuestion',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n ASK_QUESTION_FAILURE: 'askQuestionFailure',\n\n /**\n * Emitting the \"continueChatRun\" event triggers a request to the backend to retrieve more remaining answers from the same chat run.\n */\n CONTINUE_CHAT_RUN: 'continueChatRun',\n\n /**\n * Emitting the \"loadChats\" event will trigger an action to loads all chats from backend server.\n */\n LOAD_CHATS: 'loadChats',\n LOAD_CHAT_SUCCESSFUL: 'loadChatSuccess',\n LOAD_CHAT_FAILURE: 'loadChatFailure',\n\n AGENT_LIST_UPDATED: 'agentListUpdated',\n\n /**\n * This event will be emitted when the create agent process is triggered through the UI but before the agent create\n * request is sent. This is used to open the agent settings dialog.\n */\n OPEN_AGENT_SETTINGS: 'openAgentSettings',\n\n /**\n * This event will be emitted when an agent needs to be edited.\n */\n EDIT_AGENT: 'editAgent',\n\n /**\n * This event will be emitted when an agent needs to be cloned.\n */\n CLONE_AGENT: 'cloneAgent',\n\n /**\n * This event will be emitted when the delete agent process is triggered but before the agent delete request is sent.\n */\n DELETE_AGENT: 'deleteAgent',\n\n /**\n * This event will be emitted when the agent was successfully deleted.\n */\n AGENT_DELETED: 'agentDeleted',\n\n /**\n * This event will be emitted when the agent delete request is in progress. The payload will contain the agent ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_AGENT: 'deletingAgent',\n\n /**\n * This event will be emitted when an agent is selected by the user through the UI.\n */\n AGENT_SELECTED: 'agentSelected',\n\n /**\n * This event will trigger the opening of the similarity view.\n */\n GO_TO_CREATE_SIMILARITY_VIEW: \"goToCreateSimilarityView\",\n\n /**\n * This event will trigger the opening of the connectors view.\n */\n GO_TO_CONNECTORS_VIEW: \"goToConnectorsView\",\n\n /**\n * This event will trigger the opening of the \"Autocomplete index\" view.\n */\n GO_TO_AUTOCOMPLETE_INDEX_VIEW: \"goToAutocompleteIndexView\",\n\n /**\n * This event will trigger fetching a new explanation of how the answer was generated.\n */\n EXPLAIN_RESPONSE: \"explainResponse\",\n\n /**\n * This event will be emitted when the cache with explain responses changed.\n */\n EXPLAIN_RESPONSE_CACHE_UPDATED: \"explainResponseCacheUpdated\",\n\n /**\n * This event will trigger the opening of the sparql view.\n */\n GO_TO_SPARQL_EDITOR: \"openQueryInSparqlEditor\",\n\n CAN_MODIFY_AGENT_UPDATED: \"canModifyAgentUpdated\",\n};\n"],"names":["TTYGContextService","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","getChats","updateChats","chats","emit","TTYGEventName","CHAT_LIST_UPDATED","getSelectedChat","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","subscribe","callback","subscribeSync","resetContext","undefined","addChat","newChat","appendChat","replaceChat","oldChat","onChatsListChanged","angular","isFunction","selectChat","selectedChat","id","SELECT_CHAT","deselectChat","deleteChat","chat","onSelectedChatChanged","updateSelectedChat","SELECTED_CHAT_UPDATED","onSelectedChatUpdated","onLastMessageReceived","LAST_MESSAGE_RECEIVED","updateAgents","agents","AGENT_LIST_UPDATED","onAgentsListChanged","getAgent","agentId","selectAgent","selectedAgent","AGENT_SELECTED","onSelectedAgentChanged","getDefaultAgent","setDefaultAgent","agent","setCanModifyAgent","canModifyAgent","CAN_MODIFY_AGENT_UPDATED","onCanUpdateAgentUpdated","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","module","factory","$inject","CREATE_CHAT","CREATE_CHAT_SUCCESSFUL","CREATE_CHAT_FAILURE","RENAME_CHAT","RENAME_CHAT_SUCCESSFUL","RENAME_CHAT_FAILURE","DELETING_CHAT","DELETE_CHAT","DELETE_CHAT_SUCCESSFUL","DELETE_CHAT_FAILURE","CHAT_EXPORT","CHAT_EXPORT_SUCCESSFUL","CHAT_EXPORT_FAILURE","ASK_QUESTION","ASK_QUESTION_FAILURE","CONTINUE_CHAT_RUN","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","OPEN_AGENT_SETTINGS","EDIT_AGENT","CLONE_AGENT","DELETE_AGENT","AGENT_DELETED","DELETING_AGENT","GO_TO_CREATE_SIMILARITY_VIEW","GO_TO_CONNECTORS_VIEW","GO_TO_AUTOCOMPLETE_INDEX_VIEW","EXPLAIN_RESPONSE","GO_TO_SPARQL_EDITOR"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"51087.b072d1c0e53403535283.bundle.js","mappings":"oHAAA,MAAMA,EAAyB,mCACzBC,EAAwB,eAE9BC,eAAeC,IAAI,aAAc,CAC7B,CACIC,eAAgB,oBAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WAC5B,MAAO,CACH,CACIJ,eAAgB,gBAChBE,QAAS,CACLG,QAAS,qDAELH,EAAQI,WAAa,CAAC,EAAI,CAACC,MAAOX,GACtCY,MAAO,iBACPC,iBAAiB,KACdP,EACHQ,IAAK,OACLC,gBAAiBP,EAAWQ,wBAAwB,kBACpDC,KAAOC,GAAU,KACb,MAAMH,EAAkBP,EAAWQ,wBAAwB,mBAM3DG,EAAEJ,GAAiBK,GAAG,UAAYC,KAChBF,EAAEJ,GAAiBO,QAEN,UAAdD,EAAME,KAAoBF,EAAMG,UAAaH,EAAMI,SAC5DjB,EAAWkB,QAAQlB,EAAWQ,wBAAwBf,IACjD0B,KAAK,IAAMT,EAAMU,WAIlCC,KAAMA,IAAM,KACR,MAAMd,EAAkBP,EAAWQ,wBAAwB,mBAE3DG,EAAEJ,GAAiBe,IAAI,cAInCC,EAAqBvB,EAAYF,MAI7C,CACIF,eAAgB,wBAChBC,S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C,OAAO,CAAC,EAAG,CACxB1B,QAAS,mDACTG,MAAO,kBACPE,IAAK,OACLsC,UAAW,OACXrC,gBAAiBP,EAAWQ,wBAAwBf,GACpDoD,sBAAuB7C,EAAWQ,wBAAwB,oBAC3DV,I","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/guides/steps/complex/ttyg/ask-ttyg-agent/plugin.js"],"sourcesContent":["const TTYG_ASK_DEFAULT_TITLE = 'guide.step-action.ask-ttyg-agent';\nconst CHAT_DETAILS_SELECTOR = 'chat-details';\n\nPluginRegistry.add('guide.step', [\n {\n guideBlockName: 'ttyg-ask-question',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n return [\n {\n guideBlockName: 'input-element',\n options: {\n content: `guide.step_plugin.ask-ttyg-agent.input-question`,\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n class: 'input-question',\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector: GuideUtils.getGuideElementSelector('question-input'),\n show: (guide) => () => {\n const elementSelector = GuideUtils.getGuideElementSelector('contenteditable');\n\n // Add \"keydown\" listener to the element.\n // The question-input directive listens for \"Enter\" keypress to trigger question asking.\n // When enter is pressed, proceed with next step.\n // Using 'keydown' to trigger before the directive 'keypress', which clears the value.\n $(elementSelector).on('keydown', (event) => {\n const value = $(elementSelector).text();\n\n if (value && event.key === 'Enter' && !event.shiftKey && !event.ctrlKey) {\n GuideUtils.waitFor(GuideUtils.getGuideElementSelector(CHAT_DETAILS_SELECTOR))\n .then(() => guide.next());\n }\n });\n },\n hide: () => () => {\n const elementSelector = GuideUtils.getGuideElementSelector('contenteditable');\n // Remove the \"keydown\" listener of the element. It is important when the step is hidden.\n $(elementSelector).off('keydown');\n },\n },\n },\n getWaitForAnswerStep(GuideUtils, options),\n ];\n },\n },\n {\n guideBlockName: 'ttyg-explain-response',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const explainBtnSelector = GuideUtils.getLastGuideElementSelector('explain-response-btn');\n const elementSelector = GuideUtils.getLastGuideElementSelector('chat-item', explainBtnSelector);\n return [\n {\n // If button is not visible for some reason, skip the whole step\n guideBlockName: 'info-message',\n options: angular.extend({}, {\n url: 'ttyg',\n beforeShowPromise: (guide, currentStep) => GuideUtils.waitFor(elementSelector, 1)\n .then(() => {\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.next());\n })\n .catch(() => {\n const stepId = currentStep.id;\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.show(stepId + 3));\n }),\n }, options),\n },\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.ask-ttyg-agent.explain-answer',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n class: 'explain-answer',\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector,\n },\n },\n getWaitForAnswerStep(GuideUtils, options),\n ];\n },\n },\n {\n guideBlockName: 'ttyg-ask-agent-explore-sparql',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const exploreSparqlBtnSelector = GuideUtils.getLastGuideElementSelector('open-in-sparql-editor-btn');\n const elementSelector = GuideUtils.getLastGuideElementSelector('chat-item', exploreSparqlBtnSelector);\n\n return [\n {\n // If button is not visible for some reason, skip the whole step\n guideBlockName: 'info-message',\n options: angular.extend({}, {\n url: 'ttyg',\n beforeShowPromise: (guide, currentStep) => GuideUtils.waitFor(elementSelector, 1)\n .then(() => {\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.next());\n })\n .catch(() => {\n const stepId = currentStep.id;\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.show(stepId + 2));\n }),\n }, options),\n },\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.ask-ttyg-agent.explore-sparql',\n class: 'explore-sparql',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector,\n },\n },\n ];\n },\n },\n {\n guideBlockName: 'ttyg-ask-explain-answer-more',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const explainMoreBtnSelector = GuideUtils.getLastGuideElementSelector('how-derive-answer-btn');\n const elementSelector = GuideUtils.getLastGuideElementSelector('chat-item', explainMoreBtnSelector);\n return [\n {\n // If button is not visible for some reason, skip the whole step\n guideBlockName: 'info-message',\n options: angular.extend({}, {\n url: 'ttyg',\n beforeShowPromise: (guide, currentStep) => {\n return GuideUtils.waitFor(elementSelector, 1)\n .then(() => {\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.next());\n })\n .catch(() => {\n const stepId = currentStep.id;\n // Using a timeout because the library executes logic to show the step in a then clause which causes current and next steps to show\n setTimeout(() => guide.show(stepId + 3));\n });\n },\n }, options),\n },\n {\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step_plugin.ask-ttyg-agent.explain-answer-more',\n class: 'input-agent-name',\n // If mainAction is set the title will be set automatically\n ...(options.mainAction ? {} : {title: TTYG_ASK_DEFAULT_TITLE}),\n disableNextFlow: true,\n ...options,\n url: 'ttyg',\n elementSelector,\n show: (guide) => () => {\n // Add \"click\" listener to the element. Upon clicking the element is hidden and this breaks the default flow of the guide.\n // Adding a handler to proceed to next step\n $(elementSelector).on('click', () => {\n guide.next();\n });\n },\n hide: () => () => {\n // Remove the \"click\" listener of element. It is important when step is hidden.\n $(elementSelector).off('click');\n },\n },\n },\n getWaitForAnswerStep(GuideUtils, options),\n ];\n },\n },\n {\n guideBlockName: 'ask-ttyg-agent',\n getSteps: (options) => {\n options.mainAction = 'ask-ttyg-agent';\n options.maxWaitTime = 10;\n options.forceReload = false;\n\n const explain = options.explain;\n const explainMore = options.explainMore;\n const exploreSparql = options.exploreSparql;\n\n const steps = [\n {\n guideBlockName: 'ttyg-ask-question', options: {...options, skipPoint: true},\n },\n ];\n\n if (explain) {\n steps.push(\n {\n guideBlockName: 'ttyg-explain-response', options: {...options},\n },\n );\n }\n\n if (explain && exploreSparql) {\n steps.push(\n {\n guideBlockName: 'ttyg-ask-agent-explore-sparql', options: {...options},\n },\n );\n }\n\n if (explain && explainMore) {\n steps.push(\n {\n guideBlockName: 'ttyg-ask-explain-answer-more', options: {...options},\n },\n );\n }\n\n return steps;\n },\n },\n]);\n\nconst getWaitForAnswerStep = (GuideUtils, options) => {\n return {\n guideBlockName: 'hold-and-wait-until-hidden',\n options: angular.extend({}, {\n content: 'guide.step_plugin.ask-ttyg-agent.wait-for-answer',\n class: 'wait-for-answer',\n url: 'ttyg',\n placement: 'left',\n elementSelector: GuideUtils.getGuideElementSelector(CHAT_DETAILS_SELECTOR),\n elementSelectorToWait: GuideUtils.getGuideElementSelector('question-loader'),\n }, options),\n };\n};\n"],"names":["TTYG_ASK_DEFAULT_TITLE","CHAT_DETAILS_SELECTOR","PluginRegistry","add","guideBlockName","getSteps","options","services","GuideUtils","content","mainAction","title","class","disableNextFlow","url","elementSelector","getGuideElementSelector","show","guide","$","on","event","text","key","shiftKey","ctrlKey","waitFor","then","next","hide","off","getWaitForAnswerStep","explainBtnSelector","getLastGuideElementSelector","angular","extend","beforeShowPromise","currentStep","setTimeout","catch","stepId","id","exploreSparqlBtnSelector","explainMoreBtnSelector","maxWaitTime","forceReload","explain","explainMore","exploreSparql","steps","skipPoint","push","placement","elementSelectorToWait"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"55217.4769c1f0615e364d8c2a.bundle.js","mappings":"oHAAAA,eAAeC,IAAI,aAAc,CAC7B,CACIC,eAAgB,kBAChBC,SAAUA,CAACC,EAASC,KAChB,MAAMC,EAAaD,EAASC,WACtBC,EAAQ,GAEd,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAkB,G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ages/legacy-workbench/src/js/angular/guides/steps/complex/main-menu/plugin.js"],"sourcesContent":["PluginRegistry.add('guide.step', [\n {\n guideBlockName: 'click-main-menu',\n getSteps: (options, services) => {\n const GuideUtils = services.GuideUtils;\n const steps = [];\n\n let menuSelector;\n let menuTitle;\n let submenuSelector;\n let submenuTitle;\n let viewName;\n let helpInfo;\n let menuDialogClass = '';\n let submenuDialogClass = '';\n\n switch (options.menu) {\n case \"repositories\":\n menuSelector = 'menu-setup';\n menuTitle = 'menu.setup.label';\n menuDialogClass = 'menu-setup';\n submenuSelector = 'sub-menu-repositories';\n submenuTitle = 'menu.repositories.label';\n submenuDialogClass = 'sub-menu-repositories';\n viewName = 'menu.repositories.label';\n helpInfo = 'view.repositories.helpInfo';\n\n break;\n case \"import\":\n menuSelector = 'menu-import';\n menuTitle = 'common.import';\n menuDialogClass = 'menu-import';\n viewName = 'common.import';\n helpInfo = 'view.import.helpInfo';\n\n break;\n case \"connectors\":\n menuSelector = 'menu-setup';\n menuTitle = 'menu.setup.label';\n menuDialogClass = 'menu-setup-guide-dialog';\n submenuSelector = 'sub-menu-connectors';\n submenuTitle = 'menu.connectors.label';\n submenuDialogClass = 'sub-menu-connectors-guide-dialog';\n viewName = 'view.connector.management.title';\n helpInfo = 'view.connector.management.helpInfo';\n\n break;\n case \"autocomplete\":\n menuSelector = 'menu-setup';\n menuTitle = 'menu.setup.label';\n menuDialogClass = 'menu-setup';\n submenuSelector = 'sub-menu-autocomplete';\n submenuTitle = 'menu.autocomplete.label';\n submenuDialogClass = 'sub-menu-autocomplete';\n viewName = 'view.autocomplete.title';\n helpInfo = 'view.autocomplete.helpInfo';\n\n break;\n case \"visual-graph\":\n menuSelector = 'menu-explore';\n menuTitle = 'menu.explore.label';\n menuDialogClass = 'menu-explore';\n submenuSelector = 'sub-menu-visual-graph';\n submenuTitle = 'visual.graph.label';\n submenuDialogClass = 'sub-menu-visual-graph';\n viewName = 'visual.graph.label';\n helpInfo = 'view.visual.graph.helpInfo';\n\n break;\n case \"sparql\":\n menuSelector = 'menu-sparql';\n menuTitle = 'menu.sparql.label';\n menuDialogClass = 'menu-sparql';\n viewName = 'view.sparql-editor.title';\n helpInfo = 'view.sparql-editor.helpInfo';\n\n break;\n case \"class-hierarchy\":\n menuSelector = 'menu-explore';\n menuTitle = 'menu.explore.label';\n menuDialogClass = 'menu-explore';\n submenuSelector = 'menu-class-hierarchy';\n submenuTitle = 'menu.class.hierarchy.label';\n submenuDialogClass = 'sub-menu-class-hierarchy';\n viewName = 'view.class.hierarchy.title';\n helpInfo = 'view.class.hierarchy.helpInfo';\n\n break;\n case \"class-relationships\":\n menuSelector = 'menu-explore';\n menuTitle = 'menu.explore.label';\n menuDialogClass = 'menu-explore';\n submenuSelector = 'sub-menu-class-relationships';\n submenuTitle = 'menu.class.relationships.label';\n submenuDialogClass = 'sub-menu-class-relationships';\n viewName = 'view.class.relationships.title';\n helpInfo = 'view.class.relationships.helpInfo';\n\n break;\n case \"ttyg\":\n menuSelector = 'menu-lab';\n menuTitle = 'menu.lab.label';\n menuDialogClass = 'menu-lab';\n submenuSelector = 'sub-menu-ttyg';\n submenuTitle = 'menu.ttyg.label';\n submenuDialogClass = 'sub-menu-ttyg';\n viewName = 'menu.ttyg.label';\n helpInfo = 'ttyg.helpInfo';\n\n break;\n case \"similarity\":\n menuSelector = 'menu-explore';\n menuTitle = 'menu.explore.label';\n menuDialogClass = 'menu-explore';\n submenuSelector = 'sub-menu-similarity';\n submenuTitle = 'menu.similarity.label';\n submenuDialogClass = 'sub-menu-similarity';\n viewName = 'menu.similarity.label';\n helpInfo = 'guide.step-help-info.create-similarity-index';\n break;\n case \"rdf-rank\":\n menuSelector = 'menu-setup';\n menuTitle = 'menu.setup.label';\n menuDialogClass = 'menu-setup';\n submenuSelector = 'sub-menu-rdf-rank';\n submenuTitle = 'view.rdf.rank.title';\n submenuDialogClass = 'sub-menu-rdf-rank';\n viewName = 'view.rdf.rank.title';\n helpInfo = 'view.rdf.rank.helpInfo';\n break;\n }\n\n const mainMenuClickElementPostSelector = submenuSelector ? ' div' : ' a';\n options.viewName = viewName;\n\n // View intro element\n if (options.showIntro && options.mainAction) {\n steps.push({\n guideBlockName: 'info-message',\n options: {\n content: 'guide.step-intro.' + options.mainAction,\n extraContent: helpInfo,\n extraContentClass: 'alert alert-help text-left',\n skipPoint: true,\n ...options\n }\n });\n }\n\n // Main menu element\n steps.push({\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step-menu.click-menu',\n menuLabelKey: menuTitle,\n class: menuDialogClass,\n elementSelector: GuideUtils.getGuideElementSelector(menuSelector),\n showOn: () => {\n // If submenu is visible this mean that we have to close menu.\n if (!!submenuSelector && GuideUtils.isGuideElementVisible(submenuSelector)) {\n GuideUtils.clickOnGuideElement(menuSelector, mainMenuClickElementPostSelector)();\n }\n return true;\n },\n onNextClick: GuideUtils.clickOnGuideElement(menuSelector, mainMenuClickElementPostSelector),\n initPreviousStep: (services, stepId) => {\n const previousStep = services.ShepherdService.getPreviousStepFromHistory(stepId);\n if (previousStep) {\n return previousStep.options.initPreviousStep(services, previousStep.options.id);\n }\n\n return Promise.resolve();\n },\n ...options\n }\n });\n\n if (submenuSelector) {\n steps.push({\n guideBlockName: 'clickable-element',\n options: {\n content: 'guide.step-menu.click-menu',\n menuLabelKey: submenuTitle,\n class: submenuDialogClass,\n elementSelector: GuideUtils.getGuideElementSelector(submenuSelector),\n placement: 'right',\n canBePaused: false,\n onNextClick: GuideUtils.clickOnGuideElement(submenuSelector, ' a'),\n initPreviousStep: (services, stepId) => {\n const previousStep = services.ShepherdService.getPreviousStepFromHistory(stepId);\n if (previousStep) {\n return previousStep.options.initPreviousStep(services, previousStep.options.id);\n }\n\n return Promise.resolve();\n },\n ...options\n }\n });\n }\n return steps;\n }\n }\n]);\n"],"names":["PluginRegistry","add","guideBlockName","getSteps","options","services","GuideUtils","steps","menuSelector","menuTitle","submenuSelector","submenuTitle","viewName","helpInfo","menuDialogClass","submenuDialogClass","menu","mainMenuClickElementPostSelector","showIntro","mainAction","push","content","extraContent","extraContentClass","skipPoint","menuLabelKey","class","elementSelector","getGuideElementSelector","showOn","isGuideElementVisible","clickOnGuideElement","onNextClick","initPreviousStep","stepId","previousStep","ShepherdService","getPreviousStepFromHistory","id","Promise","resolve","placement","canBePaused"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=60039;export const __webpack_ids__=[42618,49539,60039,65820,71920];export const __webpack_modules__={42618:()=>{function e(e){return{restrict:"E",scope:{fieldName:"@",source:"=",onSave:"&",onCancel:"&",onClick:"&",onDblclick:"&",isEditing:"="},templateUrl:"js/angular/core/directives/inline-editable-text/templates/inline-editable-text.template.html",link:function(t,a){t.editableModel={};const n=[];let i;t.onKeydown=e=>{"Enter"===e.key?(o(),t.editableModel.text!==t.text&&t.onSave({newText:t.editableModel.text,source:t.source})):"Escape"===e.key&&E()},t.onCancelEditing=()=>{E()},t.onSelect=()=>{i?(o(),t.onDblclick({source:t.source})):i=e(function(){t.onClick({source:t.source}),o()},250)};const E=()=>{o(),t.onCancel()},o=()=>{e.cancel(i),i=void 0};n.push(t.$watch("isEditing",n=>{n&&(t.editableModel.text=t.source[t.fieldName],e(()=>{const e=a.find("input")[0];e.focus(),e.select()},0))})),t.$on("$destroy",()=>{n.forEach(e=>e()),o()})}}}angular.module("graphdb.framework.core.directives.inline-editable-text",[]).directive("inlineEditableText",e),e.$inject=["$timeout"]},60039:(e,t,a)=>{a.r(t),a(42618);var n=a(71920),i=a(65820),E=a(69937);function o(e,t,a,o){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-list.html",link:d=>{d.selectedChat=void 0,d.renamedChat=void 0,d.deletingChat=void 0,d.onSelectChatForRenaming=e=>{d.renamedChat=e},d.onSelectChat=t=>{if(!d.selectedChat||d.selectedChat.id!==t.id){const a=e.getChats().getNonPersistedChat();a&&e.deleteChat(a),e.selectChat(t),d.renamedChat=void 0}},d.onDeleteChat=i=>{const o=a.instant("ttyg.dialog.delete.title"),d=(0,E.Gz)(a.instant("ttyg.dialog.delete.body",{chatName:i.name}));t.openConfirmation(o,d,()=>e.emit(n.TTYGEventName.DELETE_CHAT,i))},d.onRenameChat=(t,a)=>{a.name=t,d.renamedChat=void 0,e.emit(n.TTYGEventName.RENAME_CHAT,a)},d.onExportChat=t=>{e.emit(n.TTYGEventName.CHAT_EXPORT,t)},d.onCancelChatRenaming=()=>{d.renamedChat=void 0},d.getHumanReadableChatGroupTimestamp=e=>(0,i.getHumanReadableTimestamp)(a,o,e);const c=e=>{d.selectedChat=e},l=[];l.push(e.onSelectedChatChanged(c)),l.push(e.onSelectedChatUpdated(c)),l.push(e.onChatsListChanged(e=>{d.chatList=e})),l.push(e.subscribe(n.TTYGEventName.DELETING_CHAT,e=>{d.deletingChat=e})),d.$on("$destroy",()=>{l.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.chat-list",["graphdb.framework.core.directives.inline-editable-text"]).directive("chatList",o),o.$inject=["TTYGContextService","ModalService","$translate","$filter"]},65820:(e,t,a)=>{a.r(t),a.d(t,{getHumanReadableTimestamp:()=>n});const n=(e,t,a,n={})=>{if(!a)return"";const i=new Date(a),E=new Date,o=new Date(E.getFullYear(),E.getMonth(),E.getDate()),d=new Date(o);d.setDate(o.getDate()-1);const c=new Date(i.getFullYear(),i.getMonth(),i.getDate()),l=n.timeFormat?t("date")(i,n.timeFormat):"";if(c.getTime()===o.getTime())return e.instant("common.dates.today")+l;if(c.getTime()===d.getTime())return e.instant("common.dates.yesterday")+l;{const e=n.dateFormat||"yyyy-MM-dd";return t("date")(i,e)+l}}},71920:(e,t,a)=>{a.r(t),a.d(t,{TTYGEventName:()=>E});var n=a(98980);function i(e){let t,a,i,o,d,c={},l=!1;const C=()=>(0,n.cloneDeep)(t),s=()=>(0,n.cloneDeep)(a),T=e=>{a=(0,n.cloneDeep)(e),h(E.CHAT_LIST_UPDATED,s())},r=()=>(0,n.cloneDeep)(i),_=()=>(0,n.cloneDeep)(o),A=()=>(0,n.cloneDeep)(c),g=e=>!!c[e],D=()=>l,h=(t,a)=>{e.emitSync(t,(0,n.cloneDeep)(a))},p=(t,a)=>e.subscribeSync(t,e=>a(e));return{resetContext:()=>{t=void 0,a=void 0,i=void 0,o=void 0,c={},d=void 0,l=!1},emit:h,subscribe:p,getChats:s,updateChats:T,addChat:e=>{a.appendChat(e),T(a)},replaceChat:(e,t)=>{a.replaceChat(e,t),T(a)},onChatsListChanged:e=>(a&&angular.isFunction(e)&&e(s()),p(E.CHAT_LIST_UPDATED,t=>e(t))),getSelectedChat:r,selectChat:e=>{i&&i.id===e.id||(i=(0,n.cloneDeep)(e),h(E.SELECT_CHAT,r()))},deselectChat:()=>{i=void 0,h(E.SELECT_CHAT,r())},deleteChat:e=>{a.deleteChat(e),T(a)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(r()),p(E.SELECT_CHAT,t=>e(t))),updateSelectedChat:e=>{i&&i.id&&e&&i.id!==e.id||(i=(0,n.cloneDeep)(e),h(E.SELECTED_CHAT_UPDATED,r()))},onSelectedChatUpdated:e=>(i&&angular.isFunction(e)&&e(r()),p(E.SELECTED_CHAT_UPDATED,t=>e(t))),onLastMessageReceived:e=>(i&&angular.isFunction(e)&&e(r()),p(E.LAST_MESSAGE_RECEIVED,t=>e(t))),updateAgents:e=>{t=(0,n.cloneDeep)(e),h(E.AGENT_LIST_UPDATED,C())},onAgentsListChanged:e=>(t&&angular.isFunction(e)&&e(C()),p(E.AGENT_LIST_UPDATED,t=>e(t))),getAgents:C,getAgent:e=>{if(t)return(0,n.cloneDeep)(t.getAgent(e))},selectAgent:e=>{o=(0,n.cloneDeep)(e),h(E.AGENT_SELECTED,_())},getSelectedAgent:_,onSelectedAgentChanged:e=>(o&&angular.isFunction(e)&&e(_()),p(E.AGENT_SELECTED,t=>e(t))),getDefaultAgent:()=>(0,n.cloneDeep)(d),setDefaultAgent:e=>{d=e},setCanModifyAgent:e=>{l=(0,n.cloneDeep)(e),h(E.CAN_MODIFY_AGENT_UPDATED,D())},getCanModifyAgent:D,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(D()),p(E.CAN_MODIFY_AGENT_UPDATED,t=>e(t))),hasExplainResponse:g,toggleExplainResponse:e=>{g(e)&&(c[e].expanded=!c[e].expanded,h(E.EXPLAIN_RESPONSE_CACHE_UPDATED,A()))},getExplainResponse:e=>(0,n.cloneDeep)(c[e]),addExplainResponseCache:e=>{c[e.answerId]=(0,n.cloneDeep)(e),h(E.EXPLAIN_RESPONSE_CACHE_UPDATED,A())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(A()),p(E.EXPLAIN_RESPONSE_CACHE_UPDATED,t=>e(t)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",i),i.$inject=["EventEmitterService","TTYGService"];const E={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}}};
2
- //# sourceMappingURL=60039.cb9262af0bc63b635c76.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"60039.cb9262af0bc63b635c76.bundle.js","mappings":"4IAsCA,SAASA,EAAmBC,GACxB,MAAO,CACHC,SAAU,IACVC,MAAO,CAIHC,UAAW,IACXC,OAAQ,IACRC,OAAQ,IACRC,SAAU,IACVC,QAAS,IACTC,WAAY,IACZC,UAAW,KAEfC,YAAa,+FACbC,KAAM,SAAUT,EAAOU,GAKnBV,EAAMW,cAAgB,CAAC,EAKvB,MAAMC,EAAgB,GACtB,IAAIC,EAKJb,EAAMc,UAAaC,IACG,UAAdA,EAAMC,KACNC,IACIjB,EAAMW,cAAcO,OAASlB,EAAMkB,MACnClB,EAAMG,OAAO,CAACgB,QAAQnB,EAAMW,cAAcO,KAAMhB,OAAQF,EAAME,UAE7C,WAAda,EAAMC,KACdI,KAIPpB,EAAMqB,gBAAkB,KACpBD,KAGJpB,EAAMsB,SAAW,KACTT,GACAI,IACAjB,EAAMM,WAAW,CAACJ,OAAQF,EAAME,UAEhCW,EAAef,EAAS,WACpBE,EAAMK,QAAQ,CAACH,OAAQF,EAAME,SAC7Be,GACJ,EAAG,MAOX,MAAMG,EAAgBA,KAClBH,IACAjB,EAAMI,YAGJa,EAAqBA,KACvBnB,EAASyB,OAAOV,GAChBA,OAAeW,GAyBn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,YAKZC,YAAa,aAKbC,aAAc,cAKdC,cAAe,eAMfC,eAAgB,gBAKhBtC,eAAgB,gBAKhBuC,6BAA8B,2BAK9BC,sBAAuB,qBAKvBC,8BAA+B,4BAK/BC,iBAAkB,kBAKlB/B,+BAAgC,8BAKhCgC,oBAAqB,0BAErBpC,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/inline-editable-text/inline-editable-text.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/directives/chat-list.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg.utils.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["/**\n * @ngdoc directive\n * @name graphdb.framework.core.directives:inlineEditableText\n * @restrict E\n * @description\n * A directive for inline editing of text fields. It provides a simple interface to display text,\n * switch to an editable input field on double-click, and save or cancel changes.\n *\n * The directive allows for customizable save, cancel, click, and double-click actions.\n *\n * @param {string} fieldName - The name of the field in the source object to be edited.\n * @param {Object} source - The object containing the field to be edited.\n * @param {function} onSave - The function to be called when saving the edited text.\n * It passes an object with the new text and the source object.\n * @param {function} onCancel - The function to be called when editing is canceled.\n * @param {function} onClick - The function to be called on single-click.\n * @param {function} onDblclick - The function to be called on double-click.\n * @param {boolean} isEditing - A flag indicating whether the text is currently being edited.\n *\n * @example\n * <inline-editable-text\n * field-name=\"name\"\n * source=\"item\"\n * on-save=\"saveFunction(newText, source)\"\n * on-cancel=\"cancelFunction()\"\n * on-click=\"clickFunction(source)\"\n * on-dblclick=\"dblClickFunction(source)\"\n * is-editing=\"item.isEditing\">\n * </inline-editable-text>\n *\n * @requires $timeout\n */\nangular\n .module('graphdb.framework.core.directives.inline-editable-text', [])\n .directive('inlineEditableText', InlineEditableText);\n\nInlineEditableText.$inject = ['$timeout'];\n\nfunction InlineEditableText($timeout) {\n return {\n restrict: 'E',\n scope: {\n /**\n * {@type {text}}\n */\n fieldName: '@',\n source: '=',\n onSave: '&',\n onCancel: '&',\n onClick: '&',\n onDblclick: '&',\n isEditing: '='\n },\n templateUrl: 'js/angular/core/directives/inline-editable-text/templates/inline-editable-text.template.html',\n link: function (scope, element) {\n\n // =========================\n // Public variables\n // =========================\n scope.editableModel = {};\n\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n let clickTimeout;\n\n // =========================\n // Public functions\n // =========================\n scope.onKeydown = (event) => {\n if (event.key === 'Enter') {\n cancelClickTimeout();\n if (scope.editableModel.text !== scope.text) {\n scope.onSave({newText:scope.editableModel.text, source: scope.source});\n }\n } else if (event.key === 'Escape') {\n cancelEditing();\n }\n };\n\n scope.onCancelEditing = () => {\n cancelEditing();\n };\n\n scope.onSelect = () => {\n if (clickTimeout) {\n cancelClickTimeout();\n scope.onDblclick({source: scope.source});\n } else {\n clickTimeout = $timeout(function () {\n scope.onClick({source: scope.source});\n cancelClickTimeout();\n }, 250);\n }\n };\n\n // =========================\n // Private functions\n // =========================\n const cancelEditing = () => {\n cancelClickTimeout();\n scope.onCancel();\n };\n\n const cancelClickTimeout = () => {\n $timeout.cancel(clickTimeout);\n clickTimeout = undefined;\n };\n\n const focusEditElement = () => {\n // Focus and select the text in the input field\n $timeout(() => {\n const inputElement = element.find('input')[0];\n inputElement.focus();\n inputElement.select();\n }, 0);\n };\n\n // =========================\n // Subscription handlers\n // =========================\n const onIsEditChanged = (newVal) => {\n if (newVal) {\n scope.editableModel.text = scope.source[scope.fieldName];\n focusEditElement();\n }\n };\n\n // =========================\n // Subscriptions\n // =========================\n subscriptions.push(scope.$watch('isEditing', onIsEditChanged));\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n cancelClickTimeout();\n };\n\n // Deregister the watcher when the scope/directive is destroyed\n scope.$on('$destroy', removeAllSubscribers);\n }\n };\n}\n","import 'angular/core/directives/inline-editable-text/inline-editable-text.directive';\nimport {TTYGEventName} from \"../services/ttyg-context.service\";\nimport {getHumanReadableTimestamp} from \"../services/ttyg.utils\";\nimport {decodeHTML} from \"../../../../app\";\n\nconst modules = [\n 'graphdb.framework.core.directives.inline-editable-text'\n];\n\nangular\n .module('graphdb.framework.ttyg.directives.chat-list', modules)\n .directive('chatList', ChatListComponent);\n\nChatListComponent.$inject = ['TTYGContextService', 'ModalService', '$translate', '$filter'];\n\nfunction ChatListComponent(TTYGContextService, ModalService, $translate, $filter) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/ttyg/templates/chat-list.html',\n link: ($scope) => {\n\n // =========================\n // Public variables\n // =========================\n\n $scope.selectedChat = undefined;\n $scope.renamedChat = undefined;\n $scope.deletingChat = undefined;\n\n // =========================\n // Private variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Handles the selection of a chat for renaming.\n * @param {ChatModel} chat\n */\n $scope.onSelectChatForRenaming = (chat) => {\n $scope.renamedChat = chat;\n };\n\n /**\n * Handles the selection of a chat.\n * @param {ChatModel} chat\n */\n $scope.onSelectChat = (chat) => {\n if (!$scope.selectedChat || $scope.selectedChat.id !== chat.id) {\n const nonPersistedChat = TTYGContextService.getChats().getNonPersistedChat();\n if (nonPersistedChat) {\n TTYGContextService.deleteChat(nonPersistedChat);\n }\n TTYGContextService.selectChat(chat);\n $scope.renamedChat = undefined;\n }\n };\n\n /**\n * Handles the deletion of a chat.\n * @param {ChatModel} chat\n */\n $scope.onDeleteChat = (chat) => {\n const title = $translate.instant('ttyg.dialog.delete.title');\n const confirmDeleteMessage = decodeHTML($translate.instant('ttyg.dialog.delete.body', {chatName: chat.name}));\n ModalService.openConfirmation(title, confirmDeleteMessage, () => TTYGContextService.emit(TTYGEventName.DELETE_CHAT, chat));\n };\n\n /**\n * Handles the renaming of a chat.\n * @param {string} newName - the new name of the chat\n * @param {ChatModel} chat\n */\n $scope.onRenameChat = (newName, chat) => {\n chat.name = newName;\n $scope.renamedChat = undefined;\n TTYGContextService.emit(TTYGEventName.RENAME_CHAT, chat);\n };\n\n /**\n * Handles the export of a chat.\n * @param {ChatModel} chat\n */\n $scope.onExportChat = (chat) => {\n TTYGContextService.emit(TTYGEventName.CHAT_EXPORT, chat);\n };\n\n /**\n * Handles the cancelation of the chat renaming.\n */\n $scope.onCancelChatRenaming = () => {\n $scope.renamedChat = undefined;\n };\n\n $scope.getHumanReadableChatGroupTimestamp = (timestamp) => {\n return getHumanReadableTimestamp($translate, $filter, timestamp);\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Handles the change of the selected chat.\n * @param {ChatModel} chat\n */\n const onSelectedChatChanged = (chat) => {\n $scope.selectedChat = chat;\n };\n\n /**\n * Handles the change of the chats list.\n * @param {ChatsListModel} chatList\n */\n const onChatsListChanged = (chatList) => {\n $scope.chatList = chatList;\n };\n\n /**\n * Handles the progress of deletion of a chat.\n * @param {{chatId: string, inProgress: boolean}} event\n */\n const onDeletingChat = (event) => {\n $scope.deletingChat = event;\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n const removeAllSubscribers = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n subscriptions.push(TTYGContextService.onSelectedChatChanged(onSelectedChatChanged));\n subscriptions.push(TTYGContextService.onSelectedChatUpdated(onSelectedChatChanged));\n subscriptions.push(TTYGContextService.onChatsListChanged(onChatsListChanged));\n subscriptions.push(TTYGContextService.subscribe(TTYGEventName.DELETING_CHAT, onDeletingChat));\n\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n\n // =========================\n // Initialization\n // =========================\n\n function initialize() {\n }\n initialize();\n }\n };\n}\n","export const getHumanReadableTimestamp = ($translate, $filter, timestamp, options = {}) => {\n\n if (!timestamp) {\n return '';\n }\n\n const date = new Date(timestamp);\n const today = new Date();\n\n // Get start of today\n const todayStart = new Date(today.getFullYear(), today.getMonth(), today.getDate());\n\n // Get start of yesterday\n const yesterdayStart = new Date(todayStart);\n yesterdayStart.setDate(todayStart.getDate() - 1);\n\n // Get start of the timestamp's day\n const dateStart = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n const time = options.timeFormat ? $filter('date')(date, options.timeFormat) : '';\n\n if (dateStart.getTime() === todayStart.getTime()) {\n return $translate.instant('common.dates.today') + time;\n } else if (dateStart.getTime() === yesterdayStart.getTime()) {\n return $translate.instant('common.dates.yesterday') + time;\n } else {\n // ISO format is the least ambiguous if no date format is passed.\n const dateFormat = options.dateFormat || 'yyyy-MM-dd';\n return $filter('date')(date, dateFormat) + time;\n }\n};\n","import {cloneDeep} from 'lodash';\n\nangular\n .module('graphdb.framework.ttyg.services.ttygcontext', [])\n .factory('TTYGContextService', TTYGContextService);\n\nTTYGContextService.$inject = ['EventEmitterService', 'TTYGService'];\n\nfunction TTYGContextService(EventEmitterService) {\n\n /**\n * The list of agents.\n * @type {AgentListModel}\n * @private\n */\n let _agents = undefined;\n\n /**\n * The ChatsListModel.\n * @type {ChatsListModel}\n * @private\n */\n let _chats = undefined;\n\n /**\n * The currently selected in the UI chat which is used for conversation.\n * @type {ChatModel|undefined}\n * @private\n */\n let _selectedChat = undefined;\n\n /**\n * The currently selected in the UI agent which is used for conversation.\n * @type {AgentModel|undefined}\n * @private\n */\n let _selectedAgent = undefined;\n\n /**\n * Stores information about loaded explain responses.\n * The key is the answer ID, and the value is an instance of {@see ExplainResponseModel} that holds the explanation message.\n *\n * @type {{[key: string]: ExplainResponseModel}}\n */\n let _explainCache = {};\n\n /**\n * The default agent values.\n * @type {AgentModel|undefined}\n * @private\n */\n let _defaultAgent = undefined;\n\n let _canModifyAgent = false;\n\n const resetContext = () => {\n _agents = undefined;\n _chats = undefined;\n _selectedChat = undefined;\n _selectedAgent = undefined;\n _explainCache = {};\n _defaultAgent = undefined;\n _canModifyAgent = false;\n };\n\n /**\n * @return {Promise<AgentModel>}\n */\n const getDefaultAgent = () => {\n return cloneDeep(_defaultAgent);\n };\n\n const setDefaultAgent = (agent) => {\n _defaultAgent = agent;\n };\n\n /**\n * @return {AgentListModel}\n */\n const getAgents = () => {\n return cloneDeep(_agents);\n };\n\n const getAgent = (agentId) => {\n if (_agents) {\n return cloneDeep(_agents.getAgent(agentId));\n }\n };\n\n /**\n * @return {ChatsListModel}\n */\n const getChats = () => {\n return cloneDeep(_chats);\n };\n\n /**\n * @param {ChatsListModel} chats\n */\n const updateChats = (chats) => {\n _chats = cloneDeep(chats);\n emit(TTYGEventName.CHAT_LIST_UPDATED, getChats());\n };\n\n /**\n * Deletes the chat with the provided <code>chatId</code>.\n * @param {ChatModel} chat\n */\n const deleteChat = (chat) => {\n _chats.deleteChat(chat);\n updateChats(_chats);\n };\n\n const addChat = (newChat) => {\n _chats.appendChat(newChat);\n updateChats(_chats);\n };\n\n const replaceChat = (newChat, oldChat) => {\n _chats.replaceChat(newChat, oldChat);\n updateChats(_chats);\n };\n\n /** Subscribes to the 'chatListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onChatsListChanged = (callback) => {\n if (_chats && angular.isFunction(callback)) {\n callback(getChats());\n }\n return subscribe(TTYGEventName.CHAT_LIST_UPDATED, (chats) => callback(chats));\n };\n\n /**\n * @return {ChatModel}\n */\n const getSelectedChat = () => {\n return cloneDeep(_selectedChat);\n };\n\n /**\n * Updates the selected chat with the provided <code>selectedChat</code> and emits the 'selectChat' event\n * to notify listeners that a new chat has been selected.\n *\n * @param {ChatModel} selectedChat - The chat object to select.\n */\n const selectChat = (selectedChat) => {\n if (!_selectedChat || _selectedChat.id !== selectedChat.id) {\n _selectedChat = cloneDeep(selectedChat);\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n }\n };\n\n const deselectChat = () => {\n _selectedChat = undefined;\n emit(TTYGEventName.SELECT_CHAT, getSelectedChat());\n };\n\n /**\n * Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatChanged = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECT_CHAT, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the selected chat and emits the 'selectChatUpdated' event to notify listeners that a property\n * of the selected chat has changed.\n *\n * If the ID of the passed chat differs from the current selected chat, no action will occur.\n *\n * The selected chat can be updated through {@link TTYGContextService#selectChat}.\n *\n * @param {ChatModel} chat - The chat object that is being updated.\n */\n const updateSelectedChat = (chat) => {\n if (!_selectedChat || !_selectedChat.id || !chat || _selectedChat.id === chat.id) {\n _selectedChat = cloneDeep(chat);\n emit(TTYGEventName.SELECTED_CHAT_UPDATED, getSelectedChat());\n }\n };\n\n /** Subscribes to the 'selectChat' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedChatUpdated = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.SELECTED_CHAT_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /** Subscribes to the 'lastMessageReceived' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onLastMessageReceived = (callback) => {\n if (_selectedChat && angular.isFunction(callback)) {\n callback(getSelectedChat());\n }\n return subscribe(TTYGEventName.LAST_MESSAGE_RECEIVED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @param {AgentListModel} agents\n */\n const updateAgents = (agents) => {\n _agents = cloneDeep(agents);\n emit(TTYGEventName.AGENT_LIST_UPDATED, getAgents());\n };\n\n /**\n * Subscribes to the 'agentListUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onAgentsListChanged = (callback) => {\n if (_agents && angular.isFunction(callback)) {\n callback(getAgents());\n }\n return subscribe(TTYGEventName.AGENT_LIST_UPDATED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * @return {AgentModel}\n */\n const getSelectedAgent = () => {\n return cloneDeep(_selectedAgent);\n };\n\n /**\n * Updates the selected agent with the provided <code>selectedAgent</code> and emits the 'agentSelected' event\n * to notify listeners that a new agent has been selected.\n *\n * @param {AgentModel} selectedAgent - The instance of selected agent.\n */\n const selectAgent = (selectedAgent) => {\n _selectedAgent = cloneDeep(selectedAgent);\n emit(TTYGEventName.AGENT_SELECTED, getSelectedAgent());\n };\n\n const _getExplainResponseCache = () => {\n return cloneDeep(_explainCache);\n };\n\n /**\n * Gets the explain response.\n * @param {string} answerId\n * @return {ExplainResponseModel}\n */\n const getExplainResponse = (answerId) => {\n return cloneDeep(_explainCache[answerId]);\n };\n\n /**\n * Adds the <code>explainResponse</code> into the explain response cache.\n *\n * @param {ExplainResponseModel} explainResponse\n */\n const addExplainResponseCache = (explainResponse) => {\n _explainCache[explainResponse.answerId] = cloneDeep(explainResponse);\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n };\n\n const hasExplainResponse = (answerId) => {\n return !!_explainCache[answerId];\n };\n\n const toggleExplainResponse = (answerId) => {\n if (hasExplainResponse(answerId)) {\n _explainCache[answerId].expanded = !_explainCache[answerId].expanded;\n emit(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, _getExplainResponseCache());\n }\n };\n\n /**\n * Subscribes to the 'explainResponseCacheUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onExplainResponseCacheUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(_getExplainResponseCache());\n }\n return subscribe(TTYGEventName.EXPLAIN_RESPONSE_CACHE_UPDATED, (explainResponses) => callback(explainResponses));\n };\n\n /**\n * Subscribes to the 'agentSelected' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onSelectedAgentChanged = (callback) => {\n if (_selectedAgent && angular.isFunction(callback)) {\n callback(getSelectedAgent());\n }\n return subscribe(TTYGEventName.AGENT_SELECTED, (selectedChat) => callback(selectedChat));\n };\n\n /**\n * Updates the \"canModifyAgent\" flag and emits the 'canModifyAgentUpdated' event to notify listeners that the canModifyAgent flag is changed.\n *\n * @param {boolean} canModifyAgent\n */\n const setCanModifyAgent = (canModifyAgent) => {\n _canModifyAgent = cloneDeep(canModifyAgent);\n emit(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, getCanModifyAgent());\n };\n\n const getCanModifyAgent = () => {\n return _canModifyAgent;\n };\n\n /**\n * Subscribes to the 'canModifyAgentUpdated' event.\n * @param {function} callback - The callback to be called when the event is fired.\n *\n * @return {function} unsubscribe function.\n */\n const onCanUpdateAgentUpdated = (callback) => {\n if (angular.isFunction(callback)) {\n callback(getCanModifyAgent());\n }\n return subscribe(TTYGEventName.CAN_MODIFY_AGENT_UPDATED, (canModifyAgent) => callback(canModifyAgent));\n };\n\n /**\n * Emits an event with a deep-cloned payload using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to emit. It must be a value from {@link TTYGEventName}.\n * @param {*} payload - The data to emit with the event. The payload is deep-cloned before emission.\n */\n const emit = (tTYGEventName, payload) => {\n EventEmitterService.emitSync(tTYGEventName, cloneDeep(payload));\n };\n\n /**\n * Subscribes to an event with the specified callback using the EventEmitterService.\n *\n * @param {string} tTYGEventName - The name of the event to subscribe to. It must be a value from {@link TTYGEventName}.\n * @param {function} callback - The function to call when the event is emitted.\n * @return {function} - Returns a function that can be called to unsubscribe from the event.\n */\n const subscribe = (tTYGEventName, callback) => {\n return EventEmitterService.subscribeSync(tTYGEventName, (payload) => callback(payload));\n };\n\n return {\n resetContext,\n emit,\n subscribe,\n // chats\n getChats,\n updateChats,\n addChat,\n replaceChat,\n onChatsListChanged,\n getSelectedChat,\n selectChat,\n deselectChat,\n deleteChat,\n onSelectedChatChanged,\n updateSelectedChat,\n onSelectedChatUpdated,\n onLastMessageReceived,\n // agents\n updateAgents,\n onAgentsListChanged,\n getAgents,\n getAgent,\n selectAgent,\n getSelectedAgent,\n onSelectedAgentChanged,\n getDefaultAgent,\n setDefaultAgent,\n setCanModifyAgent,\n getCanModifyAgent,\n onCanUpdateAgentUpdated,\n // chat explain\n hasExplainResponse,\n toggleExplainResponse,\n getExplainResponse,\n addExplainResponseCache,\n onExplainResponseCacheUpdated\n };\n}\n\nexport const TTYGEventName = {\n /**\n * Emitting the \"createChat\" event triggers a backend request to create a new chat.\n */\n CREATE_CHAT: 'createChat',\n\n /**\n * This event is emitted when a chat is successfully created.\n */\n CREATE_CHAT_SUCCESSFUL: 'chatCreated',\n\n /**\n * This event is emitted when the creation of a chat fails.\n */\n CREATE_CHAT_FAILURE: 'chatCreationFailed',\n\n RENAME_CHAT: 'renameChat',\n RENAME_CHAT_SUCCESSFUL: 'chatRenamed',\n RENAME_CHAT_FAILURE: 'chatRenamedFailure',\n\n /**\n * Emitting the \"selectChat\" event when the selected chat has been changed.\n */\n SELECT_CHAT: 'selectChat',\n\n /**\n * Emitting the \"selectChatUpdated\" event when the selected chat has been updated.\n */\n SELECTED_CHAT_UPDATED: 'selectChatUpdated',\n\n /**\n * Emitting the \"lastMessageReceived\" event when the final answer message has been received.\n */\n LAST_MESSAGE_RECEIVED: 'lastMessageReceived',\n\n /**\n * This event will be emitted when the chat delete request is in progress. The payload will contain the chat ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_CHAT: 'deletingChat',\n\n /**\n * This event will be emitted when the delete chat process is triggered but before the chat delete request is sent.\n */\n DELETE_CHAT: 'deleteChat',\n\n /**\n * This event will be emitted when the chat was successfully deleted.\n */\n DELETE_CHAT_SUCCESSFUL: 'chatDeleted',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n\n /**\n * This event is emitted when the deletion of a chat fails.\n */\n DELETE_CHAT_FAILURE: 'chatDeletedFailure',\n\n CHAT_EXPORT: 'chatExport',\n CHAT_EXPORT_SUCCESSFUL: 'chatExportSuccess',\n CHAT_EXPORT_FAILURE: 'chatExportFailure',\n CHAT_LIST_UPDATED: 'chatListUpdated',\n\n /**\n * Emitting the \"askQuestion\" event triggers a request to the backend to retrieve an answer to a question.\n */\n ASK_QUESTION: 'askQuestion',\n\n /**\n * This event will be emitted when the attempt to answer the question fails.\n */\n ASK_QUESTION_FAILURE: 'askQuestionFailure',\n\n /**\n * Emitting the \"continueChatRun\" event triggers a request to the backend to retrieve more remaining answers from the same chat run.\n */\n CONTINUE_CHAT_RUN: 'continueChatRun',\n\n /**\n * Emitting the \"loadChats\" event will trigger an action to loads all chats from backend server.\n */\n LOAD_CHATS: 'loadChats',\n LOAD_CHAT_SUCCESSFUL: 'loadChatSuccess',\n LOAD_CHAT_FAILURE: 'loadChatFailure',\n\n AGENT_LIST_UPDATED: 'agentListUpdated',\n\n /**\n * This event will be emitted when the create agent process is triggered through the UI but before the agent create\n * request is sent. This is used to open the agent settings dialog.\n */\n OPEN_AGENT_SETTINGS: 'openAgentSettings',\n\n /**\n * This event will be emitted when an agent needs to be edited.\n */\n EDIT_AGENT: 'editAgent',\n\n /**\n * This event will be emitted when an agent needs to be cloned.\n */\n CLONE_AGENT: 'cloneAgent',\n\n /**\n * This event will be emitted when the delete agent process is triggered but before the agent delete request is sent.\n */\n DELETE_AGENT: 'deleteAgent',\n\n /**\n * This event will be emitted when the agent was successfully deleted.\n */\n AGENT_DELETED: 'agentDeleted',\n\n /**\n * This event will be emitted when the agent delete request is in progress. The payload will contain the agent ID\n * and a boolean indicating if the deletion is in progress.\n */\n DELETING_AGENT: 'deletingAgent',\n\n /**\n * This event will be emitted when an agent is selected by the user through the UI.\n */\n AGENT_SELECTED: 'agentSelected',\n\n /**\n * This event will trigger the opening of the similarity view.\n */\n GO_TO_CREATE_SIMILARITY_VIEW: \"goToCreateSimilarityView\",\n\n /**\n * This event will trigger the opening of the connectors view.\n */\n GO_TO_CONNECTORS_VIEW: \"goToConnectorsView\",\n\n /**\n * This event will trigger the opening of the \"Autocomplete index\" view.\n */\n GO_TO_AUTOCOMPLETE_INDEX_VIEW: \"goToAutocompleteIndexView\",\n\n /**\n * This event will trigger fetching a new explanation of how the answer was generated.\n */\n EXPLAIN_RESPONSE: \"explainResponse\",\n\n /**\n * This event will be emitted when the cache with explain responses changed.\n */\n EXPLAIN_RESPONSE_CACHE_UPDATED: \"explainResponseCacheUpdated\",\n\n /**\n * This event will trigger the opening of the sparql view.\n */\n GO_TO_SPARQL_EDITOR: \"openQueryInSparqlEditor\",\n\n CAN_MODIFY_AGENT_UPDATED: \"canModifyAgentUpdated\",\n};\n"],"names":["InlineEditableText","$timeout","restrict","scope","fieldName","source","onSave","onCancel","onClick","onDblclick","isEditing","templateUrl","link","element","editableModel","subscriptions","clickTimeout","onKeydown","event","key","cancelClickTimeout","text","newText","cancelEditing","onCancelEditing","onSelect","cancel","undefined","push","$watch","newVal","inputElement","find","focus","select","$on","removeAllSubscribers","forEach","subscription","angular","module","directive","$inject","ChatListComponent","TTYGContextService","ModalService","$translate","$filter","$scope","selectedChat","renamedChat","deletingChat","onSelectChatForRenaming","chat","onSelectChat","id","nonPersistedChat","getChats","getNonPersistedChat","deleteChat","selectChat","onDeleteChat","title","instant","confirmDeleteMessage","decodeHTML","chatName","name","openConfirmation","emit","TTYGEventName","DELETE_CHAT","onRenameChat","newName","RENAME_CHAT","onExportChat","CHAT_EXPORT","onCancelChatRenaming","getHumanReadableChatGroupTimestamp","timestamp","getHumanReadableTimestamp","onSelectedChatChanged","onSelectedChatUpdated","onChatsListChanged","chatList","subscribe","DELETING_CHAT","options","date","Date","today","todayStart","getFullYear","getMonth","getDate","yesterdayStart","setDate","dateStart","time","timeFormat","getTime","dateFormat","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","updateChats","chats","CHAT_LIST_UPDATED","getSelectedChat","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","callback","subscribeSync","resetContext","addChat","newChat","appendChat","replaceChat","oldChat","isFunction","SELECT_CHAT","deselectChat","updateSelectedChat","SELECTED_CHAT_UPDATED","onLastMessageReceived","LAST_MESSAGE_RECEIVED","updateAgents","agents","AGENT_LIST_UPDATED","onAgentsListChanged","getAgent","agentId","selectAgent","selectedAgent","AGENT_SELECTED","onSelectedAgentChanged","getDefaultAgent","setDefaultAgent","agent","setCanModifyAgent","canModifyAgent","CAN_MODIFY_AGENT_UPDATED","onCanUpdateAgentUpdated","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","factory","CREATE_CHAT","CREATE_CHAT_SUCCESSFUL","CREATE_CHAT_FAILURE","RENAME_CHAT_SUCCESSFUL","RENAME_CHAT_FAILURE","DELETE_CHAT_SUCCESSFUL","DELETE_CHAT_FAILURE","CHAT_EXPORT_SUCCESSFUL","CHAT_EXPORT_FAILURE","ASK_QUESTION","ASK_QUESTION_FAILURE","CONTINUE_CHAT_RUN","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","OPEN_AGENT_SETTINGS","EDIT_AGENT","CLONE_AGENT","DELETE_AGENT","AGENT_DELETED","DELETING_AGENT","GO_TO_CREATE_SIMILARITY_VIEW","GO_TO_CONNECTORS_VIEW","GO_TO_AUTOCOMPLETE_INDEX_VIEW","EXPLAIN_RESPONSE","GO_TO_SPARQL_EDITOR"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=63415;export const __webpack_ids__=[36633,63415];export const __webpack_modules__={36633:(t,s,e)=>{e.r(s),e.d(s,{CHAT_MESSAGE_ROLE:()=>a,ChatMessageModel:()=>i});class i{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp,this.tokenUsageInfo=t.tokenUsageInfo}get id(){return this._id}set id(t){this._id=t}get role(){return this._role}set role(t){this._role=t}get message(){return this._message}set message(t){this._message=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}}const a={USER:"user",ASSISTANT:"assistant"}},63415:(t,s,e)=>{e.r(s),e.d(s,{ChatItemModel:()=>a,ChatItemsListModel:()=>n});var i=e(36633);class a{constructor(t,s){this._chatId=t,this._agentId=void 0,this._question=s,this._answers=[]}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get agentId(){return this._agentId}set agentId(t){this._agentId=t}get question(){return this._question}set question(t){this._question=t}get answers(){return this._answers}set answers(t){this._answers=t}setQuestionMessage(t){this._question||(this._question=new i.ChatMessageModel({role:i.CHAT_MESSAGE_ROLE.USER})),this._question.message=t}getQuestionMessage(){return this._question.message}toCreateChatRequestPayload(){return{agentId:this._agentId,question:this._question.message}}toAskRequestPayload(){return{conversationId:this._chatId,agentId:this._agentId,question:this._question.message,tzOffset:-(new Date).getTimezoneOffset()}}toExplainResponsePayload(t){return{conversationId:this._chatId,answerId:t}}}class n{constructor(t=[]){this._items=t}isEmpty(){return 0===this._items.length}appendItem(t){this._items.push(t)}get items(){return this._items}set items(t){this._items=t||[]}getLast(){if(!this.isEmpty())return this._items[this._items.length-1]}}}};
2
- //# sourceMappingURL=63415.81af22cc29be1144e07f.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"63415.81af22cc29be1144e07f.bundle.js","mappings":"8LAAO,MAAMA,EACTC,WAAAA,CAAYC,GAKRC,KAAKC,IAAMF,EAAKG,GAKhBF,KAAKG,MAAQJ,EAAKK,KAKlBJ,KAAKK,SAAWN,EAAKO,QAKrBN,KAAKO,WAA8B,IAAjBR,EAAKS,UAQvBR,KAAKS,eAAiBV,EAAKU,cAC/B,CAEA,MAAIP,GACA,OAAOF,KAAKC,GAChB,CAEA,MAAIC,CAAGQ,GACHV,KAAKC,IAAMS,CACf,CAEA,QAAIN,GACA,OAAOJ,KAAKG,KAChB,CAEA,QAAIC,CAAKM,GACLV,KAAKG,MAAQO,CACjB,CAEA,WAAIJ,GACA,OAAON,KAAKK,QAChB,CAEA,WAAIC,CAAQI,GACRV,KAAKK,SAAWK,CACpB,CAEA,aAAIF,GACA,OAAOR,KAAKO,UAChB,CAEA,aAAIC,CAAUE,GACVV,KAAKO,WAAaG,CACt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KoC,OAAOK,KAAKD,EACrB,CAEA,SAAIL,GACA,OAAOnC,KAAKoC,MAChB,CAEA,SAAID,CAAMzB,GACNV,KAAKoC,OAAS1B,GAAS,EAC3B,CAEAgC,OAAAA,GACI,IAAK1C,KAAKqC,UACN,OAAOrC,KAAKoC,OAAOpC,KAAKoC,OAAOE,OAAS,EAEhD,E","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-message.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-item.js"],"sourcesContent":["export class ChatMessageModel {\n constructor(data) {\n\n /**\n * @type {string}\n */\n this._id = data.id;\n\n /**\n * @type @type {string} - A value from {@link CHAT_MESSAGE_ROLE}, determining the owner of the message (e.g., user, assistant).\n */\n this._role = data.role;\n\n /**\n * @type {string}\n */\n this._message = data.message;\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp * 1000;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n * It is applicable only to the assistant role ({@link CHAT_MESSAGE_ROLE#ASSISTANT}).\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n }\n\n get id() {\n return this._id;\n }\n\n set id(value) {\n this._id = value;\n }\n\n get role() {\n return this._role;\n }\n\n set role(value) {\n this._role = value;\n }\n\n get message() {\n return this._message;\n }\n\n set message(value) {\n this._message = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n}\n\nexport const CHAT_MESSAGE_ROLE = {\n USER: 'user',\n ASSISTANT: 'assistant'\n};\n","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"./chat-message\";\n\n/**\n *\n * Represents a model that holds a question and the answer of it in a chat.\n *\n */\nexport class ChatItemModel {\n\n /**\n * Creates an instance of ChatItemModel.\n *\n * @param {string} chatId - The unique identifier for the chat associated with this instance.\n * @param {ChatMessageModel} question - The message object representing the question.\n */\n constructor(chatId, question) {\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._chatId = chatId;\n\n /**\n * @type {string | undefined}\n * @private\n */\n this._agentId = undefined;\n\n /**\n * @type {ChatMessageModel}\n * @private\n */\n this._question = question;\n\n /**\n *\n * @type {ChatMessageModel[] | undefined}\n * @private\n */\n this._answers = [];\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get agentId() {\n return this._agentId;\n }\n\n set agentId(value) {\n this._agentId = value;\n }\n\n get question() {\n return this._question;\n }\n\n set question(value) {\n this._question = value;\n }\n\n get answers() {\n return this._answers;\n }\n\n /**\n *\n * @param {ChatMessageModel[]} value\n */\n set answers(value) {\n this._answers = value;\n }\n\n /**\n * Sets the message for the user's question.\n *\n * @param {string} message - The message content for the user's question.\n */\n setQuestionMessage(message) {\n if (!this._question) {\n this._question = new ChatMessageModel({role: CHAT_MESSAGE_ROLE.USER});\n }\n this._question.message = message;\n }\n\n /**\n * Retrieves the message of the user's question.\n *\n * @return {string} - The message content of the user's question.\n */\n getQuestionMessage() {\n return this._question.message;\n }\n\n /**\n * Converts the instance to a create chat request payload.\n *\n * @return {{agentId: string, question: string}} An object representing the create request payload.\n */\n toCreateChatRequestPayload() {\n return {\n agentId: this._agentId,\n question: this._question.message\n };\n }\n\n /**\n * Converts the instance to an ask request payload.\n *\n * @return {{conversationId: string, agentId: string, question: string}} An object representing the ask request payload.\n */\n toAskRequestPayload() {\n return {\n conversationId: this._chatId,\n agentId: this._agentId,\n question: this._question.message,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\n\n toExplainResponsePayload(answerId) {\n return {\n conversationId: this._chatId,\n answerId\n };\n }\n}\n\nexport class ChatItemsListModel {\n\n /**\n * @param {ChatItemModel[]} items\n */\n constructor(items = []) {\n this._items = items;\n }\n\n isEmpty() {\n return this._items.length === 0;\n }\n\n /**\n * @param {ChatItemModel} chatItem\n */\n appendItem(chatItem) {\n this._items.push(chatItem);\n }\n\n get items() {\n return this._items;\n }\n\n set items(value) {\n this._items = value || [];\n }\n\n getLast() {\n if (!this.isEmpty()) {\n return this._items[this._items.length - 1];\n }\n }\n}\n"],"names":["ChatMessageModel","constructor","data","this","_id","id","_role","role","_message","message","_timestamp","timestamp","tokenUsageInfo","value","CHAT_MESSAGE_ROLE","USER","ASSISTANT","ChatItemModel","chatId","question","_chatId","_agentId","undefined","_question","_answers","agentId","answers","setQuestionMessage","getQuestionMessage","toCreateChatRequestPayload","toAskRequestPayload","conversationId","tzOffset","Date","getTimezoneOffset","toExplainResponsePayload","answerId","ChatItemsListModel","items","_items","isEmpty","length","appendItem","chatItem","push","getLast"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_id__=64118;export const __webpack_ids__=[12940,30553,49539,64118,65820,71920,89598,89647,98268];export const __webpack_modules__={12940:(e,t,n)=>{n.r(t);var o=n(5949),r=n(89598),a=n(30553),i=n(304);const s={buttonStyle:"position: absolute; top: 0; right: 0; margin-right: 24px"},l=i.LoggerProvider.logger;function c(e){const t=(0,o.A)().use(r.markdownCodeCopyPlugin).use(a.markdownOpenInSparqlEditorPlugin,s);return{renderMarkdown:(n,i)=>{try{return e.trustAsHtml((e=>e?(0,o.A)().use(r.markdownCodeCopyPlugin,e).use(a.markdownOpenInSparqlEditorPlugin,_.merge({},s,e)):t)(i).render(n))}catch(t){return l.error("Error rendering markdown:",t),e.trustAsHtml(n)}}}}angular.module("graphdb.framework.core.services.markdown-service",[]).service("MarkdownService",c),c.$inject=["$sce"]},30553:(e,t,n)=>{n.r(t),n.d(t,{markdownOpenInSparqlEditorPlugin:()=>a});const o={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function r(e,t){return t=_.merge({},o,t),(...n)=>{const[o,r]=n,a=o[r],i=o[r].content.replaceAll('"',"&quot;").replaceAll("'","&apos;"),s=e(...n);return"fence"===a.type&&"sparql"===a.info&&s.trim()?`<div style="position: relative">\n ${s}\n <open-in-sparql-editor\n style="${t.buttonStyle}"\n class="${t.buttonClass}"\n execute-query="${t.executeQuery}"\n repository-id="${t.repositoryId}"\n query="${i}">\n </open-in-sparql-editor>\n </div>`:s}}const a=(e,t)=>{e.renderer.rules.code_block=r(e.renderer.rules.code_block,t),e.renderer.rules.fence=r(e.renderer.rules.fence,t)}},64118:(e,t,n)=>{n.r(t),n(89647),n(98268);var o=n(71920),r=n(87252),a=n(65820);function i(e,t,n,i,s){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/chat-item-detail.html",scope:{chatItemDetail:"=",showActions:"=",asking:"=",disabled:"=",onRegenerateQuestion:"&",onAskHowDeliveredAnswer:"&"},link:(l,c,d)=>{l.ExplainQueryType=r.ExplainQueryType,l.repositoryId=void 0,l.markdownContentOptions=void 0,l.agentNameByIdMap={},l.explainResponseModel={},l.loadingExplainResponse={},l.regenerateQuestion=()=>{l.onRegenerateQuestion({chatItem:l.chatItemDetail})},l.explainResponse=o=>{n.hasExplainResponse(o)?n.toggleExplainResponse(o):(l.loadingExplainResponse[o]=!0,i.explainResponse(l.chatItemDetail,o).then(e=>{n.addExplainResponseCache(e)}).catch(()=>{e.error(t.instant("ttyg.chat_panel.messages.explain_response_failure"))}).finally(()=>l.loadingExplainResponse[o]=!1))},l.onAskHowAnswerWasDerived=()=>{l.onAskHowDeliveredAnswer()},l.onTokenUsageInfo=e=>{e.preventDefault(),e.stopPropagation()},l.onOpenInSparqlEditor=e=>{l.chatItemDetail.agentId&&n.emit(o.TTYGEventName.GO_TO_SPARQL_EDITOR,{query:e,repositoryId:l.repositoryId})},l.showRawQuery=e=>{const t=e.rawQuery.replace(/\s+/g,""),n=e.query.replace(/\s+/g,"");return t&&t!==n},l.getRepositoryId=e=>{const t=n.getAgent(l.chatItemDetail.agentId);return t?t.repositoryId:""},l.getHumanReadableQuestionTimestamp=e=>(0,a.getHumanReadableTimestamp)(t,s,e);const p=()=>{l.chatItemDetail.answers.forEach(e=>{l.explainResponseModel[e.id]=n.getExplainResponse(e.id)})},E=[];E.push(n.onExplainResponseCacheUpdated(()=>{p()})),E.push(n.onAgentsListChanged(()=>{l.agentNameByIdMap=n.getAgents().agentNameByIdMap})),l.$on("$destroy",()=>{E.forEach(e=>e())}),l.repositoryId=l.getRepositoryId(),l.markdownContentOptions={repositoryId:l.repositoryId},p()}}}angular.module("graphdb.framework.ttyg.directives.chat-item-detail",["graphdb.framework.core.directives.open-in-sparql-editor","graphdb.framework.core.directives.markdown-content"]).directive("chatItemDetail",i),i.$inject=["toastr","$translate","TTYGContextService","TTYGService","$filter"]},65820:(e,t,n)=>{n.r(t),n.d(t,{getHumanReadableTimestamp:()=>o});const o=(e,t,n,o={})=>{if(!n)return"";const r=new Date(n),a=new Date,i=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=new Date(i);s.setDate(i.getDate()-1);const l=new Date(r.getFullYear(),r.getMonth(),r.getDate()),c=o.timeFormat?t("date")(r,o.timeFormat):"";if(l.getTime()===i.getTime())return e.instant("common.dates.today")+c;if(l.getTime()===s.getTime())return e.instant("common.dates.yesterday")+c;{const e=o.dateFormat||"yyyy-MM-dd";return t("date")(r,e)+c}}},71920:(e,t,n)=>{n.r(t),n.d(t,{TTYGEventName:()=>a});var o=n(98980);function r(e){let t,n,r,i,s,l={},c=!1;const d=()=>(0,o.cloneDeep)(t),p=()=>(0,o.cloneDeep)(n),E=e=>{n=(0,o.cloneDeep)(e),C(a.CHAT_LIST_UPDATED,p())},g=()=>(0,o.cloneDeep)(r),u=()=>(0,o.cloneDeep)(i),_=()=>(0,o.cloneDeep)(l),A=e=>!!l[e],T=()=>c,C=(t,n)=>{e.emitSync(t,(0,o.cloneDeep)(n))},m=(t,n)=>e.subscribeSync(t,e=>n(e));return{resetContext:()=>{t=void 0,n=void 0,r=void 0,i=void 0,l={},s=void 0,c=!1},emit:C,subscribe:m,getChats:p,updateChats:E,addChat:e=>{n.appendChat(e),E(n)},replaceChat:(e,t)=>{n.replaceChat(e,t),E(n)},onChatsListChanged:e=>(n&&angular.isFunction(e)&&e(p()),m(a.CHAT_LIST_UPDATED,t=>e(t))),getSelectedChat:g,selectChat:e=>{r&&r.id===e.id||(r=(0,o.cloneDeep)(e),C(a.SELECT_CHAT,g()))},deselectChat:()=>{r=void 0,C(a.SELECT_CHAT,g())},deleteChat:e=>{n.deleteChat(e),E(n)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(g()),m(a.SELECT_CHAT,t=>e(t))),updateSelectedChat:e=>{r&&r.id&&e&&r.id!==e.id||(r=(0,o.cloneDeep)(e),C(a.SELECTED_CHAT_UPDATED,g()))},onSelectedChatUpdated:e=>(r&&angular.isFunction(e)&&e(g()),m(a.SELECTED_CHAT_UPDATED,t=>e(t))),onLastMessageReceived:e=>(r&&angular.isFunction(e)&&e(g()),m(a.LAST_MESSAGE_RECEIVED,t=>e(t))),updateAgents:e=>{t=(0,o.cloneDeep)(e),C(a.AGENT_LIST_UPDATED,d())},onAgentsListChanged:e=>(t&&angular.isFunction(e)&&e(d()),m(a.AGENT_LIST_UPDATED,t=>e(t))),getAgents:d,getAgent:e=>{if(t)return(0,o.cloneDeep)(t.getAgent(e))},selectAgent:e=>{i=(0,o.cloneDeep)(e),C(a.AGENT_SELECTED,u())},getSelectedAgent:u,onSelectedAgentChanged:e=>(i&&angular.isFunction(e)&&e(u()),m(a.AGENT_SELECTED,t=>e(t))),getDefaultAgent:()=>(0,o.cloneDeep)(s),setDefaultAgent:e=>{s=e},setCanModifyAgent:e=>{c=(0,o.cloneDeep)(e),C(a.CAN_MODIFY_AGENT_UPDATED,T())},getCanModifyAgent:T,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(T()),m(a.CAN_MODIFY_AGENT_UPDATED,t=>e(t))),hasExplainResponse:A,toggleExplainResponse:e=>{A(e)&&(l[e].expanded=!l[e].expanded,C(a.EXPLAIN_RESPONSE_CACHE_UPDATED,_()))},getExplainResponse:e=>(0,o.cloneDeep)(l[e]),addExplainResponseCache:e=>{l[e.answerId]=(0,o.cloneDeep)(e),C(a.EXPLAIN_RESPONSE_CACHE_UPDATED,_())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(_()),m(a.EXPLAIN_RESPONSE_CACHE_UPDATED,t=>e(t)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",r),r.$inject=["EventEmitterService","TTYGService"];const a={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated"}},89598:(e,t,n)=>{n.r(t),n.d(t,{markdownCodeCopyPlugin:()=>a});const o={buttonStyle:"position: absolute; top: 0; right: 0;",buttonClass:""};function r(e,t){return t=_.merge({},o,t),(...n)=>{const[o,r]=n,a=o[r],i=o[r].content.replaceAll('"',"&quot;").replaceAll("'","&apos;"),s=e(...n);return"fence"===a.type&&s.trim()?`<div style="position: relative">\n ${s}\n <copy-to-clipboard\n style="${t.buttonStyle}"\n class="${t.buttonClass}"\n tooltip-text="ttyg.chat_panel.btn.copy_sparql.tooltip"\n text-to-copy="${i}">\n </copy-to-clipboard>\n </div>`:s}}const a=(e,t)=>{e.renderer.rules.code_block=r(e.renderer.rules.code_block,t),e.renderer.rules.fence=r(e.renderer.rules.fence,t)}},89647:(e,t,n)=>{function o(e,t){return{templateUrl:"js/angular/core/templates/markdown-content/markdown-content.html",restrict:"E",scope:{content:"@",options:"="},link:function(n,o){n.markdownContent=void 0;n.markdownContent=t.renderMarkdown(n.content,n.options),n.$evalAsync(()=>{const t=o.find(".markdown-content");e(angular.element(t).contents())(n)})}}}n.r(t),n(12940),angular.module("graphdb.framework.core.directives.markdown-content",["graphdb.framework.core.services.markdown-service"]).directive("markdownContent",o),o.$inject=["$compile","MarkdownService"]},98268:(e,t,n)=>{n.r(t);var o=n(69937);function r(e,t,n,r){return{template:'\n <style>\n .open-in-sparql-editor-btn {\n line-height: 0.75;\n }\n .open-in-sparql-editor-btn .fa:nth-child(2) {\n margin-left: -0.2em;\n margin-right: -0.2em;\n font-size: 0.9em;\n }\n </style>\n <button class="btn btn-link btn-sm open-in-sparql-editor-btn" gdb-tooltip="{{\'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip\' | translate}}" ng-click="onGoToSparqlEditorView()" guide-selector="open-in-sparql-editor-btn">\n <i class="fa fa-bracket-curly"></i><i class="fa fa-ellipsis"></i><i class="fa fa-bracket-curly-right"></i>\n </button>\n ',restrict:"E",scope:{query:"@",repositoryId:"@",executeQuery:"@"},link:function(a,i){a.tooltipText="ttyg.chat_panel.btn.open_in_sparql_editor.tooltip";const s="true"===a.executeQuery;a.onGoToSparqlEditorView=()=>{const r=e.getActiveRepository();r&&r===a.repositoryId?l(a.query):n.openConfirmationModal({title:t.instant("common.confirm"),message:(0,o.Gz)(t.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:a.repositoryId})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},()=>{e.setRepository(e.getRepository(a.repositoryId)),l(a.query)})};const l=e=>{r.open(`/sparql?query=${encodeURIComponent(e)}&execute=${s}`,"_blank")}}}}angular.module("graphdb.framework.core.directives.open-in-sparql-editor",[]).directive("openInSparqlEditor",r),r.$inject=["$repositories","$translate","ModalService","$window"]}};
2
- //# sourceMappingURL=64118.fb6952c8ef6fc9117f35.bundle.js.map