feat: add Antigravity IDE external editor support - #2189
Conversation
|
@CuteTechGuy is attempting to deploy a commit to the playcanvas Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
kpal81xd
left a comment
There was a problem hiding this comment.
Thanks for this, and nice job on the coverage. You found every site that branches on the IDE value: all three assets:idePath registrations, the launch error-console switch and its click handler, the toolbar guard, the settings dropdown, and all four context-menu visibility toggles. I went looking for a missed dispatch site and there isn't one.
Two things need to change before it can work, though, plus one thing I'd like to settle first.
1. The URL scheme is wrong, so the deep link silently does nothing
The setting value is interpolated directly as the protocol scheme, so antigravity-ide produces antigravity-ide://playcanvas.playcanvas/...:
editor/src/editor/assets/assets.ts
Lines 126 to 129 in 78d7d57
Antigravity registers antigravity://, not antigravity-ide:// (its own extension deep links use the bare antigravity:extension/<id> form). An unregistered scheme fails silently in the browser: no error, no IDE, the click just does nothing. Renaming the value to antigravity fixes it, and I've left commit-ready suggestions on every occurrence. I've also suggested dropping "IDE" from the user-visible labels, since the product is just called Antigravity.
Could you verify against a real install before we merge? A screenshot of a script opening at the right line in Antigravity would be ideal. Worth confirming the extension resolves there too: it is published on Open VSX (the registry Antigravity ships with) so it should, but the URL hardcodes the playcanvas.playcanvas identifier and the Open VSX namespace is capitalised, so please sanity-check that the handler actually fires rather than just the IDE coming to the foreground.
2. This needs the paired backend schema change
editor.codeEditor is validated server-side against a fixed set of allowed values, so choosing the new option in the Editor settings panel will be rejected and won't persist. This is the same requirement #1676 carried in its checklist. The context-menu and inspector entries would still work, since those pass the IDE explicitly rather than reading the setting, but the dropdown wouldn't. That change isn't something you can make from this repo, so we'll handle it on our side.
3. Worth settling: this doesn't scale to the next fork
Each new VS Code fork now costs an eight-file change here plus a backend update, and Windsurf, Trae and Kiro are all plausible next requests. Two shapes I'd prefer: hoist the IDE list into a single shared constant with a derived type, so the next addition touches one file instead of eight; or drop the enum entirely in favour of one "custom URL scheme" text field that covers every fork permanently.
To be clear, that isn't a criticism of this PR, which faithfully follows the pattern #1676 established. But I'd rather resolve it before we add a third hardcoded entry. Happy to take either direction here, or to land the rename first and refactor separately. Let me know which you'd prefer.
|
Just a quick question, do you use Mac Os or Windows ? With Antigravity 2.0 google split the ide and agent part. Right now there is two different app in Mac OS, Antigravity 2.0(Agent Interface) and Antgiravity IDE. Thats why I used the |
Ahh thats bad design but yes I see the split - I was wondering where there ide bit was when downloading for Mac :) |
|
Once you are ready just request me to review the PR for you @CuteTechGuy |
af9fa03 to
78d7d57
Compare
What's Changed
antigravity-ide:) as an external code editor option alongside VS Code and Cursor.Antigravity IDEoption to the Code Editor setting dropdown in user settings (editor.codeEditor).assets:idePathhandlers to constructantigravity-ide://protocol URLs for script assets.antigravity-ide.Checks
Screenshots: