Skip to content

Commit 2fb333d

Browse files
committed
Merge branch 'master' of https://github.com/ethereum/remix-project into fixloggingdesktop
2 parents 656b45c + f002d36 commit 2fb333d

File tree

91 files changed

+1805
-753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+1805
-753
lines changed

.env.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ WALLET_CONNECT_PROJECT_ID=<project_id>
66
NOIR_COMPILER_BASE_URL_DEV=<dev_base_endpoint>
77
NOIR_COMPILER_BASE_URL_PROD=<prod_base_endpoint>
88
NOIR_COMPILER_WS_URL_DEV=<dev_websocket_url>
9-
NOIR_COMPILER_WS_URL_PROD=<prod_websocket_url>
9+
NOIR_COMPILER_WS_URL_PROD=<prod_websocket_url>

.github/workflows/pr-reminder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
2020
freeze-date: '2025-07-21T18:00:00Z'
2121
- name: Reminder for standup
22-
if: github.event.schedule == '55 8 * * 1-5'
22+
if: github.event.schedule == '52 8 * * 1-5'
2323
uses: Aniket-Engg/pr-reviews-reminder-action@master
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

apps/remix-dapp/src/locales/en/udapp.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@
6363
"udapp.injectedTitle": "Unfortunately it's not possible to create an account using injected provider. Please create the account directly from your provider (i.e metamask or other of the same type).",
6464
"udapp.createSmartAccount": "Create Gnosis Safe Smart Account",
6565
"udapp.createSmartAccountAlpha": "Create Gnosis Safe Smart Account [ALPHA]",
66-
"udapp.createSmartAccountDesc1":"ERC-4337 introduces smart contracts accounts, which are more advanced than traditional EOAs. These accounts offer features like multi-signature functionality, gasless transactions and custom transaction rules.",
67-
"udapp.createSmartAccountDesc2":"These smart contract accounts are often referred to as Smart Accounts. A Safe Smart Account is a Smart Account with the multi-signature functionality of Gnosis Safe at its core.",
68-
"udapp.createSmartAccountDesc3":"A Smart Account will be created with address listed below as the OWNER. The Owner account signs each transaction (user-operation) made using Smart Account.",
69-
"udapp.createSmartAccountDesc4":"A Smart Account will, by default, have a PAYMASTER attached to it to execute GASLESS transactions. Currently, in Remix, the 4337 updates only work on the SEPOLIA testnet. ",
70-
"udapp.createSmartAccountDesc5":"The Smart Account creation will require signing an initial transaction in the next step.",
66+
"udapp.createSmartAccountDesc1":"ERC-4337 introduces smart contract accounts, also referred as Smart Accounts. These accounts are more advanced than traditional EOAs and offer features like multi-signature functionality, gasless transactions and custom transaction rules.",
67+
"udapp.createSmartAccountDesc2":"A Safe Smart Account is a Smart Account with the multi-signature functionality of Gnosis Safe at its core.",
68+
"udapp.createSmartAccountDesc3":"Here, a Smart Account will be created with address listed below as the OWNER. The Owner account signs each transaction (user-operation) made using Smart Account.",
69+
"udapp.createSmartAccountDesc4":"This Smart Account will, by default, have a PAYMASTER attached to it to execute GASLESS transactions. Currently, in Remix, the ERC4337 updates only work for GNOSIS Mainnet & Ethereum SEPOLIA testnet. ",
70+
"udapp.createSmartAccountDesc5":"Please note that the Smart Account creation will require signing an initial transaction on the next step.",
7171
"udapp.continue": "Continue",
7272
"udapp.authorize": "Authorize",
7373
"udapp.createNewAccount": "Create a new account",

apps/remix-ide-e2e/src/commands/assistantClearChat.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ import { NightwatchBrowser } from 'nightwatch'
22
import EventEmitter from 'events'
33

