A VS Code extension designed to solve the "context-loss" problem in LLM chat sessions. This extension acts as a Context Manager that bridges conversations by converting your chat history into a structured, graph-based map. When your token limit expires or you switch chat sessions, you can export this graph to maintain continuity in a new session.
How it Works
Chat Integration: The extension registers as a Chat Participant (@agent-context-analyser).
Entity Mapping: As you chat, the extension automatically extracts key entities and concepts from your messages.
Graph Construction: It builds a relational graph where messages are nodes and shared entities form the links between them.
Context Transfer: When tokens expire or you reach a milestone, the extension generates a text-based "Context Graph" payload that you can copy to your clipboard and paste into any other LLM.
Features
Intelligent Extraction: Filters out stop-words and noise to focus on the core technical concepts of your conversation.
Automatic Summarization: Detects token limit errors and automatically offers a context graph as a fallback.
Clipboard Integration: Use the Get Context Graph command to quickly copy a formatted prompt-ready payload.
Strength Mapping: Tracks the frequency of entity mentions to determine the "strength" of relationships in your project context.
Usage
Using the Chat Participant :
Simply mention the extension in your VS Code Chat panel:
Type @agent-context-analyser [your message] to log context.
Type @agent-context-analyser generate graph to view the current graph structure directly in the chat response.
Using Commands :
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
Search for Agent Context Analyser: Get Context Graph.
Select Copy to Clipboard when prompted.
Paste the result into your next LLM session to resume work exactly where you left off.
Project Structure
extension.ts: The main entry point handling VS Code command registration and Chat Participant lifecycle.
contextGraph.ts: The core logic service that manages node/link data structures and entity extraction.