From 8154708d7cf9aa7aa98bf3141a8d13de126817c1 Mon Sep 17 00:00:00 2001 From: Alfredo Gallardo Date: Tue, 12 Nov 2024 15:12:09 -0300 Subject: [PATCH] - fix: perplexity tool (#59) * - fix: perplexity tool * - ci: version bump * - fix: removed headless flag * - fix: disable perplexity test in CI --- apps/shinkai-tool-perplexity/src/index.ts | 12 ++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/apps/shinkai-tool-perplexity/src/index.ts b/apps/shinkai-tool-perplexity/src/index.ts index a34127b..2cd9361 100644 --- a/apps/shinkai-tool-perplexity/src/index.ts +++ b/apps/shinkai-tool-perplexity/src/index.ts @@ -40,6 +40,18 @@ export const run: Run = async ( console.log('Filling textarea with query:', params.query); await page.fill('textarea', params.query); + try { + console.log('trying to click app popup'); + await page.click('button:has(svg[data-icon="xmark"])', { timeout: 2000 }); + } catch (_) { + console.log('unable to find the x button to close the popup'); + /* + We do nothing, so we have two cases: + - the code continue and fails later because we are not able to click the "submit" button + - the code continue and it just works because the app was changed and the popup doesn't exists + */ + } + console.log('Clicking the button with the specified SVG...'); await page.click('button:has(svg[data-icon="arrow-right"])'); diff --git a/package-lock.json b/package-lock.json index 53d8309..c333d20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@shinkai_protocol/source", - "version": "0.7.18", + "version": "0.8.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@shinkai_protocol/source", - "version": "0.7.18", + "version": "0.8.1", "license": "SEE LICENSE IN LICENSE", "dependencies": { "@coinbase/coinbase-sdk": "^0.0.16", diff --git a/package.json b/package.json index 9be6d9b..7dfa817 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shinkai_protocol/source", - "version": "0.8.0", + "version": "0.8.1", "description": "This repository serves as the ecosystem to execute Shinkai tools, provided by the Shinkai team or third-party developers, in a secure environment. It provides a sandboxed space for executing these tools, ensuring that they run safely and efficiently, while also allowing for seamless integration with Rust code.", "main": "index.js", "author": "",