Skip to main content

Module models

Module models 

Source
Expand description

Data models for VS Code chat sessions

Structs§

ChatMessage
User message in a chat request
ChatRequest
A single chat request (message + response)
ChatResponse
AI response in a chat request
ChatSession
VS Code Chat Session (version 3 format)
ChatSessionIndex
VS Code chat session index (stored in state.vscdb)
ChatSessionIndexEntry
Entry in the chat session index
ChatSessionTiming
Session timing information (VS Code 1.109+) Supports both old format (startTime/endTime) and new format (created/lastRequestStarted/lastRequestEnded)
ModelCacheEntry
Entry in the agentSessions.model.cache DB key. This cache drives the Chat panel sidebar in VS Code — sessions must have a model cache entry to be visible in the UI.
SessionWithPath
Session with its file path for internal processing
StateCacheEntry
Entry in the agentSessions.state.cache DB key. Tracks read timestamps per session for UI state (e.g., unread indicators).
Workspace
VS Code workspace information
WorkspaceJson
VS Code workspace.json structure