fix(antigravity): discover legacy workspace skills (#9410)

Co-authored-by: Simone <[email protected]>
This commit is contained in:
SimoneandSimone authored and GitHub committed 2026-09-03 16:17:57 -07:00
1 parent 80b53730d1
commit 0aae1e2ad7
3 files changed
+28 -1

No files matched your search

@@ -28,7 +28,7 @@ const makeWorkspace = Effect.fn("makeWorkspace")(function* () {
});
it.layer(NodeServices.layer)("discoverAntigravitySkills", (it) => {
it.effect("reads skill names, descriptions and paths from all four native roots", () =>
it.effect("reads skill names, descriptions and paths from the current native roots", () =>
Effect.gen(function* () {
const path = yield* Path.Path;
const input = yield* makeWorkspace();
@@ -63,6 +63,27 @@ it.layer(NodeServices.layer)("discoverAntigravitySkills", (it) => {
}),
);
it.effect("discovers skills from the legacy workspace root", () =>
Effect.gen(function* () {
const path = yield* Path.Path;
const input = yield* makeWorkspace();
const skillPath = yield* writeSkill(
path.join(input.cwd, ".agent", "skills", "review"),
"---\nname: review\ndescription: Review changes.\n---\n",
);
assert.deepEqual(yield* discoverAntigravitySkills(input), [
{
name: "review",
description: "Review changes.",
path: skillPath,
scope: "project",
enabled: true,
},
]);
}),
);
it.effect("uses native root order for duplicate names", () =>
Effect.gen(function* () {
const fileSystem = yield* FileSystem.FileSystem;
@@ -73,6 +94,7 @@ it.layer(NodeServices.layer)("discoverAntigravitySkills", (it) => {
path.join(input.cwd, ".gemini", "skills"),
path.join(input.profileDirectory, "antigravity-cli", "skills"),
path.join(input.cwd, ".agents", "skills"),
path.join(input.cwd, ".agent", "skills"),
];
for (const [index, root] of roots.entries()) {
yield* writeSkill(
@@ -134,6 +134,7 @@ export const discoverAntigravitySkills = Effect.fn("discoverAntigravitySkills")(
scope: "user",
},
{ directory: path.resolve(input.cwd, ".agents", "skills"), scope: "project" },
{ directory: path.resolve(input.cwd, ".agent", "skills"), scope: "project" },
];
const budget: ScanBudget = {
remainingBytes: MAX_SCAN_BYTES,
+4
View File
@@ -117,6 +117,10 @@ T3 Code asks you to select an available model instead of silently changing it.
Use Antigravity's native `/plan` command to request a plan. T3 Code's separate Plan mode control
is not available for this provider.
Project skills should use `.agents/skills`. T3 Code also discovers `.gemini/skills` and the legacy
`.agent/skills` location. When multiple locations define the same skill name, `.gemini/skills`
takes precedence, followed by `.agents/skills` and then `.agent/skills`.
Antigravity reads and edits workspace files through T3 Code. Each write shows up as a file
change approval with the content, so **Supervised** and **Auto-accept edits** behave the same way
they do for other providers. Attach images, PDFs, text files, or audio clips to a message and