codecompanion-history.nvim
A history management extension for codecompanion AI chat plugin that enables saving, browsing and restoring chat sessions.
claude mcp add --transport stdio ravitemer-codecompanion-history.nvim node path/to/server.js
How to use
CodeCompanion History is an extension for Neovim that saves, browses, and restores chat sessions within CodeCompanion. It provides features like automatic session saving, manual saves via a keybind, smart title generation, project-aware filtering, and a memory system that can index and search chat summaries with VectorCode when available. The extension supports multiple picker interfaces for browsing chats and summaries, and it can restore chats with their full context, tools, and references intact. To use it, install CodeCompanion alongside this history extension and enable the history extension in your CodeCompanion setup. Once enabled, you can save chats automatically or manually, browse saved chats with the selected picker, and restore a chat along with its full history, prompts, tool outputs, and references. The Summary system allows you to generate and browse summaries for individual chats, and the Memory tool provides vector-based search when VectorCode is installed.
How to install
Prerequisites:\n- Neovim >= 0.8.0\n- Lua support in Neovim (default)\n- CodeCompanion.nvim installed and configured\n- Optional: VectorCode CLI for the @memory tool, and optional pickers like snacks.nvim, telescope.nvim, or fzf-lua for enhanced browsing.\n\nInstallation steps:\n1) Install the history extension alongside CodeCompanion via your plugin manager. For lazy.nvim, add:\nlua\n{\n "olimorris/codecompanion.nvim",\n dependencies = {\n -- other plugins\n "ravitemer/codecompanion-history.nvim"\n }\n}\n}\n\n2) Configure the extension in your Neovim configuration to enable history features and customize options. Example:\nlua\nrequire("codecompanion").setup({\n extensions = {\n history = {\n enabled = true,\n opts = {\n keymap = "gh",\n save_chat_keymap = "sc",\n auto_save = true,\n expiration_days = 0,\n picker = "telescope",\n chat_filter = nil,\n picker_keymaps = {\n rename = { n = "r", i = "<M-r>" },\n delete = { n = "d", i = "<M-d>" },\n duplicate = { n = "<C-y>", i = "<C-y>" },\n },\n auto_generate_title = true,\n dir_to_save = vim.fn.stdpath("data") .. "/codecompanion-history",\n enable_logging = false,\n summary = {\n create_summary_keymap = "gcs",\n browse_summaries_keymap = "gbs",\n generation_opts = {\n adapter = nil,\n model = nil,\n context_size = 90000,\n include_references = true,\n include_tool_outputs = true,\n system_prompts = true\n }\n }\n }\n }\n }\n})\n\n3) Restart Neovim and verify that the history extension is loaded and enabled. You can then start saving chats automatically or manually and browse them using the configured keymaps.
Additional notes
Tips and troubleshooting:\n- If chats are not appearing, verify that dir_to_save exists and is writable (default is vim.fn.stdpath("data") .. "/codecompanion-history").\n- Ensure your picker (telescope, snacks, fzf-lua) is installed if you want enhanced browsing; otherwise the default picker will be used.\n- The system may report compatibility notes when CodeCompanion updates; if you encounter issues, check the project's issues page for compatibility notes and updates.\n- The memory feature relies on VectorCode; install VectorCode CLI to enable indexing and search; ensure it is accessible in your PATH.\n- Automatic expiration of chats is configurable; set expiration_days to 0 to disable automatic deletion.\n- If you customize title generation, you can adjust the adapter/model and refresh behavior via title_generation_opts.
Related MCP Servers
chatgpt-on-wechat
CowAgent是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、拥有长期记忆并不断成长。同时支持飞书、钉钉、企业微信应用、微信公众号、网页等接入,可选择OpenAI/Claude/Gemini/DeepSeek/ Qwen/GLM/Kimi/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助手和企业数字员工。
ai-guide
程序员鱼皮的 AI 资源大全 + Vibe Coding 零基础教程,分享大模型选择指南(DeepSeek / GPT / Gemini / Claude)、最新 AI 资讯、Prompt 提示词大全、AI 知识百科(RAG / MCP / A2A)、AI 编程教程、AI 工具用法(Cursor / Claude Code / OpenClaw / TRAE / Lovable / Agent Skills)、AI 开发框架教程(Spring AI / LangChain)、AI 产品变现指南,帮你快速掌握 AI 技术,走在时代前沿。本项目为开源文档版本,已升级为鱼皮 AI 导航网站
archestra
Secure cloud-native MCP registry, gateway & orchestrator
papersgpt-for-zotero
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.1, Claude, Grok, DeepSeek, OpenRouter, Kimi 2.5, GLM 5, SiliconFlow, GPT-oss, Gemma 3, Qwen 3.5
yutu
A fully functional MCP server and CLI for YouTube
c4-genai-suite
c4 GenAI Suite