Skip to main content

Module storage

Module storage 

Source
Expand description

VS Code storage (SQLite database) operations

Enums§

VsCodeSessionFormat
VS Code session format version - helps identify which parsing strategy to use

Functions§

add_session_to_index
Add a session to the VS Code index
backup_workspace_sessions
Backup workspace sessions to a timestamped directory
count_empty_window_sessions
Count empty window sessions
delete_empty_window_session
Delete an empty window session
get_empty_window_session
Get a specific empty window session by ID
get_workspace_storage_db
Get the path to the workspace storage database
is_session_file_extension
Check if a file extension indicates a session file (.json or .jsonl)
is_vscode_running
Check if VS Code is currently running
parse_session_file
Parse a session file, automatically detecting format (.json or .jsonl)
parse_session_json
Try to parse JSON, sanitizing invalid Unicode if needed
parse_session_jsonl
Parse a JSONL (JSON Lines) session file (VS Code 1.109.0+ format) Each line is a JSON object with ‘kind’ field indicating the type:
read_chat_session_index
Read the chat session index from VS Code storage
read_empty_window_sessions
Read all empty window chat sessions (not tied to any workspace) These appear in VS Code’s “ALL SESSIONS” panel
register_all_sessions_from_directory
Register all sessions from a directory into the VS Code index
remove_session_from_index
Remove a session from the VS Code index
sync_session_index
Sync the VS Code index with sessions on disk (remove stale entries, add missing ones)
write_chat_session_index
Write the chat session index to VS Code storage
write_empty_window_session
Write an empty window session