refactor(gemini): PathResolver::new takes a required home argument - #206
Draft
ecalifornica wants to merge 1 commit into
Draft
refactor(gemini): PathResolver::new takes a required home argument#206ecalifornica wants to merge 1 commit into
ecalifornica wants to merge 1 commit into
Conversation
|
🔍 Preview deployed: https://77f02e1d.toolpath.pages.dev |
ecalifornica
force-pushed
the
robert/config-gemini
branch
from
August 14, 2026 12:49
2ffd4f2 to
2eba22f
Compare
) toolpath-gemini reads no environment variable. The caller supplies the home directory; the crate keeps the layout below it (`<home>/.gemini`). Library (breaking, 0.7.0): - `PathResolver::new(home)` takes the home directory as a required argument. `GeminiConvo::new(home)` and `ConvoIO::new(home)` take the same argument. - Delete the `Default` impls on the three types, `with_home`, the private `dirs::home_dir` helper, and the `NoHomeDirectory` error variant. - Keep `with_gemini_dir` as the full override. - The home directory is always present, so `home_dir()`, `gemini_dir()`, `projects_file()`, `tmp_dir()`, and `ConvoIO::gemini_dir_path()` return a path, not a `Result`. Callers inside the crate drop the dead error arms. path-cli: - `providers::gemini_resolver` returns `Option<PathResolver>`. `None` means `Config` carries no home directory, so Gemini is out of reach. - `harness_bundle` omits the Gemini manager in that case. - `providers::require_gemini_resolver` reports "cannot determine the home directory" for the 5 commands that target Gemini. Version bump per the release checklist: crate manifest, workspace dependency, site/_data/crates.json, CHANGELOG.md.
ecalifornica
force-pushed
the
robert/config-gemini
branch
from
August 14, 2026 13:13
2eba22f to
8929e4f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #185. It sets the pattern for the remaining provider crates.
toolpath-geminireads no environment variable. The caller supplies thehome directory. The crate keeps the layout below it: Gemini data is in
<home>/.gemini.toolpath-gemini, breaking, 0.7.0
PathResolver::new(home)takes the home directory as a requiredargument.
GeminiConvo::new(home)andConvoIO::new(home)take the sameargument.
Defaultimpls onPathResolver,ConvoIO, andGeminiConvo;PathResolver::with_home; the privatedirs::home_dirhelper; the
NoHomeDirectoryerror variant.with_gemini_dirstays as the full override.instead of a
Result:home_dir,gemini_dir,projects_file,tmp_dir,ConvoIO::gemini_dir_path,GeminiConvo::gemini_dir_path.project_dirand everything below it keep theirResult. Their erroris a failed read of
projects.json, not a missing home.path-cli
providers::gemini_resolverreturnsOption<PathResolver>.Nonemeans
Configcarries no home directory, so the Gemini harness is outof reach.
harness_bundleomits the Gemini manager when the resolver isNone.providers::require_gemini_resolverturnsNoneinto an error. The 5commands that target Gemini use it:
p list gemini,p import gemini,p export gemini --project,show gemini, and the single-sessionderive.