Repository navigation
fix(wbfy): write an absolute skills directory path in ~/.gemini/config/skills.json - #1634
Conversation
…g/skills.json Co-authored-by: WillBooster (Antigravity) <agent@willbooster.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a compatibility issue where Antigravity CLI fails to resolve '~' paths in its configuration files. By resolving the home directory path programmatically and implementing a smarter merge strategy that removes obsolete legacy entries, the tool now generates valid, absolute paths that satisfy the CLI's requirements while maintaining user customizations and idempotency. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. The tilde path was causing strife, It would not work in agent life. An absolute path we now provide, With legacy entries cast aside. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the user agent configuration generator to resolve the global skills directory path (~/.agents/skills) to an absolute path, addressing an issue where the Antigravity CLI rejects non-absolute paths. It introduces an obsoleteItems mechanism to clean up legacy unresolved paths from previous configurations during the settings merge process. The unit tests have been refactored to verify this cleanup behavior and to use absolute paths. There are no review comments to assess, and the code changes adhere to the repository's style guidelines, so I have no additional feedback to provide.
Why
Antigravity CLI (
agyv1.5.4,customization.go:667) does not expand~in~/.gemini/config/skills.jsondespite its built-in documentation (json_configs.md), rejecting~/.agents/skillswithFailed to resolve absolute path "~/.agents/skills": ~/.agents/skills must be an absolute path: path is not absolute. Writing the resolvedos.homedir()path instead makes Antigravity CLI load global skills from<homedir>/.agents/skills, matching howuserAgentConfigs.tsalready resolves status line script paths.Requirements
required: Update Antigravity CLI configuration file generation so it does not use~, replacing~/.agents/skillsin~/.gemini/config/skills.jsonwith an absolute path without~.chosen: Drop the{ "path": "~/.agents/skills" }entry written by an earlierwbfyversion when merging~/.gemini/config/skills.jsonbecause leaving that previouswbfyoutput inentrieswould keep triggering Antigravity CLI's non-absolute path error after re-runningwbfy generate-user-agent-configs.Customer Summary
bunx @willbooster/wbfy generate-user-agent-configsnow writes the resolved absolute path to.agents/skillsunder the user's home directory into~/.gemini/config/skills.jsonand removes the previous~/.agents/skillsentry, allowing Antigravity CLI to discover shared global skills without path resolution errors.Technical Summary
sharedGlobalSkillsDirPathviapath.join(os.homedir(), '.agents/skills')inpackages/wbfy/src/generators/userAgentConfigs.tsinstead of writing'~/.agents/skills'.obsoleteItems: [{ path: '~/.agents/skills' }]on the.gemini/config/skills.jsonsetting entry and filtered matching items out oftargetinmergeAgentSettings'sarrayMergecallback so previously generated~/.agents/skillsentries are replaced cleanly while keeping user-defined entries and remaining idempotent across repeated runs.packages/wbfy/test/unit/userAgentConfigs.test.tsto run repeated invocations against the same scratchHOMEdirectory and verify both replacement of{ "path": "~/.agents/skills" }and preservation of user entries and full-line comments.Testing
bun wb test -w packages/wbfy test/unit/userAgentConfigs.test.ts(7 passed).bun run verify(install,cleanup,typecheck, andcode-gaugeall passed with 0 errors and no warnings in changed code) and PR CI passed.~/.gemini/config/skills.jsonwas not exercised in automated tests becauseagyis an external host CLI.