44
class AssistantClearChat extends EventEmitter {
5-
command(this: NightwatchBrowser): NightwatchBrowser {
6-
this.api.perform((done) => {
7-
clearChat(this.api, () => {
8-
done()
9-
this.emit('complete')
10-
})
11-
})
12-
return this
13-
}
5+
command(this: NightwatchBrowser): NightwatchBrowser {
6+
this.api.perform((done) => {
7+
clearChat(this.api, () => {
8+
done()
9+
this.emit('complete')
10+
})
11+
})
12+
return this
13+
}
1414
}
1515

1616
function clearChat(browser: NightwatchBrowser, done: VoidFunction) {
17-
browser
18-
.execute(function () {
19-
(window as any).remixAIChat.current.clearChat();
20-
}, [])
17+
browser
18+
.execute(function () {
19+
(window as any).remixAIChat.current.clearChat();
20+
}, [])
2121

22-
done()
22+
done()
2323
}
2424

2525
module.exports = AssistantClearChat;

apps/remix-ide-e2e/src/commands/assistantSetProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function setAssistant(browser: NightwatchBrowser, provider: string, done: VoidFu
3030
selector: "//*[@data-id='remix-ai-streaming' and @data-streaming='false']",
3131
})
3232
//.pause()
33-
.perform(() => done())
33+
.perform(() => done())
3434
}
3535

3636
module.exports = SetAssistantProvider

apps/remix-ide-e2e/src/helpers/init.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ type LoadPlugin = {
88
url: string
99
}
1010

