Add Gemini CLI support#3
Open
pdecat wants to merge 1 commit into
Open
Conversation
Brings rses to 4 tools / 12 handoff directions. Reads Gemini sessions from ~/.gemini/tmp/<projectHash>/chats/session-*.jsonl (with legacy .json fallback), resolves projectHash to cwd via ~/.gemini/projects.json. - src/parse-gemini.js: new parser handling JSONL header, $set patches, $rewindTo truncations, and the legacy single-object .json format. Reverse-lookup map covers tmp/ dirs named by either sha256 hash or the projects.json friendly name. - bin/rses.js: gemini in VALID_TOOLS, aliases gm/gem/g, picker branch, dispatch in resolveAndBuildAsync and resolveAndBuild, resume hint. - src/build-handoff.js: 'Gemini' in TOOL_NAMES. - src/launch.js: install hint for @google/gemini-cli. - src/ls.js: gemini branch in the filesystem fallback path. - README.md: tagline, examples, aliases table, sessions-read table, requirements.
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.
Summary
~/.gemini/tmp/<projectHash>/chats/session-*.jsonl(with legacy single-object.jsonfallback), honoring$setmetadata patches and$rewindTohistory truncations.projectHash→cwdvia~/.gemini/projects.json. Thetmp/dirs are named by eithersha256(absPath)or the friendly name fromprojects.jsondepending on Gemini version — thereverse-lookup handles both.
gm,gem,g→gemini.Files
src/parse-gemini.js— new parser (5 exports, mirrors the Claude parser contract).bin/rses.js—VALID_TOOLS, aliases,RESUME_HINTS, picker branch, sync + async dispatch.src/ls.js— Gemini branch in the filesystem fallback.src/build-handoff.js—gemini: 'Gemini'inTOOL_NAMES.src/launch.js— install hint for@google/gemini-cli.README.md— tagline, examples, aliases table, sessions-read table, requirements.Test plan
rses ls gemini→ table with date / cwd / first task.rses ls gemini --dir <path>→ matches both hash-named and friendly-namedtmp/subdirs.rses claude with gemini --last --dry-run→ handoff prompt names "Gemini", cwd resolved, git context + last N turns included.rses cc w gm --last --dry-run→ identical output.rses export gemini <id8>works with the 8-char filename-suffix id..jsonfiles parse correctly (verified againstsession-2026-04-21T07-58-fa6c31fc.json).rses ls(all tools) lists codex / claude / gemini / opencode sections in order.Use 'claude', 'codex', 'gemini', or 'opencode'.Verified against 134 real Gemini sessions on the dev machine.