Add /chronicle:reindex command to rebuild local session index from JS…#312905
Merged
vijayupadya merged 3 commits intomainfrom Apr 27, 2026
Merged
Add /chronicle:reindex command to rebuild local session index from JS…#312905vijayupadya merged 3 commits intomainfrom
vijayupadya merged 3 commits intomainfrom
Conversation
…ONL logs Co-authored-by: Copilot <copilot@github.com>
# Conflicts: # extensions/copilot/src/extension/chronicle/common/sessionStoreTracking.ts
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new /chronicle:reindex slash command to rebuild the local Chronicle SQLite session store by replaying per-session JSONL debug logs written to disk.
Changes:
- Add
chronicle:reindexcommand wiring (intent routing, command registration, and localized description). - Introduce a new
sessionReindexerimplementation + unit tests to stream debug-log entries and write sessions/turns/files/refs into the SQLite store. - Refactor session-store tracking helpers to share truncation limits and utility helpers (
truncateForStore,isTerminalTool).
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/src/extension/intents/node/chronicleIntent.ts | Routes /chronicle:reindex and emits progress + telemetry for reindex runs. |
| extensions/copilot/src/extension/common/constants.ts | Registers chronicle:reindex command mapping to the Chronicle intent. |
| extensions/copilot/src/extension/chronicle/vscode-node/sessionStoreTracker.ts | Reuses shared truncation + terminal-tool detection helpers. |
| extensions/copilot/src/extension/chronicle/node/sessionReindexer.ts | New reindexer that streams JSONL debug logs and writes into the session store. |
| extensions/copilot/src/extension/chronicle/node/test/sessionReindexer.spec.ts | Adds unit coverage for the reindexer behavior. |
| extensions/copilot/src/extension/chronicle/common/sessionStoreTracking.ts | Adds shared truncation constants/helpers and terminal-tool detection. |
| extensions/copilot/package.nls.json | Adds localized description for /chronicle:reindex. |
| extensions/copilot/package.json | Contributes the chronicle:reindex slash command. |
Copilot's findings
Comments suppressed due to low confidence (1)
extensions/copilot/src/extension/chronicle/node/sessionReindexer.ts:256
processAssistantResponsereadsentry.attrs.outputMessages, but the debug logger writes the serialized output messages underattrs.responseforagent_responseentries (andllm_requestentries don't carry output messages). As-is, reindexing is likely to miss assistant responses entirely. Update the parser to use the actual attribute names fromIChatDebugFileLoggerServiceoutput (and/or support both keys for backward compatibility).
// Extract assistant response from outputMessages attribute (same as sessionStoreTracker)
const outputMessagesRaw = entry.attrs.outputMessages as string | undefined;
const assistantResponse = extractAssistantResponse(outputMessagesRaw);
- Files reviewed: 8/8 changed files
- Comments generated: 3
Co-authored-by: Copilot <copilot@github.com>
bryanchen-d
approved these changes
Apr 27, 2026
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.
Adds a /chronicle:reindex slash command that rebuilds the local Chronicle SQLite session store by re-reading JSONL debug logs from disk. This enables users to manually recover session data that the live tracker may have missed, or to populate the index after enabling the local indexing setting.