graphdb-workbench 3.2.0-TR2 → 3.2.0-TR3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/12358.4be185f89eebea9c35bf.bundle.js +3 -0
- package/dist/12358.4be185f89eebea9c35bf.bundle.js.map +1 -0
- package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js → 12396.07e90b6c97623a9fd754.bundle.js} +2 -2
- package/dist/{12396.9a7f2862146b6f9adcb1.bundle.js.map → 12396.07e90b6c97623a9fd754.bundle.js.map} +1 -1
- package/dist/{15535.7b170e17ee0a58970ab6.bundle.js → 15535.12490e9b6d305e7bd827.bundle.js} +2 -2
- package/dist/{15535.7b170e17ee0a58970ab6.bundle.js.map → 15535.12490e9b6d305e7bd827.bundle.js.map} +1 -1
- package/dist/{16162.67e7c1f5f313481b1e80.bundle.js → 16162.58804ed92b5b3ae97510.bundle.js} +2 -2
- package/dist/{16162.67e7c1f5f313481b1e80.bundle.js.map → 16162.58804ed92b5b3ae97510.bundle.js.map} +1 -1
- package/dist/19402.7f6ea977348338acc824.bundle.js +2 -0
- package/dist/19402.7f6ea977348338acc824.bundle.js.map +1 -0
- package/dist/{20287.dd5bc263fe26adf34965.bundle.js → 20287.3ce3542c50f41b8b85a3.bundle.js} +2 -2
- package/dist/{20287.dd5bc263fe26adf34965.bundle.js.map → 20287.3ce3542c50f41b8b85a3.bundle.js.map} +1 -1
- package/dist/{21136.b7efcb40fb956ff1109c.bundle.js → 21136.c6d780b6f550c0df2d2a.bundle.js} +2 -2
- package/dist/{21136.b7efcb40fb956ff1109c.bundle.js.map → 21136.c6d780b6f550c0df2d2a.bundle.js.map} +1 -1
- package/dist/21142.b48a4c497617cb2df01f.bundle.js +2 -0
- package/dist/21142.b48a4c497617cb2df01f.bundle.js.map +1 -0
- package/dist/{21170.7832554eab9eaade6ffb.bundle.js → 21170.6079e1b218a1eea085f5.bundle.js} +2 -2
- package/dist/{21170.7832554eab9eaade6ffb.bundle.js.map → 21170.6079e1b218a1eea085f5.bundle.js.map} +1 -1
- package/dist/21195.152b932628044855ef83.bundle.js +2 -0
- package/dist/21195.152b932628044855ef83.bundle.js.map +1 -0
- package/dist/{25747.c01110e23b922cdd3d9e.bundle.js → 25747.117e03f9f9ae52f13606.bundle.js} +2 -2
- package/dist/{25747.c01110e23b922cdd3d9e.bundle.js.map → 25747.117e03f9f9ae52f13606.bundle.js.map} +1 -1
- package/dist/{27580.5a421770ab66d2dedc37.bundle.js → 27580.dc966117bc0ee9eecd70.bundle.js} +2 -2
- package/dist/{27580.5a421770ab66d2dedc37.bundle.js.map → 27580.dc966117bc0ee9eecd70.bundle.js.map} +1 -1
- package/dist/29350.d2791feedf54d2e4b7b6.bundle.js +2 -0
- package/dist/29350.d2791feedf54d2e4b7b6.bundle.js.map +1 -0
- package/dist/{31636.54e2817f8ae3998a34b3.bundle.js → 31636.95fa5e5c2a521d1effd5.bundle.js} +2 -2
- package/dist/{31636.54e2817f8ae3998a34b3.bundle.js.map → 31636.95fa5e5c2a521d1effd5.bundle.js.map} +1 -1
- package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js → 32489.c5d26d5023f0e0583408.bundle.js} +2 -2
- package/dist/{32489.f7a2dc39cd61c2cd8874.bundle.js.map → 32489.c5d26d5023f0e0583408.bundle.js.map} +1 -1
- package/dist/{34495.be67c06c39909114bbe4.bundle.js → 34495.2a7b45477194d52af3e5.bundle.js} +2 -2
- package/dist/{34495.be67c06c39909114bbe4.bundle.js.map → 34495.2a7b45477194d52af3e5.bundle.js.map} +1 -1
- package/dist/36633.eba4270db7fdcf1aad4c.bundle.js +2 -0
- package/dist/36633.eba4270db7fdcf1aad4c.bundle.js.map +1 -0
- package/dist/36665.19388ed0db6a1d64ad65.bundle.js +2 -0
- package/dist/36665.19388ed0db6a1d64ad65.bundle.js.map +1 -0
- package/dist/{38360.efec913bb97c3b8588a4.bundle.js → 38360.23a88f346d3a1d92dbb1.bundle.js} +2 -2
- package/dist/{38360.efec913bb97c3b8588a4.bundle.js.map → 38360.23a88f346d3a1d92dbb1.bundle.js.map} +1 -1
- package/dist/{38644.800252af49cd67310834.bundle.js → 38644.6682aa9acc813134b85a.bundle.js} +2 -2
- package/dist/{38644.800252af49cd67310834.bundle.js.map → 38644.6682aa9acc813134b85a.bundle.js.map} +1 -1
- package/dist/{38843.29e34a5e5293cee51566.bundle.js → 38843.7cf0aca4cc512c447e29.bundle.js} +2 -2
- package/dist/{38843.29e34a5e5293cee51566.bundle.js.map → 38843.7cf0aca4cc512c447e29.bundle.js.map} +1 -1
- package/dist/{39518.0ca97879b92271d7c5e2.bundle.js → 39518.cbb394dbd1fb5c717e82.bundle.js} +2 -2
- package/dist/{39518.0ca97879b92271d7c5e2.bundle.js.map → 39518.cbb394dbd1fb5c717e82.bundle.js.map} +1 -1
- package/dist/{39539.7cea6717cc3a5ba91617.bundle.js → 39539.63178d205aa9af450438.bundle.js} +2 -2
- package/dist/{39539.7cea6717cc3a5ba91617.bundle.js.map → 39539.63178d205aa9af450438.bundle.js.map} +1 -1
- package/dist/40516.3cfaf1ff4704c038f944.bundle.js +2 -0
- package/dist/40516.3cfaf1ff4704c038f944.bundle.js.map +1 -0
- package/dist/{41453.4ae219d972a187c36bfc.bundle.js → 41453.3a71e125d59ca56c3e48.bundle.js} +2 -2
- package/dist/{41453.4ae219d972a187c36bfc.bundle.js.map → 41453.3a71e125d59ca56c3e48.bundle.js.map} +1 -1
- package/dist/{42129.0314e45b4b818b01b71f.bundle.js → 42129.6bbb7e9d5f3be5d0cb47.bundle.js} +2 -2
- package/dist/{42129.0314e45b4b818b01b71f.bundle.js.map → 42129.6bbb7e9d5f3be5d0cb47.bundle.js.map} +1 -1
- package/dist/{44444.02026ff20e2a843dc05b.bundle.js → 44444.f65e3b550875b4b6e1a8.bundle.js} +2 -2
- package/dist/{44444.02026ff20e2a843dc05b.bundle.js.map → 44444.f65e3b550875b4b6e1a8.bundle.js.map} +1 -1
- package/dist/44874.b16be286176dfe4aa766.bundle.js +2 -0
- package/dist/44874.b16be286176dfe4aa766.bundle.js.map +1 -0
- package/dist/49539.63984d5b37bc8b9a7244.bundle.js +2 -0
- package/dist/49539.63984d5b37bc8b9a7244.bundle.js.map +1 -0
- package/dist/{51087.b072d1c0e53403535283.bundle.js → 51087.1e118e7fe32a8c09d6cb.bundle.js} +2 -2
- package/dist/51087.1e118e7fe32a8c09d6cb.bundle.js.map +1 -0
- package/dist/{55862.5e8602827fbf72e60cc2.bundle.js → 55862.81278272f7885ce93baf.bundle.js} +2 -2
- package/dist/{55862.5e8602827fbf72e60cc2.bundle.js.map → 55862.81278272f7885ce93baf.bundle.js.map} +1 -1
- package/dist/{58306.94b9336f68d11bdd72f0.bundle.js → 58306.061bfe57a80e266022a1.bundle.js} +2 -2
- package/dist/{58306.94b9336f68d11bdd72f0.bundle.js.map → 58306.061bfe57a80e266022a1.bundle.js.map} +1 -1
- package/dist/60039.5f9e955234f5eaf33372.bundle.js +2 -0
- package/dist/60039.5f9e955234f5eaf33372.bundle.js.map +1 -0
- package/dist/63415.7a4dfa072b5665c5995b.bundle.js +2 -0
- package/dist/63415.7a4dfa072b5665c5995b.bundle.js.map +1 -0
- package/dist/64118.edc8ed6671017d09ff4e.bundle.js +2 -0
- package/dist/64118.edc8ed6671017d09ff4e.bundle.js.map +1 -0
- package/dist/{67888.772326168aed83cbad9c.bundle.js → 67888.6a4fedd47a2764fdb04b.bundle.js} +2 -2
- package/dist/{67888.772326168aed83cbad9c.bundle.js.map → 67888.6a4fedd47a2764fdb04b.bundle.js.map} +1 -1
- package/dist/71920.c171884910616d02e2c6.bundle.js +2 -0
- package/dist/71920.c171884910616d02e2c6.bundle.js.map +1 -0
- package/dist/{72379.8a3290df05f18f8c65bd.bundle.js → 72379.d82f665d3a8b231008a3.bundle.js} +2 -2
- package/dist/{72379.8a3290df05f18f8c65bd.bundle.js.map → 72379.d82f665d3a8b231008a3.bundle.js.map} +1 -1
- package/dist/{73667.52fdbdadddafe9e9559b.bundle.js → 73667.5a32fae13853f9158d8b.bundle.js} +2 -2
- package/dist/{73667.52fdbdadddafe9e9559b.bundle.js.map → 73667.5a32fae13853f9158d8b.bundle.js.map} +1 -1
- package/dist/{73793.7e812bab1754ddd5efb5.bundle.js → 73793.88917a280c5cbacfd4c5.bundle.js} +2 -2
- package/dist/{73793.7e812bab1754ddd5efb5.bundle.js.map → 73793.88917a280c5cbacfd4c5.bundle.js.map} +1 -1
- package/dist/73964.7a3038b5726d50c1a051.bundle.js +2 -0
- package/dist/73964.7a3038b5726d50c1a051.bundle.js.map +1 -0
- package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js → 75282.865c935a564591b19c85.bundle.js} +2 -2
- package/dist/{75282.2f97d3a7d7f3fdd7aebf.bundle.js.map → 75282.865c935a564591b19c85.bundle.js.map} +1 -1
- package/dist/75849.d9fcfe95fed333bad2d0.bundle.js +2 -0
- package/dist/75849.d9fcfe95fed333bad2d0.bundle.js.map +1 -0
- package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js → 78250.c266986c29f5c73eb46a.bundle.js} +2 -2
- package/dist/{78250.73e3013c5b2ebdddbf38.bundle.js.map → 78250.c266986c29f5c73eb46a.bundle.js.map} +1 -1
- package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js +2 -0
- package/dist/7928.9ab4b363abb28bfc6bd5.bundle.js.map +1 -0
- package/dist/{79329.3d912887ba7e96090fb4.bundle.js → 79329.8d230cc14746653003ee.bundle.js} +2 -2
- package/dist/{79329.3d912887ba7e96090fb4.bundle.js.map → 79329.8d230cc14746653003ee.bundle.js.map} +1 -1
- package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js → 82926.0cb2c4faf483e67f5e7f.bundle.js} +2 -2
- package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js.map → 82926.0cb2c4faf483e67f5e7f.bundle.js.map} +1 -1
- package/dist/85609.68438b4955212d5fcb84.bundle.js +2 -0
- package/dist/85609.68438b4955212d5fcb84.bundle.js.map +1 -0
- package/dist/85788.501c7244b890d519f8cf.bundle.js +2 -0
- package/dist/85788.501c7244b890d519f8cf.bundle.js.map +1 -0
- package/dist/{89695.4ee87c52d4088115c51e.bundle.js → 89695.b7e90a123bc2875ccae4.bundle.js} +2 -2
- package/dist/89695.b7e90a123bc2875ccae4.bundle.js.map +1 -0
- package/dist/{9062.3541de664710a36fdac7.bundle.js → 9062.9bb14aa1e3d51036c7fe.bundle.js} +2 -2
- package/dist/{9062.3541de664710a36fdac7.bundle.js.map → 9062.9bb14aa1e3d51036c7fe.bundle.js.map} +1 -1
- package/dist/96089.4317e132ef8cc0033f83.bundle.js +2 -0
- package/dist/96089.4317e132ef8cc0033f83.bundle.js.map +1 -0
- package/dist/{99448.384b74c734331e5f8909.bundle.js → 99448.2ecdf14415bcd9299354.bundle.js} +2 -2
- package/dist/{99448.384b74c734331e5f8909.bundle.js.map → 99448.2ecdf14415bcd9299354.bundle.js.map} +1 -1
- package/dist/css/ttyg/chat-item-details.css +1 -1
- package/dist/css/ttyg/chat-panel.css +1 -1
- package/dist/i18n/locale-en.json +3 -0
- package/dist/i18n/locale-fr.json +3 -0
- package/dist/index.html +8 -8
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +2 -2
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +5 -5
- package/dist/js/angular/ttyg/templates/chat-list.html +2 -2
- package/dist/js/angular/ttyg/templates/chat-panel.html +12 -7
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +2 -2
- package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js → legacyWorkbench.ffd119cc335034d736cc.js} +3 -3
- package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.map → legacyWorkbench.ffd119cc335034d736cc.js.map} +1 -1
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/login.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/plugins.js +1 -1
- package/dist/res/swagger5/index.html +11 -11
- package/package.json +1 -1
- package/dist/12358.2061f29dc113149946a3.bundle.js +0 -3
- package/dist/12358.2061f29dc113149946a3.bundle.js.map +0 -1
- package/dist/19402.07424b4b7c9dd775d860.bundle.js +0 -2
- package/dist/19402.07424b4b7c9dd775d860.bundle.js.map +0 -1
- package/dist/21142.ec45fad4d52b36961d17.bundle.js +0 -2
- package/dist/21142.ec45fad4d52b36961d17.bundle.js.map +0 -1
- package/dist/21195.caae6cc33d755ad52df4.bundle.js +0 -2
- package/dist/21195.caae6cc33d755ad52df4.bundle.js.map +0 -1
- package/dist/29350.9976c09d5cdaa48ecb19.bundle.js +0 -2
- package/dist/29350.9976c09d5cdaa48ecb19.bundle.js.map +0 -1
- package/dist/36633.bd17a2028ef302870ec4.bundle.js +0 -2
- package/dist/36633.bd17a2028ef302870ec4.bundle.js.map +0 -1
- package/dist/36665.eda6cfdf545f2608a6c7.bundle.js +0 -2
- package/dist/36665.eda6cfdf545f2608a6c7.bundle.js.map +0 -1
- package/dist/40516.734b24eead67142c4045.bundle.js +0 -2
- package/dist/40516.734b24eead67142c4045.bundle.js.map +0 -1
- package/dist/44874.5854c207bbe2c4f2438e.bundle.js +0 -2
- package/dist/44874.5854c207bbe2c4f2438e.bundle.js.map +0 -1
- package/dist/49539.d253a79e8b9710776e48.bundle.js +0 -2
- package/dist/49539.d253a79e8b9710776e48.bundle.js.map +0 -1
- package/dist/51087.b072d1c0e53403535283.bundle.js.map +0 -1
- package/dist/60039.cb9262af0bc63b635c76.bundle.js +0 -2
- package/dist/60039.cb9262af0bc63b635c76.bundle.js.map +0 -1
- package/dist/63415.81af22cc29be1144e07f.bundle.js +0 -2
- package/dist/63415.81af22cc29be1144e07f.bundle.js.map +0 -1
- package/dist/64118.fb6952c8ef6fc9117f35.bundle.js +0 -2
- package/dist/64118.fb6952c8ef6fc9117f35.bundle.js.map +0 -1
- package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js +0 -2
- package/dist/71920.46e7b0ec1d22adcd8e55.bundle.js.map +0 -1
- package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js +0 -2
- package/dist/73964.fd1ad5e7aa228ad4cbbb.bundle.js.map +0 -1
- package/dist/75849.bd0bdefa903741034a71.bundle.js +0 -2
- package/dist/75849.bd0bdefa903741034a71.bundle.js.map +0 -1
- package/dist/7928.7900a3911c83495d74dd.bundle.js +0 -2
- package/dist/7928.7900a3911c83495d74dd.bundle.js.map +0 -1
- package/dist/85609.680b755726c66ea1de34.bundle.js +0 -2
- package/dist/85609.680b755726c66ea1de34.bundle.js.map +0 -1
- package/dist/85788.4e0818c48b6f29153db4.bundle.js +0 -2
- package/dist/85788.4e0818c48b6f29153db4.bundle.js.map +0 -1
- package/dist/89695.4ee87c52d4088115c51e.bundle.js.map +0 -1
- package/dist/96089.7e28823f34c450de1f7e.bundle.js +0 -2
- package/dist/96089.7e28823f34c450de1f7e.bundle.js.map +0 -1
- /package/dist/{12358.2061f29dc113149946a3.bundle.js.LICENSE.txt → 12358.4be185f89eebea9c35bf.bundle.js.LICENSE.txt} +0 -0
- /package/dist/{legacyWorkbench.2bd696723af2573e8bb7.js.LICENSE.txt → legacyWorkbench.ffd119cc335034d736cc.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7928.9ab4b363abb28bfc6bd5.bundle.js","mappings":"mKASA,SAASA,EAAaC,EAAoBC,GACtC,MAAO,CACHC,SAAU,IACVC,YAAa,gDACbC,MAAO,CACP,EACAC,KAAOC,IAMHA,EAAOC,gBAAiB,EACxBD,EAAOE,6BAA+BC,EAAAA,yBAAyBC,oBAAoBT,EAAYU,oBAAqB,sBAMpHL,EAAOM,cAAgB,KACnBZ,EAAmBa,KAAKC,EAAAA,cAAcC,sBAO1C,MAOMC,EAAgB,GAKtBA,EAAcC,KAAKjB,EAAmBkB,wBAZLX,IAC7BD,EAAOC,eAAiBA,KAY5BD,EAAOa,IAAI,WAJOC,KACdJ,EAAcK,QAASC,GAAiBA,QAMxD,CAjDAC,QACKC,OAAO,mDAAoD,IAC3DC,UAAU,eAAgB1B,GAE/BA,EAAa2B,QAAU,CAAC,qBAAsB,c,qECC9C,SAAS1B,EAAmB2B,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,GACnB1B,EAAKC,EAAc0B,kBAAmBH,MAYpCI,EAAWC,IACbb,EAAOc,WAAWD,GAClBJ,EAAYT,IA6BVe,EAAkBA,KACbR,EAAAA,EAAAA,WAAUN,GASfe,EAAcC,IACXhB,GAAiBA,EAAciB,KAAOD,EAAaC,KACpDjB,GAAgBM,EAAAA,EAAAA,WAAUU,GAC1BjC,EAAKC,EAAckC,YAAaJ,OAuFlCK,EAAmBA,KACdb,EAAAA,EAAAA,WAAUL,GAcfmB,E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AAA,WAAU6D,GACpDpF,EAAKC,EAAcgF,+BAAgC5C,MA6HnDgD,8BAzGmCxC,IAC/BnC,QAAQ4C,WAAWT,IACnBA,EAASR,KAENO,EAAU3C,EAAcgF,+BAAiCK,GAAqBzC,EAASyC,KAuGtG,CApZA5E,QACKC,OAAO,8CAA+C,IACtD4E,QAAQ,qBAAsBpG,GAEnCA,EAAmB0B,QAAU,CAAC,sBAAuB,eAkZ9C,MAAMZ,EAAgB,CAIzBuF,YAAa,aAKbpC,uBAAwB,cAKxBqC,oBAAqB,qBAErBC,YAAa,aACbC,uBAAwB,cACxBC,oBAAqB,qBAKrBzD,YAAa,aAKbyB,sBAAuB,oBAKvBG,sBAAuB,sBAMvB8B,cAAe,eAKfC,YAAa,aAKbC,uBAAwB,cASxBC,oBAAqB,qBAErBC,YAAa,aACbC,uBAAwB,oBACxBC,oBAAqB,oBACrBxE,kBAAmB,kBAKnByE,aAAc,cAKdC,qBAAsB,qBAKtBC,kBAAmB,kBAKnBC,wBAAyB,wBAKzBC,qCAAsC,oCAKtCC,gCAAiC,8BAKjCC,sBAAuB,sBAKvBC,WAAY,YACZC,qBAAsB,kBACtBC,kBAAmB,kBAEnB3C,mBAAoB,mBAMpBhE,oBAAqB,oBAKrB4G,WAAY,YAKZC,YAAa,aAKbC,aAAc,cAKdC,cAAe,eAMfC,eAAgB,gBAKhB1C,eAAgB,gBAKhB2C,6BAA8B,2BAK9BC,sBAAuB,qBAKvBC,8BAA+B,4BAK/BC,iBAAkB,kBAKlBrC,+BAAgC,8BAKhCsC,oBAAqB,0BAErBzC,yBAA0B,wB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/directives/no-agents-view.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/ttyg-context.service.js"],"sourcesContent":["import {TTYGEventName} from \"../services/ttyg-context.service\";\nimport {DocumentationUrlResolver} from \"../../utils/documentation-url-resolver\";\n\nangular\n .module('graphdb.framework.ttyg.directives.no-agents-view', [])\n .directive('noAgentsView', NoAgentsView);\n\nNoAgentsView.$inject = ['TTYGContextService', 'productInfo'];\n\nfunction NoAgentsView(TTYGContextService, productInfo) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/ttyg/templates/no-agents-view.html',\n scope: {\n },\n link: ($scope) => {\n\n // =========================\n // Public variables\n // =========================\n\n $scope.canModifyAgent = false;\n $scope.talkToGraphDocumentationLink = DocumentationUrlResolver.getDocumentationUrl(productInfo.productShortVersion, 'talk-to-graph.html');\n\n // =========================\n // Public functions\n // =========================\n\n $scope.onCreateAgent = () => {\n TTYGContextService.emit(TTYGEventName.OPEN_AGENT_SETTINGS);\n };\n\n // =========================\n // Private functions\n // =========================\n\n const onCanUpdateAgentUpdated = (canModifyAgent) => {\n $scope.canModifyAgent = canModifyAgent;\n };\n\n // =========================\n // Subscriptions\n // =========================\n const subscriptions = [];\n\n const onDestroy = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n subscriptions.push(TTYGContextService.onCanUpdateAgentUpdated(onCanUpdateAgentUpdated));\n $scope.$on('$destroy', onDestroy);\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 const createChat = (newChat) => {\n addChat(newChat);\n selectChat(newChat);\n emit(TTYGEventName.CREATE_CHAT_SUCCESSFUL, newChat);\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 createChat,\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 \"cancelPendingQuestion\" event triggers the cancellation of a pending question in a chat.\n */\n CANCEL_PENDING_QUESTION: \"cancelPendingQuestion\",\n\n /**\n * This event is emitted when the cancellation of the pending question succeeds.\n */\n PENDING_QUESTION_CANCELED_SUCCESSFUL: \"pendingQuestionCanceledSuccessful\",\n\n /**\n * This event is emitted when the cancellation of the pending question fails.\n */\n CANCEL_PENDING_QUESTION_FAILURE: \"cancelPendingQuestionFailed\",\n\n /**\n * This event will be fired before a question is sent to BE for processing.\n */\n ASK_QUESTION_STARTING: \"askQuestionStarting\",\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":["NoAgentsView","TTYGContextService","productInfo","restrict","templateUrl","scope","link","$scope","canModifyAgent","talkToGraphDocumentationLink","DocumentationUrlResolver","getDocumentationUrl","productShortVersion","onCreateAgent","emit","TTYGEventName","OPEN_AGENT_SETTINGS","subscriptions","push","onCanUpdateAgentUpdated","$on","onDestroy","forEach","subscription","angular","module","directive","$inject","EventEmitterService","_agents","_chats","_selectedChat","_selectedAgent","_defaultAgent","_explainCache","_canModifyAgent","getAgents","cloneDeep","getChats","updateChats","chats","CHAT_LIST_UPDATED","addChat","newChat","appendChat","getSelectedChat","selectChat","selectedChat","id","SELECT_CHAT","getSelectedAgent","_getExplainResponseCache","hasExplainResponse","answerId","getCanModifyAgent","tTYGEventName","payload","emitSync","subscribe","callback","subscribeSync","resetContext","undefined","replaceChat","oldChat","createChat","CREATE_CHAT_SUCCESSFUL","onChatsListChanged","isFunction","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","CAN_MODIFY_AGENT_UPDATED","toggleExplainResponse","expanded","EXPLAIN_RESPONSE_CACHE_UPDATED","getExplainResponse","addExplainResponseCache","explainResponse","onExplainResponseCacheUpdated","explainResponses","factory","CREATE_CHAT","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","CANCEL_PENDING_QUESTION","PENDING_QUESTION_CANCELED_SUCCESSFUL","CANCEL_PENDING_QUESTION_FAILURE","ASK_QUESTION_STARTING","LOAD_CHATS","LOAD_CHAT_SUCCESSFUL","LOAD_CHAT_FAILURE","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 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=79329;export const __webpack_ids__=[79329];export const __webpack_modules__={79329:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});const o='<link href="css/ttyg/agent-settings-modal.css?v=3.2.0-TR2" rel="stylesheet"/> <link href="css/lib/ng-tags-input/ng-tags-input.min.css?v=3.2.0-TR2" rel="stylesheet"/> <div class="modal-header"> <button type="button" class="close" ng-click="close()"></button> <h4 class="modal-title">{{( operation === AGENT_OPERATION.EDIT ? \'ttyg.agent.create_agent_modal.title.edit \' : operation === AGENT_OPERATION.CLONE ? \'ttyg.agent.create_agent_modal.title.clone\' : \'ttyg.agent.create_agent_modal.title.create\') | translate}}</h4> </div> <div class="modal-body"> <form novalidate name="agentSettingsForm" id="agentSettingsForm" class="agent-settings-form" guide-selector="agent-form"> <div class="form-group agent-name-label"> <label for="name" uib-popover="{{\'ttyg.agent.create_agent_modal.form.agent_name.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.agent_name.label\' | translate}}</label> <input type="text" class="form-control" id="name" name="name" ng-model="agentFormModel.name" required autocomplete="off" guide-selector="agent-name" placeholder="{{\'ttyg.agent.create_agent_modal.form.agent_name.placeholder\' | translate}}"> <div class="alert alert-danger" ng-if="agentSettingsForm.name.$touched && agentSettingsForm.name.$invalid"> {{\'required.field\' | translate}} </div> </div> <div> <button class="external-config-btn" ng-click="openExternalIntegrationConfig()" ng-if="operation !== AGENT_OPERATION.CREATE" uib-popover="{{\'ttyg.agent.create_agent_modal.form.external_config.tooltip\' | translate}}" popover-trigger="mouseenter"> <i class="fa-regular fa-plug-circle-plus"></i> {{\'ttyg.agent.create_agent_modal.form.external_config.label\' | translate}} </button> </div> <div class="form-group repository-id"> <label for="repositoryId" uib-popover="{{\'ttyg.agent.create_agent_modal.form.repository.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.repository.label\' | translate}}</label> <select class="form-control" id="repositoryId" name="repositoryId" ng-model="agentFormModel.repositoryId" required ng-change="onRepositoryChange()" guide-selector="repository-id" ng-options="repository.value as repository.label for repository in activeRepositoryList"> </select> <div class="alert alert-danger" ng-if="agentSettingsForm.repositoryId.$touched && agentSettingsForm.repositoryId.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-row clearfix"> <div class="form-group llm-model" ng-class="{\'col-md-3\': showContextSize, \'col-md-4\': !showContextSize}"> <label for="model">{{\'ttyg.agent.create_agent_modal.form.model.label\' | translate}}</label> <help-info-popover help-info="helpInfoForModel"></help-info-popover> <input type="text" class="form-control" id="model" name="model" ng-model="agentFormModel.model" guide-selector="model" required autocomplete="off"> <div class="alert alert-danger" ng-if="agentSettingsForm.model.$touched && agentSettingsForm.model.$invalid"> {{\'required.field\' | translate}} </div> </div> <div ng-if="showContextSize" class="form-group context-size col-md-3"> <div class="context-size-wrapper"> <label for="contextSize"> <span uib-popover="{{\'ttyg.agent.create_agent_modal.form.context_size.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.context_size.label\' | translate}}</span> </label> <button type="button" class="btn btn-link btn-sm reset-context-size-btn" ng-click="onRestoreDefaultContextSize()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.context_size.restore_default_btn.tooltip\' | translate}}"> <i class="fa fa-arrow-rotate-left"></i> </button> <div class="input-with-unit"> <input type="number" id="contextSize" name="contextSize" class="form-control" min="1" ng-model="agentFormModel.contextSize" required autocomplete="off"> <span class="token-unit-label"> {{\'ttyg.agent.create_agent_modal.form.context_size.field_addon\' | translate}} </span> </div> </div> <div class="alert alert-danger" ng-if="agentSettingsForm.contextSize.$touched && agentSettingsForm.contextSize.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group temperature" ng-class="{\'col-md-3\': showContextSize, \'col-md-4\': !showContextSize}" guide-selector="temperature-control"> <label for="temperature"> <span uib-popover="{{\'ttyg.agent.create_agent_modal.form.temperature.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.temperature.label\' | translate}}</span> <i class="fa fa-triangle-exclamation text-warning high-temperature-warning" ng-if="showHighTemperatureWarning" uib-popover="{{\'ttyg.agent.create_agent_modal.form.temperature.high_temperature_warning\' | translate}}" popover-trigger="mouseenter"></i> </label> <input type="text" id="temperature" name="temperature" readonly="readonly" class="form-control" ng-class="{\'has-warning\': showHighTemperatureWarning}" ng-model="agentFormModel.temperature.value"> <input id="temperatureSlider" name="temperature" type="range" guide-selector="temperature-control-input" min="{{agentFormModel.temperature.minValue}}" max="{{agentFormModel.temperature.maxValue}}" step="{{agentFormModel.temperature.step}}" ng-change="onTemperatureChange()" ng-model="agentFormModel.temperature.value"/> </div> <div class="form-group top-p" ng-class="{\'col-md-3\': showContextSize, \'col-md-4\': !showContextSize}" guide-selector="top-p-control"> <label for="topP" uib-popover="{{\'ttyg.agent.create_agent_modal.form.top_p.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.top_p.label\' | translate}}</label> <input type="text" class="form-control" id="topP" name="topP" readonly="readonly" ng-model="agentFormModel.topP.value"> <input id="topPSlider" name="topP" type="range" min="{{agentFormModel.topP.minValue}}" guide-selector="top-p-control-input" max="{{agentFormModel.topP.maxValue}}" step="{{agentFormModel.topP.step}}" ng-model="agentFormModel.topP.value"/> </div> </div> <div class="form-group extraction-methods-group"> <label for="extractionMethods" uib-popover="{{\'ttyg.agent.create_agent_modal.form.extraction_method.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.extraction_method.label\' | translate}}</label> <div id="extractionMethods" name="extractionMethods" ng-model="agentFormModel.assistantExtractionMethods.extractionMethods" required class="accordion extraction-methods" ng-class="{\'has-error\': agentSettingsForm.extractionMethods.$touched && agentSettingsForm.extractionMethods.$invalid}"> <div ng-repeat="extractionMethod in agentFormModel.assistantExtractionMethods.extractionMethods" class="extraction-method"> <div id="{{extractionMethod.method + \'_method_heading\'}}" class="extraction-method-heading" ng-class="{\'selected\': extractionMethod.selected}" guide-selector="query-method-{{extractionMethod.method}}"> <div class="mr-0 extraction-method-toggle"> <input type="checkbox" id="{{extractionMethod.method + \'_checkbox\'}}" guide-selector="query-method-{{extractionMethod.method}}-input" name="{{extractionMethod.method}}" class="switch" ng-click="toggleExtractionMethod(extractionMethod, $event)" ng-model="extractionMethod.selected"/> <label for="{{extractionMethod.method + \'_checkbox\'}}"></label> </div> <a class="btn btn-link panel-toggle-link" aria-expanded="false" aria-controls="{{extractionMethod.method + \'_method_content\'}}" ng-click="onExtractionMethodPanelToggle(extractionMethod)"> <span class="mr-1" uib-popover="{{\'ttyg.agent.create_agent_modal.form.\' + extractionMethod.method + \'.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.\' + extractionMethod.method + \'.label\' | translate}}</span> <i class="fa fa-chevron-down toggle-icon" ng-class="{\'expanded\': extractionMethod.expanded}"> </i> </a> </div> <div id="{{extractionMethod.method + \'_method_content\'}}" class="show extraction-method-content" aria-labelledby="{{extractionMethod.method + \'_method_heading\'}}" data-parent="#extractionMethods"> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.SPARQL" class="extraction-method-options" ng-class="{\'has-error\': extractionMethod.selected && !extractionMethod.sparqlOption}"> <div class="sparql-option ontology-graph-option" guide-selector="sparql-ontology-graph-option"> <label class="radio-inline" uib-popover="{{\'ttyg.agent.create_agent_modal.form.ontology_graph.tooltip\' | translate}}" popover-trigger="mouseenter"> <input type="radio" name="sparqlOption" ng-required="extractionMethod.selected" guide-selector="sparql-ontology-graph-option-input" ng-model="extractionMethod.sparqlOption" value="ontologyGraph"> {{\'ttyg.agent.create_agent_modal.form.ontology_graph.label\' | translate}} </label> <div class="panel" ng-show="extractionMethod.sparqlOption === \'ontologyGraph\'"> <div class="form-group"> <input type="text" class="form-control" id="ontologyGraph" guide-selector="sparql-ontology-graph-input" name="ontologyGraph" ng-required="extractionMethod.selected && extractionMethod.sparqlOption === \'ontologyGraph\'" ng-model="extractionMethod.ontologyGraph"> </div> </div> </div> <div class="sparql-option sparql-query-option" guide-selector="sparql-query-option"> <label class="radio-inline" uib-popover="{{\'ttyg.agent.create_agent_modal.form.construct_query.tooltip\' | translate}}" popover-trigger="mouseenter"> <input type="radio" name="sparqlOption" ng-required="extractionMethod.selected" guide-selector="sparql-query-option-input" ng-model="extractionMethod.sparqlOption" value="sparqlQuery"> {{\'ttyg.agent.create_agent_modal.form.construct_query.label\' | translate}} </label> <div class="panel" ng-show="extractionMethod.sparqlOption === \'sparqlQuery\'"> <div class="form-group"> <textarea type="text" class="form-control" id="sparqlQuery" guide-selector="sparql-query-input" name="sparqlQuery" rows="10" ng-required="extractionMethod.selected && extractionMethod.sparqlOption === \'sparqlQuery\'" ng-minlength="extractionMethod.sparqlQuery.minLength" ng-maxlength="extractionMethod.sparqlQuery.maxLength" ng-model="extractionMethod.sparqlQuery.value">\n </textarea> </div> </div> </div> <div class="alert alert-danger sparql-method-option-required-error mb-0" ng-if="extractionMethod.selected && !extractionMethod.sparqlOption"> {{\'ttyg.agent.create_agent_modal.form.sparql_search.required_option\' | translate}} </div> <div class="add-missing-namespaces-option mt-1" guide-selector="add-missing-namespaces-option"> <input id="addMissingNamespaces" name="addMissingNamespaces" type="checkbox" guide-selector="add-missing-namespaces-input" ng-model="extractionMethod.addMissingNamespaces"> <label for="addMissingNamespaces" uib-popover="{{\'ttyg.agent.create_agent_modal.form.add_missing_namespaces.tooltip\' | translate}}" popover-trigger="mouseenter">{{ \'ttyg.agent.create_agent_modal.form.add_missing_namespaces.label\' | translate }}</label> </div> </div> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.FTS_SEARCH" ng-class="{\'has-error\': agentSettingsForm.$error.FTSDisabled || agentSettingsForm.repositoryId.$invalid}" class="extraction-method-options"> <button ng-if="agentFormModel.repositoryId" class="btn btn-link btn-sm pull-right" ng-click="checkIfFTSEnabled()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.fts_search.btn.reload.tooltip\' | translate}}"> <i class="fa fa-arrows-rotate"></i> </button> <div class="alert alert-danger missing-repositoryid-error mb-0" ng-if="agentSettingsForm.repositoryId.$invalid"> {{\'ttyg.agent.create_agent_modal.form.missing_repository_id\' | translate}} </div> <div ng-if="!ftsEnabled && agentFormModel.repositoryId" class="fts-disabled-message" ng-bind-html="getFTSDisabledHelpMessage()"> </div> <div class="form-group max-triples" ng-show="ftsEnabled && agentFormModel.repositoryId"> <label for="{{extractionMethods.FTS_SEARCH + \'_maxNumberOfTriplesPerCall\'}}" uib-popover="{{\'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.label\' | translate}} </label> <input type="number" class="form-control" guide-selector="max-triples-per-call-input" id="{{extractionMethods.FTS_SEARCH + \'_maxNumberOfTriplesPerCall\'}}" name="maxNumberOfTriplesPerCall" min="0" ng-model="extractionMethod.maxNumberOfTriplesPerCall" placeholder="{{\'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.placeholder\' | translate}}"> </div> </div> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.SIMILARITY" ng-class="{\'has-error\': agentSettingsForm.$error.missingIndex || agentSettingsForm.repositoryId.$invalid}" class="extraction-method-options"> <button ng-if="agentFormModel.repositoryId" class="btn btn-link btn-sm pull-right" ng-click="updateSimilaritySearchPanel()" ng-disabled="disabled" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.similarity_index.btn.reload.tooltip\' | translate}}"> <i class="fa fa-arrows-rotate"></i> </button> <div class="alert alert-danger missing-repositoryid-error mb-0" ng-if="agentSettingsForm.repositoryId.$invalid"> {{\'ttyg.agent.create_agent_modal.form.missing_repository_id\' | translate}} </div> <div ng-if="agentFormModel.repositoryId && !similarityIndexes.length" class="no-similarity-index-message"> {{\'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_1\' | translate}} <a href="" ng-click="goToCreateSimilarityView($event)"> {{\'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_2\' | translate}} </a> {{\'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_3\' | translate}}. </div> <div ng-show="similarityIndexes.length"> <div class="form-group similarity-index"> <label for="similarityIndex" uib-popover="{{\'ttyg.agent.create_agent_modal.form.similarity_index.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.similarity_index.label\' | translate}}</label> <span ng-if="extractionMethodLoaderFlags.similarity_search" onto-loader-fancy size="16"></span> <select class="form-control" id="similarityIndex" name="similarityIndex" guide-selector="similarity-index-select" ng-required="extractionMethod.selected" ng-if="!extractionMethodLoaderFlags.similarity_search" ng-model="extractionMethod.similarityIndex" ng-options="similarityIndex.value as similarityIndex.label for similarityIndex in similarityIndexes"> </select> <div class="alert alert-danger" ng-if="extractionMethod.similarityIndex.$touched && extractionMethod.similarityIndex.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group similarity-index-threshold"> <label for="similarityIndexThreshold" uib-popover="{{\'ttyg.agent.create_agent_modal.form.similarity_threshold.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.similarity_threshold.label\' | translate}}</label> <input type="text" class="form-control" id="similarityIndexThreshold" name="similarityIndexThreshold" readonly="readonly" ng-model="extractionMethod.similarityIndexThreshold.value"> <input id="similarityIndexThresholdSlider" name="similarityIndexThreshold" type="range" ng-required="extractionMethod.selected" min="{{extractionMethod.similarityIndexThreshold.minValue}}" max="{{extractionMethod.similarityIndexThreshold.maxValue}}" step="0.1" ng-model="extractionMethod.similarityIndexThreshold.value"/> </div> <div class="form-group similarity-max-triples"> <label for="{{extractionMethods.SIMILARITY + \'_maxNumberOfTriplesPerCall\'}}" uib-popover="{{\'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.label\' | translate}}</label> <input type="number" class="form-control" id="{{extractionMethods.SIMILARITY + \'_maxNumberOfTriplesPerCall\'}}" name="maxNumberOfTriplesPerCall" min="0" ng-model="extractionMethod.maxNumberOfTriplesPerCall" placeholder="{{\'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.placeholder\' | translate}}"> </div> </div> </div> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.RETRIEVAL" ng-class="{\'has-error\': agentSettingsForm.$error.missingConnector || agentSettingsForm.repositoryId.$invalid}" class="extraction-method-options"> <button ng-if="agentFormModel.repositoryId" class="btn btn-link btn-sm pull-right" ng-click="updateRetrievalConnectorPanel()" ng-disabled="disabled" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.retrieval_search.btn.reload.tooltip\' | translate}}"> <i class="fa fa-arrows-rotate"></i> </button> <div class="alert alert-danger missing-repositoryid-error mb-0" ng-if="agentSettingsForm.repositoryId.$invalid"> {{\'ttyg.agent.create_agent_modal.form.missing_repository_id\' | translate}} </div> <div ng-if="agentFormModel.repositoryId && !retrievalConnectors.length" class="no-retrieval-connector-message"> {{\'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_1\' | translate}} <a href="" ng-click="goToConnectorsView($event)"> {{\'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_2\' | translate}} </a> {{\'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_3\' | translate}}. </div> <div ng-show="retrievalConnectors.length"> <div class="form-group retrieval-connector"> <label for="retrievalConnectorInstance" uib-popover="{{\'ttyg.agent.create_agent_modal.form.connector_id.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.connector_id.label\' | translate}}</label> <span ng-if="extractionMethodLoaderFlags.retrieval_search" onto-loader-fancy size="16"></span> <select class="form-control" id="retrievalConnectorInstance" name="retrievalConnectorInstance" ng-required="extractionMethod.selected" ng-if="!extractionMethodLoaderFlags.retrieval_search" ng-model="extractionMethod.retrievalConnectorInstance" ng-options="retrievalConnector.value as retrievalConnector.label for retrievalConnector in retrievalConnectors"> </select> <div class="alert alert-danger" ng-if="extractionMethod.retrievalConnectorInstance.$touched && extractionMethod.retrievalConnectorInstance.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group query-template"> <label for="queryTemplate" uib-popover="{{\'ttyg.agent.create_agent_modal.form.query_template.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.query_template.label\' | translate}}</label> <textarea type="text" class="form-control" id="queryTemplate" name="queryTemplate" rows="10" ng-required="extractionMethod.selected" ng-minlength="extractionMethod.queryTemplate.minLength" ng-maxlength="extractionMethod.queryTemplate.maxLength" ng-model="extractionMethod.queryTemplate.value">\n </textarea> <div class="alert alert-danger" ng-if="extractionMethod.name.$touched && extractionMethod.name.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group retrieval-connector-max-triples"> <label for="{{extractionMethods.RETRIEVAL + \'_maxNumberOfTriplesPerCall\'}}" uib-popover="{{\'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.label\' | translate}}</label> <input type="number" class="form-control" id="{{extractionMethods.RETRIEVAL + \'_maxNumberOfTriplesPerCall\'}}" name="maxNumberOfTriplesPerCall" min="0" ng-model="extractionMethod.maxNumberOfTriplesPerCall" placeholder="{{\'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.placeholder\' | translate}}"> </div> </div> </div> </div> </div> </div> <div class="alert alert-danger extraction-method-required-error" ng-if="agentSettingsForm.extractionMethods.$touched && agentSettingsForm.extractionMethods.$invalid"> {{\'ttyg.agent.create_agent_modal.form.extraction_method.required\' | translate}} </div> </div> <div id="additionalExtractionMethods" class="form-group additional-extraction-methods"> <label uib-popover="{{\'ttyg.agent.create_agent_modal.form.additional_query_methods.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.additional_query_methods.label\' | translate}} </label> <div ng-repeat="extractionMethod in agentFormModel.additionalExtractionMethods.additionalExtractionMethods" class="additional-extraction-method"> <div ng-if="ExtractionMethodTemplates[extractionMethod.method]"> <div ng-include="\'js/angular/ttyg/templates/\' + ExtractionMethodTemplates[extractionMethod.method] + \'.html\'"></div> </div> </div> </div> <div class="form-group user-instructions"> <div class="toolbar"> <label for="userInstruction" uib-popover="{{\'ttyg.agent.create_agent_modal.form.user_instruction.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.user_instruction.label\' | translate}}</label> <div class="actions"> <copy-to-clipboard tooltip-text="ttyg.agent.create_agent_modal.form.user_instruction.btn.copy_instruction.tooltip" text-to-copy="{{agentFormModel.instructions.userInstruction}}"></copy-to-clipboard> <button class="btn btn-link btn-sm create-chat-btn" ng-click="onRestoreDefaultUserInstructions()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.user_instruction.btn.restore_default.tooltip\' | translate}}"> <i class="fa fa-arrow-rotate-left"></i> </button> </div> </div> <textarea type="text" class="form-control" id="userInstruction" name="userInstruction" rows="5" guide-selector="user-instructions" ng-model="agentFormModel.instructions.userInstruction" placeholder="{{\'ttyg.agent.create_agent_modal.form.user_instruction.placeholder\' | translate}}">\n </textarea> </div> <div class="text-xs-center"> <button type="button" ng-click="showAdvancedSettings = !showAdvancedSettings" class="btn btn-link btn-sm toggle-advanced-settings"> <span ng-hide="showAdvancedSettings">{{\'ttyg.agent.create_agent_modal.advanced_settings.show\' | translate}}<em class="icon-caret-down"></em></span> <span ng-show="showAdvancedSettings">{{\'ttyg.agent.create_agent_modal.advanced_settings.hide\' | translate}}<em class="icon-caret-up"></em></span> </button> </div> <div ng-show="showAdvancedSettings" class="advanced-settings"> <div class="form-group system-instructions"> <div class="toolbar"> <label for="systemInstruction"> <span uib-popover="{{\'ttyg.agent.create_agent_modal.form.system_instruction.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.system_instruction.label\' | translate}}</span> <i class="fa fa-triangle-exclamation text-warning overriding-system-instructions-warning" ng-if="showSystemInstructionWarning" uib-popover="{{\'ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body\' | translate}}" popover-trigger="mouseenter"></i> </label> <div class="actions"> <copy-to-clipboard tooltip-text="ttyg.agent.create_agent_modal.form.system_instruction.btn.copy_instruction.tooltip" text-to-copy="{{agentFormModel.instructions.systemInstruction}}"></copy-to-clipboard> <button class="btn btn-link btn-sm create-chat-btn" ng-click="onRestoreDefaultSystemInstructions()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.system_instruction.btn.restore_default.tooltip\' | translate}}"> <i class="fa fa-arrow-rotate-left"></i> </button> </div> </div> <textarea type="text" class="form-control" id="systemInstruction" name="systemInstruction" rows="5" placeholder="{{\'ttyg.agent.create_agent_modal.form.system_instruction.placeholder\' | translate}}" ng-class="{\'has-warning\': showSystemInstructionWarning}" ng-model="agentFormModel.instructions.systemInstruction" ng-change="onSystemInstructionChange()">\n </textarea> </div> </div> </form> </div> <div class="modal-footer"> <button type="button" ng-click="onExplainAgentSettings()" class="btn explain-agent-settings-btn"> {{\'ttyg.agent.create_agent_modal.btn.explain_settings.label\' | translate}} </button> <div> <button type="button" ng-click="cancel()" class="btn cancel-btn"> {{\'ttyg.agent.create_agent_modal.btn.cancel.label\' | translate}} </button> <button type="button" ng-click="ok()" ng-disabled="agentSettingsForm.$invalid || savingAgent" guide-selector="save-agent-settings" class="btn btn-primary save-agent-settings-btn"> <span>{{(operation === AGENT_OPERATION.EDIT ? \'ttyg.agent.create_agent_modal.btn.save.label\' : operation === AGENT_OPERATION.CLONE ? \'ttyg.agent.create_agent_modal.btn.save.label\' : \'ttyg.agent.create_agent_modal.btn.create.label\') | translate}}</span> <span class="saving-agent-loader" ng-if="savingAgent" onto-loader-fancy hide-message="true" size="15"></span> </button> </div> </div> '}};
|
|
2
|
-
//# sourceMappingURL=79329.
|
|
1
|
+
export const __webpack_id__=79329;export const __webpack_ids__=[79329];export const __webpack_modules__={79329:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});const o='<link href="css/ttyg/agent-settings-modal.css?v=3.2.0-TR3" rel="stylesheet"/> <link href="css/lib/ng-tags-input/ng-tags-input.min.css?v=3.2.0-TR3" rel="stylesheet"/> <div class="modal-header"> <button type="button" class="close" ng-click="close()"></button> <h4 class="modal-title">{{( operation === AGENT_OPERATION.EDIT ? \'ttyg.agent.create_agent_modal.title.edit \' : operation === AGENT_OPERATION.CLONE ? \'ttyg.agent.create_agent_modal.title.clone\' : \'ttyg.agent.create_agent_modal.title.create\') | translate}}</h4> </div> <div class="modal-body"> <form novalidate name="agentSettingsForm" id="agentSettingsForm" class="agent-settings-form" guide-selector="agent-form"> <div class="form-group agent-name-label"> <label for="name" uib-popover="{{\'ttyg.agent.create_agent_modal.form.agent_name.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.agent_name.label\' | translate}}</label> <input type="text" class="form-control" id="name" name="name" ng-model="agentFormModel.name" required autocomplete="off" guide-selector="agent-name" placeholder="{{\'ttyg.agent.create_agent_modal.form.agent_name.placeholder\' | translate}}"> <div class="alert alert-danger" ng-if="agentSettingsForm.name.$touched && agentSettingsForm.name.$invalid"> {{\'required.field\' | translate}} </div> </div> <div> <button class="external-config-btn" ng-click="openExternalIntegrationConfig()" ng-if="operation !== AGENT_OPERATION.CREATE" uib-popover="{{\'ttyg.agent.create_agent_modal.form.external_config.tooltip\' | translate}}" popover-trigger="mouseenter"> <i class="fa-regular fa-plug-circle-plus"></i> {{\'ttyg.agent.create_agent_modal.form.external_config.label\' | translate}} </button> </div> <div class="form-group repository-id"> <label for="repositoryId" uib-popover="{{\'ttyg.agent.create_agent_modal.form.repository.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.repository.label\' | translate}}</label> <select class="form-control" id="repositoryId" name="repositoryId" ng-model="agentFormModel.repositoryId" required ng-change="onRepositoryChange()" guide-selector="repository-id" ng-options="repository.value as repository.label for repository in activeRepositoryList"> </select> <div class="alert alert-danger" ng-if="agentSettingsForm.repositoryId.$touched && agentSettingsForm.repositoryId.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-row clearfix"> <div class="form-group llm-model" ng-class="{\'col-md-3\': showContextSize, \'col-md-4\': !showContextSize}"> <label for="model">{{\'ttyg.agent.create_agent_modal.form.model.label\' | translate}}</label> <help-info-popover help-info="helpInfoForModel"></help-info-popover> <input type="text" class="form-control" id="model" name="model" ng-model="agentFormModel.model" guide-selector="model" required autocomplete="off"> <div class="alert alert-danger" ng-if="agentSettingsForm.model.$touched && agentSettingsForm.model.$invalid"> {{\'required.field\' | translate}} </div> </div> <div ng-if="showContextSize" class="form-group context-size col-md-3"> <div class="context-size-wrapper"> <label for="contextSize"> <span uib-popover="{{\'ttyg.agent.create_agent_modal.form.context_size.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.context_size.label\' | translate}}</span> </label> <button type="button" class="btn btn-link btn-sm reset-context-size-btn" ng-click="onRestoreDefaultContextSize()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.context_size.restore_default_btn.tooltip\' | translate}}"> <i class="fa fa-arrow-rotate-left"></i> </button> <div class="input-with-unit"> <input type="number" id="contextSize" name="contextSize" class="form-control" min="1" ng-model="agentFormModel.contextSize" required autocomplete="off"> <span class="token-unit-label"> {{\'ttyg.agent.create_agent_modal.form.context_size.field_addon\' | translate}} </span> </div> </div> <div class="alert alert-danger" ng-if="agentSettingsForm.contextSize.$touched && agentSettingsForm.contextSize.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group temperature" ng-class="{\'col-md-3\': showContextSize, \'col-md-4\': !showContextSize}" guide-selector="temperature-control"> <label for="temperature"> <span uib-popover="{{\'ttyg.agent.create_agent_modal.form.temperature.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.temperature.label\' | translate}}</span> <i class="fa fa-triangle-exclamation text-warning high-temperature-warning" ng-if="showHighTemperatureWarning" uib-popover="{{\'ttyg.agent.create_agent_modal.form.temperature.high_temperature_warning\' | translate}}" popover-trigger="mouseenter"></i> </label> <input type="text" id="temperature" name="temperature" readonly="readonly" class="form-control" ng-class="{\'has-warning\': showHighTemperatureWarning}" ng-model="agentFormModel.temperature.value"> <input id="temperatureSlider" name="temperature" type="range" guide-selector="temperature-control-input" min="{{agentFormModel.temperature.minValue}}" max="{{agentFormModel.temperature.maxValue}}" step="{{agentFormModel.temperature.step}}" ng-change="onTemperatureChange()" ng-model="agentFormModel.temperature.value"/> </div> <div class="form-group top-p" ng-class="{\'col-md-3\': showContextSize, \'col-md-4\': !showContextSize}" guide-selector="top-p-control"> <label for="topP" uib-popover="{{\'ttyg.agent.create_agent_modal.form.top_p.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.top_p.label\' | translate}}</label> <input type="text" class="form-control" id="topP" name="topP" readonly="readonly" ng-model="agentFormModel.topP.value"> <input id="topPSlider" name="topP" type="range" min="{{agentFormModel.topP.minValue}}" guide-selector="top-p-control-input" max="{{agentFormModel.topP.maxValue}}" step="{{agentFormModel.topP.step}}" ng-model="agentFormModel.topP.value"/> </div> </div> <div class="form-group extraction-methods-group"> <label for="extractionMethods" uib-popover="{{\'ttyg.agent.create_agent_modal.form.extraction_method.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.extraction_method.label\' | translate}}</label> <div id="extractionMethods" name="extractionMethods" ng-model="agentFormModel.assistantExtractionMethods.extractionMethods" required class="accordion extraction-methods" ng-class="{\'has-error\': agentSettingsForm.extractionMethods.$touched && agentSettingsForm.extractionMethods.$invalid}"> <div ng-repeat="extractionMethod in agentFormModel.assistantExtractionMethods.extractionMethods" class="extraction-method"> <div id="{{extractionMethod.method + \'_method_heading\'}}" class="extraction-method-heading" ng-class="{\'selected\': extractionMethod.selected}" guide-selector="query-method-{{extractionMethod.method}}"> <div class="mr-0 extraction-method-toggle"> <input type="checkbox" id="{{extractionMethod.method + \'_checkbox\'}}" guide-selector="query-method-{{extractionMethod.method}}-input" name="{{extractionMethod.method}}" class="switch" ng-click="toggleExtractionMethod(extractionMethod, $event)" ng-model="extractionMethod.selected"/> <label for="{{extractionMethod.method + \'_checkbox\'}}"></label> </div> <a class="btn btn-link panel-toggle-link" aria-expanded="false" aria-controls="{{extractionMethod.method + \'_method_content\'}}" ng-click="onExtractionMethodPanelToggle(extractionMethod)"> <span class="mr-1" uib-popover="{{\'ttyg.agent.create_agent_modal.form.\' + extractionMethod.method + \'.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.\' + extractionMethod.method + \'.label\' | translate}}</span> <i class="fa fa-chevron-down toggle-icon" ng-class="{\'expanded\': extractionMethod.expanded}"> </i> </a> </div> <div id="{{extractionMethod.method + \'_method_content\'}}" class="show extraction-method-content" aria-labelledby="{{extractionMethod.method + \'_method_heading\'}}" data-parent="#extractionMethods"> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.SPARQL" class="extraction-method-options" ng-class="{\'has-error\': extractionMethod.selected && !extractionMethod.sparqlOption}"> <div class="sparql-option ontology-graph-option" guide-selector="sparql-ontology-graph-option"> <label class="radio-inline" uib-popover="{{\'ttyg.agent.create_agent_modal.form.ontology_graph.tooltip\' | translate}}" popover-trigger="mouseenter"> <input type="radio" name="sparqlOption" ng-required="extractionMethod.selected" guide-selector="sparql-ontology-graph-option-input" ng-model="extractionMethod.sparqlOption" value="ontologyGraph"> {{\'ttyg.agent.create_agent_modal.form.ontology_graph.label\' | translate}} </label> <div class="panel" ng-show="extractionMethod.sparqlOption === \'ontologyGraph\'"> <div class="form-group"> <input type="text" class="form-control" id="ontologyGraph" guide-selector="sparql-ontology-graph-input" name="ontologyGraph" ng-required="extractionMethod.selected && extractionMethod.sparqlOption === \'ontologyGraph\'" ng-model="extractionMethod.ontologyGraph"> </div> </div> </div> <div class="sparql-option sparql-query-option" guide-selector="sparql-query-option"> <label class="radio-inline" uib-popover="{{\'ttyg.agent.create_agent_modal.form.construct_query.tooltip\' | translate}}" popover-trigger="mouseenter"> <input type="radio" name="sparqlOption" ng-required="extractionMethod.selected" guide-selector="sparql-query-option-input" ng-model="extractionMethod.sparqlOption" value="sparqlQuery"> {{\'ttyg.agent.create_agent_modal.form.construct_query.label\' | translate}} </label> <div class="panel" ng-show="extractionMethod.sparqlOption === \'sparqlQuery\'"> <div class="form-group"> <textarea type="text" class="form-control" id="sparqlQuery" guide-selector="sparql-query-input" name="sparqlQuery" rows="10" ng-required="extractionMethod.selected && extractionMethod.sparqlOption === \'sparqlQuery\'" ng-minlength="extractionMethod.sparqlQuery.minLength" ng-maxlength="extractionMethod.sparqlQuery.maxLength" ng-model="extractionMethod.sparqlQuery.value">\n </textarea> </div> </div> </div> <div class="alert alert-danger sparql-method-option-required-error mb-0" ng-if="extractionMethod.selected && !extractionMethod.sparqlOption"> {{\'ttyg.agent.create_agent_modal.form.sparql_search.required_option\' | translate}} </div> <div class="add-missing-namespaces-option mt-1" guide-selector="add-missing-namespaces-option"> <input id="addMissingNamespaces" name="addMissingNamespaces" type="checkbox" guide-selector="add-missing-namespaces-input" ng-model="extractionMethod.addMissingNamespaces"> <label for="addMissingNamespaces" uib-popover="{{\'ttyg.agent.create_agent_modal.form.add_missing_namespaces.tooltip\' | translate}}" popover-trigger="mouseenter">{{ \'ttyg.agent.create_agent_modal.form.add_missing_namespaces.label\' | translate }}</label> </div> </div> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.FTS_SEARCH" ng-class="{\'has-error\': agentSettingsForm.$error.FTSDisabled || agentSettingsForm.repositoryId.$invalid}" class="extraction-method-options"> <button ng-if="agentFormModel.repositoryId" class="btn btn-link btn-sm pull-right" ng-click="checkIfFTSEnabled()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.fts_search.btn.reload.tooltip\' | translate}}"> <i class="fa fa-arrows-rotate"></i> </button> <div class="alert alert-danger missing-repositoryid-error mb-0" ng-if="agentSettingsForm.repositoryId.$invalid"> {{\'ttyg.agent.create_agent_modal.form.missing_repository_id\' | translate}} </div> <div ng-if="!ftsEnabled && agentFormModel.repositoryId" class="fts-disabled-message" ng-bind-html="getFTSDisabledHelpMessage()"> </div> <div class="form-group max-triples" ng-show="ftsEnabled && agentFormModel.repositoryId"> <label for="{{extractionMethods.FTS_SEARCH + \'_maxNumberOfTriplesPerCall\'}}" uib-popover="{{\'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.label\' | translate}} </label> <input type="number" class="form-control" guide-selector="max-triples-per-call-input" id="{{extractionMethods.FTS_SEARCH + \'_maxNumberOfTriplesPerCall\'}}" name="maxNumberOfTriplesPerCall" min="0" ng-model="extractionMethod.maxNumberOfTriplesPerCall" placeholder="{{\'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.placeholder\' | translate}}"> </div> </div> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.SIMILARITY" ng-class="{\'has-error\': agentSettingsForm.$error.missingIndex || agentSettingsForm.repositoryId.$invalid}" class="extraction-method-options"> <button ng-if="agentFormModel.repositoryId" class="btn btn-link btn-sm pull-right" ng-click="updateSimilaritySearchPanel()" ng-disabled="disabled" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.similarity_index.btn.reload.tooltip\' | translate}}"> <i class="fa fa-arrows-rotate"></i> </button> <div class="alert alert-danger missing-repositoryid-error mb-0" ng-if="agentSettingsForm.repositoryId.$invalid"> {{\'ttyg.agent.create_agent_modal.form.missing_repository_id\' | translate}} </div> <div ng-if="agentFormModel.repositoryId && !similarityIndexes.length" class="no-similarity-index-message"> {{\'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_1\' | translate}} <a href="" ng-click="goToCreateSimilarityView($event)"> {{\'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_2\' | translate}} </a> {{\'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_3\' | translate}}. </div> <div ng-show="similarityIndexes.length"> <div class="form-group similarity-index"> <label for="similarityIndex" uib-popover="{{\'ttyg.agent.create_agent_modal.form.similarity_index.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.similarity_index.label\' | translate}}</label> <span ng-if="extractionMethodLoaderFlags.similarity_search" onto-loader-fancy size="16"></span> <select class="form-control" id="similarityIndex" name="similarityIndex" guide-selector="similarity-index-select" ng-required="extractionMethod.selected" ng-if="!extractionMethodLoaderFlags.similarity_search" ng-model="extractionMethod.similarityIndex" ng-options="similarityIndex.value as similarityIndex.label for similarityIndex in similarityIndexes"> </select> <div class="alert alert-danger" ng-if="extractionMethod.similarityIndex.$touched && extractionMethod.similarityIndex.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group similarity-index-threshold"> <label for="similarityIndexThreshold" uib-popover="{{\'ttyg.agent.create_agent_modal.form.similarity_threshold.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.similarity_threshold.label\' | translate}}</label> <input type="text" class="form-control" id="similarityIndexThreshold" name="similarityIndexThreshold" readonly="readonly" ng-model="extractionMethod.similarityIndexThreshold.value"> <input id="similarityIndexThresholdSlider" name="similarityIndexThreshold" type="range" ng-required="extractionMethod.selected" min="{{extractionMethod.similarityIndexThreshold.minValue}}" max="{{extractionMethod.similarityIndexThreshold.maxValue}}" step="0.1" ng-model="extractionMethod.similarityIndexThreshold.value"/> </div> <div class="form-group similarity-max-triples"> <label for="{{extractionMethods.SIMILARITY + \'_maxNumberOfTriplesPerCall\'}}" uib-popover="{{\'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.label\' | translate}}</label> <input type="number" class="form-control" id="{{extractionMethods.SIMILARITY + \'_maxNumberOfTriplesPerCall\'}}" name="maxNumberOfTriplesPerCall" min="0" ng-model="extractionMethod.maxNumberOfTriplesPerCall" placeholder="{{\'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.placeholder\' | translate}}"> </div> </div> </div> <div ng-if="extractionMethod.expanded && extractionMethod.method === extractionMethods.RETRIEVAL" ng-class="{\'has-error\': agentSettingsForm.$error.missingConnector || agentSettingsForm.repositoryId.$invalid}" class="extraction-method-options"> <button ng-if="agentFormModel.repositoryId" class="btn btn-link btn-sm pull-right" ng-click="updateRetrievalConnectorPanel()" ng-disabled="disabled" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.retrieval_search.btn.reload.tooltip\' | translate}}"> <i class="fa fa-arrows-rotate"></i> </button> <div class="alert alert-danger missing-repositoryid-error mb-0" ng-if="agentSettingsForm.repositoryId.$invalid"> {{\'ttyg.agent.create_agent_modal.form.missing_repository_id\' | translate}} </div> <div ng-if="agentFormModel.repositoryId && !retrievalConnectors.length" class="no-retrieval-connector-message"> {{\'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_1\' | translate}} <a href="" ng-click="goToConnectorsView($event)"> {{\'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_2\' | translate}} </a> {{\'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_3\' | translate}}. </div> <div ng-show="retrievalConnectors.length"> <div class="form-group retrieval-connector"> <label for="retrievalConnectorInstance" uib-popover="{{\'ttyg.agent.create_agent_modal.form.connector_id.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.connector_id.label\' | translate}}</label> <span ng-if="extractionMethodLoaderFlags.retrieval_search" onto-loader-fancy size="16"></span> <select class="form-control" id="retrievalConnectorInstance" name="retrievalConnectorInstance" ng-required="extractionMethod.selected" ng-if="!extractionMethodLoaderFlags.retrieval_search" ng-model="extractionMethod.retrievalConnectorInstance" ng-options="retrievalConnector.value as retrievalConnector.label for retrievalConnector in retrievalConnectors"> </select> <div class="alert alert-danger" ng-if="extractionMethod.retrievalConnectorInstance.$touched && extractionMethod.retrievalConnectorInstance.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group query-template"> <label for="queryTemplate" uib-popover="{{\'ttyg.agent.create_agent_modal.form.query_template.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.query_template.label\' | translate}}</label> <textarea type="text" class="form-control" id="queryTemplate" name="queryTemplate" rows="10" ng-required="extractionMethod.selected" ng-minlength="extractionMethod.queryTemplate.minLength" ng-maxlength="extractionMethod.queryTemplate.maxLength" ng-model="extractionMethod.queryTemplate.value">\n </textarea> <div class="alert alert-danger" ng-if="extractionMethod.name.$touched && extractionMethod.name.$invalid"> {{\'required.field\' | translate}} </div> </div> <div class="form-group retrieval-connector-max-triples"> <label for="{{extractionMethods.RETRIEVAL + \'_maxNumberOfTriplesPerCall\'}}" uib-popover="{{\'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.label\' | translate}}</label> <input type="number" class="form-control" id="{{extractionMethods.RETRIEVAL + \'_maxNumberOfTriplesPerCall\'}}" name="maxNumberOfTriplesPerCall" min="0" ng-model="extractionMethod.maxNumberOfTriplesPerCall" placeholder="{{\'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.placeholder\' | translate}}"> </div> </div> </div> </div> </div> </div> <div class="alert alert-danger extraction-method-required-error" ng-if="agentSettingsForm.extractionMethods.$touched && agentSettingsForm.extractionMethods.$invalid"> {{\'ttyg.agent.create_agent_modal.form.extraction_method.required\' | translate}} </div> </div> <div id="additionalExtractionMethods" class="form-group additional-extraction-methods"> <label uib-popover="{{\'ttyg.agent.create_agent_modal.form.additional_query_methods.tooltip\' | translate}}" popover-trigger="mouseenter"> {{\'ttyg.agent.create_agent_modal.form.additional_query_methods.label\' | translate}} </label> <div ng-repeat="extractionMethod in agentFormModel.additionalExtractionMethods.additionalExtractionMethods" class="additional-extraction-method"> <div ng-if="ExtractionMethodTemplates[extractionMethod.method]"> <div ng-include="\'js/angular/ttyg/templates/\' + ExtractionMethodTemplates[extractionMethod.method] + \'.html\'"></div> </div> </div> </div> <div class="form-group user-instructions"> <div class="toolbar"> <label for="userInstruction" uib-popover="{{\'ttyg.agent.create_agent_modal.form.user_instruction.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.user_instruction.label\' | translate}}</label> <div class="actions"> <copy-to-clipboard tooltip-text="ttyg.agent.create_agent_modal.form.user_instruction.btn.copy_instruction.tooltip" text-to-copy="{{agentFormModel.instructions.userInstruction}}"></copy-to-clipboard> <button class="btn btn-link btn-sm create-chat-btn" ng-click="onRestoreDefaultUserInstructions()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.user_instruction.btn.restore_default.tooltip\' | translate}}"> <i class="fa fa-arrow-rotate-left"></i> </button> </div> </div> <textarea type="text" class="form-control" id="userInstruction" name="userInstruction" rows="5" guide-selector="user-instructions" ng-model="agentFormModel.instructions.userInstruction" placeholder="{{\'ttyg.agent.create_agent_modal.form.user_instruction.placeholder\' | translate}}">\n </textarea> </div> <div class="text-xs-center"> <button type="button" ng-click="showAdvancedSettings = !showAdvancedSettings" class="btn btn-link btn-sm toggle-advanced-settings"> <span ng-hide="showAdvancedSettings">{{\'ttyg.agent.create_agent_modal.advanced_settings.show\' | translate}}<em class="icon-caret-down"></em></span> <span ng-show="showAdvancedSettings">{{\'ttyg.agent.create_agent_modal.advanced_settings.hide\' | translate}}<em class="icon-caret-up"></em></span> </button> </div> <div ng-show="showAdvancedSettings" class="advanced-settings"> <div class="form-group system-instructions"> <div class="toolbar"> <label for="systemInstruction"> <span uib-popover="{{\'ttyg.agent.create_agent_modal.form.system_instruction.tooltip\' | translate}}" popover-trigger="mouseenter">{{\'ttyg.agent.create_agent_modal.form.system_instruction.label\' | translate}}</span> <i class="fa fa-triangle-exclamation text-warning overriding-system-instructions-warning" ng-if="showSystemInstructionWarning" uib-popover="{{\'ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body\' | translate}}" popover-trigger="mouseenter"></i> </label> <div class="actions"> <copy-to-clipboard tooltip-text="ttyg.agent.create_agent_modal.form.system_instruction.btn.copy_instruction.tooltip" text-to-copy="{{agentFormModel.instructions.systemInstruction}}"></copy-to-clipboard> <button class="btn btn-link btn-sm create-chat-btn" ng-click="onRestoreDefaultSystemInstructions()" gdb-tooltip="{{\'ttyg.agent.create_agent_modal.form.system_instruction.btn.restore_default.tooltip\' | translate}}"> <i class="fa fa-arrow-rotate-left"></i> </button> </div> </div> <textarea type="text" class="form-control" id="systemInstruction" name="systemInstruction" rows="5" placeholder="{{\'ttyg.agent.create_agent_modal.form.system_instruction.placeholder\' | translate}}" ng-class="{\'has-warning\': showSystemInstructionWarning}" ng-model="agentFormModel.instructions.systemInstruction" ng-change="onSystemInstructionChange()">\n </textarea> </div> </div> </form> </div> <div class="modal-footer"> <button type="button" ng-click="onExplainAgentSettings()" class="btn explain-agent-settings-btn"> {{\'ttyg.agent.create_agent_modal.btn.explain_settings.label\' | translate}} </button> <div> <button type="button" ng-click="cancel()" class="btn cancel-btn"> {{\'ttyg.agent.create_agent_modal.btn.cancel.label\' | translate}} </button> <button type="button" ng-click="ok()" ng-disabled="agentSettingsForm.$invalid || savingAgent" guide-selector="save-agent-settings" class="btn btn-primary save-agent-settings-btn"> <span>{{(operation === AGENT_OPERATION.EDIT ? \'ttyg.agent.create_agent_modal.btn.save.label\' : operation === AGENT_OPERATION.CLONE ? \'ttyg.agent.create_agent_modal.btn.save.label\' : \'ttyg.agent.create_agent_modal.btn.create.label\') | translate}}</span> <span class="saving-agent-loader" ng-if="savingAgent" onto-loader-fancy hide-message="true" size="15"></span> </button> </div> </div> '}};
|
|
2
|
+
//# sourceMappingURL=79329.8d230cc14746653003ee.bundle.js.map
|
package/dist/{79329.3d912887ba7e96090fb4.bundle.js.map → 79329.8d230cc14746653003ee.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"79329.3d912887ba7e96090fb4.bundle.js","mappings":"uJAOA,QANW,sxxB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/modal/agent-settings-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/agent-settings-modal.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <link href=\"css/lib/ng-tags-input/ng-tags-input.min.css?v=3.2.0-TR2\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <button type=\"button\" class=\"close\" ng-click=\"close()\"></button> <h4 class=\"modal-title\">{{( operation === AGENT_OPERATION.EDIT ? 'ttyg.agent.create_agent_modal.title.edit ' : operation === AGENT_OPERATION.CLONE ? 'ttyg.agent.create_agent_modal.title.clone' : 'ttyg.agent.create_agent_modal.title.create') | translate}}</h4> </div> <div class=\"modal-body\"> <form novalidate name=\"agentSettingsForm\" id=\"agentSettingsForm\" class=\"agent-settings-form\" guide-selector=\"agent-form\"> <div class=\"form-group agent-name-label\"> <label for=\"name\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.agent_name.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.agent_name.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"name\" name=\"name\" ng-model=\"agentFormModel.name\" required autocomplete=\"off\" guide-selector=\"agent-name\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.agent_name.placeholder' | translate}}\"> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.name.\\$touched && agentSettingsForm.name.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div> <button class=\"external-config-btn\" ng-click=\"openExternalIntegrationConfig()\" ng-if=\"operation !== AGENT_OPERATION.CREATE\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.external_config.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <i class=\"fa-regular fa-plug-circle-plus\"></i> {{'ttyg.agent.create_agent_modal.form.external_config.label' | translate}} </button> </div> <div class=\"form-group repository-id\"> <label for=\"repositoryId\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.repository.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.repository.label' | translate}}</label> <select class=\"form-control\" id=\"repositoryId\" name=\"repositoryId\" ng-model=\"agentFormModel.repositoryId\" required ng-change=\"onRepositoryChange()\" guide-selector=\"repository-id\" ng-options=\"repository.value as repository.label for repository in activeRepositoryList\"> </select> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.repositoryId.\\$touched && agentSettingsForm.repositoryId.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-row clearfix\"> <div class=\"form-group llm-model\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\"> <label for=\"model\">{{'ttyg.agent.create_agent_modal.form.model.label' | translate}}</label> <help-info-popover help-info=\"helpInfoForModel\"></help-info-popover> <input type=\"text\" class=\"form-control\" id=\"model\" name=\"model\" ng-model=\"agentFormModel.model\" guide-selector=\"model\" required autocomplete=\"off\"> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.model.\\$touched && agentSettingsForm.model.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div ng-if=\"showContextSize\" class=\"form-group context-size col-md-3\"> <div class=\"context-size-wrapper\"> <label for=\"contextSize\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.context_size.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.context_size.label' | translate}}</span> </label> <button type=\"button\" class=\"btn btn-link btn-sm reset-context-size-btn\" ng-click=\"onRestoreDefaultContextSize()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.context_size.restore_default_btn.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> <div class=\"input-with-unit\"> <input type=\"number\" id=\"contextSize\" name=\"contextSize\" class=\"form-control\" min=\"1\" ng-model=\"agentFormModel.contextSize\" required autocomplete=\"off\"> <span class=\"token-unit-label\"> {{'ttyg.agent.create_agent_modal.form.context_size.field_addon' | translate}} </span> </div> </div> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.contextSize.\\$touched && agentSettingsForm.contextSize.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group temperature\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\" guide-selector=\"temperature-control\"> <label for=\"temperature\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.temperature.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.temperature.label' | translate}}</span> <i class=\"fa fa-triangle-exclamation text-warning high-temperature-warning\" ng-if=\"showHighTemperatureWarning\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.temperature.high_temperature_warning' | translate}}\" popover-trigger=\"mouseenter\"></i> </label> <input type=\"text\" id=\"temperature\" name=\"temperature\" readonly=\"readonly\" class=\"form-control\" ng-class=\"{'has-warning': showHighTemperatureWarning}\" ng-model=\"agentFormModel.temperature.value\"> <input id=\"temperatureSlider\" name=\"temperature\" type=\"range\" guide-selector=\"temperature-control-input\" min=\"{{agentFormModel.temperature.minValue}}\" max=\"{{agentFormModel.temperature.maxValue}}\" step=\"{{agentFormModel.temperature.step}}\" ng-change=\"onTemperatureChange()\" ng-model=\"agentFormModel.temperature.value\"/> </div> <div class=\"form-group top-p\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\" guide-selector=\"top-p-control\"> <label for=\"topP\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.top_p.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.top_p.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"topP\" name=\"topP\" readonly=\"readonly\" ng-model=\"agentFormModel.topP.value\"> <input id=\"topPSlider\" name=\"topP\" type=\"range\" min=\"{{agentFormModel.topP.minValue}}\" guide-selector=\"top-p-control-input\" max=\"{{agentFormModel.topP.maxValue}}\" step=\"{{agentFormModel.topP.step}}\" ng-model=\"agentFormModel.topP.value\"/> </div> </div> <div class=\"form-group extraction-methods-group\"> <label for=\"extractionMethods\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.extraction_method.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.extraction_method.label' | translate}}</label> <div id=\"extractionMethods\" name=\"extractionMethods\" ng-model=\"agentFormModel.assistantExtractionMethods.extractionMethods\" required class=\"accordion extraction-methods\" ng-class=\"{'has-error': agentSettingsForm.extractionMethods.\\$touched && agentSettingsForm.extractionMethods.\\$invalid}\"> <div ng-repeat=\"extractionMethod in agentFormModel.assistantExtractionMethods.extractionMethods\" class=\"extraction-method\"> <div id=\"{{extractionMethod.method + '_method_heading'}}\" class=\"extraction-method-heading\" ng-class=\"{'selected': extractionMethod.selected}\" guide-selector=\"query-method-{{extractionMethod.method}}\"> <div class=\"mr-0 extraction-method-toggle\"> <input type=\"checkbox\" id=\"{{extractionMethod.method + '_checkbox'}}\" guide-selector=\"query-method-{{extractionMethod.method}}-input\" name=\"{{extractionMethod.method}}\" class=\"switch\" ng-click=\"toggleExtractionMethod(extractionMethod, \\$event)\" ng-model=\"extractionMethod.selected\"/> <label for=\"{{extractionMethod.method + '_checkbox'}}\"></label> </div> <a class=\"btn btn-link panel-toggle-link\" aria-expanded=\"false\" aria-controls=\"{{extractionMethod.method + '_method_content'}}\" ng-click=\"onExtractionMethodPanelToggle(extractionMethod)\"> <span class=\"mr-1\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.' + extractionMethod.method + '.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.' + extractionMethod.method + '.label' | translate}}</span> <i class=\"fa fa-chevron-down toggle-icon\" ng-class=\"{'expanded': extractionMethod.expanded}\"> </i> </a> </div> <div id=\"{{extractionMethod.method + '_method_content'}}\" class=\"show extraction-method-content\" aria-labelledby=\"{{extractionMethod.method + '_method_heading'}}\" data-parent=\"#extractionMethods\"> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.SPARQL\" class=\"extraction-method-options\" ng-class=\"{'has-error': extractionMethod.selected && !extractionMethod.sparqlOption}\"> <div class=\"sparql-option ontology-graph-option\" guide-selector=\"sparql-ontology-graph-option\"> <label class=\"radio-inline\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.ontology_graph.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <input type=\"radio\" name=\"sparqlOption\" ng-required=\"extractionMethod.selected\" guide-selector=\"sparql-ontology-graph-option-input\" ng-model=\"extractionMethod.sparqlOption\" value=\"ontologyGraph\"> {{'ttyg.agent.create_agent_modal.form.ontology_graph.label' | translate}} </label> <div class=\"panel\" ng-show=\"extractionMethod.sparqlOption === 'ontologyGraph'\"> <div class=\"form-group\"> <input type=\"text\" class=\"form-control\" id=\"ontologyGraph\" guide-selector=\"sparql-ontology-graph-input\" name=\"ontologyGraph\" ng-required=\"extractionMethod.selected && extractionMethod.sparqlOption === 'ontologyGraph'\" ng-model=\"extractionMethod.ontologyGraph\"> </div> </div> </div> <div class=\"sparql-option sparql-query-option\" guide-selector=\"sparql-query-option\"> <label class=\"radio-inline\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.construct_query.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <input type=\"radio\" name=\"sparqlOption\" ng-required=\"extractionMethod.selected\" guide-selector=\"sparql-query-option-input\" ng-model=\"extractionMethod.sparqlOption\" value=\"sparqlQuery\"> {{'ttyg.agent.create_agent_modal.form.construct_query.label' | translate}} </label> <div class=\"panel\" ng-show=\"extractionMethod.sparqlOption === 'sparqlQuery'\"> <div class=\"form-group\"> <textarea type=\"text\" class=\"form-control\" id=\"sparqlQuery\" guide-selector=\"sparql-query-input\" name=\"sparqlQuery\" rows=\"10\" ng-required=\"extractionMethod.selected && extractionMethod.sparqlOption === 'sparqlQuery'\" ng-minlength=\"extractionMethod.sparqlQuery.minLength\" ng-maxlength=\"extractionMethod.sparqlQuery.maxLength\" ng-model=\"extractionMethod.sparqlQuery.value\">\n </textarea> </div> </div> </div> <div class=\"alert alert-danger sparql-method-option-required-error mb-0\" ng-if=\"extractionMethod.selected && !extractionMethod.sparqlOption\"> {{'ttyg.agent.create_agent_modal.form.sparql_search.required_option' | translate}} </div> <div class=\"add-missing-namespaces-option mt-1\" guide-selector=\"add-missing-namespaces-option\"> <input id=\"addMissingNamespaces\" name=\"addMissingNamespaces\" type=\"checkbox\" guide-selector=\"add-missing-namespaces-input\" ng-model=\"extractionMethod.addMissingNamespaces\"> <label for=\"addMissingNamespaces\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.add_missing_namespaces.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{ 'ttyg.agent.create_agent_modal.form.add_missing_namespaces.label' | translate }}</label> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.FTS_SEARCH\" ng-class=\"{'has-error': agentSettingsForm.\\$error.FTSDisabled || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"checkIfFTSEnabled()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.fts_search.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"!ftsEnabled && agentFormModel.repositoryId\" class=\"fts-disabled-message\" ng-bind-html=\"getFTSDisabledHelpMessage()\"> </div> <div class=\"form-group max-triples\" ng-show=\"ftsEnabled && agentFormModel.repositoryId\"> <label for=\"{{extractionMethods.FTS_SEARCH + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.label' | translate}} </label> <input type=\"number\" class=\"form-control\" guide-selector=\"max-triples-per-call-input\" id=\"{{extractionMethods.FTS_SEARCH + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.SIMILARITY\" ng-class=\"{'has-error': agentSettingsForm.\\$error.missingIndex || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"updateSimilaritySearchPanel()\" ng-disabled=\"disabled\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.similarity_index.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"agentFormModel.repositoryId && !similarityIndexes.length\" class=\"no-similarity-index-message\"> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_1' | translate}} <a href=\"\" ng-click=\"goToCreateSimilarityView(\\$event)\"> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_2' | translate}} </a> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_3' | translate}}. </div> <div ng-show=\"similarityIndexes.length\"> <div class=\"form-group similarity-index\"> <label for=\"similarityIndex\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_index.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.similarity_index.label' | translate}}</label> <span ng-if=\"extractionMethodLoaderFlags.similarity_search\" onto-loader-fancy size=\"16\"></span> <select class=\"form-control\" id=\"similarityIndex\" name=\"similarityIndex\" guide-selector=\"similarity-index-select\" ng-required=\"extractionMethod.selected\" ng-if=\"!extractionMethodLoaderFlags.similarity_search\" ng-model=\"extractionMethod.similarityIndex\" ng-options=\"similarityIndex.value as similarityIndex.label for similarityIndex in similarityIndexes\"> </select> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.similarityIndex.\\$touched && extractionMethod.similarityIndex.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group similarity-index-threshold\"> <label for=\"similarityIndexThreshold\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_threshold.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.similarity_threshold.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"similarityIndexThreshold\" name=\"similarityIndexThreshold\" readonly=\"readonly\" ng-model=\"extractionMethod.similarityIndexThreshold.value\"> <input id=\"similarityIndexThresholdSlider\" name=\"similarityIndexThreshold\" type=\"range\" ng-required=\"extractionMethod.selected\" min=\"{{extractionMethod.similarityIndexThreshold.minValue}}\" max=\"{{extractionMethod.similarityIndexThreshold.maxValue}}\" step=\"0.1\" ng-model=\"extractionMethod.similarityIndexThreshold.value\"/> </div> <div class=\"form-group similarity-max-triples\"> <label for=\"{{extractionMethods.SIMILARITY + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.label' | translate}}</label> <input type=\"number\" class=\"form-control\" id=\"{{extractionMethods.SIMILARITY + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.RETRIEVAL\" ng-class=\"{'has-error': agentSettingsForm.\\$error.missingConnector || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"updateRetrievalConnectorPanel()\" ng-disabled=\"disabled\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"agentFormModel.repositoryId && !retrievalConnectors.length\" class=\"no-retrieval-connector-message\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_1' | translate}} <a href=\"\" ng-click=\"goToConnectorsView(\\$event)\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_2' | translate}} </a> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_3' | translate}}. </div> <div ng-show=\"retrievalConnectors.length\"> <div class=\"form-group retrieval-connector\"> <label for=\"retrievalConnectorInstance\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.connector_id.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.connector_id.label' | translate}}</label> <span ng-if=\"extractionMethodLoaderFlags.retrieval_search\" onto-loader-fancy size=\"16\"></span> <select class=\"form-control\" id=\"retrievalConnectorInstance\" name=\"retrievalConnectorInstance\" ng-required=\"extractionMethod.selected\" ng-if=\"!extractionMethodLoaderFlags.retrieval_search\" ng-model=\"extractionMethod.retrievalConnectorInstance\" ng-options=\"retrievalConnector.value as retrievalConnector.label for retrievalConnector in retrievalConnectors\"> </select> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.retrievalConnectorInstance.\\$touched && extractionMethod.retrievalConnectorInstance.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group query-template\"> <label for=\"queryTemplate\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.query_template.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.query_template.label' | translate}}</label> <textarea type=\"text\" class=\"form-control\" id=\"queryTemplate\" name=\"queryTemplate\" rows=\"10\" ng-required=\"extractionMethod.selected\" ng-minlength=\"extractionMethod.queryTemplate.minLength\" ng-maxlength=\"extractionMethod.queryTemplate.maxLength\" ng-model=\"extractionMethod.queryTemplate.value\">\n </textarea> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.name.\\$touched && extractionMethod.name.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group retrieval-connector-max-triples\"> <label for=\"{{extractionMethods.RETRIEVAL + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.label' | translate}}</label> <input type=\"number\" class=\"form-control\" id=\"{{extractionMethods.RETRIEVAL + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> </div> </div> </div> </div> <div class=\"alert alert-danger extraction-method-required-error\" ng-if=\"agentSettingsForm.extractionMethods.\\$touched && agentSettingsForm.extractionMethods.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.extraction_method.required' | translate}} </div> </div> <div id=\"additionalExtractionMethods\" class=\"form-group additional-extraction-methods\"> <label uib-popover=\"{{'ttyg.agent.create_agent_modal.form.additional_query_methods.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.additional_query_methods.label' | translate}} </label> <div ng-repeat=\"extractionMethod in agentFormModel.additionalExtractionMethods.additionalExtractionMethods\" class=\"additional-extraction-method\"> <div ng-if=\"ExtractionMethodTemplates[extractionMethod.method]\"> <div ng-include=\"'js/angular/ttyg/templates/' + ExtractionMethodTemplates[extractionMethod.method] + '.html'\"></div> </div> </div> </div> <div class=\"form-group user-instructions\"> <div class=\"toolbar\"> <label for=\"userInstruction\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.user_instruction.label' | translate}}</label> <div class=\"actions\"> <copy-to-clipboard tooltip-text=\"ttyg.agent.create_agent_modal.form.user_instruction.btn.copy_instruction.tooltip\" text-to-copy=\"{{agentFormModel.instructions.userInstruction}}\"></copy-to-clipboard> <button class=\"btn btn-link btn-sm create-chat-btn\" ng-click=\"onRestoreDefaultUserInstructions()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.btn.restore_default.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> </div> </div> <textarea type=\"text\" class=\"form-control\" id=\"userInstruction\" name=\"userInstruction\" rows=\"5\" guide-selector=\"user-instructions\" ng-model=\"agentFormModel.instructions.userInstruction\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.placeholder' | translate}}\">\n </textarea> </div> <div class=\"text-xs-center\"> <button type=\"button\" ng-click=\"showAdvancedSettings = !showAdvancedSettings\" class=\"btn btn-link btn-sm toggle-advanced-settings\"> <span ng-hide=\"showAdvancedSettings\">{{'ttyg.agent.create_agent_modal.advanced_settings.show' | translate}}<em class=\"icon-caret-down\"></em></span> <span ng-show=\"showAdvancedSettings\">{{'ttyg.agent.create_agent_modal.advanced_settings.hide' | translate}}<em class=\"icon-caret-up\"></em></span> </button> </div> <div ng-show=\"showAdvancedSettings\" class=\"advanced-settings\"> <div class=\"form-group system-instructions\"> <div class=\"toolbar\"> <label for=\"systemInstruction\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.system_instruction.label' | translate}}</span> <i class=\"fa fa-triangle-exclamation text-warning overriding-system-instructions-warning\" ng-if=\"showSystemInstructionWarning\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body' | translate}}\" popover-trigger=\"mouseenter\"></i> </label> <div class=\"actions\"> <copy-to-clipboard tooltip-text=\"ttyg.agent.create_agent_modal.form.system_instruction.btn.copy_instruction.tooltip\" text-to-copy=\"{{agentFormModel.instructions.systemInstruction}}\"></copy-to-clipboard> <button class=\"btn btn-link btn-sm create-chat-btn\" ng-click=\"onRestoreDefaultSystemInstructions()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.btn.restore_default.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> </div> </div> <textarea type=\"text\" class=\"form-control\" id=\"systemInstruction\" name=\"systemInstruction\" rows=\"5\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.placeholder' | translate}}\" ng-class=\"{'has-warning': showSystemInstructionWarning}\" ng-model=\"agentFormModel.instructions.systemInstruction\" ng-change=\"onSystemInstructionChange()\">\n </textarea> </div> </div> </form> </div> <div class=\"modal-footer\"> <button type=\"button\" ng-click=\"onExplainAgentSettings()\" class=\"btn explain-agent-settings-btn\"> {{'ttyg.agent.create_agent_modal.btn.explain_settings.label' | translate}} </button> <div> <button type=\"button\" ng-click=\"cancel()\" class=\"btn cancel-btn\"> {{'ttyg.agent.create_agent_modal.btn.cancel.label' | translate}} </button> <button type=\"button\" ng-click=\"ok()\" ng-disabled=\"agentSettingsForm.\\$invalid || savingAgent\" guide-selector=\"save-agent-settings\" class=\"btn btn-primary save-agent-settings-btn\"> <span>{{(operation === AGENT_OPERATION.EDIT ? 'ttyg.agent.create_agent_modal.btn.save.label' : operation === AGENT_OPERATION.CLONE ? 'ttyg.agent.create_agent_modal.btn.save.label' : 'ttyg.agent.create_agent_modal.btn.create.label') | translate}}</span> <span class=\"saving-agent-loader\" ng-if=\"savingAgent\" onto-loader-fancy hide-message=\"true\" size=\"15\"></span> </button> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"79329.8d230cc14746653003ee.bundle.js","mappings":"uJAOA,QANW,sxxB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/templates/modal/agent-settings-modal.html"],"sourcesContent":["// Module\nvar code = `<link href=\"css/ttyg/agent-settings-modal.css?v=3.2.0-TR3\" rel=\"stylesheet\"/> <link href=\"css/lib/ng-tags-input/ng-tags-input.min.css?v=3.2.0-TR3\" rel=\"stylesheet\"/> <div class=\"modal-header\"> <button type=\"button\" class=\"close\" ng-click=\"close()\"></button> <h4 class=\"modal-title\">{{( operation === AGENT_OPERATION.EDIT ? 'ttyg.agent.create_agent_modal.title.edit ' : operation === AGENT_OPERATION.CLONE ? 'ttyg.agent.create_agent_modal.title.clone' : 'ttyg.agent.create_agent_modal.title.create') | translate}}</h4> </div> <div class=\"modal-body\"> <form novalidate name=\"agentSettingsForm\" id=\"agentSettingsForm\" class=\"agent-settings-form\" guide-selector=\"agent-form\"> <div class=\"form-group agent-name-label\"> <label for=\"name\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.agent_name.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.agent_name.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"name\" name=\"name\" ng-model=\"agentFormModel.name\" required autocomplete=\"off\" guide-selector=\"agent-name\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.agent_name.placeholder' | translate}}\"> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.name.\\$touched && agentSettingsForm.name.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div> <button class=\"external-config-btn\" ng-click=\"openExternalIntegrationConfig()\" ng-if=\"operation !== AGENT_OPERATION.CREATE\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.external_config.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <i class=\"fa-regular fa-plug-circle-plus\"></i> {{'ttyg.agent.create_agent_modal.form.external_config.label' | translate}} </button> </div> <div class=\"form-group repository-id\"> <label for=\"repositoryId\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.repository.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.repository.label' | translate}}</label> <select class=\"form-control\" id=\"repositoryId\" name=\"repositoryId\" ng-model=\"agentFormModel.repositoryId\" required ng-change=\"onRepositoryChange()\" guide-selector=\"repository-id\" ng-options=\"repository.value as repository.label for repository in activeRepositoryList\"> </select> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.repositoryId.\\$touched && agentSettingsForm.repositoryId.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-row clearfix\"> <div class=\"form-group llm-model\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\"> <label for=\"model\">{{'ttyg.agent.create_agent_modal.form.model.label' | translate}}</label> <help-info-popover help-info=\"helpInfoForModel\"></help-info-popover> <input type=\"text\" class=\"form-control\" id=\"model\" name=\"model\" ng-model=\"agentFormModel.model\" guide-selector=\"model\" required autocomplete=\"off\"> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.model.\\$touched && agentSettingsForm.model.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div ng-if=\"showContextSize\" class=\"form-group context-size col-md-3\"> <div class=\"context-size-wrapper\"> <label for=\"contextSize\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.context_size.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.context_size.label' | translate}}</span> </label> <button type=\"button\" class=\"btn btn-link btn-sm reset-context-size-btn\" ng-click=\"onRestoreDefaultContextSize()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.context_size.restore_default_btn.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> <div class=\"input-with-unit\"> <input type=\"number\" id=\"contextSize\" name=\"contextSize\" class=\"form-control\" min=\"1\" ng-model=\"agentFormModel.contextSize\" required autocomplete=\"off\"> <span class=\"token-unit-label\"> {{'ttyg.agent.create_agent_modal.form.context_size.field_addon' | translate}} </span> </div> </div> <div class=\"alert alert-danger\" ng-if=\"agentSettingsForm.contextSize.\\$touched && agentSettingsForm.contextSize.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group temperature\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\" guide-selector=\"temperature-control\"> <label for=\"temperature\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.temperature.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.temperature.label' | translate}}</span> <i class=\"fa fa-triangle-exclamation text-warning high-temperature-warning\" ng-if=\"showHighTemperatureWarning\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.temperature.high_temperature_warning' | translate}}\" popover-trigger=\"mouseenter\"></i> </label> <input type=\"text\" id=\"temperature\" name=\"temperature\" readonly=\"readonly\" class=\"form-control\" ng-class=\"{'has-warning': showHighTemperatureWarning}\" ng-model=\"agentFormModel.temperature.value\"> <input id=\"temperatureSlider\" name=\"temperature\" type=\"range\" guide-selector=\"temperature-control-input\" min=\"{{agentFormModel.temperature.minValue}}\" max=\"{{agentFormModel.temperature.maxValue}}\" step=\"{{agentFormModel.temperature.step}}\" ng-change=\"onTemperatureChange()\" ng-model=\"agentFormModel.temperature.value\"/> </div> <div class=\"form-group top-p\" ng-class=\"{'col-md-3': showContextSize, 'col-md-4': !showContextSize}\" guide-selector=\"top-p-control\"> <label for=\"topP\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.top_p.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.top_p.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"topP\" name=\"topP\" readonly=\"readonly\" ng-model=\"agentFormModel.topP.value\"> <input id=\"topPSlider\" name=\"topP\" type=\"range\" min=\"{{agentFormModel.topP.minValue}}\" guide-selector=\"top-p-control-input\" max=\"{{agentFormModel.topP.maxValue}}\" step=\"{{agentFormModel.topP.step}}\" ng-model=\"agentFormModel.topP.value\"/> </div> </div> <div class=\"form-group extraction-methods-group\"> <label for=\"extractionMethods\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.extraction_method.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.extraction_method.label' | translate}}</label> <div id=\"extractionMethods\" name=\"extractionMethods\" ng-model=\"agentFormModel.assistantExtractionMethods.extractionMethods\" required class=\"accordion extraction-methods\" ng-class=\"{'has-error': agentSettingsForm.extractionMethods.\\$touched && agentSettingsForm.extractionMethods.\\$invalid}\"> <div ng-repeat=\"extractionMethod in agentFormModel.assistantExtractionMethods.extractionMethods\" class=\"extraction-method\"> <div id=\"{{extractionMethod.method + '_method_heading'}}\" class=\"extraction-method-heading\" ng-class=\"{'selected': extractionMethod.selected}\" guide-selector=\"query-method-{{extractionMethod.method}}\"> <div class=\"mr-0 extraction-method-toggle\"> <input type=\"checkbox\" id=\"{{extractionMethod.method + '_checkbox'}}\" guide-selector=\"query-method-{{extractionMethod.method}}-input\" name=\"{{extractionMethod.method}}\" class=\"switch\" ng-click=\"toggleExtractionMethod(extractionMethod, \\$event)\" ng-model=\"extractionMethod.selected\"/> <label for=\"{{extractionMethod.method + '_checkbox'}}\"></label> </div> <a class=\"btn btn-link panel-toggle-link\" aria-expanded=\"false\" aria-controls=\"{{extractionMethod.method + '_method_content'}}\" ng-click=\"onExtractionMethodPanelToggle(extractionMethod)\"> <span class=\"mr-1\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.' + extractionMethod.method + '.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.' + extractionMethod.method + '.label' | translate}}</span> <i class=\"fa fa-chevron-down toggle-icon\" ng-class=\"{'expanded': extractionMethod.expanded}\"> </i> </a> </div> <div id=\"{{extractionMethod.method + '_method_content'}}\" class=\"show extraction-method-content\" aria-labelledby=\"{{extractionMethod.method + '_method_heading'}}\" data-parent=\"#extractionMethods\"> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.SPARQL\" class=\"extraction-method-options\" ng-class=\"{'has-error': extractionMethod.selected && !extractionMethod.sparqlOption}\"> <div class=\"sparql-option ontology-graph-option\" guide-selector=\"sparql-ontology-graph-option\"> <label class=\"radio-inline\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.ontology_graph.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <input type=\"radio\" name=\"sparqlOption\" ng-required=\"extractionMethod.selected\" guide-selector=\"sparql-ontology-graph-option-input\" ng-model=\"extractionMethod.sparqlOption\" value=\"ontologyGraph\"> {{'ttyg.agent.create_agent_modal.form.ontology_graph.label' | translate}} </label> <div class=\"panel\" ng-show=\"extractionMethod.sparqlOption === 'ontologyGraph'\"> <div class=\"form-group\"> <input type=\"text\" class=\"form-control\" id=\"ontologyGraph\" guide-selector=\"sparql-ontology-graph-input\" name=\"ontologyGraph\" ng-required=\"extractionMethod.selected && extractionMethod.sparqlOption === 'ontologyGraph'\" ng-model=\"extractionMethod.ontologyGraph\"> </div> </div> </div> <div class=\"sparql-option sparql-query-option\" guide-selector=\"sparql-query-option\"> <label class=\"radio-inline\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.construct_query.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> <input type=\"radio\" name=\"sparqlOption\" ng-required=\"extractionMethod.selected\" guide-selector=\"sparql-query-option-input\" ng-model=\"extractionMethod.sparqlOption\" value=\"sparqlQuery\"> {{'ttyg.agent.create_agent_modal.form.construct_query.label' | translate}} </label> <div class=\"panel\" ng-show=\"extractionMethod.sparqlOption === 'sparqlQuery'\"> <div class=\"form-group\"> <textarea type=\"text\" class=\"form-control\" id=\"sparqlQuery\" guide-selector=\"sparql-query-input\" name=\"sparqlQuery\" rows=\"10\" ng-required=\"extractionMethod.selected && extractionMethod.sparqlOption === 'sparqlQuery'\" ng-minlength=\"extractionMethod.sparqlQuery.minLength\" ng-maxlength=\"extractionMethod.sparqlQuery.maxLength\" ng-model=\"extractionMethod.sparqlQuery.value\">\n </textarea> </div> </div> </div> <div class=\"alert alert-danger sparql-method-option-required-error mb-0\" ng-if=\"extractionMethod.selected && !extractionMethod.sparqlOption\"> {{'ttyg.agent.create_agent_modal.form.sparql_search.required_option' | translate}} </div> <div class=\"add-missing-namespaces-option mt-1\" guide-selector=\"add-missing-namespaces-option\"> <input id=\"addMissingNamespaces\" name=\"addMissingNamespaces\" type=\"checkbox\" guide-selector=\"add-missing-namespaces-input\" ng-model=\"extractionMethod.addMissingNamespaces\"> <label for=\"addMissingNamespaces\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.add_missing_namespaces.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{ 'ttyg.agent.create_agent_modal.form.add_missing_namespaces.label' | translate }}</label> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.FTS_SEARCH\" ng-class=\"{'has-error': agentSettingsForm.\\$error.FTSDisabled || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"checkIfFTSEnabled()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.fts_search.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"!ftsEnabled && agentFormModel.repositoryId\" class=\"fts-disabled-message\" ng-bind-html=\"getFTSDisabledHelpMessage()\"> </div> <div class=\"form-group max-triples\" ng-show=\"ftsEnabled && agentFormModel.repositoryId\"> <label for=\"{{extractionMethods.FTS_SEARCH + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.label' | translate}} </label> <input type=\"number\" class=\"form-control\" guide-selector=\"max-triples-per-call-input\" id=\"{{extractionMethods.FTS_SEARCH + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.fts_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.SIMILARITY\" ng-class=\"{'has-error': agentSettingsForm.\\$error.missingIndex || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"updateSimilaritySearchPanel()\" ng-disabled=\"disabled\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.similarity_index.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"agentFormModel.repositoryId && !similarityIndexes.length\" class=\"no-similarity-index-message\"> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_1' | translate}} <a href=\"\" ng-click=\"goToCreateSimilarityView(\\$event)\"> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_2' | translate}} </a> {{'ttyg.agent.create_agent_modal.form.similarity_index.no_similarity_index.message_3' | translate}}. </div> <div ng-show=\"similarityIndexes.length\"> <div class=\"form-group similarity-index\"> <label for=\"similarityIndex\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_index.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.similarity_index.label' | translate}}</label> <span ng-if=\"extractionMethodLoaderFlags.similarity_search\" onto-loader-fancy size=\"16\"></span> <select class=\"form-control\" id=\"similarityIndex\" name=\"similarityIndex\" guide-selector=\"similarity-index-select\" ng-required=\"extractionMethod.selected\" ng-if=\"!extractionMethodLoaderFlags.similarity_search\" ng-model=\"extractionMethod.similarityIndex\" ng-options=\"similarityIndex.value as similarityIndex.label for similarityIndex in similarityIndexes\"> </select> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.similarityIndex.\\$touched && extractionMethod.similarityIndex.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group similarity-index-threshold\"> <label for=\"similarityIndexThreshold\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_threshold.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.similarity_threshold.label' | translate}}</label> <input type=\"text\" class=\"form-control\" id=\"similarityIndexThreshold\" name=\"similarityIndexThreshold\" readonly=\"readonly\" ng-model=\"extractionMethod.similarityIndexThreshold.value\"> <input id=\"similarityIndexThresholdSlider\" name=\"similarityIndexThreshold\" type=\"range\" ng-required=\"extractionMethod.selected\" min=\"{{extractionMethod.similarityIndexThreshold.minValue}}\" max=\"{{extractionMethod.similarityIndexThreshold.maxValue}}\" step=\"0.1\" ng-model=\"extractionMethod.similarityIndexThreshold.value\"/> </div> <div class=\"form-group similarity-max-triples\"> <label for=\"{{extractionMethods.SIMILARITY + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.label' | translate}}</label> <input type=\"number\" class=\"form-control\" id=\"{{extractionMethods.SIMILARITY + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.similarity_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> </div> <div ng-if=\"extractionMethod.expanded && extractionMethod.method === extractionMethods.RETRIEVAL\" ng-class=\"{'has-error': agentSettingsForm.\\$error.missingConnector || agentSettingsForm.repositoryId.\\$invalid}\" class=\"extraction-method-options\"> <button ng-if=\"agentFormModel.repositoryId\" class=\"btn btn-link btn-sm pull-right\" ng-click=\"updateRetrievalConnectorPanel()\" ng-disabled=\"disabled\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search.btn.reload.tooltip' | translate}}\"> <i class=\"fa fa-arrows-rotate\"></i> </button> <div class=\"alert alert-danger missing-repositoryid-error mb-0\" ng-if=\"agentSettingsForm.repositoryId.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.missing_repository_id' | translate}} </div> <div ng-if=\"agentFormModel.repositoryId && !retrievalConnectors.length\" class=\"no-retrieval-connector-message\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_1' | translate}} <a href=\"\" ng-click=\"goToConnectorsView(\\$event)\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_2' | translate}} </a> {{'ttyg.agent.create_agent_modal.form.retrieval_search.no_retrieval_connectors.message_3' | translate}}. </div> <div ng-show=\"retrievalConnectors.length\"> <div class=\"form-group retrieval-connector\"> <label for=\"retrievalConnectorInstance\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.connector_id.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.connector_id.label' | translate}}</label> <span ng-if=\"extractionMethodLoaderFlags.retrieval_search\" onto-loader-fancy size=\"16\"></span> <select class=\"form-control\" id=\"retrievalConnectorInstance\" name=\"retrievalConnectorInstance\" ng-required=\"extractionMethod.selected\" ng-if=\"!extractionMethodLoaderFlags.retrieval_search\" ng-model=\"extractionMethod.retrievalConnectorInstance\" ng-options=\"retrievalConnector.value as retrievalConnector.label for retrievalConnector in retrievalConnectors\"> </select> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.retrievalConnectorInstance.\\$touched && extractionMethod.retrievalConnectorInstance.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group query-template\"> <label for=\"queryTemplate\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.query_template.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.query_template.label' | translate}}</label> <textarea type=\"text\" class=\"form-control\" id=\"queryTemplate\" name=\"queryTemplate\" rows=\"10\" ng-required=\"extractionMethod.selected\" ng-minlength=\"extractionMethod.queryTemplate.minLength\" ng-maxlength=\"extractionMethod.queryTemplate.maxLength\" ng-model=\"extractionMethod.queryTemplate.value\">\n </textarea> <div class=\"alert alert-danger\" ng-if=\"extractionMethod.name.\\$touched && extractionMethod.name.\\$invalid\"> {{'required.field' | translate}} </div> </div> <div class=\"form-group retrieval-connector-max-triples\"> <label for=\"{{extractionMethods.RETRIEVAL + '_maxNumberOfTriplesPerCall'}}\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.label' | translate}}</label> <input type=\"number\" class=\"form-control\" id=\"{{extractionMethods.RETRIEVAL + '_maxNumberOfTriplesPerCall'}}\" name=\"maxNumberOfTriplesPerCall\" min=\"0\" ng-model=\"extractionMethod.maxNumberOfTriplesPerCall\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.retrieval_search_max_number_of_triples_per_call.placeholder' | translate}}\"> </div> </div> </div> </div> </div> </div> <div class=\"alert alert-danger extraction-method-required-error\" ng-if=\"agentSettingsForm.extractionMethods.\\$touched && agentSettingsForm.extractionMethods.\\$invalid\"> {{'ttyg.agent.create_agent_modal.form.extraction_method.required' | translate}} </div> </div> <div id=\"additionalExtractionMethods\" class=\"form-group additional-extraction-methods\"> <label uib-popover=\"{{'ttyg.agent.create_agent_modal.form.additional_query_methods.tooltip' | translate}}\" popover-trigger=\"mouseenter\"> {{'ttyg.agent.create_agent_modal.form.additional_query_methods.label' | translate}} </label> <div ng-repeat=\"extractionMethod in agentFormModel.additionalExtractionMethods.additionalExtractionMethods\" class=\"additional-extraction-method\"> <div ng-if=\"ExtractionMethodTemplates[extractionMethod.method]\"> <div ng-include=\"'js/angular/ttyg/templates/' + ExtractionMethodTemplates[extractionMethod.method] + '.html'\"></div> </div> </div> </div> <div class=\"form-group user-instructions\"> <div class=\"toolbar\"> <label for=\"userInstruction\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.user_instruction.label' | translate}}</label> <div class=\"actions\"> <copy-to-clipboard tooltip-text=\"ttyg.agent.create_agent_modal.form.user_instruction.btn.copy_instruction.tooltip\" text-to-copy=\"{{agentFormModel.instructions.userInstruction}}\"></copy-to-clipboard> <button class=\"btn btn-link btn-sm create-chat-btn\" ng-click=\"onRestoreDefaultUserInstructions()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.btn.restore_default.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> </div> </div> <textarea type=\"text\" class=\"form-control\" id=\"userInstruction\" name=\"userInstruction\" rows=\"5\" guide-selector=\"user-instructions\" ng-model=\"agentFormModel.instructions.userInstruction\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.user_instruction.placeholder' | translate}}\">\n </textarea> </div> <div class=\"text-xs-center\"> <button type=\"button\" ng-click=\"showAdvancedSettings = !showAdvancedSettings\" class=\"btn btn-link btn-sm toggle-advanced-settings\"> <span ng-hide=\"showAdvancedSettings\">{{'ttyg.agent.create_agent_modal.advanced_settings.show' | translate}}<em class=\"icon-caret-down\"></em></span> <span ng-show=\"showAdvancedSettings\">{{'ttyg.agent.create_agent_modal.advanced_settings.hide' | translate}}<em class=\"icon-caret-up\"></em></span> </button> </div> <div ng-show=\"showAdvancedSettings\" class=\"advanced-settings\"> <div class=\"form-group system-instructions\"> <div class=\"toolbar\"> <label for=\"systemInstruction\"> <span uib-popover=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.tooltip' | translate}}\" popover-trigger=\"mouseenter\">{{'ttyg.agent.create_agent_modal.form.system_instruction.label' | translate}}</span> <i class=\"fa fa-triangle-exclamation text-warning overriding-system-instructions-warning\" ng-if=\"showSystemInstructionWarning\" uib-popover=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body' | translate}}\" popover-trigger=\"mouseenter\"></i> </label> <div class=\"actions\"> <copy-to-clipboard tooltip-text=\"ttyg.agent.create_agent_modal.form.system_instruction.btn.copy_instruction.tooltip\" text-to-copy=\"{{agentFormModel.instructions.systemInstruction}}\"></copy-to-clipboard> <button class=\"btn btn-link btn-sm create-chat-btn\" ng-click=\"onRestoreDefaultSystemInstructions()\" gdb-tooltip=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.btn.restore_default.tooltip' | translate}}\"> <i class=\"fa fa-arrow-rotate-left\"></i> </button> </div> </div> <textarea type=\"text\" class=\"form-control\" id=\"systemInstruction\" name=\"systemInstruction\" rows=\"5\" placeholder=\"{{'ttyg.agent.create_agent_modal.form.system_instruction.placeholder' | translate}}\" ng-class=\"{'has-warning': showSystemInstructionWarning}\" ng-model=\"agentFormModel.instructions.systemInstruction\" ng-change=\"onSystemInstructionChange()\">\n </textarea> </div> </div> </form> </div> <div class=\"modal-footer\"> <button type=\"button\" ng-click=\"onExplainAgentSettings()\" class=\"btn explain-agent-settings-btn\"> {{'ttyg.agent.create_agent_modal.btn.explain_settings.label' | translate}} </button> <div> <button type=\"button\" ng-click=\"cancel()\" class=\"btn cancel-btn\"> {{'ttyg.agent.create_agent_modal.btn.cancel.label' | translate}} </button> <button type=\"button\" ng-click=\"ok()\" ng-disabled=\"agentSettingsForm.\\$invalid || savingAgent\" guide-selector=\"save-agent-settings\" class=\"btn btn-primary save-agent-settings-btn\"> <span>{{(operation === AGENT_OPERATION.EDIT ? 'ttyg.agent.create_agent_modal.btn.save.label' : operation === AGENT_OPERATION.CLONE ? 'ttyg.agent.create_agent_modal.btn.save.label' : 'ttyg.agent.create_agent_modal.btn.create.label') | translate}}</span> <span class=\"saving-agent-loader\" ng-if=\"savingAgent\" onto-loader-fancy hide-message=\"true\" size=\"15\"></span> </button> </div> </div> `;\n// Exports\nexport default code;"],"names":[],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_id__=82926;export const __webpack_ids__=[82926];export const __webpack_modules__={82926:()=>{function t(){return{link:function(t,e,o){t.$watch("file.status",function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.2.0-
|
|
2
|
-
//# sourceMappingURL=82926.
|
|
1
|
+
export const __webpack_id__=82926;export const __webpack_ids__=[82926];export const __webpack_modules__={82926:()=>{function t(){return{link:function(t,e,o){t.$watch("file.status",function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.2.0-TR3">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",t),t.$inject=[]}};
|
|
2
|
+
//# sourceMappingURL=82926.0cb2c4faf483e67f5e7f.bundle.js.map
|
package/dist/{82926.93a59d42bf8d49aaac8e.bundle.js.map → 82926.0cb2c4faf483e67f5e7f.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"82926.
|
|
1
|
+
{"version":3,"file":"82926.0cb2c4faf483e67f5e7f.bundle.js","mappings":"oHASA,SAASA,IACL,MAAO,CACHC,KAAM,SAAUC,EAAOC,EAASC,GAC5BF,EAAMG,OAAO,cAAe,WACE,cAAtBH,EAAMI,KAAKC,QAAgD,cAAtBL,EAAMI,KAAKC,SAC3CC,EAAEL,GAASM,IAAI,UAAUC,OAAS,GACnCF,EAAEL,GAASQ,OAAO,kBAAoBP,EAAKQ,KAAO,aAAeR,EAAKQ,KAAO,6GAGzF,EACJ,EAER,CAnBAC,QACKC,OAAO,gEAHI,IAIXC,UAAU,0BAA2Bf,GAE1CA,EAAwBgB,QAAU,E","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-progress-indicator.directive.js"],"sourcesContent":["const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-progress-indicator', modules)\n .directive('ImportProgressIndicator', ImportProgressIndicator);\n\nImportProgressIndicator.$inject = [];\n\n// importDirectives.directive('filesOntoLoader',\nfunction ImportProgressIndicator() {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=3.2.0-TR3\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n}\n"],"names":["ImportProgressIndicator","link","scope","element","attr","$watch","file","status","$","has","length","append","size","angular","module","directive","$inject"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_id__=85609;export const __webpack_ids__=[19402,36633,45458,63415,85609,85788];export const __webpack_modules__={19402:(t,s,e)=>{e.r(s),e.d(s,{ChatByDayModel:()=>n,ChatModel:()=>h,ChatsListModel:()=>r});var a=e(63415),i=e(93135);class h{static getNewChat(){const t={name:"· · ·",timestamp:Math.floor(Date.now()/1e3),new:!0};return new h(t,(0,i.md5HashGenerator)())}constructor(t,s){this.hashGenerator=s,this._id=t.id,this._name=t.name,this._timestamp=t.timestamp,this._chatHistory=t.chatHistory||new a.ChatItemsListModel,this._new=void 0!==t.new&&t.new,this.hash=this.generateHash()}isNew(){return this._new}set new(t){this._new=t}generateHash(){return this.hashGenerator(JSON.stringify(this))}get id(){return this._id}set id(t){this._id=t}get name(){return this._name}set name(t){this.generateHash(),this._name=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chatHistory(){return this._chatHistory}set chatHistory(t){this._chatHistory=t||new a.ChatItemsListModel}toRenameRequestPayload(){return{name:this._name}}}class n{constructor(t){this._day=t.day,this._timestamp=t.timestamp,this._chats=t.chats}get day(){return this._day}set day(t){this._day=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get chats(){return this._chats}set chats(t){this._chats=t}}class r{constructor(t){this._chats=t||[],this._chatsByDay=[],this.sortByTime(),this.updateChatsByDay()}containsNewChats(){return this._chats.some(t=>t.isNew())}sortByTime(){this._chats.sort((t,s)=>s.timestamp-t.timestamp)}updateChatTimestamp(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.timestamp=s,this.sortByTime(),this.updateChatsByDay())}setChatAsOld(t){const s=this._chats.find(s=>s.id===t);s&&(s.new=!1)}updateChatName(t,s){const e=this._chats.find(s=>s.id===t);e&&(e.name=s)}deleteChat(t){this._chats=this._chats.filter(s=>s.id!==t.id),this.sortByTime(),this.updateChatsByDay()}updateChatsByDay(){this._chatsByDay=[],this._chats.forEach(t=>{const s=new Date(1e3*t.timestamp).toDateString(),e=this._chatsByDay.find(t=>t.day===s);e?e.chats.push(t):this._chatsByDay.push(new n({day:s,timestamp:1e3*t.timestamp,chats:[t]}))})}appendChat(t){this._chats.push(t),this.sortByTime(),this.updateChatsByDay()}replaceChat(t,s){this._chats=this._chats.map(e=>e.id===s.id?t:e),this.sortByTime(),this.updateChatsByDay()}isEmpty(){return 0===this._chats.length}getFirstChat(){return this._chats[0]}deselectAll(){this._chats.forEach(t=>{t.selected=!1})}selectChat(t){this.deselectAll(),this._chats.forEach(s=>{s.selected=s.id===t.id})}getChat(t){return this._chats.find(s=>s.id===t)}getNonPersistedChat(){return this._chats.find(t=>!t.id)}renameChat(t){const s=this._chats.find(s=>s.id===t.id);s&&(s.name=t.name)}get chats(){return this._chats}set chats(t){this._chats=t}get chatsByDay(){return this._chatsByDay}set chatsByDay(t){this._chatsByDay=t}}},36633:(t,s,e)=>{e.r(s),e.d(s,{CHAT_MESSAGE_ROLE:()=>i,ChatMessageModel:()=>a});class a{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp,this.tokenUsageInfo=t.tokenUsageInfo,this._isTerminalState=t.isTerminalState,this._status=t.status}addToChatAnswer(t){t.messages=[this]}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}get isTerminalState(){return this._isTerminalState}set isTerminalState(t){this._isTerminalState=t}get status(){return this._status}set status(t){this._status=t}}const i={USER:"user",ASSISTANT:"assistant"}},45458:(t,s,e)=>{e.r(s),e.d(s,{ChatAnswerModel:()=>a,ContinueChatRun:()=>i});class a{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId,this.tokenUsageInfo=t.tokenUsageInfo}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class i{constructor(t,s){this._chatItem=t,this._runId=s}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,agentId:this._chatItem.agentId,tzOffset:-(new Date).getTimezoneOffset()}}}},63415:(t,s,e)=>{e.r(s),e.d(s,{ChatItemModel:()=>i,ChatItemsListModel:()=>h});var a=e(36633);class i{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 a.ChatMessageModel({role:a.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 h{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]}}},85609:(t,s,e)=>{e.r(s),e.d(s,{chatModelMapper:()=>o,chatsListMapper:()=>m});var a=e(19402),i=e(93135),h=e(85788),n=e(63415);const r=(0,i.md5HashGenerator)(),m=t=>{if(!t)return new a.ChatsListModel;const s=t.map(t=>o(t));return new a.ChatsListModel(s)},o=t=>{if(t)return new a.ChatModel({id:t.id,name:t.name,timestamp:t.timestamp,chatHistory:t.messages&&t.messages.length?(0,h.chatItemsModelMapper)(t.messages):new n.ChatItemsListModel},r)}},85788:(t,s,e)=>{e.r(s),e.d(s,{chatAnswerModelMapper:()=>o,chatItemsModelMapper:()=>r,chatMessageModelListMapper:()=>n,chatMessageModelMapper:()=>m});var a=e(36633),i=e(63415),h=e(45458);const n=t=>t?t.map(t=>m(t)):[],r=(t=[])=>{const s=[];let e;return t.forEach(t=>{const h=t.conversationId;a.CHAT_MESSAGE_ROLE.USER===t.role?(e&&s.push(e),e=new i.ChatItemModel(h,m(t))):(e||(e=new i.ChatItemModel(h,null)),e.answers.push(m(t)),e.agentId=t.agentId)}),e&&s.push(e),new i.ChatItemsListModel(s)},m=t=>{if(t)return new a.ChatMessageModel({id:t.id,role:t.role,message:t.message,timestamp:t.timestamp,tokenUsageInfo:t.usage,data:t,isTerminalState:t.isTerminalState,status:t.terminalStatusCode})},o=t=>{if(t)return new h.ChatAnswerModel({chatId:t.id,chatName:t.name,timestamp:t.timestamp,messages:n(t.messages),continueRunId:t.continueRunId,tokenUsageInfo:t.usage})}}};
|
|
2
|
+
//# sourceMappingURL=85609.68438b4955212d5fcb84.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"85609.68438b4955212d5fcb84.bundle.js","mappings":"2PAGO,MAAMA,EACT,iBAAOC,GACH,MAAMC,EAAO,CACTC,KAAM,QACNC,UAAWC,KAAKC,MAAMC,KAA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AChBe,YAAajB,EAAKqF,UAAYrF,EAAKqF,SAAStB,QAAS8D,EAAAA,EAAAA,sBAAqB7H,EAAKqF,UAAY,IAAInE,EAAAA,oBAChGR,G,4LCzBA,MAAMoH,EAA8B9H,GAClCA,EAGEA,EAAK6D,IAAKkE,GAAgBC,EAAuBD,IAF7C,GAoCFF,EAAuBA,CAAC7H,EAAO,MACxC,MAAMsH,EAAQ,GACd,IAAIW,EAuBJ,OAtBAjI,EAAKoD,QAASyB,IAKV,MAAMjC,EAASiC,EAAQyB,eACnBhB,EAAAA,kBAAkBC,OAASV,EAAQF,MAC/BsD,GACAX,EAAM9D,KAAKyE,GAEfA,EAAc,IAAIvB,EAAAA,cAAc9D,EAAQoF,EAAuBnD,MAE1DoD,IACDA,EAAc,IAAIvB,EAAAA,cAAc9D,EAAQ,OAE5CqF,EAAYlB,QAAQvD,KAAKwE,EAAuBnD,IAChDoD,EAAY1B,QAAU1B,EAAQ0B,WAGlC0B,GACAX,EAAM9D,KAAKyE,GAER,IAAI/G,EAAAA,mBAAmBoG,IAQrBU,EAA0BhI,IACnC,GAAKA,EAGL,OAAO,IAAIyE,EAAAA,iBAAiB,CACxB5D,GAAIb,EAAKa,GACT8D,KAAM3E,EAAK2E,KACXE,QAAS7E,EAAK6E,QACd3E,UAAWF,EAAKE,UAChB4E,eAAgB9E,EAAKkI,MACrBlI,KAAMA,EACNgF,gBAAiBhF,EAAKgF,gBACtBE,OAAQlF,EAAKmI,sBASRC,EAAyBpI,IAClC,GAAKA,EAGL,OAAO,IAAIyF,EAAAA,gBAAgB,CACvB7C,OAAQ5C,EAAKa,GACb+E,SAAU5F,EAAKC,KACfC,UAAWF,EAAKE,UAChBmF,SAAUyC,EAA2B9H,EAAKqF,UAC1CU,cAAe/F,EAAK+F,cACpBjB,eAAgB9E,EAAKkI,Q","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chats.js","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-answer.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-item.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/chats.mapper.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/chat-message.mapper.js"],"sourcesContent":["import {ChatItemsListModel} from \"./chat-item\";\nimport {md5HashGenerator} from \"../../utils/hash-utils\";\n\nexport class ChatModel {\n static getNewChat() {\n const data = {\n name: \"\\u00B7 \\u00B7 \\u00B7\",\n timestamp: Math.floor(Date.now() / 1000),\n new: true\n };\n return new ChatModel(data, md5HashGenerator());\n }\n\n constructor(data, hashGenerator) {\n this.hashGenerator = hashGenerator;\n\n /**\n * @type {string}\n */\n this._id = data.id;\n\n /**\n * @type {string}\n */\n this._name = data.name;\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp;\n\n /**\n * @type {ChatItemsListModel}\n */\n this._chatHistory = data.chatHistory || new ChatItemsListModel();\n this._new = data.new !== undefined ? data.new : false;\n this.hash = this.generateHash();\n }\n\n isNew() {\n return this._new;\n }\n\n set new(value) {\n this._new = value;\n }\n\n generateHash() {\n return this.hashGenerator(JSON.stringify(this));\n }\n\n get id() {\n return this._id;\n }\n\n set id(value) {\n this._id = value;\n }\n\n get name() {\n return this._name;\n }\n\n set name(value) {\n this.generateHash();\n this._name = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get chatHistory() {\n return this._chatHistory;\n }\n\n set chatHistory(value) {\n this._chatHistory = value || new ChatItemsListModel();\n }\n\n /**\n * Converts the instance to a rename chat request payload.\n * This request object contains the new name for renaming the chat.\n *\n * @return {{name: string}} An object representing the rename request payload.\n */\n toRenameRequestPayload() {\n return {name: this._name};\n }\n}\n\nexport class ChatByDayModel {\n constructor(data) {\n this._day = data.day;\n /**\n * @type {number}\n * @private\n */\n this._timestamp = data.timestamp;\n /**\n * @type {ChatModel[]|*}\n * @private\n */\n this._chats = data.chats;\n }\n\n get day() {\n return this._day;\n }\n\n set day(value) {\n this._day = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get chats() {\n return this._chats;\n }\n\n set chats(value) {\n this._chats = value;\n }\n}\n\nexport class ChatsListModel {\n constructor(chats) {\n /**\n * @type {ChatModel[]}\n * @private\n */\n this._chats = chats || [];\n /**\n * @type {ChatByDayModel[]}\n * @private\n */\n this._chatsByDay = [];\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n /**\n * Checks if there is at least one new chat.\n *\n * @returns {boolean} True if any chat is marked as new, otherwise false.\n */\n containsNewChats() {\n return this._chats.some((chat) => chat.isNew());\n }\n\n /**\n * Sorts the list of chats by timestamp in descending order, with the newest items on top.\n */\n sortByTime() {\n this._chats.sort((a, b) => {\n return b.timestamp - a.timestamp;\n });\n }\n\n /**\n * Updates the timestamp of a chat in the list.\n * @param {string} chatId\n * @param {number} timestamp\n */\n updateChatTimestamp(chatId, timestamp) {\n const chat = this._chats.find((c) => c.id === chatId);\n if (chat) {\n chat.timestamp = timestamp;\n this.sortByTime();\n this.updateChatsByDay();\n }\n }\n\n /**\n * Marks the specified chat as no longer new.\n *\n * @param {string} chatId - The ID of the chat to update.\n */\n setChatAsOld(chatId) {\n const chat = this._chats.find((chat) => chat.id === chatId);\n if (chat) {\n chat.new = false;\n }\n }\n\n /**\n * Updates the name of a chat in the list.\n * @param {string} chatId\n * @param {string} name\n */\n updateChatName(chatId, name) {\n const chat = this._chats.find((c) => c.id === chatId);\n if (chat) {\n chat.name = name;\n }\n }\n\n /**\n * Deletes a chat from the chat list.\n * @param {ChatModel} chatToBeDeleted\n */\n deleteChat(chatToBeDeleted) {\n this._chats = this._chats.filter((chat) => chat.id !== chatToBeDeleted.id);\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n updateChatsByDay() {\n this._chatsByDay = [];\n // group chats by day\n this._chats.forEach((chat) => {\n const day = new Date(chat.timestamp * 1000).toDateString();\n const dayModel = this._chatsByDay.find((d) => d.day === day);\n if (dayModel) {\n dayModel.chats.push(chat);\n } else {\n this._chatsByDay.push(new ChatByDayModel({day: day, timestamp: chat.timestamp * 1000, chats: [chat]}));\n }\n });\n }\n\n appendChat(chat) {\n this._chats.push(chat);\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n replaceChat(newChat, oldChat) {\n this._chats = this._chats.map((chat) => {\n if (chat.id === oldChat.id) {\n return newChat;\n }\n return chat;\n });\n this.sortByTime();\n this.updateChatsByDay();\n }\n\n /**\n * Checks if the chat list is empty.\n * @return {boolean}\n */\n isEmpty() {\n return this._chats.length === 0;\n }\n\n /**\n * Returns the first chat from the list.\n * @return {ChatModel|undefined}\n */\n getFirstChat() {\n return this._chats[0];\n }\n\n /**\n * Deselects all chats.\n */\n deselectAll() {\n this._chats.forEach((c) => {\n c.selected = false;\n });\n }\n\n /**\n * Selects a chat.\n * @param {ChatModel} chat\n */\n selectChat(chat) {\n this.deselectAll();\n this._chats.forEach((c) => {\n c.selected = c.id === chat.id;\n });\n }\n\n getChat(id) {\n return this._chats.find((c) => c.id === id);\n }\n\n getNonPersistedChat() {\n return this._chats.find((chat) => !chat.id);\n }\n\n renameChat(renamedChat) {\n const chat = this._chats.find((c) => c.id === renamedChat.id);\n if (chat) {\n chat.name = renamedChat.name;\n }\n }\n\n /**\n * @return {ChatModel[]}\n */\n get chats() {\n return this._chats;\n }\n\n /**\n * @param {ChatModel[]} value\n */\n set chats(value) {\n this._chats = value;\n }\n\n get chatsByDay() {\n return this._chatsByDay;\n }\n\n set chatsByDay(value) {\n this._chatsByDay = value;\n }\n}\n","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 * If the message was terminated via the Abort button\n * @type {boolean}\n */\n this._isTerminalState = data.isTerminalState;\n\n /**\n * Reason for cancellation.\n * @private {string}\n */\n this._status = data.status\n }\n\n /**\n * Updates the chatAnswer.messages array with this message instance.\n * @param {ChatAnswerModel} chatAnswer - The answer object containing the messages.\n */\n addToChatAnswer(chatAnswer) {\n chatAnswer.messages = [this];\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 get isTerminalState() {\n return this._isTerminalState;\n }\n\n set isTerminalState(value) {\n this._isTerminalState = value;\n }\n\n get status() {\n return this._status;\n }\n\n set status(value) {\n this._status = value;\n }\n}\n\nexport const CHAT_MESSAGE_ROLE = {\n USER: 'user',\n ASSISTANT: 'assistant'\n};\n","export class ChatAnswerModel {\n constructor(data = {}) {\n /**\n * @type {string | undefined}\n */\n this._chatId = data.chatId;\n\n /**\n * @type {string}\n */\n this._chatName = data.chatName || '';\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp;\n\n /**\n * @type {ChatMessageModel[]}\n */\n this._messages = data.messages || [];\n\n /**\n * @type {string}\n */\n this._continueRunId = data.continueRunId;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get chatName() {\n return this._chatName;\n }\n\n set chatName(value) {\n this._chatName = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get messages() {\n return this._messages;\n }\n\n set messages(value) {\n this._messages = value;\n }\n\n get continueRunId() {\n return this._continueRunId;\n }\n\n set continueRunId(value) {\n this._continueRunId = value;\n }\n}\n\n/**\n * Represents information on continuing the chat run, i.e., fetching answers iteratively after\n * asking until the last answer is received.\n */\nexport class ContinueChatRun {\n constructor(chatItem, runId) {\n this._chatItem = chatItem;\n this._runId = runId;\n }\n\n get chatId() {\n return this._chatItem.chatId;\n }\n\n toContinueRunRequestPayload() {\n return {\n conversationId: this.chatId,\n runId: this._runId,\n agentId: this._chatItem.agentId,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\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","import {ChatsListModel, ChatModel} from \"../../models/ttyg/chats\";\nimport {md5HashGenerator} from \"../../utils/hash-utils\";\nimport {chatItemsModelMapper} from \"./chat-message.mapper\";\nimport {ChatItemsListModel} from \"../../models/ttyg/chat-item\";\n\nconst hashGenerator = md5HashGenerator();\n\n/**\n * Converts the response from the server to a list of ChatModels.\n * @param {*[]} data\n * @return {ChatsListModel}\n */\nexport const chatsListMapper = (data) => {\n if (!data) {\n return new ChatsListModel();\n }\n const chatModels = data.map((chat) => chatModelMapper(chat));\n return new ChatsListModel(chatModels);\n};\n\n/**\n * Converts the response from the server to a ChatModel.\n * @param {*} data\n * @return {ChatModel|undefined}\n */\nexport const chatModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatModel({\n id: data.id,\n name: data.name,\n timestamp: data.timestamp,\n chatHistory: data.messages && data.messages.length ? chatItemsModelMapper(data.messages) : new ChatItemsListModel()\n }, hashGenerator);\n};\n","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"../../models/ttyg/chat-message\";\nimport {ChatItemModel, ChatItemsListModel} from \"../../models/ttyg/chat-item\";\nimport {ChatAnswerModel} from \"../../models/ttyg/chat-answer\";\n\n/**\n * Converts the response from the server to a list of ChatMessageModel array.\n * @param {*[]} data\n * @return {ChatMessageModel[]}\n */\nexport const chatMessageModelListMapper = (data) => {\n if (!data) {\n return [];\n }\n return data.map((chatMessage) => chatMessageModelMapper(chatMessage));\n};\n\n/**\n * Maps a list of chat messages into an instance of {@see ChatItemsListModel}, which contains a list of `ChatItemModel` objects. Each object represents a question (from the user) and its corresponding answer (from the agent).\n * The backend returns messages as individual entries, and this function transforms those entries into objects that pair each question with its answer.\n *\n * @param {Array<Object>} data - An array of message objects, where each message contains details such as the role (user or assistant) and the message content.\n * @return {ChatItemsListModel} An instance of `ChatItemsListModel` containing a list of `ChatItemModel` objects, where each object holds a question and its corresponding answer.\n *\n * @example\n * // Example message data from the backend\n * const data = [\n * { role: 'user', conversationId: '123', agentId: 'agent-1', message: 'What is the weather?', timestamp: 1628876583 },\n * { role: 'assistant', conversationId: '123', agentId: 'agent-1', message: 'The weather is sunny.', timestamp: 1628876590 }\n * ];\n *\n * // Example of the resulting ChatItemsListModel array\n * const items = [\n * {\n * conversationId: '123',\n * agentId: 'agent-1',\n * question: {\n * role: 'user',\n * message: 'What is the weather?',\n * timestamp: 1628876583\n * },\n * answer: {\n * role: 'assistant',\n * message: 'The weather is sunny.',\n * timestamp: 1628876590\n * }\n * }]\n */\nexport const chatItemsModelMapper = (data = []) => {\n const items = [];\n let currentItem;\n data.forEach((message) => {\n // NOTE: The backend chat model doesn't have a ChatItemModel object,\n // i.e. it doesn't group user + assistant messages together.\n // In essence, there may be multiple consecutive user messages as well as\n // multiple consecutive assistant messages.\n const chatId = message.conversationId;\n if (CHAT_MESSAGE_ROLE.USER === message.role) {\n if (currentItem) {\n items.push(currentItem);\n }\n currentItem = new ChatItemModel(chatId, chatMessageModelMapper(message));\n } else {\n if (!currentItem) {\n currentItem = new ChatItemModel(chatId, null);\n }\n currentItem.answers.push(chatMessageModelMapper(message));\n currentItem.agentId = message.agentId;\n }\n });\n if (currentItem) {\n items.push(currentItem);\n }\n return new ChatItemsListModel(items);\n};\n\n/**\n * Converts the response from the server to a ChatMessageModel.\n * @param {*} data\n * @return {ChatMessageModel|undefined}\n */\nexport const chatMessageModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatMessageModel({\n id: data.id,\n role: data.role,\n message: data.message,\n timestamp: data.timestamp,\n tokenUsageInfo: data.usage,\n data: data,\n isTerminalState: data.isTerminalState,\n status: data.terminalStatusCode\n });\n};\n\n/**\n * Converts the response from the server to a ChatAnswerModel instance.\n * @param {*} data\n * @return {ChatAnswerModel|undefined}\n */\nexport const chatAnswerModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatAnswerModel({\n chatId: data.id,\n chatName: data.name,\n timestamp: data.timestamp,\n messages: chatMessageModelListMapper(data.messages),\n continueRunId: data.continueRunId,\n tokenUsageInfo: data.usage\n });\n};\n"],"names":["ChatModel","getNewChat","data","name","timestamp","Math","floor","Date","now","new","md5HashGenerator","constructor","hashGenerator","this","_id","id","_name","_timestamp","_chatHistory","chatHistory","ChatItemsListModel","_new","undefined","hash","generateHash","isNew","value","JSON","stringify","toRenameRequestPayload","ChatByDayModel","_day","day","_chats","chats","ChatsListModel","_chatsByDay","sortByTime","updateChatsByDay","containsNewChats","some","chat","sort","a","b","updateChatTimestamp","chatId","find","c","setChatAsOld","updateChatName","deleteChat","chatToBeDeleted","filter","forEach","toDateString","dayModel","d","push","appendChat","replaceChat","newChat","oldChat","map","isEmpty","length","getFirstChat","deselectAll","selected","selectChat","getChat","getNonPersistedChat","renameChat","renamedChat","chatsByDay","ChatMessageModel","_role","role","_message","message","tokenUsageInfo","_isTerminalState","isTerminalState","_status","status","addToChatAnswer","chatAnswer","messages","CHAT_MESSAGE_ROLE","USER","ASSISTANT","ChatAnswerModel","_chatId","_chatName","chatName","_messages","_continueRunId","continueRunId","ContinueChatRun","chatItem","runId","_chatItem","_runId","toContinueRunRequestPayload","conversationId","agentId","tzOffset","getTimezoneOffset","ChatItemModel","question","_agentId","_question","_answers","answers","setQuestionMessage","getQuestionMessage","toCreateChatRequestPayload","toAskRequestPayload","toExplainResponsePayload","answerId","items","_items","appendItem","getLast","chatsListMapper","chatModels","chatModelMapper","chatItemsModelMapper","chatMessageModelListMapper","chatMessage","chatMessageModelMapper","currentItem","usage","terminalStatusCode","chatAnswerModelMapper"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_id__=85788;export const __webpack_ids__=[36633,45458,63415,85788];export const __webpack_modules__={36633:(t,e,s)=>{s.r(e),s.d(e,{CHAT_MESSAGE_ROLE:()=>i,ChatMessageModel:()=>a});class a{constructor(t){this._id=t.id,this._role=t.role,this._message=t.message,this._timestamp=1e3*t.timestamp,this.tokenUsageInfo=t.tokenUsageInfo,this._isTerminalState=t.isTerminalState,this._status=t.status}addToChatAnswer(t){t.messages=[this]}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}get isTerminalState(){return this._isTerminalState}set isTerminalState(t){this._isTerminalState=t}get status(){return this._status}set status(t){this._status=t}}const i={USER:"user",ASSISTANT:"assistant"}},45458:(t,e,s)=>{s.r(e),s.d(e,{ChatAnswerModel:()=>a,ContinueChatRun:()=>i});class a{constructor(t={}){this._chatId=t.chatId,this._chatName=t.chatName||"",this._timestamp=t.timestamp,this._messages=t.messages||[],this._continueRunId=t.continueRunId,this.tokenUsageInfo=t.tokenUsageInfo}get chatId(){return this._chatId}set chatId(t){this._chatId=t}get chatName(){return this._chatName}set chatName(t){this._chatName=t}get timestamp(){return this._timestamp}set timestamp(t){this._timestamp=t}get messages(){return this._messages}set messages(t){this._messages=t}get continueRunId(){return this._continueRunId}set continueRunId(t){this._continueRunId=t}}class i{constructor(t,e){this._chatItem=t,this._runId=e}get chatId(){return this._chatItem.chatId}toContinueRunRequestPayload(){return{conversationId:this.chatId,runId:this._runId,agentId:this._chatItem.agentId,tzOffset:-(new Date).getTimezoneOffset()}}}},63415:(t,e,s)=>{s.r(e),s.d(e,{ChatItemModel:()=>i,ChatItemsListModel:()=>n});var a=s(36633);class i{constructor(t,e){this._chatId=t,this._agentId=void 0,this._question=e,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 a.ChatMessageModel({role:a.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]}}},85788:(t,e,s)=>{s.r(e),s.d(e,{chatAnswerModelMapper:()=>m,chatItemsModelMapper:()=>r,chatMessageModelListMapper:()=>h,chatMessageModelMapper:()=>o});var a=s(36633),i=s(63415),n=s(45458);const h=t=>t?t.map(t=>o(t)):[],r=(t=[])=>{const e=[];let s;return t.forEach(t=>{const n=t.conversationId;a.CHAT_MESSAGE_ROLE.USER===t.role?(s&&e.push(s),s=new i.ChatItemModel(n,o(t))):(s||(s=new i.ChatItemModel(n,null)),s.answers.push(o(t)),s.agentId=t.agentId)}),s&&e.push(s),new i.ChatItemsListModel(e)},o=t=>{if(t)return new a.ChatMessageModel({id:t.id,role:t.role,message:t.message,timestamp:t.timestamp,tokenUsageInfo:t.usage,data:t,isTerminalState:t.isTerminalState,status:t.terminalStatusCode})},m=t=>{if(t)return new n.ChatAnswerModel({chatId:t.id,chatName:t.name,timestamp:t.timestamp,messages:h(t.messages),continueRunId:t.continueRunId,tokenUsageInfo:t.usage})}}};
|
|
2
|
+
//# sourceMappingURL=85788.501c7244b890d519f8cf.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"85788.501c7244b890d519f8cf.bundle.js","mappings":"0MAAO,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,eAM3BT,KAAKU,iBAAmBX,EAAKY,gBAM7BX,KAAKY,QAAUb,EAAKc,MACxB,CAMAC,eAAAA,CAAgBC,GACZA,EAAWC,SAAW,CAAChB,KAC3B,CAEA,MAAIE,GACA,OAAOF,KAAKC,GAChB,CAEA,MAAIC,CAAGe,GACHjB,KAAKC,IAAMgB,CACf,CAEA,QAAIb,GACA,OAAOJ,KAAKG,KAChB,CAEA,QAAIC,CAAKa,GACLjB,KAAKG,MAAQc,CACjB,CAEA,WAAIX,GACA,OAAON,KAAKK,QAChB,CAEA,WAAIC,CAAQW,GACRjB,KAAKK,SAAWY,CACpB,CAEA,aAAIT,GACA,OAAOR,KAAKO,UAChB,CAEA,aAAIC,CAAUS,GACVjB,KAAKO,WAAaU,CACtB,CAEA,mBAAIN,GACA,OAAOX,KAAKU,gBAChB,CAEA,mBAAIC,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,SAAID,CAAMrC,GACNjB,KAAKuD,OAAStC,GAAS,EAC3B,CAEA2C,OAAAA,GACI,IAAK5D,KAAKwD,UACN,OAAOxD,KAAKuD,OAAOvD,KAAKuD,OAAOE,OAAS,EAEhD,E,4LC7JG,MAAMI,EAA8B9D,GAClCA,EAGEA,EAAK+D,IAAKC,GAAgBC,EAAuBD,IAF7C,GAoCFE,EAAuBA,CAAClE,EAAO,MACxC,MAAMuD,EAAQ,GACd,IAAIY,EAuBJ,OAtBAnE,EAAKoE,QAAS7D,IAKV,MAAMiB,EAASjB,EAAQ6B,eACnBjB,EAAAA,kBAAkBC,OAASb,EAAQF,MAC/B8D,GACAZ,EAAMK,KAAKO,GAEfA,EAAc,IAAI1B,EAAAA,cAAcjB,EAAQyC,EAAuB1D,MAE1D4D,IACDA,EAAc,IAAI1B,EAAAA,cAAcjB,EAAQ,OAE5C2C,EAAYpB,QAAQa,KAAKK,EAAuB1D,IAChD4D,EAAY9B,QAAU9B,EAAQ8B,WAGlC8B,GACAZ,EAAMK,KAAKO,GAER,IAAIb,EAAAA,mBAAmBC,IAQrBU,EAA0BjE,IACnC,GAAKA,EAGL,OAAO,IAAIF,EAAAA,iBAAiB,CACxBK,GAAIH,EAAKG,GACTE,KAAML,EAAKK,KACXE,QAASP,EAAKO,QACdE,UAAWT,EAAKS,UAChBC,eAAgBV,EAAKqE,MACrBrE,KAAMA,EACNY,gBAAiBZ,EAAKY,gBACtBE,OAAQd,EAAKsE,sBASRC,EAAyBvE,IAClC,GAAKA,EAGL,OAAO,IAAIsB,EAAAA,gBAAgB,CACvBE,OAAQxB,EAAKG,GACbuB,SAAU1B,EAAKwE,KACf/D,UAAWT,EAAKS,UAChBQ,SAAU6C,EAA2B9D,EAAKiB,UAC1CY,cAAe7B,EAAK6B,cACpBnB,eAAgBV,EAAKqE,Q","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-answer.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ttyg/chat-item.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/chat-message.mapper.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 * If the message was terminated via the Abort button\n * @type {boolean}\n */\n this._isTerminalState = data.isTerminalState;\n\n /**\n * Reason for cancellation.\n * @private {string}\n */\n this._status = data.status\n }\n\n /**\n * Updates the chatAnswer.messages array with this message instance.\n * @param {ChatAnswerModel} chatAnswer - The answer object containing the messages.\n */\n addToChatAnswer(chatAnswer) {\n chatAnswer.messages = [this];\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 get isTerminalState() {\n return this._isTerminalState;\n }\n\n set isTerminalState(value) {\n this._isTerminalState = value;\n }\n\n get status() {\n return this._status;\n }\n\n set status(value) {\n this._status = value;\n }\n}\n\nexport const CHAT_MESSAGE_ROLE = {\n USER: 'user',\n ASSISTANT: 'assistant'\n};\n","export class ChatAnswerModel {\n constructor(data = {}) {\n /**\n * @type {string | undefined}\n */\n this._chatId = data.chatId;\n\n /**\n * @type {string}\n */\n this._chatName = data.chatName || '';\n\n /**\n * @type {number}\n */\n this._timestamp = data.timestamp;\n\n /**\n * @type {ChatMessageModel[]}\n */\n this._messages = data.messages || [];\n\n /**\n * @type {string}\n */\n this._continueRunId = data.continueRunId;\n\n /**\n * Holds information about the number of tokens used for this answer, including prompt and completion tokens.\n *\n * @type {TokenUsageInfo}\n */\n this.tokenUsageInfo = data.tokenUsageInfo;\n }\n\n get chatId() {\n return this._chatId;\n }\n\n set chatId(value) {\n this._chatId = value;\n }\n\n get chatName() {\n return this._chatName;\n }\n\n set chatName(value) {\n this._chatName = value;\n }\n\n get timestamp() {\n return this._timestamp;\n }\n\n set timestamp(value) {\n this._timestamp = value;\n }\n\n get messages() {\n return this._messages;\n }\n\n set messages(value) {\n this._messages = value;\n }\n\n get continueRunId() {\n return this._continueRunId;\n }\n\n set continueRunId(value) {\n this._continueRunId = value;\n }\n}\n\n/**\n * Represents information on continuing the chat run, i.e., fetching answers iteratively after\n * asking until the last answer is received.\n */\nexport class ContinueChatRun {\n constructor(chatItem, runId) {\n this._chatItem = chatItem;\n this._runId = runId;\n }\n\n get chatId() {\n return this._chatItem.chatId;\n }\n\n toContinueRunRequestPayload() {\n return {\n conversationId: this.chatId,\n runId: this._runId,\n agentId: this._chatItem.agentId,\n tzOffset: -new Date().getTimezoneOffset() // offsets are reversed here hence the minus\n };\n }\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","import {CHAT_MESSAGE_ROLE, ChatMessageModel} from \"../../models/ttyg/chat-message\";\nimport {ChatItemModel, ChatItemsListModel} from \"../../models/ttyg/chat-item\";\nimport {ChatAnswerModel} from \"../../models/ttyg/chat-answer\";\n\n/**\n * Converts the response from the server to a list of ChatMessageModel array.\n * @param {*[]} data\n * @return {ChatMessageModel[]}\n */\nexport const chatMessageModelListMapper = (data) => {\n if (!data) {\n return [];\n }\n return data.map((chatMessage) => chatMessageModelMapper(chatMessage));\n};\n\n/**\n * Maps a list of chat messages into an instance of {@see ChatItemsListModel}, which contains a list of `ChatItemModel` objects. Each object represents a question (from the user) and its corresponding answer (from the agent).\n * The backend returns messages as individual entries, and this function transforms those entries into objects that pair each question with its answer.\n *\n * @param {Array<Object>} data - An array of message objects, where each message contains details such as the role (user or assistant) and the message content.\n * @return {ChatItemsListModel} An instance of `ChatItemsListModel` containing a list of `ChatItemModel` objects, where each object holds a question and its corresponding answer.\n *\n * @example\n * // Example message data from the backend\n * const data = [\n * { role: 'user', conversationId: '123', agentId: 'agent-1', message: 'What is the weather?', timestamp: 1628876583 },\n * { role: 'assistant', conversationId: '123', agentId: 'agent-1', message: 'The weather is sunny.', timestamp: 1628876590 }\n * ];\n *\n * // Example of the resulting ChatItemsListModel array\n * const items = [\n * {\n * conversationId: '123',\n * agentId: 'agent-1',\n * question: {\n * role: 'user',\n * message: 'What is the weather?',\n * timestamp: 1628876583\n * },\n * answer: {\n * role: 'assistant',\n * message: 'The weather is sunny.',\n * timestamp: 1628876590\n * }\n * }]\n */\nexport const chatItemsModelMapper = (data = []) => {\n const items = [];\n let currentItem;\n data.forEach((message) => {\n // NOTE: The backend chat model doesn't have a ChatItemModel object,\n // i.e. it doesn't group user + assistant messages together.\n // In essence, there may be multiple consecutive user messages as well as\n // multiple consecutive assistant messages.\n const chatId = message.conversationId;\n if (CHAT_MESSAGE_ROLE.USER === message.role) {\n if (currentItem) {\n items.push(currentItem);\n }\n currentItem = new ChatItemModel(chatId, chatMessageModelMapper(message));\n } else {\n if (!currentItem) {\n currentItem = new ChatItemModel(chatId, null);\n }\n currentItem.answers.push(chatMessageModelMapper(message));\n currentItem.agentId = message.agentId;\n }\n });\n if (currentItem) {\n items.push(currentItem);\n }\n return new ChatItemsListModel(items);\n};\n\n/**\n * Converts the response from the server to a ChatMessageModel.\n * @param {*} data\n * @return {ChatMessageModel|undefined}\n */\nexport const chatMessageModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatMessageModel({\n id: data.id,\n role: data.role,\n message: data.message,\n timestamp: data.timestamp,\n tokenUsageInfo: data.usage,\n data: data,\n isTerminalState: data.isTerminalState,\n status: data.terminalStatusCode\n });\n};\n\n/**\n * Converts the response from the server to a ChatAnswerModel instance.\n * @param {*} data\n * @return {ChatAnswerModel|undefined}\n */\nexport const chatAnswerModelMapper = (data) => {\n if (!data) {\n return;\n }\n return new ChatAnswerModel({\n chatId: data.id,\n chatName: data.name,\n timestamp: data.timestamp,\n messages: chatMessageModelListMapper(data.messages),\n continueRunId: data.continueRunId,\n tokenUsageInfo: data.usage\n });\n};\n"],"names":["ChatMessageModel","constructor","data","this","_id","id","_role","role","_message","message","_timestamp","timestamp","tokenUsageInfo","_isTerminalState","isTerminalState","_status","status","addToChatAnswer","chatAnswer","messages","value","CHAT_MESSAGE_ROLE","USER","ASSISTANT","ChatAnswerModel","_chatId","chatId","_chatName","chatName","_messages","_continueRunId","continueRunId","ContinueChatRun","chatItem","runId","_chatItem","_runId","toContinueRunRequestPayload","conversationId","agentId","tzOffset","Date","getTimezoneOffset","ChatItemModel","question","_agentId","undefined","_question","_answers","answers","setQuestionMessage","getQuestionMessage","toCreateChatRequestPayload","toAskRequestPayload","toExplainResponsePayload","answerId","ChatItemsListModel","items","_items","isEmpty","length","appendItem","push","getLast","chatMessageModelListMapper","map","chatMessage","chatMessageModelMapper","chatItemsModelMapper","currentItem","forEach","usage","terminalStatusCode","chatAnswerModelMapper","name"],"sourceRoot":""}
|