Support Copilot CLI multi-storage recall and provider-based fallback#5
Open
jshessen wants to merge 2 commits intodezgit2025:mainfrom
Open
Support Copilot CLI multi-storage recall and provider-based fallback#5jshessen wants to merge 2 commits intodezgit2025:mainfrom
jshessen wants to merge 2 commits intodezgit2025:mainfrom
Conversation
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
This PR resolves Copilot CLI 1.0.34+ storage compatibility by introducing provider-based multi-storage recall instead of assuming a single SQLite layout.
Closes #3
Storage model coverage by provider
cli(Copilot CLI)~/.copilot/session-store.dblist,search,show,files,checkpoints,health,schema-checkclifallback~/.copilot/session-state/*/events.jsonllist,search,show(schema-check reports compatibility mode)vscode~/.config/Code/User/workspaceStorage/**/chatSessions/*.jsonl(+ flatpak/snap variants)list,search,show,filesjetbrains~/.config/github-copilot/chat-sessions/*+ related chat fileslist,search,show,filesneovim~/.config/github-copilot/**and~/.local/share/nvim/**chat JSON/JSONLlist,search,show,filesEnvironment overrides supported
SESSION_RECALL_DBSESSION_RECALL_CLI_STATE_ROOTSESSION_RECALL_VSCODE_STORAGESESSION_RECALL_JETBRAINS_ROOTSESSION_RECALL_NEOVIM_ROOTRuntime behavior and fallback semantics
Provider discovery
At runtime, providers are discovered and filtered to those actually available on the machine:
Command behavior in multi-storage mode
list,search,show,files,checkpointsnow route through active providers.schema-checkis provider-aware:session-state-or-sqlite) when fallback event storage is active.healthis provider-aware:UX and recall quality improvements
session-recall reposto summarize discovered repositories/workspaces across providers.What changed
src/session_recall/providers/(base.py,discovery.py,copilot_cli.py,file_backends.py,common.py)src/session_recall/commands/repos.pylist,search,show,files,checkpoints,health,schema-checksrc/session_recall/util/detect_repo.pysrc/session_recall/util/format_output.pytest_provider_backends.pytest_health_schema_multistorage.pytest_repo_scope_fallback.pytest_repos_command.pytest_list_sessions.pyHow this differs from PR #4
PR #4 primarily introduces a DB-layer adapter approach (
db/jsonl_store.py+ connect/schema integration).This PR addresses the same issue via provider routing and command-layer fallback, including:
Both aim at Issue #3 but with different architecture and operational surface area.
Validation
pytest src/session_recall/tests/ -q→ 105 passedruff check src/→ all checks passedpytest -q src/session_recall/tests/test_provider_backends.py src/session_recall/tests/test_repo_scope_fallback.py src/session_recall/tests/test_repos_command.py src/session_recall/tests/test_list_sessions.py src/session_recall/tests/test_health_schema_multistorage.py→ 18 passedCONTRIBUTING checklist
pytest src/session_recall/tests/ -qruff check src/README.md)