Expand description
hindsight-copilot: GitHub Copilot log processing for hindsight-mcp
This library crate provides functionality to parse and process GitHub Copilot logs and chat sessions for consumption by the hindsight-mcp server.
§Log Locations
VS Code stores Copilot chat history in local SQLite databases and JSON files:
- macOS:
~/Library/Application Support/Code/User/workspaceStorage/<workspace-id>/chatSessions/ - Windows:
%APPDATA%\Code\User\workspaceStorage\<workspace-id>\chatSessions\ - Linux:
~/.config/Code/User/workspaceStorage/<workspace-id>/chatSessions/
§Log Format
Copilot logs follow JSON Stream / LSP Trace format when log level is set to Trace.
§Session Discovery
Use SessionDiscovery to find chat sessions across all workspaces:
use hindsight_copilot::session::{SessionDiscovery, parse_session_file};
let discovery = SessionDiscovery::new().expect("find storage");
for session in discovery.discover_sessions().expect("enumerate") {
let parsed = parse_session_file(&session.path, &session.workspace_storage_id);
println!("{:?}", parsed);
}Re-exports§
pub use error::CopilotError;pub use session::ChatMessage;pub use session::ChatSession;pub use session::DiscoveredSession;pub use session::MessageRole;pub use session::SessionDiscovery;pub use session::Variable;pub use session::WorkspaceInfo;pub use session::default_chat_sessions_dir;pub use session::parse_session_file;pub use session::parse_session_json;