feat: Add multi-provider session viewer support (Codex, Gemini, OpenCode, agy)#225
feat: Add multi-provider session viewer support (Codex, Gemini, OpenCode, agy)#225iansherr wants to merge 1 commit into
Conversation
|
Important Review skippedToo many files! This PR contains 156 files, which is 6 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (156)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Extend claude-code-log from a Claude Code-only viewer into a multi-provider session viewer supporting 5 AI coding tools: Claude Code, Codex CLI, Gemini CLI, OpenCode, and Antigravity CLI (agy). Provider abstraction: - BaseProvider ABC with discover_sessions() and load_session() - ProviderRegistry for auto-discovery based on ~/. directories - 5 concrete adapters with max_messages support for previews CLI & TUI: - --provider <name> to filter to a specific provider - --list-providers to show available providers - --all-providers to generate unified cross-provider index - TUI provider filter (f key cycles through providers) All-providers unified index: - Single index.html across all providers with session counts/badges - Full-text search across all 883 sessions via hidden data div - Click search result → navigate to session HTML with #search= hash - Individual session HTML files generated during index build Bug fixes: - Search next/prev buttons on index page (navigateToMatch) - Provider badge CSS for all-providers layout Default output directory: - Changed from ./claude-code-log-output to ~/.local/agent_log_viewer/ - Keeps generated files out of project directories (XDG convention)
|
Wow, this is incredible, thanks a lot for taking the time implementing and submitting! I opened an issue to discuss on a higher level, would appreciate your insights having already done this implementation: #226 |
|
Thanks! Happy to see you're excited. Just responded in the issue discussion. Meantime, I'm going to keep tinkering with the fork, just because there are some other elements I've been itching for, like parallel processing from your todo list. I'll keep them as separate worktrees as much as possible so it's easy to pick and choose merges however you move forward. |
|
Hello Ian, this looks indeed promising. However, it seems your branch had some trouble with the symlink in the docs (docs/development), bringing in a lot of unrelated (and outdated?) changes in. As a result, CodeRabbit went back to its burrow... Can you try to tidy this up a bit, so that only the relevant changes are included? Also: |
Summary
This PR extends claude-code-log from a Claude Code-only viewer into a multi-provider session viewer that supports 5 AI coding tools: Claude Code, Codex CLI, Gemini CLI, OpenCode, and Antigravity CLI (agy).
What Changed
Provider Abstraction Layer
providers/base.py— abstractBaseProviderwithdiscover_sessions()andload_session()interfacesproviders/registry.py— auto-discovery and management of providers based on~/.directoriesclaude.py,codex.py,gemini.py,opencode.py,agy.pyCLI & TUI
--provider <name>— filter to a specific provider--list-providers— show which providers are available--all-providers— generate unified cross-provider indexfkey cycles through providers)All-Providers Unified Index
index.htmlacross all providers with session counts, provider badgesmax_messages=10)#search=URL hashBug Fixes
navigateToMatchto handle index page context correctlyProvider Notes
brain/<uuid>/.system_generated/logs/transcript.jsonl(not protobuf SQLite) — binary blobs inconversations/*.dbare not human-readablesession/*.json,message/{id}/*.json)logs/*.ndjsonwith CLI command extractionmax_messagesfor preview loadingDefault Output Directory
./claude-code-log-outputto~/.local/agent_log_viewer/--outputflag still works as beforeTesting
Scope Note
This is a substantial feature addition. I started with a fork of daaain/claude-code-log (MIT licensed) and extended it with the provider abstraction. The original Claude Code functionality is fully preserved — new providers are additive.
I'm happy to continue working on this (there are more polish items I'd like to address), but wanted to share the progress in case you'd like to review or have preferences on direction.
The output directory change is included here as a separate commit for easy extraction if you'd prefer it as a standalone PR.