From b7cf8089bfb5ebed711cb0518d142c806be20f84 Mon Sep 17 00:00:00 2001 From: Jose Chirivella Date: Tue, 4 Jun 2024 22:16:35 -0500 Subject: [PATCH 1/5] FOUR-15153 Updated deps and ran prod script --- package-lock.json | 12 ++++++------ public/images/Stroke.svg | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 public/images/Stroke.svg diff --git a/package-lock.json b/package-lock.json index 3660ed33e2..22ea9e1271 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11299,7 +11299,7 @@ "resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.5.tgz", "integrity": "sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==", "funding": { - "type": "GitHub Sponsors \u2764", + "type": "GitHub Sponsors ❤", "url": "https://github.com/sponsors/dmonad" } }, @@ -12292,7 +12292,7 @@ "node": ">=16" }, "funding": { - "type": "GitHub Sponsors \u2764", + "type": "GitHub Sponsors ❤", "url": "https://github.com/sponsors/dmonad" } }, @@ -18765,7 +18765,7 @@ "lib0": "^0.2.31" }, "funding": { - "type": "GitHub Sponsors \u2764", + "type": "GitHub Sponsors ❤", "url": "https://github.com/sponsors/dmonad" }, "peerDependencies": { @@ -18784,7 +18784,7 @@ "npm": ">=8.0.0" }, "funding": { - "type": "GitHub Sponsors \u2764", + "type": "GitHub Sponsors ❤", "url": "https://github.com/sponsors/dmonad" }, "peerDependencies": { @@ -18805,7 +18805,7 @@ "y-websocket-server": "bin/server.js" }, "funding": { - "type": "GitHub Sponsors \u2764", + "type": "GitHub Sponsors ❤", "url": "https://github.com/sponsors/dmonad" }, "optionalDependencies": { @@ -19005,7 +19005,7 @@ "npm": ">=8.0.0" }, "funding": { - "type": "GitHub Sponsors \u2764", + "type": "GitHub Sponsors ❤", "url": "https://github.com/sponsors/dmonad" } }, diff --git a/public/images/Stroke.svg b/public/images/Stroke.svg new file mode 100644 index 0000000000..565473f08d --- /dev/null +++ b/public/images/Stroke.svg @@ -0,0 +1,3 @@ + + + From 00049b9e0c749b7db8b864b4b4fcca24cdc49175 Mon Sep 17 00:00:00 2001 From: Jose Chirivella Date: Tue, 4 Jun 2024 22:40:24 -0500 Subject: [PATCH 2/5] added sass --- package-lock.json | 27 ++++++++++----------------- package.json | 1 + 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22ea9e1271..89b918306c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -97,6 +97,7 @@ "moment": "^2.30.1", "moment-timezone": "^0.5.45", "resolve-url-loader": "^3.1.2", + "sass": "^1.77.4", "sass-loader": "^12.6.0", "vue-loader": "^15.10.0" }, @@ -10676,9 +10677,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", - "dev": true, - "optional": true, - "peer": true + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -15827,12 +15826,10 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sass": { - "version": "1.58.3", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.58.3.tgz", - "integrity": "sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A==", + "version": "1.77.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.4.tgz", + "integrity": "sha512-vcF3Ckow6g939GMA4PeU7b2K/9FALXk2KF9J87txdHzXbUF9XRQRwSxcAs/fGaTnJeBFd7UoV22j3lzMLdM0Pw==", "dev": true, - "optional": true, - "peer": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -15842,7 +15839,7 @@ "sass": "sass.js" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, "node_modules/sass-loader": { @@ -26716,9 +26713,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", - "dev": true, - "optional": true, - "peer": true + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -30431,12 +30426,10 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass": { - "version": "1.58.3", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.58.3.tgz", - "integrity": "sha512-Q7RaEtYf6BflYrQ+buPudKR26/lH+10EmO9bBqbmPh/KeLqv8bjpTNqxe71ocONqXq+jYiCbpPUmQMS+JJPk4A==", + "version": "1.77.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.4.tgz", + "integrity": "sha512-vcF3Ckow6g939GMA4PeU7b2K/9FALXk2KF9J87txdHzXbUF9XRQRwSxcAs/fGaTnJeBFd7UoV22j3lzMLdM0Pw==", "dev": true, - "optional": true, - "peer": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", diff --git a/package.json b/package.json index e6c40fcc19..7085f52d7e 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "moment": "^2.30.1", "moment-timezone": "^0.5.45", "resolve-url-loader": "^3.1.2", + "sass": "^1.77.4", "sass-loader": "^12.6.0", "vue-loader": "^15.10.0" }, From 4cd7fd6f00781b5c11ce0c17080cef94eb3df2f1 Mon Sep 17 00:00:00 2001 From: Ryan Cooley Date: Sun, 9 Jun 2024 21:44:32 -0700 Subject: [PATCH 3/5] Update enterprise packages --- composer.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/composer.json b/composer.json index eeea8d569f..9442b3471c 100644 --- a/composer.json +++ b/composer.json @@ -134,42 +134,42 @@ "package-plg": "0.0.3" }, "enterprise": { - "connector-docusign": "1.9.0", - "connector-idp": "1.9.4", - "connector-pdf-print": "1.16.1", - "connector-send-email": "1.26.3", - "connector-slack": "1.8.0", + "connector-docusign": "1.10.0", + "connector-idp": "1.10.0", + "connector-pdf-print": "1.17.0", + "connector-send-email": "1.27.0", + "connector-slack": "1.9.0", "docker-executor-cdata": "1.4.1", "docker-executor-node-ssr": "1.5.0", - "package-ab-testing": "1.1.0", - "package-actions-by-email": "1.17.0", + "package-ab-testing": "1.2.0", + "package-actions-by-email": "1.18.0", "package-advanced-user-manager": "1.11.0", - "package-ai": "1.8.0", + "package-ai": "1.9.0", "package-analytics-reporting": "1.7.0", "package-auth": "1.19.0", "package-cdata": "1.4.4", - "package-collections": "2.17.0", + "package-collections": "2.18.0", "package-comments": "1.13.0", - "package-conversational-forms": "1.8.1", - "package-data-sources": "1.27.0", + "package-conversational-forms": "1.9.0", + "package-data-sources": "1.28.0", "package-decision-engine": "1.9.15", - "package-dynamic-ui": "1.20.0", - "package-files": "1.16.0", - "package-googleplaces": "1.11.0", + "package-dynamic-ui": "1.21.0", + "package-files": "1.17.0", + "package-googleplaces": "1.12.0", "package-photo-video": "1.5.1", - "package-pm-blocks": "1.6.7", - "package-process-documenter": "1.9.0", + "package-pm-blocks": "1.7.0", + "package-process-documenter": "1.10.0", "package-process-optimization": "1.10.0", "package-product-analytics": "1.5.8", "package-projects": "1.3.1", - "package-savedsearch": "1.34.0", - "package-sentry": "1.8.0", + "package-savedsearch": "1.35.0", + "package-sentry": "1.9.0", "package-signature": "1.12.0", "package-testing": "1.3.0", - "package-translations": "2.9.0", - "package-versions": "1.10.1", - "package-vocabularies": "2.15.2", - "package-webentry": "2.21.2", + "package-translations": "2.10.0", + "package-versions": "1.11.0", + "package-vocabularies": "2.16.0", + "package-webentry": "2.22.0", "packages": "^0" }, "docker-executors": { From d168f3989e4e51eabd2958e262ce80a7590cf80d Mon Sep 17 00:00:00 2001 From: Ryan Cooley Date: Sun, 9 Jun 2024 21:45:39 -0700 Subject: [PATCH 4/5] Version 4.11.0+alpha-1 Build #bd988db1 --- composer.json | 6 +++--- composer.lock | 2 +- package-lock.json | 16 ++++++++-------- package.json | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 9442b3471c..9fd443b794 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "processmaker/processmaker", - "version": "4.10.2-RC1", + "version": "4.11.0+alpha-1", "description": "BPM PHP Software", "keywords": [ "php bpm processmaker" @@ -103,7 +103,7 @@ "Gmail" ], "processmaker": { - "build": "1417049f", + "build": "bd988db1", "custom": { "package-ellucian-ethos": "1.16.0", "package-plaid": "1.6.0", @@ -180,7 +180,7 @@ "microservices": { "pmai": "fall-2023" }, - "release": "Spring 2024 Release Candidate" + "release": "Summer 2024 Alpha" } }, "scripts": { diff --git a/composer.lock b/composer.lock index ecfeb4b4df..130df1a05b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4f81973817c3918b825e06db7cf93d6e", + "content-hash": "bc30dcfebdf48e7397a8b458b8c8a8ab", "packages": [ { "name": "aws/aws-crt-php", diff --git a/package-lock.json b/package-lock.json index 89b918306c..fb639a183f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@processmaker/processmaker", - "version": "4.10.2-RC1", + "version": "4.11.0+alpha-1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@processmaker/processmaker", - "version": "4.10.2-RC1", + "version": "4.11.0+alpha-1", "hasInstallScript": true, "license": "ISC", "dependencies": { @@ -11298,7 +11298,7 @@ "resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.5.tgz", "integrity": "sha512-PIeMbHqMt4DnUP3MA/Flc0HElYjMXArsw1qwJZcm9sqR8mq3l8NYizFMty0pWwE/tzIGH3EKK5+jes5mAr85yw==", "funding": { - "type": "GitHub Sponsors ❤", + "type": "GitHub Sponsors \u2764", "url": "https://github.com/sponsors/dmonad" } }, @@ -12291,7 +12291,7 @@ "node": ">=16" }, "funding": { - "type": "GitHub Sponsors ❤", + "type": "GitHub Sponsors \u2764", "url": "https://github.com/sponsors/dmonad" } }, @@ -18762,7 +18762,7 @@ "lib0": "^0.2.31" }, "funding": { - "type": "GitHub Sponsors ❤", + "type": "GitHub Sponsors \u2764", "url": "https://github.com/sponsors/dmonad" }, "peerDependencies": { @@ -18781,7 +18781,7 @@ "npm": ">=8.0.0" }, "funding": { - "type": "GitHub Sponsors ❤", + "type": "GitHub Sponsors \u2764", "url": "https://github.com/sponsors/dmonad" }, "peerDependencies": { @@ -18802,7 +18802,7 @@ "y-websocket-server": "bin/server.js" }, "funding": { - "type": "GitHub Sponsors ❤", + "type": "GitHub Sponsors \u2764", "url": "https://github.com/sponsors/dmonad" }, "optionalDependencies": { @@ -19002,7 +19002,7 @@ "npm": ">=8.0.0" }, "funding": { - "type": "GitHub Sponsors ❤", + "type": "GitHub Sponsors \u2764", "url": "https://github.com/sponsors/dmonad" } }, diff --git a/package.json b/package.json index 7085f52d7e..882c178320 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@processmaker/processmaker", - "version": "4.10.2-RC1", + "version": "4.11.0+alpha-1", "description": "ProcessMaker 4", "author": "DevOps ", "license": "ISC", From a9ef0bd57df0a32078fc38c444950eedd3de21b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Busso?= <90727999+agustinbusso@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:31:59 -0300 Subject: [PATCH 5/5] Fix NL to PMQL to use microservice for select list PMQL --- resources/js/components/shared/PmqlInput.vue | 58 ++++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/resources/js/components/shared/PmqlInput.vue b/resources/js/components/shared/PmqlInput.vue index 0c0c9c01e8..bda1093c1d 100755 --- a/resources/js/components/shared/PmqlInput.vue +++ b/resources/js/components/shared/PmqlInput.vue @@ -243,6 +243,8 @@ export default { promptTokens: 0, totalTokens: 0, }, + promptSessionId: "", + currentNonce: "", get, }; }, @@ -312,6 +314,9 @@ export default { this.filtersPmql = this.filtersValue; this.inputAriaLabel = this.ariaLabel; + this.promptSessionId = localStorage.promptSessionId; + this.currentNonce = localStorage.currentNonce; + this.$root.$on("bv::collapse::state", (collapseId, isJustShown) => { this.query = this.value; this.pmql = this.value; @@ -325,6 +330,48 @@ export default { }, methods: { + getNonce() { + const max = 999999999999999; + const nonce = Math.floor(Math.random() * max); + this.currentNonce = nonce; + localStorage.currentNonce = this.currentNonce; + }, + getPromptSession() { + const url = "/package-ai/getPromptSessionHistory"; + + let params = { + server: window.location.host, + }; + + if (this.promptSessionId?.startsWith("ss")) { + this.promptSessionId = ""; + } + + if ( + this.promptSessionId + && this.promptSessionId !== null + && this.promptSessionId !== "" + ) { + params = { + promptSessionId: this.promptSessionId, + }; + } + + ProcessMaker.apiClient + .post(url, params) + .then((response) => { + this.promptSessionId = response.data.promptSessionId; + localStorage.promptSessionId = response.data.promptSessionId; + this.runNLQToPMQL(); + }) + .catch((error) => { + if (error.response.status === 404) { + localStorage.promptSessionId = ""; + this.promptSessionId = ""; + this.getPromptSession(); + } + }); + }, onFiltersPmqlChange(value) { this.filtersPmql = value[0]; this.selectedFilters = value[1]; @@ -381,7 +428,7 @@ export default { this.$emit("submit", this.query); this.$emit("input", this.query); } else if (this.aiEnabledLocal) { - this.runNLQToPMQL(); + this.getPromptSession(); } else if (!this.query.isPMQL() && !this.aiEnabledLocal) { const fullTextSearch = `(fulltext LIKE "%${this.query}%")`; this.pmql = fullTextSearch; @@ -395,10 +442,13 @@ export default { this.runSearch(); }, runNLQToPMQL() { + this.getNonce(); const params = { - question: this.query, + search: this.query, type: this.searchType, classifySearch: false, + promptSessionId: this.promptSessionId, + nonce: this.currentNonce, }; this.aiLoading = true; @@ -406,8 +456,8 @@ export default { ProcessMaker.apiClient .post("/package-ai/naturalLanguageToPmql", params) .then((response) => { - this.pmql = response.data.result; - this.usage = response.data.usage; + this.pmql = response.data.result[0].result.pmql; + this.usage = response.data.result[0].usage; this.$emit("submit", this.pmql); this.$emit("input", this.pmql); this.aiLoading = false;