fix(editors): stop treating the agy CLI as the Antigravity IDE (#7079)
This commit is contained in:
1 parent
4408bf5a4f
commit
1e844a3d06
3 files changed
+61
-1
No files matched your search
@@ -923,6 +923,18 @@ it.effect("discovers editors through the service API", () =>
|
||||
);
|
||||
|
||||
for (const { platform, installPath, editor, args } of [
|
||||
{
|
||||
platform: "darwin",
|
||||
installPath: "Applications/Antigravity IDE.app/Contents/Resources/app/bin/antigravity-ide",
|
||||
editor: "antigravity",
|
||||
args: ["--goto", "/workspace with spaces/file.ts:12:4"],
|
||||
},
|
||||
{
|
||||
platform: "linux",
|
||||
installPath: ".local/bin/antigravity-ide",
|
||||
editor: "antigravity",
|
||||
args: ["--goto", "/workspace with spaces/file.ts:12:4"],
|
||||
},
|
||||
{
|
||||
platform: "darwin",
|
||||
installPath: "Applications/Cursor.app/Contents/Resources/app/bin/code",
|
||||
@@ -1028,6 +1040,45 @@ for (const { platform, installPath, editor, args } of [
|
||||
);
|
||||
}
|
||||
|
||||
// `agy` is the standalone Antigravity CLI, which installs to ~/.local/bin on
|
||||
// macOS and Linux and to its own bin folder on Windows. It is not the IDE.
|
||||
for (const { platform, installPath, onPath } of [
|
||||
{ platform: "darwin", installPath: ".local/bin/agy", onPath: true },
|
||||
{ platform: "linux", installPath: ".local/bin/agy", onPath: false },
|
||||
{ platform: "win32", installPath: "agy/bin/agy.cmd", onPath: true },
|
||||
] as const) {
|
||||
it.effect.skipIf(windowsHost && platform !== "win32")(
|
||||
`does not report the agy CLI as the Antigravity IDE on ${platform}`,
|
||||
() =>
|
||||
Effect.gen(function* () {
|
||||
const fs = yield* FileSystem.FileSystem;
|
||||
const path = yield* Path.Path;
|
||||
const home = yield* fs.makeTempDirectoryScoped({ prefix: "t3-agy-cli-" });
|
||||
const executable = path.join(home, installPath);
|
||||
yield* fs.makeDirectory(path.dirname(executable), { recursive: true });
|
||||
yield* fs.writeFileString(executable, "#!/bin/sh\n");
|
||||
yield* fs.chmod(executable, 0o755);
|
||||
const editors = yield* Effect.gen(function* () {
|
||||
const launcher = yield* ExternalLauncher.ExternalLauncher;
|
||||
return yield* launcher.resolveAvailableEditors();
|
||||
}).pipe(
|
||||
Effect.provide(
|
||||
testLayer({
|
||||
platform,
|
||||
env: {
|
||||
HOME: home,
|
||||
LOCALAPPDATA: home,
|
||||
PATH: onPath ? path.dirname(executable) : path.join(home, "empty"),
|
||||
PATHEXT: ".COM;.EXE;.BAT;.CMD",
|
||||
},
|
||||
}),
|
||||
),
|
||||
);
|
||||
assert.notInclude(editors, "antigravity");
|
||||
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
|
||||
);
|
||||
}
|
||||
|
||||
it.effect.skipIf(windowsHost)("ignores unusable app bundles and keeps PATH launchers first", () =>
|
||||
Effect.gen(function* () {
|
||||
const fs = yield* FileSystem.FileSystem;
|
||||
|
||||
@@ -59,7 +59,14 @@ export const EDITORS = [
|
||||
launchStyle: "direct-path",
|
||||
remoteScheme: "zed",
|
||||
},
|
||||
{ id: "antigravity", label: "Antigravity", commands: ["agy"], launchStyle: "goto" },
|
||||
{
|
||||
id: "antigravity",
|
||||
label: "Antigravity",
|
||||
// `agy` is the standalone Antigravity CLI, not the IDE. The IDE bundle
|
||||
// ships `antigravity-ide`, so it comes first for install-folder lookups.
|
||||
commands: ["antigravity-ide", "agy-ide"],
|
||||
launchStyle: "goto",
|
||||
},
|
||||
{ id: "idea", label: "IntelliJ IDEA", commands: ["idea"], launchStyle: "line-column" },
|
||||
{ id: "aqua", label: "Aqua", commands: ["aqua"], launchStyle: "line-column" },
|
||||
{ id: "clion", label: "CLion", commands: ["clion"], launchStyle: "line-column" },
|
||||
|
||||
@@ -12,6 +12,8 @@ type Editor = (typeof EDITORS)[number];
|
||||
const installNames: Partial<Record<Editor["id"], ReadonlyArray<string>>> = {
|
||||
vscode: ["Visual Studio Code"],
|
||||
"vscode-insiders": ["Visual Studio Code - Insiders"],
|
||||
// `Antigravity.app` is the separate Hub, not the IDE.
|
||||
antigravity: ["Antigravity IDE"],
|
||||
idea: ["IntelliJ IDEA", "IntelliJ IDEA CE", "IntelliJ IDEA Ultimate"],
|
||||
pycharm: ["PyCharm", "PyCharm CE"],
|
||||
rider: ["Rider", "JetBrains Rider"],
|
||||
|
||||
Reference in new issue
Block a user