CodeCompanion History Extension for Neovim saves, browses, and restores chat sessions. Developers using CodeCompanion AI chat plugin can manage conversation history. Integrates with Neovim and supports Claude AI agents.
git clone https://github.com/ravitemer/codecompanion-history.nvim.gitCodeCompanion History Extension for Neovim saves, browses, and restores chat sessions. Developers using CodeCompanion AI chat plugin can manage conversation history. Integrates with Neovim and supports Claude AI agents.
[{"step":"Open the session browser in Neovim","action":"Run `:CodeCompanionHistory` to list all saved sessions. Filter by project using `:CodeCompanionHistory /backend-services/` or search by keyword with `:CodeCompanionHistory /memory leak/`.","tip":"Use `:CodeCompanionHistory --today` to see today's sessions only."},{"step":"Select and restore a session","action":"Highlight a session (e.g., `2024-05-15_14-30`) and press `<CR>` to restore it. Alternatively, use `:CodeCompanionHistory restore 2024-05-15_14-30` to load directly.","tip":"Add `:CodeCompanionHistory restore` to your `init.lua` to auto-restore the last session on Neovim startup."},{"step":"Extract and organize insights","action":"Use the restored chat to generate a summary. For example, run `:lua require('codecompanion.history').extract({ format = 'markdown', focus = 'code_snippets' })` to export key code changes.","tip":"Combine with `:CodeCompanion` to ask follow-up questions like 'How does the weakref solution compare to using a bounded cache?'"},{"step":"Save or archive the session","action":"Mark resolved sessions with `:CodeCompanionHistory archive 2024-05-15_14-30` or delete outdated ones with `:CodeCompanionHistory delete 2024-04-01_*`.","tip":"Use `:CodeCompanionHistory --stats` to view session metrics (e.g., total sessions, most active project)."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/ravitemer/codecompanion-history.nvimCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use CodeCompanion History Extension for Neovim to [ACTION: restore/analyze/summarize] the chat session from [DATE/TIME] or [SESSION_NAME] in [PROJECT_DIRECTORY]. Focus on [SPECIFIC_TOPIC: e.g., error debugging, feature implementation, or refactoring]. Extract [OUTPUT_TYPE: key decisions, code snippets, or unresolved questions] and organize them into a [FORMAT: markdown table, bullet points, or actionable checklist].
### Restored Chat Session: 'Debugging Python Memory Leak' (Session ID: 2024-05-15_14-30)
**Project:** `backend-services/api-gateway`
#### Key Decisions:
| Decision Point | Context | Outcome |
|----------------|---------|---------|
| **Switched to `tracemalloc`** | Original profiler missed memory spikes | Identified `UserSessionManager` as leak source |
| **Added `weakref` to cache** | Prevented circular references in `RedisClient` | Reduced memory usage by 42% (from 1.2GB to 700MB) |
#### Code Snippets:
```python
# Before (Leak)
class UserSessionManager:
def __init__(self):
self.sessions = {} # Unbounded cache
# After (Fixed)
import weakref
class UserSessionManager:
def __init__(self):
self.sessions = weakref.WeakValueDictionary() # Auto-cleanup
```
#### Unresolved Questions:
1. **Thread safety:** Does `weakref` handle concurrent access safely? (Needs testing)
2. **Cache eviction policy:** Should we implement LRU for `sessions`?
---
*Session restored from CodeCompanion History Extension (v1.2.0). Next steps: [ ] Test thread safety, [ ] Implement LRU cache.*Create Beautiful Branded Deliverables. Ship Professionally. Repeat.
IronCalc is a spreadsheet engine and ecosystem
ITIL-aligned IT service management platform
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan