VS Code Extension¶
Bring Sekha memory directly into Visual Studio Code for persistent coding context and conversation management.
Overview¶
The Sekha VS Code extension integrates AI memory into your editor:
- ✅ Save conversations from editor content
- ✅ Search memory semantically
- ✅ Insert context into active files
- ✅ Tree view explorer for browsing conversations
- ✅ Command palette integration
- ✅ Keyboard shortcuts for quick actions
Status: Beta - Available for testing
Installation¶
From VS Code Marketplace¶
Coming Soon: Official marketplace publication
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X/Cmd+Shift+X) - Search for "Sekha Memory Controller"
- Click Install
From Source¶
# Clone the repository
git clone https://github.com/sekha-ai/sekha-vscode.git
cd sekha-vscode
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Open in VS Code and press F5 to debug
code .
Prerequisites¶
- VS Code 1.85.0+
- Sekha Controller running at
http://localhost:8080 - Node.js 18+ (for development)
Configuration¶
Settings¶
Open VS Code settings (Ctrl+, / Cmd+,) and search for "Sekha":
{
"sekha.apiUrl": "http://localhost:8080",
"sekha.apiKey": "your-rest-api-key-here",
"sekha.autoSave": false,
"sekha.autoSaveInterval": 5,
"sekha.maxConversationsInTree": 100,
"sekha.defaultFolder": "/vscode"
}
Configuration Options:
| Setting | Type | Default | Description |
|---|---|---|---|
sekha.apiUrl | string | http://localhost:8080 | Sekha Controller API URL |
sekha.apiKey | string | "" | REST API key (min 32 characters) |
sekha.autoSave | boolean | false | Automatically save conversations |
sekha.autoSaveInterval | number | 5 | Auto-save interval in minutes |
sekha.maxConversationsInTree | number | 100 | Max conversations in tree view |
sekha.defaultFolder | string | /vscode | Default folder for saved conversations |
Get API Key¶
Your API key is configured in the Sekha Controller:
# Check your API key
cat sekha-docker/docker/.env | grep REST_API_KEY
# Or from config
cat ~/.sekha/config.toml | grep rest_api_key
Security: Never commit your API key to version control!
Features¶
1. Save Conversations¶
Store editor content as a conversation in Sekha memory.
Command: Sekha: Save Conversation
Shortcut: Ctrl+Shift+S / Cmd+Shift+S
How it works:
- Select text in editor (or use entire file)
- Run command or press shortcut
- Enter label and folder when prompted
- Conversation is stored with file context
Example:
# Selected code:
def calculate_similarity(a, b):
"""Calculate cosine similarity between two vectors."""
return np.dot(a, b) / (np.linalg.norm(a) * np.linalg.norm(b))
# Saved as:
# Label: "Cosine Similarity Function"
# Folder: "/vscode/python/utils"
# Content: Code + file path + timestamp
2. Search Memory¶
Semantically search all stored conversations.
Command: Sekha: Search Memory
Shortcut: Ctrl+Shift+F / Cmd+Shift+F
How it works:
- Run command
- Enter search query
- View results in quick pick menu
- Select result to view full conversation
Example:
Query: "How did I implement authentication?"
Results:
1. JWT Token Implementation (95% match)
/vscode/typescript/auth
Created: 2 days ago
2. OAuth2 Setup Guide (87% match)
/vscode/docs/setup
Created: 1 week ago
3. Password Hashing Function (76% match)
/vscode/python/security
Created: 3 days ago
3. Insert Context¶
Insert stored conversation content at cursor position.
Command: Sekha: Insert Context
Shortcut: Ctrl+Shift+I / Cmd+Shift+I
How it works:
- Place cursor where you want to insert
- Run command
- Browse conversations in tree or search
- Select conversation to insert
4. Search & Insert¶
Combines search and insert in one action.
Command: Sekha: Search & Insert
Shortcut: Ctrl+Shift+A / Cmd+Shift+A
Workflow:
- Run command
- Enter search query
- Select matching conversation from results
- Content inserted at cursor
5. Tree View Explorer¶
Browse all conversations in a dedicated sidebar.
Access: Click Sekha icon in Activity Bar
Features:
- View conversations by folder
- Search within tree
- Click to view conversation
- Refresh to update list
- Quick access to settings
Tree View Actions:
- Refresh - Reload conversation list
- Search - Quick search from tree
- Settings - Open Sekha settings
Keyboard Shortcuts¶
| Action | Windows/Linux | macOS |
|---|---|---|
| Save Conversation | Ctrl+Shift+S | Cmd+Shift+S |
| Search Memory | Ctrl+Shift+F | Cmd+Shift+F |
| Search & Insert | Ctrl+Shift+A | Cmd+Shift+A |
| Insert Context | Ctrl+Shift+I | Cmd+Shift+I |
Customize shortcuts:
- Open Keyboard Shortcuts (
Ctrl+K Ctrl+S/Cmd+K Cmd+S) - Search for "Sekha"
- Click on command to edit keybinding
Command Palette¶
All commands available via Ctrl+Shift+P / Cmd+Shift+P:
Sekha: Save ConversationSekha: Search MemorySekha: Insert ContextSekha: Search & InsertSekha: RefreshSekha: View ConversationSekha: Open Settings
Use Cases¶
Code Snippet Library¶
Store reusable code patterns:
# Save common patterns
- Database connection setup
- Error handling wrappers
- API endpoint templates
- Test fixtures
- Utility functions
# Retrieve later with semantic search
"How do I connect to PostgreSQL?"
"Show me error handling pattern"
Project Documentation¶
Save architecture decisions and notes:
# Store:
- Architecture decisions
- API design notes
- Performance optimization ideas
- Bug investigation notes
- Refactoring plans
# Search:
"Why did we choose MongoDB?"
"What was the caching strategy?"
Learning Journal¶
Track learning progress:
# Save:
- Tutorial notes
- Language syntax examples
- Framework patterns
- Debugging solutions
- Stack Overflow answers
# Retrieve:
"How to use React hooks?"
"Python decorator syntax"
Meeting Notes¶
Store standup and planning discussions:
# Save meeting outcomes
- Sprint planning decisions
- Code review feedback
- Architecture discussions
- Performance metrics
# Find later
"What did we decide about caching?"
"Sprint goals from last week"
Workflows¶
Daily Standup Notes¶
// 1. Write standup notes in editor
/*
Standup 2026-01-25
Yesterday:
- Fixed authentication bug in user service
- Reviewed PR #234 for API refactor
Today:
- Implement rate limiting middleware
- Update documentation
Blockers:
- Waiting on database migration approval
*/
// 2. Save with Ctrl+Shift+S
// Label: "Standup 2026-01-25"
// Folder: "/vscode/meetings/standup"
// 3. Later, search for context
// Query: "What was blocking me last week?"
Code Review Feedback¶
// 1. Write review comments
/*
PR #345 Review Notes
✅ Good:
- Clean separation of concerns
- Comprehensive tests
🔧 Suggestions:
- Extract validation logic
- Add error handling for edge cases
- Consider caching frequently accessed data
*/
// 2. Save to memory
// 3. Reference in future PRs
Bug Investigation¶
# 1. Document bug findings
"""
BUG: Memory leak in WebSocket connections
Symptoms:
- Memory grows 10MB/hour
- Connections not properly closed
Root Cause:
- Event listeners not removed on disconnect
- Circular references in connection object
Solution:
- Add cleanup in disconnect handler
- Use WeakMap for connection storage
"""
# 2. Save with context
# 3. Search later when similar issue occurs
Troubleshooting¶
Extension Not Connecting¶
Check Sekha Controller:
# Verify controller is running
curl http://localhost:8080/health
# Check logs
docker logs sekha-controller
Check VS Code Settings:
- Verify
sekha.apiUrlmatches your controller URL - Ensure
sekha.apiKeyis set and correct (min 32 characters)
No Conversations in Tree View¶
Troubleshooting:
- Click Refresh button in tree view
- Check
sekha.maxConversationsInTreesetting - Verify API key has correct permissions
- Check Sekha Controller logs for errors
Commands Not Appearing¶
Fix:
- Reload VS Code window (
Ctrl+R/Cmd+R) - Reinstall extension
- Check VS Code version (requires 1.85.0+)
Search Returns No Results¶
Debugging:
- Verify conversations exist in controller
- Test search via REST API:
- Check embedding service (Ollama) is running
- Review controller logs for search errors
Development¶
Building From Source¶
# Clone repository
git clone https://github.com/sekha-ai/sekha-vscode.git
cd sekha-vscode
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode (auto-recompile)
npm run watch
# Run tests
npm test
# Package extension
npm run package
# Generates: sekha-vscode-1.0.0.vsix
Install Local Build¶
Roadmap¶
Planned Features (v1.1+)¶
- Auto-save file changes with git integration
- Code context assembly - Smart context gathering
- Inline suggestions - Memory-aware autocomplete
- Workspace-wide memory - Project-scoped conversations
- Chat panel - Integrated memory chat interface
- Label suggestions - AI-powered auto-labeling
- Folder organization - Visual folder management
- Export/import - Backup conversations
- Multi-workspace support - Separate memories per workspace
Next Steps¶
- Python SDK - Build custom integrations
- JavaScript SDK - Web app integration
- REST API - Full API reference
- Claude Desktop - MCP integration
Support¶
- Issues: GitHub Issues
- Discord: Join Community
- Documentation: docs.sekha.dev
Contributing¶
We welcome contributions!
- Bug reports: Open an issue
- Feature requests: Submit a proposal
- Code contributions: Contributing Guide
Join the beta testing program! Report bugs and share feedback in Discord.