graphdb-workbench 3.3.2-TR1 → 3.3.3-TR1
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/13231.8bbbe30c10e6c0dfdba3.bundle.js +2 -0
- package/dist/13231.8bbbe30c10e6c0dfdba3.bundle.js.map +1 -0
- package/dist/{20694.a738f5634ec09369dc85.bundle.js → 20694.4becb7771236462dcc5a.bundle.js} +2 -2
- package/dist/20694.4becb7771236462dcc5a.bundle.js.map +1 -0
- package/dist/21015.6db2b66597f78d4b83cc.bundle.js +2 -0
- package/dist/21015.6db2b66597f78d4b83cc.bundle.js.map +1 -0
- package/dist/2975.c5ebc3e3ad52df3ab907.bundle.js +2 -0
- package/dist/2975.c5ebc3e3ad52df3ab907.bundle.js.map +1 -0
- package/dist/{38644.37a8cd71112da94401d9.bundle.js → 38644.cc471c67239fa24901cc.bundle.js} +2 -2
- package/dist/{38644.37a8cd71112da94401d9.bundle.js.map → 38644.cc471c67239fa24901cc.bundle.js.map} +1 -1
- package/dist/{39518.2871b32c37b20075dba3.bundle.js → 39518.1c641a7dc1c50a526845.bundle.js} +2 -2
- package/dist/{39518.2871b32c37b20075dba3.bundle.js.map → 39518.1c641a7dc1c50a526845.bundle.js.map} +1 -1
- package/dist/39874.710e94f211579215f997.bundle.js +2 -0
- package/dist/39874.710e94f211579215f997.bundle.js.map +1 -0
- package/dist/60560.6ba1b091a34af6c00770.bundle.js +2 -0
- package/dist/60560.6ba1b091a34af6c00770.bundle.js.map +1 -0
- package/dist/{64118.b06aebc9f8d7e822244f.bundle.js → 64118.177457589341de779668.bundle.js} +2 -2
- package/dist/64118.177457589341de779668.bundle.js.map +1 -0
- package/dist/{67888.b75d9678cf65cd82f065.bundle.js → 67888.7224e1b2689d73c4d468.bundle.js} +2 -2
- package/dist/{67888.b75d9678cf65cd82f065.bundle.js.map → 67888.7224e1b2689d73c4d468.bundle.js.map} +1 -1
- package/dist/71099.ba1073458b96d9789756.bundle.js +2 -0
- package/dist/71099.ba1073458b96d9789756.bundle.js.map +1 -0
- package/dist/75881.148ce498d06784abfd6c.bundle.js +2 -0
- package/dist/75881.148ce498d06784abfd6c.bundle.js.map +1 -0
- package/dist/78070.d54ede951a08e1c8689d.bundle.js +2 -0
- package/dist/78070.d54ede951a08e1c8689d.bundle.js.map +1 -0
- package/dist/7815.2aec5ebbcd434f5582ff.bundle.js +2 -0
- package/dist/7815.2aec5ebbcd434f5582ff.bundle.js.map +1 -0
- package/dist/78681.9e1d4e064e9e1fb5fb21.bundle.js +2 -0
- package/dist/78681.9e1d4e064e9e1fb5fb21.bundle.js.map +1 -0
- package/dist/{82926.99231caacc379c66487a.bundle.js → 82926.bbdac6a7e9eb883ae97b.bundle.js} +2 -2
- package/dist/{82926.99231caacc379c66487a.bundle.js.map → 82926.bbdac6a7e9eb883ae97b.bundle.js.map} +1 -1
- package/dist/{94229.47dbdba202106c61dff1.bundle.js → 94229.5a853fae006f6ef633af.bundle.js} +2 -2
- package/dist/94229.5a853fae006f6ef633af.bundle.js.map +1 -0
- package/dist/95953.1350a9dc14b22372b4e2.bundle.js +2 -0
- package/dist/95953.1350a9dc14b22372b4e2.bundle.js.map +1 -0
- package/dist/98268.a1bd17e40ede031a0a00.bundle.js +2 -0
- package/dist/98268.a1bd17e40ede031a0a00.bundle.js.map +1 -0
- package/dist/{99448.272a4ba1ce8032167bea.bundle.js → 99448.b9922814bd15808a9d1c.bundle.js} +2 -2
- package/dist/{99448.272a4ba1ce8032167bea.bundle.js.map → 99448.b9922814bd15808a9d1c.bundle.js.map} +1 -1
- package/dist/api/models/cookie/cookie-options.d.ts +17 -0
- package/dist/api/models/cookie/index.d.ts +1 -1
- package/dist/api/models/security/authenticated-user.d.ts +2 -0
- package/dist/api/models/tracking/cookie-consent.d.ts +39 -0
- package/dist/api/models/tracking/index.d.ts +1 -0
- package/dist/api/models/users/app-settings.d.ts +2 -2
- package/dist/api/ontotext-workbench-api.d.ts +3 -1
- package/dist/api/ontotext-workbench-api.js +1 -1
- package/dist/api/ontotext-workbench-api.js.map +1 -1
- package/dist/api/services/cookie/browser-cookie-store.d.ts +19 -0
- package/dist/api/services/cookie/cookie-builder.d.ts +77 -0
- package/dist/api/services/cookie/cookie-store.d.ts +16 -0
- package/dist/api/services/cookie/cookie.service.d.ts +34 -7
- package/dist/api/services/cookie/error/invalid-cookie-expiration.d.ts +8 -0
- package/dist/api/services/cookie/index.d.ts +3 -0
- package/dist/api/services/cookie/test/cookie-builder.spec.d.ts +1 -0
- package/dist/api/services/cookie/test/in-memory-cookie-store.d.ts +11 -0
- package/dist/api/services/security/auth-strategies/tests/provider-response-mocks.d.ts +2 -2
- package/dist/api/services/security/security-context.service.d.ts +6 -0
- package/dist/api/services/tracking/google-analytics-cookie.service.d.ts +50 -0
- package/dist/api/services/tracking/index.d.ts +4 -0
- package/dist/api/services/tracking/installation-cookie.service.d.ts +37 -0
- package/dist/api/services/tracking/test/tracking-storage.service.spec.d.ts +1 -0
- package/dist/api/services/tracking/test/tracking.service.spec.d.ts +1 -0
- package/dist/api/services/tracking/tracking-storage.service.d.ts +27 -0
- package/dist/api/services/tracking/tracking.service.d.ts +56 -0
- package/dist/api/services/users/response/user-response.d.ts +1 -1
- package/dist/api/services/utils/date-util.d.ts +11 -0
- package/dist/api/services/utils/index.d.ts +1 -0
- package/dist/api/services/window/window.service.d.ts +6 -0
- package/dist/assets/i18n/fr.json +1 -1
- package/dist/index.html +9 -9
- 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 +2 -2
- 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 +2 -2
- 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 +5 -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 +3 -2
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- 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 +3 -3
- 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.4d8a4e8dde83fc9ac427.js +3 -0
- package/dist/{legacyWorkbench.88e1d4d209e51c6f9b65.js.map → legacyWorkbench.4d8a4e8dde83fc9ac427.js.map} +1 -1
- package/dist/license-checker-static.json +0 -7
- package/dist/{main.1be0fc11ab24b99f8800.js → main.14f083264cd64618d96a.js} +3 -3
- package/dist/main.14f083264cd64618d96a.js.map +1 -0
- package/dist/pages/aclmanagement.html +1 -1
- 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/home.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/jdbc.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/sparql-templates.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +4 -3
- package/dist/res/swagger5/index.html +11 -11
- package/dist/res/swagger5/swagger-initializer.js +1 -1
- package/dist/shared-components/cjs/function-utils-WB47AWpR.js +1 -0
- package/dist/shared-components/cjs/loader.cjs.js +1 -1
- package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-dialog_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-footer_5.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-test-context.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/shared-components.cjs.js +1 -1
- package/dist/shared-components/collection/components/dialogs/onto-cookie-policy-dialog/onto-cookie-policy-dialog.js +1 -1
- package/dist/shared-components/collection/components/dialogs/onto-dialog.js +1 -1
- package/dist/shared-components/collection/components/onto-cookie-consent/onto-cookie-consent.css +1 -1
- package/dist/shared-components/collection/components/onto-cookie-consent/onto-cookie-consent.js +1 -1
- package/dist/shared-components/collection/components/onto-footer/onto-footer.js +1 -1
- package/dist/shared-components/esm/function-utils-D1ZpXQQS.js +1 -0
- package/dist/shared-components/esm/loader.js +1 -1
- package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-dialog_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-footer_5.entry.js +1 -1
- package/dist/shared-components/esm/onto-layout.entry.js +1 -1
- package/dist/shared-components/esm/onto-test-context.entry.js +1 -1
- package/dist/shared-components/esm/shared-components.js +1 -1
- package/dist/shared-components/shared-components/{p-279a026b.entry.js → p-5886e663.entry.js} +1 -1
- package/dist/shared-components/shared-components/p-598d33d7.entry.js +1 -0
- package/dist/shared-components/shared-components/p-6d34b2cb.entry.js +1 -0
- package/dist/shared-components/shared-components/p-74888633.entry.js +1 -0
- package/dist/shared-components/shared-components/p-D1ZpXQQS.js +1 -0
- package/dist/shared-components/shared-components/p-b5d4081d.entry.js +1 -0
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/dist/shared-components/types/components/dialogs/onto-cookie-policy-dialog/onto-cookie-policy-dialog.d.ts +31 -7
- package/dist/shared-components/types/components/onto-cookie-consent/onto-cookie-consent.d.ts +2 -2
- package/dist/shared-components/types/components/onto-footer/onto-footer.d.ts +9 -2
- package/dist/shared-components/types/components.d.ts +17 -8
- package/dist/shared-components/types/models/dialog/dialog-handler.d.ts +4 -0
- package/package.json +1 -1
- package/dist/13231.9b625e487e6385faa36f.bundle.js +0 -2
- package/dist/13231.9b625e487e6385faa36f.bundle.js.map +0 -1
- package/dist/20694.a738f5634ec09369dc85.bundle.js.map +0 -1
- package/dist/21015.68c7c667ef64ad8e8e0d.bundle.js +0 -2
- package/dist/21015.68c7c667ef64ad8e8e0d.bundle.js.map +0 -1
- package/dist/2975.8be1a79816fd811be223.bundle.js +0 -2
- package/dist/2975.8be1a79816fd811be223.bundle.js.map +0 -1
- package/dist/39874.47a6948df3520a7bf37a.bundle.js +0 -2
- package/dist/39874.47a6948df3520a7bf37a.bundle.js.map +0 -1
- package/dist/60560.275a89ab1375e91de0aa.bundle.js +0 -2
- package/dist/60560.275a89ab1375e91de0aa.bundle.js.map +0 -1
- package/dist/64118.b06aebc9f8d7e822244f.bundle.js.map +0 -1
- package/dist/71099.ca7720893604e9d908d6.bundle.js +0 -2
- package/dist/71099.ca7720893604e9d908d6.bundle.js.map +0 -1
- package/dist/75881.54dc716f79b6fe29232a.bundle.js +0 -2
- package/dist/75881.54dc716f79b6fe29232a.bundle.js.map +0 -1
- package/dist/78070.13538271878de6a98862.bundle.js +0 -2
- package/dist/78070.13538271878de6a98862.bundle.js.map +0 -1
- package/dist/7815.f09f8d6953d2c964e04d.bundle.js +0 -2
- package/dist/7815.f09f8d6953d2c964e04d.bundle.js.map +0 -1
- package/dist/78681.0cfa1e86d4dac1b7e7e8.bundle.js +0 -2
- package/dist/78681.0cfa1e86d4dac1b7e7e8.bundle.js.map +0 -1
- package/dist/94229.47dbdba202106c61dff1.bundle.js.map +0 -1
- package/dist/95953.ec1b9d5e568d43ec3dcf.bundle.js +0 -2
- package/dist/95953.ec1b9d5e568d43ec3dcf.bundle.js.map +0 -1
- package/dist/98268.86ff371dde616b4e2a76.bundle.js +0 -2
- package/dist/98268.86ff371dde616b4e2a76.bundle.js.map +0 -1
- package/dist/api/models/cookie/cookie-consent.d.ts +0 -14
- package/dist/legacyWorkbench.88e1d4d209e51c6f9b65.js +0 -3
- package/dist/main.1be0fc11ab24b99f8800.js.map +0 -1
- package/dist/shared-components/collection/models/dialog/onto-dialog.js +0 -1
- package/dist/shared-components/shared-components/p-2075209c.entry.js +0 -1
- package/dist/shared-components/shared-components/p-30e4880f.entry.js +0 -1
- package/dist/shared-components/shared-components/p-413b3789.entry.js +0 -1
- package/dist/shared-components/shared-components/p-67199a46.entry.js +0 -1
- package/dist/shared-components/types/models/dialog/onto-dialog.d.ts +0 -4
- /package/dist/{legacyWorkbench.88e1d4d209e51c6f9b65.js.LICENSE.txt → legacyWorkbench.4d8a4e8dde83fc9ac427.js.LICENSE.txt} +0 -0
- /package/dist/{main.1be0fc11ab24b99f8800.js.LICENSE.txt → main.14f083264cd64618d96a.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=95953;export const __webpack_esm_ids__=[40618,62608,65191,95953];export const __webpack_esm_modules__={40618(){angular.module("graphdb.framework.core.directives.multiselect",[]).directive("multiSelectDropdown",function(){return{restrict:"E",scope:{items:"=",placeholder:"@?",onChange:"&?",labelKeys:"=?"},templateUrl:"js/angular/core/directives/multiselect-search/templates/multiselect-search.html",controller:["$scope","$document","$element","$filter","$timeout",function(e,t,o,n,r){e.open=!1,e.search={query:""},e.visibleItems=[];const i=[],a=e=>null===e?"":(""+e).toLowerCase(),s=()=>{const t=Array.isArray(e.items)?e.items:[],o=a(e.search.query);e.visibleItems=o?t.filter(e=>a(e.label).includes(o)):t},l=t=>{e.open&&(o[0].contains(t.target)||e.$applyAsync(function(){e.open=!1}))};e.toggleOpen=function(t){t&&t.stopPropagation(),e.open=!e.open,e.open&&r(function(){const e=o[0].querySelector(".multiselect-search");e&&e.focus()})},e.onKeydownMenu=function(t){"Escape"===t.key&&(e.open=!1,t.stopPropagation(),t.preventDefault(),r(function(){const e=o[0].querySelector(".multiselect-button");e&&e.focus()}))},e.selectedCount=function(){return Array.isArray(e.items)?e.items.filter(e=>e.selected).length:0},e.allFilteredSelected=function(){const t=e.visibleItems||[];return 0!==t.length&&t.every(e=>e.selected)},e.someFilteredSelected=function(){const t=e.visibleItems||[],o=t.some(e=>e.selected),n=t.every(e=>e.selected);return o&&!n},e.toggleSelectAll=function(t){t&&t.stopPropagation();const o=e.visibleItems||[],n=!e.allFilteredSelected();for(const e of o)e.selected=n;e.emitChange()},e.emitChange=function(){if("function"==typeof e.onChange){const t=(e.items||[]).filter(e=>e.selected);e.onChange({selected:t})}},t.on("click",l),i.push(e.$watch("search.query",s),e.$watchCollection("items",s)),e.$on("$destroy",()=>{t.off("click",l);for(const e of i)e()}),s()}]}})},62608(e,t,o){o.d(t,{X:()=>n});const n={SIMILARITY:"similarity",ELASTICSEARCH:"elasticsearch",OPENSEARCH:"opensearch"}},65191(){function e(e,t,o,n,r){e.externalIntegrationConfiguration=r.externalIntegrationConfiguration,e.difyExtension=r.difyExtensionUrl,e.queryMethods=r.queryMethodsUrl,e.agentId=r.agentId,e.agentName=r.agentName,e.close=()=>{t.dismiss({})},e.onCloseExternalIntegrationConfigurationModal=()=>{t.dismiss({})}}angular.module("graphdb.framework.ttyg.controllers.external-integration-configuration-modal",[]).controller("ExternalIntegrationConfigurationModalController",e),e.$inject=["$scope","$uibModalInstance","ModalService","$translate","dialogModel"]},84430(e,t,o){o(65191);var n=o(70826);function r(e,t,o){return{open:function(r){return t.getExternalUrl().then(t=>{const o=function(e,t){return{agentName:e.name,agentId:e.id,queryMethodsUrl:`${t}/rest/llm/tool/ttyg/${e.id}`,difyExtensionUrl:`${t}/rest/llm/ttyg/${e.id}/dify`}}(r,t.data);return e.open({templateUrl:"js/angular/ttyg/templates/modal/external-integration-configuration-modal.html",controller:"ExternalIntegrationConfigurationModalController",windowClass:"external-integration-configuration-modal",backdrop:"static",resolve:{dialogModel:()=>o}}).result.then(()=>{}).catch(()=>{})}).catch(e=>{o.error(getError(e,0,n.LE))})}}}angular.module("graphdb.framework.ttyg.services.externalIntegrationModal",["graphdb.framework.ttyg.controllers.external-integration-configuration-modal"]).factory("ExternalIntegrationModalService",r),r.$inject=["$uibModal","LocationsRestService","toastr"]},95953(e,t,o){var n=o(60529),r=o(28319),i=(o(51682),o(66989),o(36665),o(40618),o(69289),o(17187),o(84430),o(51445)),a=o(71920),s=o(70826),l=o(16135),c=o(76076),d=o(304),g=o(38940),m=o(62608);const u=d.I.logger;function p(e,t,o,d,p,y,h,I,f,v,S,E,M,x,F,_,C,A,T){e.AGENT_OPERATION=s.A1,e.operation=E.operation,e.savingAgent=!1,e.agentFormModel=E.agentFormModel,e.activeRepositoryInfo=E.activeRepositoryInfo,e.extractionMethodLoaderFlags={[r.Ht.SIMILARITY]:!1},e.activeRepositoryList=E.activeRepositoryList,e.extractionMethods=r.Ht,e.additionalExtractionMethods=r.eA,e.ExtractionMethodTemplates=F,e.showAdvancedSettings=!1,e.showHighTemperatureWarning=!1,e.showSystemInstructionWarning=!1,e.retrievalConnectors=[],e.ftsEnabled=!1,e.autocompleteSuggestions=[],e.showContextSize=null!==e.agentFormModel.contextSize,e.vectorFields=[],e.documentationUrlForSimilarity=c.m.getDocumentationUrl(T.productShortVersion,"talk-to-graph.html#prerequisites-and-configuration"),e.similarityOptionsGrouped=[],e.toggleExtractionMethod=t=>{t.expanded=t.selected,e.agentSettingsForm.extractionMethods.$setTouched(),k(),j[t.method](t)},e.onExtractionMethodPanelToggle=e=>{e.toggleCollapse(),j[e.method](e)},e.toggleAdditionalExtractionMethod=t=>{t.expanded=t.selected,e.checkAutocompleteIndexEnabled(),q[t.method](t)},e.onAdditionalExtractionMethodPanelToggle=e=>{e.toggleCollapse(),q[e.method](e)},e.helpInfoForModel={ttygHelpInfo:function(){const e=(0,n.Gz)(S.instant("ttyg.agent.create_agent_modal.form.model.hint"));return I.trustAsHtml(e)}(),linkText:S.instant("ttyg.agent.create_agent_modal.form.model.link_text"),documentationUrl:c.m.getDocumentationUrl(T.productShortVersion,"talk-to-graph.html#prerequisites-and-configuration")},e.getFTSDisabledHelpMessage=()=>{const t=(0,n.Gz)(S.instant("ttyg.agent.create_agent_modal.form.fts_search.fts_disabled_message",{repositoryEditPage:"repository/edit/"+e.agentFormModel.repositoryId}));return I.trustAsHtml(t)},e.goToAutocompleteView=t=>{t.preventDefault(),M.emit(a.I.GO_TO_AUTOCOMPLETE_INDEX_VIEW,{repositoryId:e.agentFormModel.repositoryId})},e.goToCreateSimilarityView=t=>{t.preventDefault(),M.emit(a.I.GO_TO_CREATE_SIMILARITY_VIEW,{repositoryId:e.agentFormModel.repositoryId})},e.goToConnectorsView=t=>{t.preventDefault(),M.emit(a.I.GO_TO_CONNECTORS_VIEW,{repositoryId:e.agentFormModel.repositoryId})},e.ok=()=>{const t=e.agentFormModel.toPayload();return R[e.operation](t)},e.cancel=()=>{t.dismiss({})},e.close=()=>{t.dismiss({})},e.updateSimilaritySearchPanel=(t=!1)=>{const o=e.agentFormModel.assistantExtractionMethods.getSimilarityExtractionMethod();o.selected&&(t&&(o.similarityIndex=null),H(o,!0))},e.updateRetrievalConnectorPanel=(t=!1)=>{const o=e.agentFormModel.assistantExtractionMethods.getRetrievalExtractionMethod();o.selected&&(t&&(o.retrievalConnectorInstance=null),N(o))},e.checkIfFTSEnabled=()=>{e.agentFormModel.repositoryId?e.agentFormModel.assistantExtractionMethods.getFTSSearchExtractionMethod().selected?(e.extractionMethodLoaderFlags[r.Ht.FTS_SEARCH]=!0,h.getRepositoryModel({id:e.agentFormModel.repositoryId}).then(t=>{e.ftsEnabled=t.getParamValue(i.YF.enableFtsIndex)}).catch(e=>{O(e,"ttyg.agent.messages.error_repository_config_loading")}).finally(()=>{e.extractionMethodLoaderFlags[r.Ht.FTS_SEARCH]=!1,e.agentSettingsForm.$setValidity("FTSDisabled",e.ftsEnabled)})):e.agentSettingsForm.$setValidity("FTSDisabled",!0):e.agentSettingsForm.$setValidity("FTSDisabled",!1)},e.openExternalIntegrationConfig=()=>{const t=e.agentFormModel;A.open(t)},e.onRepositoryChange=()=>{Y(!0,!0)},e.checkAutocompleteIndexEnabled=t=>{if(t||(t=e.agentFormModel.additionalExtractionMethods.additionalExtractionMethods.find(e=>e.method===r.eA.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH)),t&&!t.selected||!e.agentFormModel.repositoryId)return;const o=V();_.checkAutocompleteStatus(o.repositoryId,o.repositoryLocation).then(t=>{e.autocompleteEnabled=t,e.agentSettingsForm.$setValidity("autocompleteDisabled",t)}).catch(t=>{e.agentSettingsForm.$setValidity("autocompleteDisabled",!1),f.error(getError(t))})},e.onRestoreDefaultContextSize=()=>{e.agentFormModel.contextSize=e.agentFormModel.contextSizeCopy},e.onRestoreDefaultSystemInstructions=()=>{e.agentFormModel.instructions.systemInstruction=e.agentFormModel.instructions.systemInstructionCopy},e.onRestoreDefaultUserInstructions=()=>{e.agentFormModel.instructions.userInstruction=e.agentFormModel.instructions.userInstructionCopy},e.onTemperatureChange=()=>{e.showHighTemperatureWarning=e.agentFormModel.temperature.value>1},e.onSystemInstructionChange=()=>{""===e.agentFormModel.instructions.systemInstruction||e.showSystemInstructionWarning||(e.showSystemInstructionWarning=!0,o.openModalAlert({title:S.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.title"),message:S.instant("ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body")}).result.then(function(){})),""===e.agentFormModel.instructions.systemInstruction&&(e.showSystemInstructionWarning=!1)},e.onExplainAgentSettings=()=>{const t=e.agentFormModel.toPayload();x.explainAgentSettings(t).then(e=>{const t={templateUrl:"js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html",controller:"AgentInstructionsExplainModalController",windowClass:"agent-instructions-explain-modal",backdrop:"static",resolve:{dialogModel:function(){return{agentInstructionsExplain:e}}},size:"lg"};d.open(t).result.then(()=>{})}).catch(e=>{f.error(getError(e,0,s.LE))})},e.getSuggestions=t=>{const o=t.target.value;C.getAutocompleteSuggestions(o).then(l.C).then(t=>{e.autocompleteSuggestions=t.map(e=>({text:e.value}))}).catch(e=>{f.error(getError(e,0,s.LE))})},e.onVectorFieldsChange=function(e){e.connectorFields=e.selectedConnectorField?[e.selectedConnectorField]:[]},e.hasConnectorData=()=>!(!e.connectorMap||!Object.keys(e.connectorMap).length),e.shouldShowVectorFields=t=>{if(!t)return!1;const o=t.connectorType,n=t.similarityIndex;if(!D(o))return!1;if(Array.isArray(e.vectorFields))return e.vectorFields.length>0;const r=b(o,n);return Array.isArray(r)&&r.length>0},e.onSimilarityIndexChange=t=>{const o=t&&t.similarityIndexOption;if(t.selectedConnectorField=void 0,t.connectorFields=[],!o)return t.connectorType=null,t.similarityIndex="",void(e.vectorFields=[]);t.connectorType=o.provider,t.similarityIndex=o.value,e.vectorFields=b(o.provider,o.value)};const b=(t,o)=>{const n=e.connectorMap||{};return n[t]&&n[t][o]?n[t][o]:[]},R={[s.A1.CREATE]:e=>$(e),[s.A1.EDIT]:e=>w(e),[s.A1.CLONE]:e=>L(e)},$=o=>(e.savingAgent=!0,x.createAgent(o).then(e=>{t.close(e),f.success(S.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{f.error(getError(e,0,s.LE))}).finally(()=>{e.savingAgent=!1})),w=o=>(e.savingAgent=!0,x.editAgent(o).then(e=>{t.close(e),f.success(S.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{f.error(getError(e,0,s.LE))}).finally(()=>{e.savingAgent=!1})),L=o=>(e.savingAgent=!0,x.createAgent(o).then(e=>{t.close(e),f.success(S.instant("ttyg.agent.messages.agent_save_successfully",{agentName:e.name}))}).catch(e=>{f.error(getError(e,0,s.LE))}).finally(()=>{e.savingAgent=!1})),O=(e,t)=>{u.error(e),f.error(S.instant(t))},k=()=>{e.agentSettingsForm.extractionMethods.$setValidity("required",e.agentFormModel.hasExtractionMethodSelected())},V=()=>{const t=e.activeRepositoryList.find(t=>t.value===e.agentFormModel.repositoryId);return{repositoryId:t?t.data.repository.id:void 0,repositoryLocation:t?t.data.repository.location:void 0}},D=e=>e===m.X.OPENSEARCH||e===m.X.ELASTICSEARCH,H=(t,o=!1)=>{if(t.selected||e.agentSettingsForm.$setValidity("missingIndex",!0),t.selected){const t=e.agentSettingsForm&&e.agentSettingsForm.connectorInstances,o=!t||t.$pristine;if(e.connectorMap&&!o)return}if(e.agentFormModel.repositoryId&&t.expanded){e.extractionMethodLoaderFlags[t.method]=!0;const n=V();p.getSimilarityIndexesWithVectorFields(n.repositoryId).then(n=>{e.connectorMap=n;const r=U(n);(t=>{e.similarityOptionsGrouped=[],Object.entries(t).forEach(([t,o])=>{const n=S.instant(`ttyg.agent.create_agent_modal.form.similarity_instance_type_label.${t}`);Object.keys(o||{}).forEach(o=>{e.similarityOptionsGrouped.push({provider:t,label:o,value:o,group:n})})})})(n),P(r,t),(t=>{const o=t.connectorType,n=t.similarityIndex;D(o)?e.vectorFields=b(o,n):e.vectorFields=[]})(t),e.agentSettingsForm.$setValidity("missingIndex",!t.selected||e.hasConnectorData()),(o||t.connectorFields&&0===t.connectorFields.length)&&e.onSimilarityIndexChange(t)}).catch(t=>{e.connectorMap=null,e.agentSettingsForm.$setValidity("missingIndex",!1),O(t,"ttyg.agent.messages.error_similarity_indexes_loading")}).finally(()=>{e.extractionMethodLoaderFlags[t.method]=!1})}},P=(t,o)=>{if(!t.length)return o.connectorType="",o.similarityIndex="",void(o.similarityIndexOption=void 0);const n=o.connectorType,r=o.similarityIndex,i=t.find(e=>e.data.connectorType===n&&e.value===r)||t[0];o.connectorType=i.data.connectorType,o.similarityIndex=i.value;const a=(e.similarityOptionsGrouped||[]).find(e=>e.provider===o.connectorType&&e.value===o.similarityIndex);o.similarityIndexOption=a||void 0},U=e=>{const t=[];return Object.entries(e).forEach(([e,o])=>{Object.entries(o).forEach(([o,n])=>{t.push(new g.rx({label:o,value:o,data:{connectorType:e,connectorFields:n}}))})}),t},N=t=>{if(e.agentFormModel.repositoryId&&(t.selected||e.agentSettingsForm.$setValidity("missingConnector",!0),t.expanded)){e.extractionMethodLoaderFlags[t.method]=!0;const o=V();y.getConnectorPrefixByName("ChatGPT Retrieval",o.repositoryId,o.repositoryLocation).then(e=>y.getConnectorsByTypeAsSelectMenuOptions(e,o.repositoryId,o.repositoryLocation)).then(o=>{e.retrievalConnectors=o,e.agentSettingsForm.$setValidity("missingConnector",!t.selected||!(!o||!o.length)),G(e.retrievalConnectors,t)}).catch(t=>{e.agentSettingsForm.$setValidity("missingConnector",!1),O(t,"ttyg.agent.messages.error_retrieval_connectors_loading")}).finally(()=>{e.extractionMethodLoaderFlags[t.method]=!1})}},G=(e,t)=>{if(0===e.length)return void(t.retrievalConnectorInstance=null);const o=e.find(e=>e.value===t.retrievalConnectorInstance);t.retrievalConnectorInstance=o?o.value:e[0].value},j={[r.Ht.FTS_SEARCH]:t=>{e.checkIfFTSEnabled()},[r.Ht.SPARQL]:e=>{},[r.Ht.SIMILARITY]:e=>H(e),[r.Ht.RETRIEVAL]:e=>N(e)},q={[r.eA.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH]:e=>W(e),[r.eA.IRI_DISCOVERY_SEARCH]:()=>{}},W=t=>{t.selected||e.agentSettingsForm.$setValidity("autocompleteDisabled",!0),e.checkAutocompleteIndexEnabled(t)},Y=(t=!1,o=!1)=>{e.checkIfFTSEnabled(),e.updateSimilaritySearchPanel(t),e.updateRetrievalConnectorPanel(o),e.checkAutocompleteIndexEnabled()},z=()=>{document.hidden||Y()},X=(e,t)=>{const o=document.getElementById(e);o&&(o.value=t)};document.addEventListener("visibilitychange",z),e.$on("$destroy",()=>{document.removeEventListener("visibilitychange",z)}),V().repositoryId||(e.agentFormModel.repositoryId=null),setTimeout(k,0),t.rendered.then(()=>{X("temperatureSlider",e.agentFormModel.temperature.value),X("topPSlider",e.agentFormModel.topP.value)})}angular.module("graphdb.framework.ttyg.controllers.agent-settings-modal",["graphdb.framework.core.services.similarity","graphdb.framework.core.services.connectors","graphdb.framework.rest.repositories.service","graphdb.framework.ttyg.controllers.agent-instructions-explain-modal","graphdb.framework.ttyg.services.externalIntegrationModal","ngTagsInput","graphdb.framework.core.directives.multiselect"]).constant("ExtractionMethodTemplates",{iri_discovery_search:"iri-discovery-search",autocomplete_iri_discovery_search:"autocomplete-iri-discovery-search"}).filter("map",function(){return function(e,t){return Array.isArray(e)?e.map(function(e){return e[t]}):e}}).controller("AgentSettingsModalController",p),p.$inject=["$scope","$uibModalInstance","ModalService","$uibModal","SimilarityService","ConnectorsService","RepositoriesRestService","$sce","toastr","UriUtils","$translate","dialogModel","TTYGContextService","TTYGService","ExtractionMethodTemplates","AutocompleteService","AutocompleteRestService","ExternalIntegrationModalService","productInfo"]}};
|
|
2
|
-
//# sourceMappingURL=95953.ec1b9d5e568d43ec3dcf.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"95953.ec1b9d5e568d43ec3dcf.bundle.js","mappings":"+IACIA,QAAQC,OAAO,gDAAiD,IAC3DC,UAAU,sBAAuB,WAC9B,MAAO,CACHC,SAAU,IACVC,MAAO,CACHC,MAAO,IACPC,YAAa,KACbC,SAAU,KAYVC,UAAW,MAEfC,YAAa,kFACbC,WAAY,CAAC,SAAU,YAAa,WAAY,UAAW,WAAY,SAASC,EAAQC,EAAWC,EAAUC,EAASC,GAKlHJ,EAAOK,MAAO,EACdL,EAAOM,OAAS,CAACC,MAAO,IACxBP,EAAOQ,aAAe,GAMtB,MAAMC,EAAgB,GAWhBC,EAAaC,GACF,OAANA,EAAa,IAAM,GAAKA,GAAGC,cAMhCC,EAAkBA,KACpB,MAAMC,EAAOC,MAAMC,QAAQhB,EAAON,OAASM,EAAON,MAAQ,GACpDuB,EAAkBP,EAAUV,EAAOM,OAAOC,OAE5CP,EAAOQ,aADPS,EACsBH,EAAKI,OAAQC,GAAMT,EAAUS,EAAEC,OAAOC,SAASJ,IAE/CH,GAcxBQ,EAAcC,IACXvB,EAAOK,OAGPH,EAAS,GAAGsB,SAASD,EAAEE,SAb5BzB,EAAO0B,YAAY,WACf1B,EAAOK,MAAO,CAClB,KA4CJL,EAAO2B,WAAa,SAASJ,GACzBA,GAAKA,EAAEK,kBACP5B,EAAOK,MAAQL,EAAOK,KAClBL,EAA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ElEvM,EAAOmJ,8BAA8BV,IAGnCiE,EAAqBA,CAACzB,GAAsB,EAAOmI,GAAmC,KACxFpT,EAAO6L,oBACP7L,EAAOgL,4BAA4BC,GACnCjL,EAAOuL,8BAA8B6H,GACrCpT,EAAOmJ,iCAGLkK,EAAyBA,KACtBC,SAASC,QACV7G,KAIF8G,EAAoBA,CAACC,EAAW5F,KAClC,MAAM6F,EAASJ,SAASK,eAAeF,GACnCC,IACAA,EAAO7F,MAAQA,IAYvByF,SAASM,iBAAiB,mBAAoBP,GAG9CrT,EAAOqD,IAAI,WAPkBwQ,KACzBP,SAASQ,oBAAoB,mBAAoBT,KAelBvG,IACH7C,eACxBjK,EAAOiH,eAAegD,aAAe,MAGzC8J,WAAWlL,EAAmC,GAC9ClF,EAAkBqQ,SAAShP,KAAK,KAC5BwO,EAAkB,oBAAqBxT,EAAOiH,eAAe2G,YAAYC,OACzE2F,EAAkB,aAAcxT,EAAOiH,eAAegN,KAAKpG,QAIvE,CA38BAxO,QACKC,OAAO,0DAA2D,CAC/D,6CACA,6CACA,8CACA,sEACA,2DACA,cACA,kDAEH4U,SAAS,4BAA6B,CACnC,qBAAwB,uBACxB,kCAAqC,sCAExChT,OAAO,MAAO,WACX,OAAO,SAASiT,EAAKlS,GACjB,OAAKlB,MAAMC,QAAQmT,GAGZA,EAAIxF,IAAI,SAASyF,GACpB,OAAOA,EAAEnS,EACb,GAJWkS,CAKf,CACJ,GACCpU,WAAW,+BAAgCmG,GAEhDA,EAA6BzB,QAAU,CACnC,SACA,oBACA,eACA,YACA,oBACA,oBACA,0BACA,OACA,SACA,WACA,aACA,cACA,qBACA,cACA,4BACA,sBACA,0BACA,kCACA,c","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/multiselect-search/multiselect-search.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/similarity/similarity-instance-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/controllers/external-integration-configuration-modal.controller.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/services/externalIntegrationModal.service.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/ttyg/controllers/agent-settings-modal.controller.js"],"sourcesContent":["(function() {\n angular.module('graphdb.framework.core.directives.multiselect', [])\n .directive('multiSelectDropdown', function() {\n return {\n restrict: 'E',\n scope: {\n items: '=',\n placeholder: '@?',\n onChange: '&?',\n /**\n * Keys for labels used in the multiselect dropdown.\n * <code>\n * {\n * \"select_all\": \"All\",\n * \"search_placeholder\": \"Select options\",\n * \"selected_count\": \"{{count}} selected\",\n * \"no_matches\": \"No matches\"\n * }\n * </code>\n */\n labelKeys: '=?',\n },\n templateUrl: 'js/angular/core/directives/multiselect-search/templates/multiselect-search.html',\n controller: ['$scope', '$document', '$element', '$filter', '$timeout', function($scope, $document, $element, $filter, $timeout) {\n // =========================\n // Public variables\n // =========================\n\n $scope.open = false;\n $scope.search = {query: ''};\n $scope.visibleItems = [];\n\n // =========================\n // Private variables\n // =========================\n\n const subscriptions = [];\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Normalize string for searching.\n * @param v {string|null}\n * @returns {string|string}\n */\n const normalize = (v) => {\n return v === null ? '' : ('' + v).toLowerCase();\n };\n\n /**\n * Build filtered list when query or items change.\n */\n const rebuildFiltered = () => {\n const list = Array.isArray($scope.items) ? $scope.items : [];\n const normalizedQuery = normalize($scope.search.query);\n if (normalizedQuery) {\n $scope.visibleItems = list.filter((i) => normalize(i.label).includes(normalizedQuery));\n } else {\n $scope.visibleItems = list;\n }\n };\n\n const dropTheOpenFlag = () => {\n $scope.$applyAsync(function() {\n $scope.open = false;\n });\n };\n\n /**\n * Closes the menu when clicking outside.\n * @param e {MouseEvent} The click event.\n */\n const onDocClick = (e) => {\n if (!$scope.open) {\n return;\n }\n if (!$element[0].contains(e.target)) {\n dropTheOpenFlag();\n }\n };\n\n const focusSearchInput = () => {\n // wait for the menu to open before focusing the input\n $timeout(function() {\n const input = $element[0].querySelector('.multiselect-search');\n if (input) {\n input.focus();\n }\n });\n };\n\n const focusMultiselectButton = () => {\n // wait for the menu to be removed before focusing the button\n $timeout(function() {\n const btn = $element[0].querySelector('.multiselect-button');\n if (btn) {\n btn.focus();\n }\n });\n };\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Toggles the menu open/closed.\n * @param e {MouseEvent} The click event.\n */\n $scope.toggleOpen = function(e) {\n e && e.stopPropagation();\n $scope.open = !$scope.open;\n if ($scope.open) {\n focusSearchInput();\n }\n };\n\n /**\n * Handles keydown events in the menu (for Escape key) and closes the menu.\n * @param e {KeyboardEvent} The keydown event.\n */\n $scope.onKeydownMenu = function(e) {\n if (e.key === 'Escape') {\n $scope.open = false;\n e.stopPropagation();\n e.preventDefault();\n focusMultiselectButton();\n }\n };\n\n /**\n * Gets count of selected items.\n * @returns {*|number}\n */\n $scope.selectedCount = function() {\n if (!Array.isArray($scope.items)) {\n return 0;\n }\n return $scope.items.filter((i) => i.selected).length;\n };\n\n /**\n * Checks if all filtered items are selected.\n * @returns {this is T[]|boolean}\n */\n $scope.allFilteredSelected = function() {\n const list = $scope.visibleItems || [];\n if (list.length === 0) {\n return false;\n }\n return list.every((i) => i.selected);\n };\n\n /**\n * Checks if some (but not all) filtered items are selected.\n * @returns {boolean}\n */\n $scope.someFilteredSelected = function() {\n const list = $scope.visibleItems || [];\n const any = list.some((i) => i.selected);\n const all = list.every((i) => i.selected);\n return any && !all;\n };\n\n /**\n * Toggles select all filtered items.\n * @param e {MouseEvent} The click event.\n */\n $scope.toggleSelectAll = function(e) {\n e && e.stopPropagation();\n const list = $scope.visibleItems || [];\n const makeSelected = !$scope.allFilteredSelected();\n for (const item of list) {\n item.selected = makeSelected;\n }\n $scope.emitChange();\n };\n\n /**\n * Emits change event.\n */\n $scope.emitChange = function() {\n if (typeof $scope.onChange === 'function') {\n const selected = ($scope.items || []).filter((i) => i.selected);\n $scope.onChange({selected: selected});\n }\n };\n\n // =========================\n // Watches & Listeners\n // =========================\n\n $document.on('click', onDocClick);\n subscriptions.push(\n $scope.$watch('search.query', rebuildFiltered),\n $scope.$watchCollection('items', rebuildFiltered),\n );\n\n const onDestroyCallback = () => {\n $document.off('click', onDocClick);\n for (const unsubscribe of subscriptions) {\n unsubscribe();\n }\n };\n $scope.$on('$destroy', onDestroyCallback);\n\n rebuildFiltered();\n }],\n };\n });\n})();\n","export const SimilarityInstanceType = {\n 'SIMILARITY': 'similarity',\n 'ELASTICSEARCH': 'elasticsearch',\n 'OPENSEARCH': 'opensearch',\n};\n","angular\n .module('graphdb.framework.ttyg.controllers.external-integration-configuration-modal', [])\n .controller('ExternalIntegrationConfigurationModalController', ExternalIntegrationConfigurationModalController);\n\nExternalIntegrationConfigurationModalController.$inject = [\n '$scope',\n '$uibModalInstance',\n 'ModalService',\n '$translate',\n 'dialogModel'\n];\n\nfunction ExternalIntegrationConfigurationModalController($scope, $uibModalInstance, ModalService, $translate, dialogModel) {\n // =========================\n // Public variables\n // =========================\n\n $scope.externalIntegrationConfiguration = dialogModel.externalIntegrationConfiguration;\n $scope.difyExtension = dialogModel.difyExtensionUrl;\n $scope.queryMethods = dialogModel.queryMethodsUrl;\n $scope.agentId = dialogModel.agentId;\n $scope.agentName = dialogModel.agentName;\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Closes the modal when the user clicks the close button.\n */\n $scope.close = () => {\n $uibModalInstance.dismiss({});\n };\n\n $scope.onCloseExternalIntegrationConfigurationModal = () => {\n $uibModalInstance.dismiss({});\n };\n}\n","import 'angular/ttyg/controllers/external-integration-configuration-modal.controller';\nimport {TTYG_ERROR_MSG_LENGTH} from \"./constants\";\n\nangular\n .module('graphdb.framework.ttyg.services.externalIntegrationModal',\n ['graphdb.framework.ttyg.controllers.external-integration-configuration-modal'])\n .factory('ExternalIntegrationModalService', ExternalIntegrationModalService)\n\nExternalIntegrationModalService.$inject = ['$uibModal', 'LocationsRestService', 'toastr'];\n\nfunction ExternalIntegrationModalService($uibModal, LocationsRestService, toastr) {\n function buildDialogModel(agent, baseUrl) {\n return {\n agentName: agent.name,\n agentId: agent.id,\n queryMethodsUrl: `${baseUrl}/rest/llm/tool/ttyg/${agent.id}`,\n difyExtensionUrl: `${baseUrl}/rest/llm/ttyg/${agent.id}/dify`\n };\n }\n\n function open(agent) {\n return LocationsRestService.getExternalUrl()\n .then((response) => {\n const dialogModel = buildDialogModel(agent, response.data);\n\n return $uibModal.open({\n templateUrl: 'js/angular/ttyg/templates/modal/external-integration-configuration-modal.html',\n controller: 'ExternalIntegrationConfigurationModalController',\n windowClass: 'external-integration-configuration-modal',\n backdrop: 'static',\n resolve: {\n dialogModel: () => dialogModel\n }\n }).result\n .then(() => {\n // Modal was closed with success - do nothing\n })\n .catch(() => {\n // Modal was dismissed — do nothing\n });\n })\n .catch((error) => {\n // Catches API failure\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n });\n }\n\n return {open};\n}\n","import {decodeHTML} from \"../../../../app\";\nimport {AdditionalExtractionMethod, ExtractionMethod} from \"../../models/ttyg/agents\";\nimport 'angular/core/services/similarity.service';\nimport 'angular/core/services/connectors.service';\nimport 'angular/core/services/ttyg.service';\nimport 'angular/core/directives/multiselect-search/multiselect-search.directive';\nimport 'angular/rest/repositories.rest.service';\nimport 'angular/ttyg/controllers/agent-instructions-explain-modal.controller';\nimport 'angular/ttyg/services/externalIntegrationModal.service';\nimport {REPOSITORY_PARAMS} from \"../../models/repository/repository\";\nimport {TTYGEventName} from \"../services/ttyg-context.service\";\nimport {AGENT_OPERATION, TTYG_ERROR_MSG_LENGTH} from \"../services/constants\";\nimport {mapUriAsNtripleAutocompleteResponse} from \"../../rest/mappers/autocomplete-mapper\";\nimport {DocumentationUrlResolver} from \"../../utils/documentation-url-resolver\";\nimport {LoggerProvider} from \"../../core/services/logger-provider\";\nimport {SelectMenuOptionsModel} from \"../../models/form-fields\";\nimport {SimilarityInstanceType} from '../../models/similarity/similarity-instance-type';\n\nconst logger = LoggerProvider.logger;\n/**\n * @typedef {Object} SimilarityIndexOption\n * @property {string} provider\n * @property {string} label\n * @property {string} value\n * @property {string} group\n */\n\n\nangular\n .module('graphdb.framework.ttyg.controllers.agent-settings-modal', [\n 'graphdb.framework.core.services.similarity',\n 'graphdb.framework.core.services.connectors',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.ttyg.controllers.agent-instructions-explain-modal',\n 'graphdb.framework.ttyg.services.externalIntegrationModal',\n 'ngTagsInput',\n 'graphdb.framework.core.directives.multiselect',\n ])\n .constant('ExtractionMethodTemplates', {\n 'iri_discovery_search': 'iri-discovery-search',\n 'autocomplete_iri_discovery_search': 'autocomplete-iri-discovery-search',\n })\n .filter('map', function() {\n return function(arr, key) {\n if (!Array.isArray(arr)) {\n return arr;\n }\n return arr.map(function(o) {\n return o[key];\n });\n };\n })\n .controller('AgentSettingsModalController', AgentSettingsModalController);\n\nAgentSettingsModalController.$inject = [\n '$scope',\n '$uibModalInstance',\n 'ModalService',\n '$uibModal',\n 'SimilarityService',\n 'ConnectorsService',\n 'RepositoriesRestService',\n '$sce',\n 'toastr',\n 'UriUtils',\n '$translate',\n 'dialogModel',\n 'TTYGContextService',\n 'TTYGService',\n 'ExtractionMethodTemplates',\n 'AutocompleteService',\n 'AutocompleteRestService',\n 'ExternalIntegrationModalService',\n 'productInfo'];\n\nfunction AgentSettingsModalController(\n $scope,\n $uibModalInstance,\n ModalService,\n $uibModal,\n SimilarityService,\n ConnectorsService,\n RepositoriesRestService,\n $sce,\n toastr,\n UriUtils,\n $translate,\n dialogModel,\n TTYGContextService,\n TTYGService,\n ExtractionMethodTemplates,\n AutocompleteService,\n AutocompleteRestService,\n ExternalIntegrationModalService,\n productInfo) {\n // =========================\n // Private variables\n // =========================\n\n const CHAT_GPT_RETRIEVAL_CONNECTOR_NAME = 'ChatGPT Retrieval';\n\n // =========================\n // Public variables\n // =========================\n\n $scope.AGENT_OPERATION = AGENT_OPERATION;\n\n /**\n * The operation type for the modal. This can be one of <code>AGENT_OPERATION</code> constants.\n */\n $scope.operation = dialogModel.operation;\n\n /**\n * Flag to control the visibility of the loader when creating an agent.\n * @type {boolean}\n */\n $scope.savingAgent = false;\n\n /**\n * The model used in the form.\n * @type {AgentFormModel|*}\n */\n $scope.agentFormModel = dialogModel.agentFormModel;\n\n /**\n * The active repository info model.\n * @type {RepositoryInfoModel|*}\n */\n $scope.activeRepositoryInfo = dialogModel.activeRepositoryInfo;\n\n /**\n * Flags used to show/hide the loader for the extraction methods when the user opens a panel and some data needs to\n * be loaded.\n * @type {{[string]: boolean}} - the key is the extraction method types in <code>ExtractionMethod</code>\n */\n $scope.extractionMethodLoaderFlags = {\n [ExtractionMethod.SIMILARITY]: false,\n };\n\n /**\n * The repository select menu options model.\n * @type {SelectMenuOptionsModel[]}\n */\n $scope.activeRepositoryList = dialogModel.activeRepositoryList;\n\n /**\n * The extraction method types constants.\n * @type {{SPARQL: string, FTS_SEARCH: string, SIMILARITY: string, RETRIEVAL: string}}\n */\n $scope.extractionMethods = ExtractionMethod;\n\n /**\n * The additional extraction method types constants.\n * @type {{IRI_DISCOVERY_SEARCH: string, AUTOCOMPLETE_IRI_DISCOVERY_SEARCH: string}}\n */\n $scope.additionalExtractionMethods = AdditionalExtractionMethod;\n\n /**\n * The names of the template files, containing the Extraction Method Templates.\n * @type {Object<string, string>}\n */\n $scope.ExtractionMethodTemplates = ExtractionMethodTemplates;\n\n /**\n * Flag used to show/hide the advanced settings in the modal.\n * @type {boolean}\n */\n $scope.showAdvancedSettings = false;\n\n /**\n * Flag used to show/hide the high temperature warning in the modal.\n * @type {boolean}\n */\n $scope.showHighTemperatureWarning = false;\n\n /**\n * Flag used to control the visibility of the system instruction warning.\n * @type {boolean}\n */\n $scope.showSystemInstructionWarning = false;\n\n /**\n * The retrieval connectors to be used for the retrieval extraction method as select menu options.\n * @type {SelectMenuOptionsModel[]}\n */\n $scope.retrievalConnectors = [];\n\n /**\n * Flag used to show/hide the FTS enabled state in the modal.\n * @type {boolean}\n */\n $scope.ftsEnabled = false;\n\n /**\n * The autocomplete suggestions source for the 'Autocomplete IRI discovery' extraction method.\n * @type {*[]}\n */\n $scope.autocompleteSuggestions = [];\n\n /**\n * Flag to determine if the context size field should be visible in the form.\n * @type {boolean}\n */\n $scope.showContextSize = ($scope.agentFormModel.contextSize !== null);\n\n /**\n * The model for the vector fields select dropdown (Similarity search method).\n * @type {string[]}\n */\n $scope.vectorFields = [];\n\n $scope.documentationUrlForSimilarity = DocumentationUrlResolver.getDocumentationUrl(productInfo.productShortVersion, 'talk-to-graph.html#prerequisites-and-configuration');\n\n /**\n * The similarity index select options grouped by provider for the similarity search extraction method.\n * @type {*[]}\n */\n $scope.similarityOptionsGrouped = [];\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Sets the UI touched state and validation state for the extraction methods property so that the UI can show if\n * the user has selected at least one extraction method and warn him if he hasn't.\n *\n * @param {ExtractionMethodFormModel} extractionMethod\n */\n $scope.toggleExtractionMethod = (extractionMethod) => {\n extractionMethod.expanded = extractionMethod.selected;\n $scope.agentSettingsForm.extractionMethods.$setTouched();\n setExtractionMethodValidityStatus();\n extractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n /**\n * Handles the panel toggle event for the extraction method. This is used to do some initialization when the user\n * opens the panel for a specific extraction method.\n * @param {ExtractionMethodFormModel} extractionMethod\n */\n $scope.onExtractionMethodPanelToggle = (extractionMethod) => {\n extractionMethod.toggleCollapse();\n extractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n /**\n * Sets the UI touched state and validation state for the additional extraction methods property so that the UI can show if\n * the user has selected at least one extraction method.\n *\n * @param {AdditionalExtractionMethodFormModel} extractionMethod\n */\n $scope.toggleAdditionalExtractionMethod = (extractionMethod) => {\n extractionMethod.expanded = extractionMethod.selected;\n $scope.checkAutocompleteIndexEnabled();\n additionalExtractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n /**\n * Handles the panel toggle event for the additional extraction method. This is used to do some initialization when the user\n * opens the panel for a specific extraction method.\n * @param {AdditionalExtractionMethodFormModel} extractionMethod\n */\n $scope.onAdditionalExtractionMethodPanelToggle = (extractionMethod) => {\n extractionMethod.toggleCollapse();\n additionalExtractionPanelToggleHandlers[extractionMethod.method](extractionMethod);\n };\n\n $scope.helpInfoForModel = {\n ttygHelpInfo: getModelHelpMessage(),\n linkText: $translate.instant('ttyg.agent.create_agent_modal.form.model.link_text'),\n documentationUrl: DocumentationUrlResolver.getDocumentationUrl(productInfo.productShortVersion, 'talk-to-graph.html#prerequisites-and-configuration'),\n };\n\n /**\n * Resolves the hint for the FTS search missing message. This is needed because the hint contains a html link that\n * should be properly rendered.\n * @return {*}\n */\n $scope.getFTSDisabledHelpMessage = () => {\n // The hint contains a html link which should be properly rendered.\n const message = decodeHTML(\n $translate.instant(\n 'ttyg.agent.create_agent_modal.form.fts_search.fts_disabled_message',\n {repositoryEditPage: 'repository/edit/' + $scope.agentFormModel.repositoryId},\n ),\n );\n return $sce.trustAsHtml(message);\n };\n\n /**\n * Opens the 'Autocomplete index' view in a new tab.\n */\n $scope.goToAutocompleteView = (event) => {\n event.preventDefault();\n TTYGContextService.emit(TTYGEventName.GO_TO_AUTOCOMPLETE_INDEX_VIEW, {repositoryId: $scope.agentFormModel.repositoryId});\n };\n\n /**\n * Opens the 'Create Similarity' view in a new tab.\n */\n $scope.goToCreateSimilarityView = (event) => {\n event.preventDefault();\n TTYGContextService.emit(TTYGEventName.GO_TO_CREATE_SIMILARITY_VIEW, {repositoryId: $scope.agentFormModel.repositoryId});\n };\n\n /**\n * Opens the 'Connectors' view in a new tab.\n */\n $scope.goToConnectorsView = (event) => {\n event.preventDefault();\n TTYGContextService.emit(TTYGEventName.GO_TO_CONNECTORS_VIEW, {repositoryId: $scope.agentFormModel.repositoryId});\n };\n\n /**\n * Handles the selected agent operation which can be one of <code>AGENT_OPERATION</code> types. Respective handler\n * is called based on the operation type with the agent payload build based on the form model.\n * @return {Promise<void>}\n */\n $scope.ok = () => {\n const agentPayload = $scope.agentFormModel.toPayload();\n return agentOperationHandlers[$scope.operation](agentPayload);\n };\n\n /**\n * Closes the modal when the user cancels the agent creation.\n */\n $scope.cancel = () => {\n $uibModalInstance.dismiss({});\n };\n\n /**\n * Closes the modal when the user clicks the close button.\n */\n $scope.close = () => {\n $uibModalInstance.dismiss({});\n };\n\n /**\n * Updates the similarity search panel.\n *\n * @param {boolean} clearIndexSelection - If true, the selected index will be cleared.\n */\n $scope.updateSimilaritySearchPanel = (clearIndexSelection = false) => {\n const similaritySearchExtractionMethod = $scope.agentFormModel.assistantExtractionMethods.getSimilarityExtractionMethod();\n if (!similaritySearchExtractionMethod.selected) {\n return;\n }\n if (clearIndexSelection) {\n similaritySearchExtractionMethod.similarityIndex = null;\n }\n handleSimilaritySearchExtractionMethodPanelToggle(similaritySearchExtractionMethod, true);\n };\n\n /**\n * Updates the ChatGPT retrieval connector panel.\n *\n * @param {boolean} clearSelection - If true, the selected connector will be cleared.\n */\n $scope.updateRetrievalConnectorPanel = (clearSelection = false) => {\n const retrievalExtractionExtractionMethod = $scope.agentFormModel.assistantExtractionMethods.getRetrievalExtractionMethod();\n if (!retrievalExtractionExtractionMethod.selected) {\n return;\n }\n if (clearSelection) {\n retrievalExtractionExtractionMethod.retrievalConnectorInstance = null;\n }\n handleRetrievalConnectorExtractionMethodPanelToggle(retrievalExtractionExtractionMethod);\n };\n\n /**\n * Checks if the Full-Text Search (FTS) index is enabled for the selected repository.\n * Sets form validation state based on whether FTS is enabled and required.\n */\n $scope.checkIfFTSEnabled = () => {\n if (!$scope.agentFormModel.repositoryId) {\n $scope.agentSettingsForm.$setValidity('FTSDisabled', false);\n return;\n }\n\n const ftsSearchExtractionMethod = $scope.agentFormModel.assistantExtractionMethods.getFTSSearchExtractionMethod();\n if (!ftsSearchExtractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('FTSDisabled', true);\n return;\n }\n\n $scope.extractionMethodLoaderFlags[ExtractionMethod.FTS_SEARCH] = true;\n\n // pass a fake repository info object with only an id because we don't care for the location\n RepositoriesRestService.getRepositoryModel({id: $scope.agentFormModel.repositoryId}).then((repositoryModel) => {\n $scope.ftsEnabled = repositoryModel.getParamValue(REPOSITORY_PARAMS.enableFtsIndex);\n })\n .catch((error) => {\n logAndShowError(error, 'ttyg.agent.messages.error_repository_config_loading');\n })\n .finally(() => {\n $scope.extractionMethodLoaderFlags[ExtractionMethod.FTS_SEARCH] = false;\n $scope.agentSettingsForm.$setValidity('FTSDisabled', $scope.ftsEnabled);\n });\n };\n\n /**\n * Opens a modal to copy the external integration for the currently edited agent.\n *\n * @function\n */\n $scope.openExternalIntegrationConfig = () => {\n const agent = $scope.agentFormModel;\n ExternalIntegrationModalService.open(agent);\n };\n\n /**\n * Handles the change in the repository id field. This is needed because\n * the FTS method configuration depends on the selected repository to be\n * able to validate if the FTS is enabled for that selected repository.\n */\n $scope.onRepositoryChange = () => {\n refreshValidations(true, true);\n };\n\n /**\n * Checks the status of the autocomplete index.\n * @param {AdditionalExtractionMethodFormModel|undefined} method - The extraction method to check the autocomplete\n * index for. This function can be called in the visibilitychange handler, so the method might not be defined.\n * If not provided, it will check the 'Autocomplete IRI discovery search' method from the additional extraction\n * methods.\n */\n $scope.checkAutocompleteIndexEnabled = (method) => {\n if (!method) {\n method = $scope.agentFormModel.additionalExtractionMethods.additionalExtractionMethods\n .find((extractionMethod) => extractionMethod.method === AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH);\n }\n // If the method is not selected, we don't need to check the autocomplete index status.\n // Also, if the repository id is not set, we can't check the autocomplete index status.\n if (method && !method.selected || !$scope.agentFormModel.repositoryId) {\n return;\n }\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n AutocompleteService.checkAutocompleteStatus(selectedRepositoryInfo.repositoryId, selectedRepositoryInfo.repositoryLocation)\n .then((autocompleteEnabled) => {\n $scope.autocompleteEnabled = autocompleteEnabled;\n $scope.agentSettingsForm.$setValidity('autocompleteDisabled', autocompleteEnabled);\n })\n .catch((error) => {\n $scope.agentSettingsForm.$setValidity('autocompleteDisabled', false);\n toastr.error(getError(error));\n });\n };\n\n /**\n * Restores the default context size.\n */\n $scope.onRestoreDefaultContextSize = () => {\n $scope.agentFormModel.contextSize = $scope.agentFormModel.contextSizeCopy;\n };\n\n /**\n * Restores the default system instructions.\n */\n $scope.onRestoreDefaultSystemInstructions = () => {\n $scope.agentFormModel.instructions.systemInstruction = $scope.agentFormModel.instructions.systemInstructionCopy;\n };\n\n /**\n * Restores the default user instructions.\n */\n $scope.onRestoreDefaultUserInstructions = () => {\n $scope.agentFormModel.instructions.userInstruction = $scope.agentFormModel.instructions.userInstructionCopy;\n };\n\n /**\n * Handles the change in the temperature field. This is needed because the high temperature warning should be shown\n * when the temperature is higher than 1.\n */\n $scope.onTemperatureChange = () => {\n $scope.showHighTemperatureWarning = $scope.agentFormModel.temperature.value > 1;\n };\n\n /**\n * Handles the change in the system instructions field.\n */\n $scope.onSystemInstructionChange = () => {\n if ($scope.agentFormModel.instructions.systemInstruction !== '' && !$scope.showSystemInstructionWarning) {\n $scope.showSystemInstructionWarning = true;\n ModalService.openModalAlert({\n title: $translate.instant('ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.title'),\n message: $translate.instant('ttyg.agent.create_agent_modal.form.system_instruction.overriding_system_instruction_warning.body'),\n }).result\n .then(function() {\n // Do nothing, just warning the user\n });\n }\n if ($scope.agentFormModel.instructions.systemInstruction === '') {\n $scope.showSystemInstructionWarning = false;\n }\n };\n\n /**\n * Opens the agent instructions explain modal.\n */\n $scope.onExplainAgentSettings = () => {\n const agentPayload = $scope.agentFormModel.toPayload();\n TTYGService.explainAgentSettings(agentPayload)\n .then((agentInstructionsExplain) => {\n const options = {\n templateUrl: 'js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html',\n controller: 'AgentInstructionsExplainModalController',\n windowClass: 'agent-instructions-explain-modal',\n backdrop: 'static',\n resolve: {\n dialogModel: function() {\n return {\n agentInstructionsExplain,\n };\n },\n },\n size: 'lg',\n };\n $uibModal.open(options).result\n .then(() => {\n // Do nothing\n });\n }).catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n });\n };\n\n /**\n * Populates autocomplete suggestions for the given input text.\n * @param {Event} event - The input event containing the search text.\n */\n $scope.getSuggestions = (event) => {\n const inputText = event.target.value;\n AutocompleteRestService.getAutocompleteSuggestions(inputText)\n .then(mapUriAsNtripleAutocompleteResponse)\n .then((suggestions) => {\n $scope.autocompleteSuggestions = suggestions.map((item) => ({text: item.value}));\n }).catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n });\n };\n\n /**\n * Handles the change event for the vector fields select dropdown.\n * Updates the connector fields based on the selected vector field.\n * @param {ExtractionMethodFormModel} extractionMethod - The extraction method being updated.\n */\n $scope.onVectorFieldsChange = function(extractionMethod) {\n extractionMethod.connectorFields = extractionMethod.selectedConnectorField ? [extractionMethod.selectedConnectorField] : [];\n };\n\n /**\n * Determines whether there is connector data available for the similarity search extraction method.\n * @returns {boolean} True if connector data exists, false otherwise.\n */\n $scope.hasConnectorData = () => {\n return !!($scope.connectorMap && Object.keys($scope.connectorMap).length);\n };\n\n /**\n * Determines whether the vector fields select dropdown should be shown for the similarity search extraction method.\n * @param {ExtractionMethodFormModel} extractionMethod - The extraction method to check.\n * @returns {boolean} True if vector fields dropdown should be shown, false otherwise.\n */\n $scope.shouldShowVectorFields = (extractionMethod) => {\n if (!extractionMethod) {\n return false;\n }\n\n const provider = extractionMethod.connectorType;\n const indexName = extractionMethod.similarityIndex;\n\n if (!isVectorProvider(provider)) {\n return false;\n }\n\n if (Array.isArray($scope.vectorFields)) {\n return $scope.vectorFields.length > 0;\n }\n\n const fields = getVectorFieldsFromMap(provider, indexName);\n\n return Array.isArray(fields) && fields.length > 0;\n };\n\n /**\n * Handles the change event for the similarity index select menu.\n * Updates the connector type, similarity index, and refreshes available vector fields.\n * @param {ExtractionMethodFormModel} extractionMethod - The extraction method being updated.\n */\n $scope.onSimilarityIndexChange = (extractionMethod) => {\n const option = extractionMethod && extractionMethod.similarityIndexOption;\n // The user needs to select a vector field again.\n extractionMethod.selectedConnectorField = undefined;\n extractionMethod.connectorFields = [];\n\n if (!option) {\n extractionMethod.connectorType = null;\n extractionMethod.similarityIndex = '';\n $scope.vectorFields = [];\n return;\n }\n\n extractionMethod.connectorType = option.provider;\n extractionMethod.similarityIndex = option.value;\n\n $scope.vectorFields = getVectorFieldsFromMap(option.provider, option.value);\n };\n\n // =========================\n // Private functions\n // =========================\n\n /**\n * Gets vector fields from the connector map for a given provider and index name.\n * @param {string} provider - The provider type.\n * @param {string} indexName - The index name.\n * @returns {Array} The vector fields array, or an empty array if not found.\n */\n const getVectorFieldsFromMap = (provider, indexName) => {\n const map = $scope.connectorMap || {};\n return (map[provider] && map[provider][indexName])\n ? map[provider][indexName]\n : [];\n };\n\n /**\n * Updates the vector fields in the select dropdown based on the selected extraction method.\n * @param extractionMethod\n */\n const updateVectorFields = (extractionMethod) => {\n const provider = extractionMethod.connectorType;\n const indexName = extractionMethod.similarityIndex;\n\n if (!isVectorProvider(provider)) {\n $scope.vectorFields = [];\n return;\n }\n\n $scope.vectorFields = getVectorFieldsFromMap(provider, indexName);\n };\n\n /**\n * Resolves the hint message for the agent model property.\n * This is needed because the hint contains a html link that\n * should be properly rendered.\n * @return {*}\n */\n function getModelHelpMessage() {\n // The hint contains a html link which should be properly rendered.\n const message = decodeHTML($translate.instant('ttyg.agent.create_agent_modal.form.model.hint'));\n return $sce.trustAsHtml(message);\n }\n\n /**\n * Mapping of agent operations to their respective handlers.\n * @type {{[AGENT_OPERATION.EDIT]: (function(*): Promise<void>), [AGENT_OPERATION.CLONE]: (function(*): Promise<void>), [AGENT_OPERATION.CREATE]: (function(*): Promise<void>)}}\n */\n const agentOperationHandlers = {\n [AGENT_OPERATION.CREATE]: (payload) => createAgent(payload),\n [AGENT_OPERATION.EDIT]: (payload) => editAgent(payload),\n [AGENT_OPERATION.CLONE]: (payload) => cloneAgent(payload),\n };\n\n /**\n * Creates a new agent with the given payload and closes the modal if no errors occur.\n * @param {*} newAgentPayload - the payload for the new agent.\n * @return {Promise<void>}\n */\n const createAgent = (newAgentPayload) => {\n $scope.savingAgent = true;\n return TTYGService.createAgent(newAgentPayload)\n .then((agentModel) => {\n $uibModalInstance.close(agentModel);\n toastr.success($translate.instant('ttyg.agent.messages.agent_save_successfully', {agentName: agentModel.name}));\n })\n .catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n })\n .finally(() => {\n $scope.savingAgent = false;\n });\n };\n\n /**\n * Sends the edit agent payload to the server and closes the modal if no errors occur.\n * @param {*} agentPayload - the payload for the agent to be edited.\n * @return {Promise<void>}\n */\n const editAgent = (agentPayload) => {\n $scope.savingAgent = true;\n return TTYGService.editAgent(agentPayload)\n .then((updatedAgent) => {\n $uibModalInstance.close(updatedAgent);\n toastr.success($translate.instant('ttyg.agent.messages.agent_save_successfully', {agentName: updatedAgent.name}));\n })\n .catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n })\n .finally(() => {\n $scope.savingAgent = false;\n });\n };\n\n /**\n * Clones the agent with the given payload and closes the modal if no errors occur.\n * @param {*} agentPayload\n * @return {Promise<void>}\n */\n const cloneAgent = (agentPayload) => {\n $scope.savingAgent = true;\n return TTYGService.createAgent(agentPayload)\n .then((updatedAgent) => {\n $uibModalInstance.close(updatedAgent);\n toastr.success($translate.instant(\"ttyg.agent.messages.agent_save_successfully\", {agentName: updatedAgent.name}));\n })\n .catch((error) => {\n toastr.error(getError(error, 0, TTYG_ERROR_MSG_LENGTH));\n })\n .finally(() => {\n $scope.savingAgent = false;\n });\n };\n\n const logAndShowError = (error, errorMessageKey) => {\n logger.error(error);\n toastr.error($translate.instant(errorMessageKey));\n };\n\n const setExtractionMethodValidityStatus = () => {\n $scope.agentSettingsForm.extractionMethods.$setValidity('required', $scope.agentFormModel.hasExtractionMethodSelected());\n };\n\n const handleFTSExtractionMethodPanelToggle = (extractionMethod) => {\n $scope.checkIfFTSEnabled();\n };\n\n /**\n * Returns the repository info model for the selected repository in the form.\n *\n * @return {{repositoryLocation: (*|undefined), repositoryId: (*|undefined)}}\n */\n const getSelectedRepositoryInfo = () => {\n const selectRepositoryInfo = $scope.activeRepositoryList.find((repository) => repository.value === $scope.agentFormModel.repositoryId);\n return {\n repositoryId: selectRepositoryInfo ? selectRepositoryInfo.data.repository.id : undefined,\n repositoryLocation: selectRepositoryInfo ? selectRepositoryInfo.data.repository.location : undefined,\n };\n };\n\n const isVectorProvider = (p) => p === SimilarityInstanceType.OPENSEARCH || p === SimilarityInstanceType.ELASTICSEARCH;\n\n /**\n * Creates grouped options for ng-options with optgroups.\n * @param connectorMap - The connector map with similarity indexes.\n */\n const buildSimilarityIndexSelectOptions = (connectorMap) => {\n /** @type {SimilarityIndexOption[]} */\n $scope.similarityOptionsGrouped = [];\n Object.entries(connectorMap).forEach(([provider, types]) => {\n const groupLabel = $translate.instant(`ttyg.agent.create_agent_modal.form.similarity_instance_type_label.${provider}`);\n Object.keys(types || {}).forEach((typeName) => {\n $scope.similarityOptionsGrouped.push({\n provider,\n label: typeName,\n value: typeName,\n group: groupLabel,\n });\n });\n });\n };\n\n const handleSimilaritySearchExtractionMethodPanelToggle = (extractionMethod, clearSelectedVectorField = false) => {\n if (!extractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('missingIndex', true);\n }\n if (extractionMethod.selected) {\n // Check if the connector instances select is pristine (unchanged). Treat the field as pristine until it exists.\n // Because it's loaded with ng-if, on first pass through here, it won't exist yet, so we treat it as pristine.\n const connectorField = $scope.agentSettingsForm && $scope.agentSettingsForm.connectorInstances;\n const isConnectorPristine = connectorField ? connectorField.$pristine : true;\n // Don't reload the indexes and override the user selection if the connector instances field is pristine\n if ($scope.connectorMap && !isConnectorPristine) {\n return;\n }\n }\n if (!$scope.agentFormModel.repositoryId) {\n return;\n }\n if (extractionMethod.expanded) {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = true;\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n SimilarityService.getSimilarityIndexesWithVectorFields(selectedRepositoryInfo.repositoryId)\n .then((connectorMap) => {\n $scope.connectorMap = connectorMap;\n const indexes = buildSelectMenuOptions(connectorMap);\n // if no indexes are found, selection (connectorsMap) will be cleaned and the info message will be\n // shown to the user again\n buildSimilarityIndexSelectOptions(connectorMap);\n updateSelectedSimilarityIndex(indexes, extractionMethod);\n updateVectorFields(extractionMethod);\n\n $scope.agentSettingsForm.$setValidity('missingIndex', !extractionMethod.selected || $scope.hasConnectorData());\n // Initially, when there is no selection, the first index is selected, and we need to trigger the\n // onSimilarityIndexChange to set the connector fields.\n if (clearSelectedVectorField || (extractionMethod.connectorFields && extractionMethod.connectorFields.length === 0)) {\n $scope.onSimilarityIndexChange(extractionMethod);\n }\n })\n .catch((error) => {\n $scope.connectorMap = null;\n $scope.agentSettingsForm.$setValidity('missingIndex', false);\n logAndShowError(error, 'ttyg.agent.messages.error_similarity_indexes_loading');\n })\n .finally(() => {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = false;\n });\n }\n };\n\n /**\n * Updates the selected similarity index for the extraction method.\n *\n * @param {SelectMenuOptionsModel[]} indexes - The list of all available similarity indexes.\n * @param {Object} extractionMethod - The extraction method object containing the currently selected similarity index.\n */\n const updateSelectedSimilarityIndex = (indexes, extractionMethod) => {\n if (!indexes.length) {\n extractionMethod.connectorType = '';\n extractionMethod.similarityIndex = '';\n extractionMethod.similarityIndexOption = undefined;\n return;\n }\n\n const currentType = extractionMethod.connectorType;\n const currentName = extractionMethod.similarityIndex;\n\n // Find previously selected index or default to the first one\n const matchedIndex = indexes.find((index) =>\n index.data.connectorType === currentType &&\n index.value === currentName,\n );\n const selectedIndex = matchedIndex || indexes[0];\n\n extractionMethod.connectorType = selectedIndex.data.connectorType;\n extractionMethod.similarityIndex = selectedIndex.value;\n\n const options = $scope.similarityOptionsGrouped || [];\n const opt = options.find((option) =>\n option.provider === extractionMethod.connectorType &&\n option.value === extractionMethod.similarityIndex,\n );\n\n extractionMethod.similarityIndexOption = opt || undefined;\n };\n\n const buildSelectMenuOptions = (data) => {\n const result = [];\n\n Object.entries(data).forEach(([connectorType, indexes]) => {\n Object.entries(indexes).forEach(([indexName, fields]) => {\n result.push(\n new SelectMenuOptionsModel({\n label: indexName,\n value: indexName,\n data: {connectorType, connectorFields: fields},\n }),\n );\n });\n });\n\n return result;\n };\n\n const handleRetrievalConnectorExtractionMethodPanelToggle = (extractionMethod) => {\n if (!$scope.agentFormModel.repositoryId) {\n return;\n }\n if (!extractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('missingConnector', true);\n }\n\n if (extractionMethod.expanded) {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = true;\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n ConnectorsService.getConnectorPrefixByName(CHAT_GPT_RETRIEVAL_CONNECTOR_NAME, selectedRepositoryInfo.repositoryId, selectedRepositoryInfo.repositoryLocation)\n .then((prefix) => ConnectorsService.getConnectorsByTypeAsSelectMenuOptions(prefix, selectedRepositoryInfo.repositoryId, selectedRepositoryInfo.repositoryLocation))\n .then((connectors) => {\n $scope.retrievalConnectors = connectors;\n $scope.agentSettingsForm.$setValidity('missingConnector', !extractionMethod.selected || !!(connectors && connectors.length));\n updateSelectedRetrievalConnector($scope.retrievalConnectors, extractionMethod);\n })\n .catch((error) => {\n $scope.agentSettingsForm.$setValidity('missingConnector', false);\n logAndShowError(error, 'ttyg.agent.messages.error_retrieval_connectors_loading');\n })\n .finally(() => {\n $scope.extractionMethodLoaderFlags[extractionMethod.method] = false;\n });\n }\n };\n\n /**\n * Updates the selected retrieval connector for the extraction method.\n *\n * @param {SelectMenuOptionsModel[]} retrievalConnectors - The list of all available connectors.\n * @param {Object} extractionMethod - The extraction method object containing the currently selected retrieval connector.\n */\n const updateSelectedRetrievalConnector = (retrievalConnectors, extractionMethod) => {\n if (retrievalConnectors.length === 0) {\n // If no connector are available, clear the similarity index.\n extractionMethod.retrievalConnectorInstance = null;\n return;\n }\n const selectedConnector = retrievalConnectors.find((connector) => connector.value === extractionMethod.retrievalConnectorInstance);\n\n // If the selected connector is not found in the current list, default to the first index.\n extractionMethod.retrievalConnectorInstance = selectedConnector\n ? selectedConnector.value\n : retrievalConnectors[0].value;\n };\n\n const extractionPanelToggleHandlers = {\n [ExtractionMethod.FTS_SEARCH]: (extractionMethod) => handleFTSExtractionMethodPanelToggle(extractionMethod),\n [ExtractionMethod.SPARQL]: (extractionMethod) => {\n },\n [ExtractionMethod.SIMILARITY]: (extractionMethod) => handleSimilaritySearchExtractionMethodPanelToggle(extractionMethod),\n [ExtractionMethod.RETRIEVAL]: (extractionMethod) => handleRetrievalConnectorExtractionMethodPanelToggle(extractionMethod),\n };\n\n const additionalExtractionPanelToggleHandlers = {\n [AdditionalExtractionMethod.AUTOCOMPLETE_IRI_DISCOVERY_SEARCH]: (extractionMethod) => handleAutocompleteExtractionMethodPanelToggle(extractionMethod),\n [AdditionalExtractionMethod.IRI_DISCOVERY_SEARCH]: () => {\n },\n };\n\n const handleAutocompleteExtractionMethodPanelToggle = (extractionMethod) => {\n if (!extractionMethod.selected) {\n // clear the validation status if method is deselected.\n $scope.agentSettingsForm.$setValidity('autocompleteDisabled', true);\n }\n $scope.checkAutocompleteIndexEnabled(extractionMethod);\n };\n\n const refreshValidations = (clearIndexSelection = false, clearRetrievalConnectorSelection = false) => {\n $scope.checkIfFTSEnabled();\n $scope.updateSimilaritySearchPanel(clearIndexSelection);\n $scope.updateRetrievalConnectorPanel(clearRetrievalConnectorSelection);\n $scope.checkAutocompleteIndexEnabled();\n };\n\n const onTabVisibilityChanged = () => {\n if (!document.hidden) {\n refreshValidations();\n }\n };\n\n const refreshSliderById = (elementId, value) => {\n const slider = document.getElementById(elementId);\n if (slider) {\n slider.value = value;\n }\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n const removeAllSubscribers = () => {\n document.removeEventListener(\"visibilitychange\", onTabVisibilityChanged);\n };\n\n document.addEventListener(\"visibilitychange\", onTabVisibilityChanged);\n\n // Deregister the watcher when the scope/directive is destroyed\n $scope.$on('$destroy', removeAllSubscribers);\n\n\n // =========================\n // Initialization\n // =========================\n\n const init = () => {\n // Set repository id to null if it is missing from the list of active repositories\n const selectedRepositoryInfo = getSelectedRepositoryInfo();\n if (!selectedRepositoryInfo.repositoryId) {\n $scope.agentFormModel.repositoryId = null;\n }\n // Delay the validation status setting because angular form ngmodel is not present immediately\n setTimeout(setExtractionMethodValidityStatus, 0);\n $uibModalInstance.rendered.then(() => {\n refreshSliderById('temperatureSlider', $scope.agentFormModel.temperature.value);\n refreshSliderById('topPSlider', $scope.agentFormModel.topP.value);\n });\n };\n init();\n}\n"],"names":["angular","module","directive","restrict","scope","items","placeholder","onChange","labelKeys","templateUrl","controller","$scope","$document","$element","$filter","$timeout","open","search","query","visibleItems","subscriptions","normalize","v","toLowerCase","rebuildFiltered","list","Array","isArray","normalizedQuery","filter","i","label","includes","onDocClick","e","contains","target","$applyAsync","toggleOpen","stopPropagation","input","querySelector","focus","onKeydownMenu","key","preventDefault","btn","selectedCount","selected","length","allFilteredSelected","every","someFilteredSelected","any","some","all","toggleSelectAll","makeSelected","item","emitChange","on","push","$watch","$watchCollection","$on","onDestroyCallback","off","unsubscribe","SimilarityInstanceType","ExternalIntegrationConfigurationModalController","$uibModalInstance","ModalService","$translate","dialogModel","externalIntegrationConfiguration","difyExtension","difyExtensionUrl","queryMethods","queryMethodsUrl","agentId","agentName","close","dismiss","onCloseExternalIntegrationConfigurationModal","$inject","ExternalIntegrationModalService","$uibModal","LocationsRestService","toastr","agent","getExternalUrl","then","response","baseUrl","name","id","buildDialogModel","data","windowClass","backdrop","resolve","result","catch","error","getError","TTYG_ERROR_MSG_LENGTH","factory","logger","LoggerProvider","AgentSettingsModalController","SimilarityService","ConnectorsService","RepositoriesRestService","$sce","UriUtils","TTYGContextService","TTYGService","ExtractionMethodTemplates","AutocompleteService","AutocompleteRestService","productInfo","AGENT_OPERATION","operation","savingAgent","agentFormModel","activeRepositoryInfo","extractionMethodLoaderFlags","ExtractionMethod","SIMILARITY","activeRepositoryList","extractionMethods","additionalExtractionMethods","AdditionalExtractionMethod","showAdvancedSettings","showHighTemperatureWarning","showSystemInstructionWarning","retrievalConnectors","ftsEnabled","autocompleteSuggestions","showContextSize","contextSize","vectorFields","documentationUrlForSimilarity","DocumentationUrlResolver","getDocumentationUrl","productShortVersion","similarityOptionsGrouped","toggleExtractionMethod","extractionMethod","expanded","agentSettingsForm","$setTouched","setExtractionMethodValidityStatus","extractionPanelToggleHandlers","method","onExtractionMethodPanelToggle","toggleCollapse","toggleAdditionalExtractionMethod","checkAutocompleteIndexEnabled","additionalExtractionPanelToggleHandlers","onAdditionalExtractionMethodPanelToggle","helpInfoForModel","ttygHelpInfo","message","decodeHTML","instant","trustAsHtml","getModelHelpMessage","linkText","documentationUrl","getFTSDisabledHelpMessage","repositoryEditPage","repositoryId","goToAutocompleteView","event","emit","TTYGEventName","GO_TO_AUTOCOMPLETE_INDEX_VIEW","goToCreateSimilarityView","GO_TO_CREATE_SIMILARITY_VIEW","goToConnectorsView","GO_TO_CONNECTORS_VIEW","ok","agentPayload","toPayload","agentOperationHandlers","cancel","updateSimilaritySearchPanel","clearIndexSelection","similaritySearchExtractionMethod","assistantExtractionMethods","getSimilarityExtractionMethod","similarityIndex","handleSimilaritySearchExtractionMethodPanelToggle","updateRetrievalConnectorPanel","clearSelection","retrievalExtractionExtractionMethod","getRetrievalExtractionMethod","retrievalConnectorInstance","handleRetrievalConnectorExtractionMethodPanelToggle","checkIfFTSEnabled","getFTSSearchExtractionMethod","FTS_SEARCH","getRepositoryModel","repositoryModel","getParamValue","REPOSITORY_PARAMS","enableFtsIndex","logAndShowError","finally","$setValidity","openExternalIntegrationConfig","onRepositoryChange","refreshValidations","find","AUTOCOMPLETE_IRI_DISCOVERY_SEARCH","selectedRepositoryInfo","getSelectedRepositoryInfo","checkAutocompleteStatus","repositoryLocation","autocompleteEnabled","onRestoreDefaultContextSize","contextSizeCopy","onRestoreDefaultSystemInstructions","instructions","systemInstruction","systemInstructionCopy","onRestoreDefaultUserInstructions","userInstruction","userInstructionCopy","onTemperatureChange","temperature","value","onSystemInstructionChange","openModalAlert","title","onExplainAgentSettings","explainAgentSettings","agentInstructionsExplain","options","size","getSuggestions","inputText","getAutocompleteSuggestions","mapUriAsNtripleAutocompleteResponse","suggestions","map","text","onVectorFieldsChange","connectorFields","selectedConnectorField","hasConnectorData","connectorMap","Object","keys","shouldShowVectorFields","provider","connectorType","indexName","isVectorProvider","fields","getVectorFieldsFromMap","onSimilarityIndexChange","option","similarityIndexOption","undefined","CREATE","payload","createAgent","EDIT","editAgent","CLONE","cloneAgent","newAgentPayload","agentModel","success","updatedAgent","errorMessageKey","hasExtractionMethodSelected","selectRepositoryInfo","repository","location","p","OPENSEARCH","ELASTICSEARCH","clearSelectedVectorField","connectorField","connectorInstances","isConnectorPristine","$pristine","getSimilarityIndexesWithVectorFields","indexes","buildSelectMenuOptions","entries","forEach","types","groupLabel","typeName","group","buildSimilarityIndexSelectOptions","updateSelectedSimilarityIndex","updateVectorFields","currentType","currentName","selectedIndex","index","opt","SelectMenuOptionsModel","getConnectorPrefixByName","prefix","getConnectorsByTypeAsSelectMenuOptions","connectors","updateSelectedRetrievalConnector","selectedConnector","connector","SPARQL","RETRIEVAL","handleAutocompleteExtractionMethodPanelToggle","IRI_DISCOVERY_SEARCH","clearRetrievalConnectorSelection","onTabVisibilityChanged","document","hidden","refreshSliderById","elementId","slider","getElementById","addEventListener","removeAllSubscribers","removeEventListener","setTimeout","rendered","topP","constant","arr","o"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=98268;export const __webpack_esm_ids__=[98268];export const __webpack_esm_modules__={98268(e,t,n){var o=n(60529);function r(e,t,n,r){return{template:'\n <style>\n .open-in-sparql-editor-btn {\n line-height: 0.75;\n }\n .open-in-sparql-editor-btn .fa:nth-child(2) {\n margin-left: -0.2em;\n margin-right: -0.2em;\n font-size: 0.9em;\n }\n </style>\n <button class="btn btn-link btn-sm open-in-sparql-editor-btn"\n data-test="open-in-sparql-editor-btn"\n gdb-tooltip="{{\'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip\' | translate}}" ng-click="onGoToSparqlEditorView()" guide-selector="open-in-sparql-editor-btn">\n <i class="ri-braces-line"></i>\n </button>\n ',restrict:"E",scope:{query:"@",repositoryId:"@",executeQuery:"@"},link:function(i,p){i.tooltipText="ttyg.chat_panel.btn.open_in_sparql_editor.tooltip";const s="true"===i.executeQuery;i.onGoToSparqlEditorView=()=>{const r=e.getActiveRepository();r&&r===i.repositoryId?a(i.query):n.openConfirmationModal({title:t.instant("common.confirm"),message:(0,o.Gz)(t.instant("ttyg.chat_panel.dialog.confirm_repository_change.body",{repositoryId:i.repositoryId})),confirmButtonKey:"ttyg.chat_panel.btn.proceed.label"},()=>{e.setRepository(e.getRepository(i.repositoryId)),a(i.query)})};const a=e=>{r.open(`sparql?query=${encodeURIComponent(e)}&execute=${s}`,"_blank")}}}}angular.module("graphdb.framework.core.directives.open-in-sparql-editor",[]).directive("openInSparqlEditor",r),r.$inject=["$repositories","$translate","ModalService","$window"]}};
|
|
2
|
-
//# sourceMappingURL=98268.86ff371dde616b4e2a76.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"98268.86ff371dde616b4e2a76.bundle.js","mappings":"iJAwCA,SAASA,EAA4BC,EAAeC,EAAYC,EAAcC,GAC1E,MAAO,CAGHC,SAAU,mvBAiBVC,SAAU,IACVC,MAAO,CACHC,MAAO,IACPC,aAAc,IACdC,aAAc,KAElBC,KAAM,SAASC,EAAQC,GAKnBD,EAAOE,YAAc,oDAIrB,MAAMC,EAAkC,SAAxBH,EAAOF,aASvBE,EAAOI,uBAAyB,KAC5B,MAAMC,EAAqBhB,EAAciB,sBACpCD,GAAsBA,IAAuBL,EAAOH,aAerDU,EAA2BP,EAAOJ,OAblCL,EAAaiB,sBACT,CACIC,MAAOnB,EAAWoB,QAAQ,kBAC1BC,SAASC,EAAAA,EAAAA,IAAWtB,EAAWoB,QAAQ,wDAAyD,CAACb,aAAcG,EAAOH,gBACtHgB,iBAAkB,qCAEtB,KACIxB,EAAcyB,cAAczB,EAAc0B,cAAcf,EAAOH,eAC/DU,EAA2BP,EAAOJ,UAgBlD,MAAMW,EAA8BX,IAEhCJ,EAAQwB,KAAK,gBAAgBC,mBAAmBrB,cAAkBO,IAAW,UAErF,EAER,CArFAe,QACKC,OAAO,0DAA2D,IAClEC,UAAU,qBAAsBhC,GAErCA,EAA4BiC,QAAU,CAAC,gBAAiB,aAAc,eAAgB,U","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/open-in-sparql-editor/open-in-sparql-editor.directive.js"],"sourcesContent":["import {decodeHTML} from \"../../../../../app\";\n\n/**\n * @ngdoc directive\n * @name graphdb.framework.core.directives.open-in-sparql-editor.directive:openInSparqlEditor\n * @restrict E\n *\n * @description\n * This directive provides a button that allows users to open the SPARQL editor with a pre-defined query.\n * Optionally, it can handle repository switching before opening the editor and executing the query.\n * The directive can also trigger the query execution automatically if specified.\n *\n * @scope\n *\n * @param {string} query The SPARQL query to be opened and optionally executed in the SPARQL editor.\n * @param {string} repositoryId The ID of the repository to be selected before opening the SPARQL editor.\n * @param {string} executeQuery Flag that determines whether the query should be executed upon opening the editor.\n * It accepts 'true' or 'false'. If 'true', the query will be automatically executed.\n *\n * @example\n * <open-in-sparql-editor\n * query=\"SELECT * WHERE {?s ?p ?o}\"\n * repository-id=\"myRepository\"\n * execute-query=\"true\">\n * </open-in-sparql-editor>\n *\n * @requires $repositories\n * @requires $translate\n * @requires ModalService\n * @requires $window\n *\n * @param {string} query The SPARQL query to be executed in the new tab.\n */\n\nangular\n .module('graphdb.framework.core.directives.open-in-sparql-editor', [])\n .directive('openInSparqlEditor', openInSparqlEditorDirective);\n\nopenInSparqlEditorDirective.$inject = ['$repositories', '$translate', 'ModalService', '$window'];\n\nfunction openInSparqlEditorDirective($repositories, $translate, ModalService, $window) {\n return {\n // Note: the line-height of the element must match the line-height of the icon.\n // This defines a composite FontAwesome icon to match the style of the surrounding icons.\n template: `\n <style>\n .open-in-sparql-editor-btn {\n line-height: 0.75;\n }\n .open-in-sparql-editor-btn .fa:nth-child(2) {\n margin-left: -0.2em;\n margin-right: -0.2em;\n font-size: 0.9em;\n }\n </style>\n <button class=\"btn btn-link btn-sm open-in-sparql-editor-btn\"\n data-test=\"open-in-sparql-editor-btn\"\n gdb-tooltip=\"{{'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip' | translate}}\" ng-click=\"onGoToSparqlEditorView()\" guide-selector=\"open-in-sparql-editor-btn\">\n <i class=\"ri-braces-line\"></i>\n </button>\n `,\n restrict: 'E',\n scope: {\n query: '@',\n repositoryId: '@',\n executeQuery: '@',\n },\n link: function($scope, element) {\n // =========================\n // Public variables\n // =========================\n\n $scope.tooltipText = 'ttyg.chat_panel.btn.open_in_sparql_editor.tooltip';\n // =========================\n // Private functions\n // =========================\n const execute = $scope.executeQuery === 'true';\n\n // =========================\n // Public functions\n // =========================\n\n /**\n * Opens the SPARQL editor in a new browser tab with the specified query and optional execution.\n */\n $scope.onGoToSparqlEditorView = () => {\n const activeRepositoryId = $repositories.getActiveRepository();\n if (!activeRepositoryId || activeRepositoryId !== $scope.repositoryId) {\n // Open a confirmation modal before switching the repository\n ModalService.openConfirmationModal(\n {\n title: $translate.instant('common.confirm'),\n message: decodeHTML($translate.instant('ttyg.chat_panel.dialog.confirm_repository_change.body', {repositoryId: $scope.repositoryId})),\n confirmButtonKey: 'ttyg.chat_panel.btn.proceed.label',\n },\n () => {\n $repositories.setRepository($repositories.getRepository($scope.repositoryId));\n openInSparqlEditorInNewTab($scope.query);\n },\n );\n } else {\n // No repository switch needed, just open the SPARQL editor\n openInSparqlEditorInNewTab($scope.query);\n }\n };\n // =========================\n // Private functions\n // =========================\n\n /**\n * Opens SPARQL editor view with passed query and handles repository switch if necessary.\n * @param {string} query\n */\n const openInSparqlEditorInNewTab = (query) => {\n // Open the SPARQL editor in a new tab and execute the query\n $window.open(`sparql?query=${encodeURIComponent(query)}&execute=${execute}`, '_blank');\n };\n },\n };\n}\n"],"names":["openInSparqlEditorDirective","$repositories","$translate","ModalService","$window","template","restrict","scope","query","repositoryId","executeQuery","link","$scope","element","tooltipText","execute","onGoToSparqlEditorView","activeRepositoryId","getActiveRepository","openInSparqlEditorInNewTab","openConfirmationModal","title","instant","message","decodeHTML","confirmButtonKey","setRepository","getRepository","open","encodeURIComponent","angular","module","directive","$inject"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Represents the user's consent for various types of cookies.
|
|
3
|
-
*/
|
|
4
|
-
export declare class CookieConsent {
|
|
5
|
-
/** Indicates whether the cookie policy has been accepted. */
|
|
6
|
-
policyAccepted?: boolean;
|
|
7
|
-
/** Indicates consent for statistical cookies. */
|
|
8
|
-
statistic?: boolean;
|
|
9
|
-
/** Indicates consent for third-party cookies. */
|
|
10
|
-
thirdParty?: boolean;
|
|
11
|
-
/** Epoch timestamp of last update in seconds. */
|
|
12
|
-
updatedAt?: number;
|
|
13
|
-
constructor(data?: boolean | Partial<CookieConsent>);
|
|
14
|
-
}
|