From fd3671b0a429e8af607dd7ef9b4c6cd2b73106a6 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 13:24:21 +0530 Subject: [PATCH 1/6] fix Remix copilot status --- .../remix-ui/statusbar/src/lib/components/aiStatus.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx index 255602004f2..46ad4ba5240 100644 --- a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx @@ -14,13 +14,11 @@ export default function AIStatus(props: AIStatusProps) { const [copilotActive, setCopilotActive] = useState(false) useEffect(() => { const run = async () => { - props.plugin.on('fileManager', 'currentFileChanged', async (isAiActive) => { - const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') - setCopilotActive(aiActivate) - }) + const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') + setCopilotActive(aiActivate) } run() - }, [props.plugin.isAiActive, props.isAiActive]) + }, []) useEffect(() => { const run = async () => { @@ -30,7 +28,7 @@ export default function AIStatus(props: AIStatusProps) { }) } run() - }, [props.plugin.isAiActive]) + }, [props.plugin.isAiActive, props.plugin.isAiActive]) return ( Date: Mon, 9 Sep 2024 13:32:57 +0530 Subject: [PATCH 2/6] update wording --- libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx index 46ad4ba5240..b6b1f68891c 100644 --- a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx @@ -31,7 +31,7 @@ export default function AIStatus(props: AIStatusProps) { }, [props.plugin.isAiActive, props.plugin.isAiActive]) return (
From 7c33e0ba0f332d52545e36a631d2b17f19274bf7 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 13:34:56 +0530 Subject: [PATCH 3/6] remove terminal logs --- libs/remix-ui/settings/src/lib/remix-ui-settings.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx index 050cb9d5391..d56fe1dff98 100644 --- a/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx +++ b/libs/remix-ui/settings/src/lib/remix-ui-settings.tsx @@ -139,13 +139,11 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { const onchangeCopilotActivate = () => { if (!props.useCopilot) { copilotActivate(props.config, props.useCopilot, dispatch) - props.plugin.call('terminal', 'log', { type: 'typewriterlog', value: `Solidity copilot not activated!` }) return } const startCopilot = async () => { copilotActivate(props.config, props.useCopilot, dispatch) - props.plugin.call('terminal', 'log', { type: 'typewriterlog', value: `Solidity copilot activated!` }) } startCopilot() From c0b74de50616d205e43756c9417a34f73a8ce8c4 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 14:27:57 +0530 Subject: [PATCH 4/6] fix e2e text not visible on screen --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 91ef7d6a4f1..6503ade0081 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -246,7 +246,6 @@ module.exports = { .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000) .waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000) .pause(2000) - .assert.containsText('#journal > div:nth-child(4) > span', 'Before all:') .assert.containsText('#journal > div:nth-child(4) > span', 'Inside beforeAll') .assert.containsText('#journal > div:nth-child(5) > span', 'Check sender:') .assert.containsText('#journal > div:nth-child(5) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4') From 377f85f18e569bedb54d6f3237ff648fd1859639 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 9 Sep 2024 19:14:55 +0530 Subject: [PATCH 5/6] fix e2e --- .../src/tests/solidityUnittests.test.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 6503ade0081..8fd8ff3b682 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -246,12 +246,13 @@ module.exports = { .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000) .waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000) .pause(2000) - .assert.containsText('#journal > div:nth-child(4) > span', 'Inside beforeAll') - .assert.containsText('#journal > div:nth-child(5) > span', 'Check sender:') - .assert.containsText('#journal > div:nth-child(5) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4') - .assert.containsText('#journal > div:nth-child(6) > span', 'Check int logs:') - .assert.containsText('#journal > div:nth-child(6) > span', '10 20') - .assert.containsText('#journal > div:nth-child(6) > span', 'Number is 25') + .assert.textContains('#journal > div:nth-child(3) > span', 'Before all:') + .assert.textContains('#journal > div:nth-child(3) > span', 'Inside beforeAll') + .assert.textContains('#journal > div:nth-child(4) > span', 'Check sender:') + .assert.textContains('#journal > div:nth-child(4) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4') + .assert.textContains('#journal > div:nth-child(5) > span', 'Check int logs:') + .assert.textContains('#journal > div:nth-child(5) > span', '10 20') + .assert.textContains('#journal > div:nth-child(5) > span', 'Number is 25') .openFile('tests/hhLogs_test.sol') .removeFile('tests/hhLogs_test.sol', 'workspace_new') }, From d1b239cec52ef955d5cabecb132f2dca895d692d Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 10 Sep 2024 14:16:50 +0530 Subject: [PATCH 6/6] update text --- apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json | 6 +++--- libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json index 6541753d86b..b3f77de3013 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json +++ b/apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json @@ -4,10 +4,10 @@ "remixUiTabs.tooltipText3": "Select .sol or .yul file to compile OR a .ts or .js file to run", "remixUiTabs.tooltipText4": "To explain a contract, choose a .sol file", "remixUiTabs.tooltipText5": "Explain the contract(s) in current file [BETA]", - "remixUiTabs.tooltipText6": "Enable Remix AI Copilot [BETA]", - "remixUiTabs.tooltipText7": "Disable Remix AI Copilot [BETA]", + "remixUiTabs.tooltipText6": "Enable RemixAI Copilot [BETA]", + "remixUiTabs.tooltipText7": "Disable RemixAI Copilot [BETA]", "remixUiTabs.tooltipText8": "Remix AI Tools Documentation", - "remixUiTabs.tooltipTextDisabledCopilot": "To use Remix AI Copilot, choose a .sol file", + "remixUiTabs.tooltipTextDisabledCopilot": "To use RemixAI Copilot, choose a .sol file", "remixUiTabs.zoomOut": "Zoom out", "remixUiTabs.zoomIn": "Zoom in" } diff --git a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx index b6b1f68891c..fc6d774ce42 100644 --- a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx @@ -31,11 +31,11 @@ export default function AIStatus(props: AIStatusProps) { }, [props.plugin.isAiActive, props.plugin.isAiActive]) return (
- {copilotActive === false ? 'Remix Copilot (disabled)' : 'Remix Copilot (enabled)'} + {copilotActive === false ? 'RemixAI Copilot (disabled)' : 'RemixAI Copilot (enabled)'}