Skip to content

Commit 1e844a3

Browse files
authored
fix(editors): stop treating the agy CLI as the Antigravity IDE (pingdotgg#7079)
1 parent 4408bf5 commit 1e844a3

3 files changed

Lines changed: 61 additions & 1 deletion

File tree

‎apps/server/src/process/externalLauncher.test.ts‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,18 @@ it.effect("discovers editors through the service API", () =>
923923
);
924924

925925
for (const { platform, installPath, editor, args } of [
926+
{
927+
platform: "darwin",
928+
installPath: "Applications/Antigravity IDE.app/Contents/Resources/app/bin/antigravity-ide",
929+
editor: "antigravity",
930+
args: ["--goto", "/workspace with spaces/file.ts:12:4"],
931+
},
932+
{
933+
platform: "linux",
934+
installPath: ".local/bin/antigravity-ide",
935+
editor: "antigravity",
936+
args: ["--goto", "/workspace with spaces/file.ts:12:4"],
937+
},
926938
{
927939
platform: "darwin",
928940
installPath: "Applications/Cursor.app/Contents/Resources/app/bin/code",
@@ -1028,6 +1040,45 @@ for (const { platform, installPath, editor, args } of [
10281040
);
10291041
}
10301042

1043+
// `agy` is the standalone Antigravity CLI, which installs to ~/.local/bin on
1044+
// macOS and Linux and to its own bin folder on Windows. It is not the IDE.
1045+
for (const { platform, installPath, onPath } of [
1046+
{ platform: "darwin", installPath: ".local/bin/agy", onPath: true },
1047+
{ platform: "linux", installPath: ".local/bin/agy", onPath: false },
1048+
{ platform: "win32", installPath: "agy/bin/agy.cmd", onPath: true },
1049+
] as const) {
1050+
it.effect.skipIf(windowsHost && platform !== "win32")(
1051+
`does not report the agy CLI as the Antigravity IDE on ${platform}`,
1052+
() =>
1053+
Effect.gen(function* () {
1054+
const fs = yield* FileSystem.FileSystem;
1055+
const path = yield* Path.Path;
1056+
const home = yield* fs.makeTempDirectoryScoped({ prefix: "t3-agy-cli-" });
1057+
const executable = path.join(home, installPath);
1058+
yield* fs.makeDirectory(path.dirname(executable), { recursive: true });
1059+
yield* fs.writeFileString(executable, "#!/bin/sh\n");
1060+
yield* fs.chmod(executable, 0o755);
1061+
const editors = yield* Effect.gen(function* () {
1062+
const launcher = yield* ExternalLauncher.ExternalLauncher;
1063+
return yield* launcher.resolveAvailableEditors();
1064+
}).pipe(
1065+
Effect.provide(
1066+
testLayer({
1067+
platform,
1068+
env: {
1069+
HOME: home,
1070+
LOCALAPPDATA: home,
1071+
PATH: onPath ? path.dirname(executable) : path.join(home, "empty"),
1072+
PATHEXT: ".COM;.EXE;.BAT;.CMD",
1073+
},
1074+
}),
1075+
),
1076+
);
1077+
assert.notInclude(editors, "antigravity");
1078+
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
1079+
);
1080+
}
1081+
10311082
it.effect.skipIf(windowsHost)("ignores unusable app bundles and keeps PATH launchers first", () =>
10321083
Effect.gen(function* () {
10331084
const fs = yield* FileSystem.FileSystem;

‎packages/contracts/src/editor.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ export const EDITORS = [
5959
launchStyle: "direct-path",
6060
remoteScheme: "zed",
6161
},
62-
{ id: "antigravity", label: "Antigravity", commands: ["agy"], launchStyle: "goto" },
62+
{
63+
id: "antigravity",
64+
label: "Antigravity",
65+
// `agy` is the standalone Antigravity CLI, not the IDE. The IDE bundle
66+
// ships `antigravity-ide`, so it comes first for install-folder lookups.
67+
commands: ["antigravity-ide", "agy-ide"],
68+
launchStyle: "goto",
69+
},
6370
{ id: "idea", label: "IntelliJ IDEA", commands: ["idea"], launchStyle: "line-column" },
6471
{ id: "aqua", label: "Aqua", commands: ["aqua"], launchStyle: "line-column" },
6572
{ id: "clion", label: "CLion", commands: ["clion"], launchStyle: "line-column" },

‎packages/shared/src/editor.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ type Editor = (typeof EDITORS)[number];
1212
const installNames: Partial<Record<Editor["id"], ReadonlyArray<string>>> = {
1313
vscode: ["Visual Studio Code"],
1414
"vscode-insiders": ["Visual Studio Code - Insiders"],
15+
// `Antigravity.app` is the separate Hub, not the IDE.
16+
antigravity: ["Antigravity IDE"],
1517
idea: ["IntelliJ IDEA", "IntelliJ IDEA CE", "IntelliJ IDEA Ultimate"],
1618
pycharm: ["PyCharm", "PyCharm CE"],
1719
rider: ["Rider", "JetBrains Rider"],

0 commit comments

Comments
 (0)