11-
1211
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1312
export default function (browser: NightwatchBrowser, callback: VoidFunction, url?: string, preloadPlugins = true, loadPlugin?: LoadPlugin, hideToolTips: boolean = true): void {
1413
browser

apps/remix-ide-e2e/src/tests/ai_panel.test.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ module.exports = {
2222
.addFile('Untitled.sol', sources[0]['Untitled.sol'])
2323
},
2424
// Conversation starter button with data id 'explain-editor' doesn't exist anymore
25-
'Should explain the contract #group1': function (browser: NightwatchBrowser) {
25+
'Should contain message starters #group1': function (browser: NightwatchBrowser) {
2626
browser
2727
.clickLaunchIcon('remixaiassistant')
2828
.waitForElementVisible('*[data-id="remix-ai-assistant-starter-0"]')
2929
.click('*[data-id="remix-ai-assistant-starter-0"]')
3030
.waitForElementVisible('*[data-id="remix-ai-assistant"]')
3131
.waitForElementVisible({
3232
locateStrategy: 'xpath',
33-
selector: '//div[contains(@class,"chat-bubble") and contains(.,"Explain what a modifier is")]'
33+
selector: '//*[contains(@class,"chat-bubble") and contains(.,"What is a modifier?")]'
3434
})
3535
.waitForElementPresent({
3636
locateStrategy: 'xpath',
@@ -55,7 +55,6 @@ module.exports = {
5555
locateStrategy: 'xpath',
5656
selector: "//*[@data-id='remix-ai-streaming' and @data-streaming='false']"
5757
})
58-
5958
},
6059
'Should select the AI assistant provider #group1': function (browser: NightwatchBrowser) {
6160
browser
@@ -81,21 +80,23 @@ module.exports = {
8180
locateStrategy: 'xpath',
8281
timeout: 120000
8382
})
84-
.waitForElementPresent('*[data-id="remix-ai-assistant-ready"]')
83+
// .waitForElementPresent('*[data-id="remix-ai-assistant-ready"]')
8584
.assistantAddContext('currentFile')
8685
.waitForElementVisible({
8786
locateStrategy: 'xpath',
88-
selector: `//*[contains(@class,"aiContext-file") and contains(.,"Untitled.sol")]`
87+
selector: '//*[@data-id="composer-ai-add-context"]'
8988
})
89+
.assert.containsText('*[data-id="composer-ai-add-context"]', 'Current File')
9090
},
9191
'Should add workspace as context to the AI assistant #group1': function (browser: NightwatchBrowser) {
9292
browser
9393
.waitForElementPresent('*[data-id="remix-ai-assistant-ready"]')
9494
.assistantAddContext('workspace')
9595
.waitForElementVisible({
9696
locateStrategy: 'xpath',
97-
selector: '//*[contains(@class,"aiContext-file") and contains(.,"@workspace")]'
97+
selector: '//*[@data-id="composer-ai-add-context"]'
9898
})
99+
.assert.containsText('*[data-id="composer-ai-add-context"]', 'Workspace')
99100
},
100101

101102
'Should add opened files as context to the AI assistant #group1': function (browser: NightwatchBrowser) {
@@ -113,8 +114,9 @@ module.exports = {
113114
.assistantAddContext('openedFiles')
114115
.waitForElementVisible({
115116
locateStrategy: 'xpath',
116-
selector: '//*[contains(@class,"aiContext-file") and contains(.,"anotherFile.sol")]'
117+
selector: '//*[@data-id="composer-ai-add-context"]'
117118
})
119+
.assert.containsText('*[data-id="composer-ai-add-context"]', 'Open Files')
118120
},
119121

120122
'Should generate new workspace contract code with the AI assistant #group1': function (browser: NightwatchBrowser) {
@@ -171,11 +173,11 @@ module.exports = {
171173
locateStrategy: 'xpath',
172174
timeout: 120000
173175
})
174-
.waitForElementVisible('*[data-id="composer-ai-workspace-generate"]')
175-
.click('*[data-id="composer-ai-workspace-generate"]')
176+
.waitForElementVisible('*[data-id="remix-ai-workspace-generate"]')
177+
.click('*[data-id="remix-ai-workspace-generate"]')
176178
.waitForElementVisible('*[data-id="generate-workspaceModalDialogModalBody-react"]')
177-
.click('*[data-id="modalDialogCustomPromp"]')
178-
.setValue('*[data-id="modalDialogCustomPromp"]', 'a simple ERC20 contract')
179+
.click('*[data-id="modalDialogCustomTextarea"]')
180+
.setValue('*[data-id="modalDialogCustomTextarea"]', 'a simple ERC20 contract')
179181
.click('*[data-id="generate-workspace-modal-footer-ok-react"]')
180182
.waitForElementVisible({
181183
locateStrategy: 'xpath',
@@ -268,4 +270,4 @@ module.exports = {
268270
.clickLaunchIcon('filePanel')
269271
.waitForElementNotVisible('*[data-id="remix-ai-assistant"]', 5000)
270272
},
271-
}
273+
}

apps/remix-ide-e2e/yarn.lock

Lines changed: 60 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,17 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0:
15211521
ripemd160 "^2.0.1"
15221522
sha.js "^2.4.0"
15231523

1524-
create-hmac@^1.1.4, create-hmac@^1.1.7:
1524+
create-hash@~1.1.3:
1525+
version "1.1.3"
1526+
resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.1.3.tgz#606042ac8b9262750f483caddab0f5819172d8fd"
1527+
integrity sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==
1528+
dependencies:
1529+
cipher-base "^1.0.1"
1530+
inherits "^2.0.1"
1531+
ripemd160 "^2.0.0"
1532+
sha.js "^2.4.0"
1533+
1534+
create-hmac@^1.1.7:
15251535
version "1.1.7"
15261536
resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff"
15271537
integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==
@@ -2002,10 +2012,10 @@ ethers@^5.4.2, ethers@^5.7.2:
20022012
"@ethersproject/web" "5.8.0"
20032013
"@ethersproject/wordlists" "5.8.0"
20042014

2005-
ethers@^6.13.7:
2006-
version "6.13.7"
2007-
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.7.tgz#7457fcb32413b441a3ee6e9f4cd63bf782de6226"
2008-
integrity sha512-qbaJ0uIrjh+huP1Lad2f2QtzW5dcqSVjIzVH6yWB4dKoMuj2WqYz5aMeeQTCNpAKgTJBM5J9vcc2cYJ23UAimQ==
2015+
ethers@^6.14.0:
2016+
version "6.14.4"
2017+
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.14.4.tgz#0f6fbc562a8425c7c888da307fa71ef796be0c04"
2018+
integrity sha512-Jm/dzRs2Z9iBrT6e9TvGxyb5YVKAPLlpna7hjxH7KH/++DSh2T/JVmQUv7iHI5E55hDbp/gEVvstWYXVxXFzsA==
20092019
dependencies:
20102020
"@adraffy/ens-normalize" "1.10.1"
20112021
"@noble/curves" "1.2.0"
@@ -2503,6 +2513,13 @@ has@^1.0.3:
25032513
dependencies:
25042514
function-bind "^1.1.1"
25052515

2516+
hash-base@^2.0.0:
2517+
version "2.0.2"
2518+
resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1"
2519+
integrity sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==
2520+
dependencies:
2521+
inherits "^2.0.1"
2522+
25062523
hash-base@^3.0.0:
25072524
version "3.1.0"
25082525
resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33"
@@ -2877,7 +2894,7 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9:
28772894
dependencies:
28782895
which-typed-array "^1.1.11"
28792896

2880-
is-typed-array@^1.1.3:
2897+
is-typed-array@^1.1.14, is-typed-array@^1.1.3:
28812898
version "1.1.15"
28822899
resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.15.tgz#4bfb4a45b61cee83a5a46fba778e4e8d59c0ce0b"
28832900
integrity sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==
@@ -3678,15 +3695,16 @@ [email protected]:
36783695
integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==
36793696

36803697
pbkdf2@^3.0.17:
3681-
version "3.1.2"
3682-
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075"
3683-
integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==
3698+
version "3.1.3"
3699+
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.3.tgz#8be674d591d65658113424592a95d1517318dd4b"
3700+
integrity sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==
36843701
dependencies:
3685-
create-hash "^1.1.2"
3686-
create-hmac "^1.1.4"
3687-
ripemd160 "^2.0.1"
3688-
safe-buffer "^5.0.1"
3689-
sha.js "^2.4.8"
3702+
create-hash "~1.1.3"
3703+
create-hmac "^1.1.7"
3704+
ripemd160 "=2.0.1"
3705+
safe-buffer "^5.2.1"
3706+
sha.js "^2.4.11"
3707+
to-buffer "^1.2.0"
36903708

36913709
36923710
version "0.2.25"
@@ -3913,6 +3931,14 @@ rimraf@^3.0.0:
39133931
dependencies:
39143932
glob "^7.1.3"
39153933

3934+
ripemd160@=2.0.1:
3935+
version "2.0.1"
3936+
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7"
3937+
integrity sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==
3938+
dependencies:
3939+
hash-base "^2.0.0"
3940+
inherits "^2.0.1"
3941+
39163942
ripemd160@^2.0.0, ripemd160@^2.0.1:
39173943
version "2.0.2"
39183944
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
@@ -3965,7 +3991,7 @@ [email protected], safe-buffer@~5.1.0, safe-buffer@~5.1.1:
39653991
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
39663992
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
39673993

3968-
safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0:
3994+
safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0:
39693995
version "5.2.1"
39703996
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
39713997
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -4088,7 +4114,7 @@ setimmediate@^1.0.5:
40884114
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
40894115
integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==
40904116

4091-
sha.js@^2.4.0, sha.js@^2.4.8:
4117+
sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8:
40924118
version "2.4.11"
40934119
resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7"
40944120
integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==
@@ -4337,6 +4363,15 @@ tmp@^0.2.1:
43374363
dependencies:
43384364
rimraf "^3.0.0"
43394365

4366+
to-buffer@^1.2.0:
4367+
version "1.2.1"
4368+
resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.2.1.tgz#2ce650cdb262e9112a18e65dc29dcb513c8155e0"
4369+
integrity sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==
4370+
dependencies:
4371+
isarray "^2.0.5"
4372+
safe-buffer "^5.2.1"
4373+
typed-array-buffer "^1.0.3"
4374+
43404375
to-object-path@^0.3.0:
43414376
version "0.3.0"
43424377
resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
@@ -4418,6 +4453,15 @@ typed-array-buffer@^1.0.0:
44184453
get-intrinsic "^1.2.1"
44194454
is-typed-array "^1.1.10"
44204455

4456+
typed-array-buffer@^1.0.3:
4457+
version "1.0.3"
4458+
resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz#a72395450a4869ec033fd549371b47af3a2ee536"
4459+
integrity sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==
4460+
dependencies:
4461+
call-bound "^1.0.3"
4462+
es-errors "^1.3.0"
4463+
is-typed-array "^1.1.14"
4464+
44214465
typed-array-byte-length@^1.0.0:
44224466
version "1.0.0"
44234467
resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0"

apps/remix-ide/src/app/components/side-panel.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,28 @@ export class SidePanel extends AbstractPanel {
7070
}
7171

7272
async pinView (profile) {
73+
const active = this.currentFocus()
7374
await this.call('pinnedPanel', 'pinView', profile, this.plugins[profile.name]?.view)
74-
if (this.plugins[profile.name].active) this.call('menuicons', 'select', 'filePanel')
75+
if (this.plugins[profile.name].active) {
76+
this.call('menuicons', 'select', 'filePanel')
77+
}
78+
if (active === profile.name) this.call('menuicons', 'select', active.length > 1 ? active : 'filePanel')
7579
super.remove(profile.name)
7680
this.renderComponent()
7781
}
7882

7983
async unPinView (profile, view) {
8084
const activePlugin = this.currentFocus()
81-
8285
if (activePlugin === profile.name) throw new Error(`Plugin ${profile.name} already unpinned`)
8386
this.loggedState = await this.call('pluginStateLogger', 'getPluginState', profile.name)
8487
super.addView(profile, view)
8588
this.plugins[activePlugin].active = false
8689
this.plugins[profile.name].active = true
87-
this.showContent(profile.name)
90+
if (profile.name !== 'remixaiassistant') {
91+
this.showContent(profile.name)
92+
}
93+
this.emit('focusChanged', profile.name)
94+
// this.showContent(profile.name)
8895
}
8996

9097
/**
@@ -93,8 +100,9 @@ export class SidePanel extends AbstractPanel {
93100
*/
94101
async showContent(name) {
95102
super.showContent(name)
96-
if (name === 'remixaiassistant') { // TODO: should this be a plugin feature?
97-
this.pinView(this.plugins['remixaiassistant'].profile)
103+
if (name === 'remixaiassistant') {
104+
await this.call('sidePanel', 'pinView', this.plugins[name].profile)
105+
return
98106
}
99107
this.emit('focusChanged', name)
100108
this.renderComponent()

apps/remix-ide/src/app/editor/editor.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const profile = {
1313
name: 'editor',
1414
description: 'service - editor',
1515
version: packageJson.version,
16-
methods: ['highlight', 'discardHighlight', 'clearAnnotations', 'addLineText', 'discardLineTexts', 'addAnnotation', 'gotoLine', 'revealRange', 'getCursorPosition', 'open', 'addModel','addErrorMarker', 'clearErrorMarkers', 'getText', 'getPositionAt', 'openReadOnly'],
16+
methods: ['highlight', 'discardHighlight', 'clearAnnotations', 'addLineText', 'discardLineTexts', 'addAnnotation', 'gotoLine', 'revealRange', 'getCursorPosition', 'open', 'addModel','addErrorMarker', 'clearErrorMarkers', 'getText', 'getPositionAt', 'openReadOnly', 'showCustomDiff'],
1717
}
1818

1919
export default class Editor extends Plugin {
@@ -274,6 +274,10 @@ export default class Editor extends Plugin {
274274
return this.api.findMatches(this.currentFile, string)
275275
}
276276

277+
async showCustomDiff (file, content) {
278+
return this.api.showCustomDiff(file, content)
279+
}
280+
277281
addModel(path, content) {
278282
this.emit('addModel', content, this._getMode(path), path, this.readOnlySessions[path])
279283
}

0 commit comments

Comments
 (0)