feat(copilot): add caching, incremental parsing, fixture tests, and agent launcher#145
Open
jacola wants to merge 7 commits intomarcus:mainfrom
Open
feat(copilot): add caching, incremental parsing, fixture tests, and agent launcher#145jacola wants to merge 7 commits intomarcus:mainfrom
jacola wants to merge 7 commits intomarcus:mainfrom
Conversation
Implement MessageSearcher interface for cross-conversation search. Uses adapter.SearchMessagesSlice helper for efficient searching with regex and case-sensitivity options.
Add Copilot CLI to the list of supported agents in both README and conversations plugin documentation.
Use a.ID(), a.Name(), a.Icon() instead of constants directly to match pattern used by all other adapters.
…gent launcher Addresses PR review feedback: - Add metadata cache (workspace.yaml) and message cache (cache.Cache[T]) with path+size+modTime keys and LRU eviction - Implement 3-way cache decision in Messages() (hit/grew/changed) - Add incremental JSONL parsing via cache.IncrementalReader - Fix retroactive tool result linking for tool.execution_complete events - Add defensive copy helpers (copyMessages, copyStringMap) - Replace environment-dependent tests with fixture-based tests using testdata/ (valid_events, tool_linking, malformed, empty) - Use cache.NewScanner pool for scanner buffers - Add GitHub Copilot CLI as launchable agent in workspace plugin
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
Builds on PR #115 by addressing the review feedback and adding Copilot CLI as a launchable agent.
Changes
1. Metadata/message caching
metaCache(map with path+size+modTime keys) forworkspace.yamlreadscache.Cache[messageCacheEntry](LRU-bounded, 128 entries) for messagesDetect(),Sessions(), andsessionMatchesProject()now usereadWorkspaceCached()countMessagesCached()returns cached count when available2. Incremental JSONL parsing
Messages()uses 3-way cache decision: exact hit → defensive copy, file grew →parseMessagesIncremental()viacache.IncrementalReader, otherwise full re-parsecache.NewScannerpool for scanner bufferstool.execution_completeevents arrive after assistant messages)3. Fixture-based tests
testdata/with 5 fixtures:workspace.yaml,valid_events.jsonl,tool_linking.jsonl,malformed.jsonl,empty.jsonlsetupTestSession()helper with temp dirs — no moret.Skipon missing real sessions4. Agent launcher (bonus)
AgentCopilotto workspace plugin so Copilot CLI appears in the agent selection UI when creating sessionsTesting
go build ./cmd/sidecar/succeedsRelated