fix(server): Antigravity reads user skills from ~/.agents/skills #46752
Pushed7b356ff
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- @@ -256,0 +262,21 @@262+ readonly userHome: string;263+ readonly geminiSkills: string;264+}): Effect.fn.Return<265+ ReadonlyArray<readonly [string, string]>,266+ never,267+ FileSystem.FileSystem | Path.Path268+> {269+ const fs = yield* FileSystem.FileSystem;270+ const path = yield* Path.Path;271+ const agentsSkills = path.join(input.userHome, ".agents", "skills");272+ const profileSkills = path.join(input.profileDirectory, "skills");273+ const list = (directory: string) =>274+ fs.readDirectory(directory).pipe(Effect.orElseSucceed((): ReadonlyArray<string> => []));275+ const isLink = (link: string) =>276+ fs.readLink(link).pipe(277+ Effect.as(true),278+ Effect.orElseSucceed(() => false),279+ );280+ // Links are made inside this folder, so it must not lead into the user's own.281+ if (yield* isLink(profileSkills)) yield* fs.remove(profileSkills).pipe(Effect.ignore);282+ const shadowed = new Set(yield* list(input.geminiSkills));
Pushed2f76d70
- @@ -256,0 +269,21 @@269+ ReadonlyArray<readonly [string, string]>,270+ never,271+ FileSystem.FileSystem | Path.Path272+> {273+ const fs = yield* FileSystem.FileSystem;274+ const path = yield* Path.Path;275+ const agentsSkills = path.join(input.userHome, ".agents", "skills");276+ const profileSkills = path.join(input.profileDirectory, "skills");277+ const isLink = (link: string) =>278+ fs.readLink(link).pipe(279+ Effect.as(true),280+ Effect.orElseSucceed(() => false),281+ );282+ // Links are made inside this folder, so it must not lead into the user's own.283+ if (yield* isLink(profileSkills)) yield* fs.remove(profileSkills).pipe(Effect.ignore);284+ // The profile has no project skills, so only user skills compete for a name.285+ const skills = yield* discoverAntigravitySkills({286+ cwd: input.profileDirectory,287+ userHome: input.userHome,288+ profileDirectory: input.profileDirectory,289+ }).pipe(Effect.orElseSucceed((): ReadonlyArray<ServerProviderSkill> => []));
Pushedbe346a5
- @@ -256,0 +269,21 @@269+ ReadonlyArray<readonly [string, string]>,270+ never,271+ FileSystem.FileSystem | Path.Path272+> {273+ const fs = yield* FileSystem.FileSystem;274+ const path = yield* Path.Path;275+ const agentsSkills = path.join(input.userHome, ".agents", "skills");276+ const profileSkills = path.join(input.profileDirectory, "skills");277+ const isLink = (link: string) =>278+ fs.readLink(link).pipe(279+ Effect.as(true),280+ Effect.orElseSucceed(() => false),281+ );282+ // Links are made inside this folder, so it must not lead into the user's own.283+ if (yield* isLink(profileSkills)) yield* fs.remove(profileSkills).pipe(Effect.ignore);284+ // The profile has no project skills, so only user skills compete for a name.285+ const skills = yield* discoverAntigravitySkills({286+ cwd: input.profileDirectory,287+ userHome: input.userHome,288+ profileDirectory: input.profileDirectory,289+ }).pipe(Effect.orElseSucceed((): ReadonlyArray<ServerProviderSkill> => []));
Sign in to join this conversation.




macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed