Files
OpenCode 68a9071cf1 feat: reconcile local master with origin (exa/hot-platform hunters, leaks ledger, latest results)
Local branch had diverged from origin/master (sibling commits on the same base). Rewrote local history linearly on top of origin/master, folding in all local content: exa/hot-platform discovery hunters, leaks ledger, nightly sweep orchestrator, updated .gitignore and skill docs, plus the latest hunt output and vault state. Remote-only files (vault keys, channel scripts) were restored rather than dropped, so the resulting tree is a full union of both sides.
2026-08-07 12:53:47 +08:00

1 line
139 KiB
JSON
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{"repo": "captainflasmr/ollama-buddy", "files": {"ollama-buddy-deepseek.el": {"24826c21ac205c7eafe285a918b314492617254a": {"t": 1785746494.973466, "n": 2783, "h": "a8bb938770bd6be7", "c": ";;; ollama-buddy-deepseek.el --- DeepSeek integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n\n;;; Commentary:\n;;\n;; This extension provides DeepSeek integration for the ollama-buddy package.\n;; It allows users to interact with DeepSeek's language models using the same\n;; interface as ollama-buddy, providing seamless switching between local Ollama\n;; models and cloud-based DeepSeek models.\n;;\n;; This is a thin wrapper around `ollama-buddy-provider-create'. The\n;; defcustom variables below are preserved for backward compatibility so\n;; existing configurations continue to work.\n;;\n;; Usage:\n;; (require 'ollama-buddy-deepseek)\n;; (setq ollama-buddy-deepseek-api-key (getenv \"DEEPSEEK_API_KEY\"))\n\n;;; Code:\n\n(require 'ollama-buddy-provider)\n\n(defgroup ollama-buddy-deepseek nil\n \"DeepSeek integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-deepseek-\")\n\n(defcustom ollama-buddy-deepseek-marker-prefix \"d:\"\n \"Prefix used to identify DeepSeek models in the ollama-buddy interface.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-key \"\"\n \"API key for accessing DeepSeek services.\nGet your key from https://platform.deepseek.com/api_keys.\nConsider using `auth-source' instead of setting this directly.\"\n :type 'string\n :risky t\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-default-model \"deepseek-chat\"\n \"Default DeepSeek model to use.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-endpoint \"https://api.deepseek.com/chat/completions\"\n \"Endpoint for DeepSeek chat completions API.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-temperature 0.7\n \"Temperature setting for DeepSeek requests (0.0-2.0).\nLower values make the output more deterministic, higher values more creative.\"\n :type 'float\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-max-tokens nil\n \"Maximum number of tokens to generate in the response.\nUse nil for API default behavior (adaptive).\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-deepseek)\n\n;; Register via the generic provider system\n(ollama-buddy-provider-create\n :name \"DeepSeek\"\n :prefix ollama-buddy-deepseek-marker-prefix\n :api-key (lambda () ollama-buddy-deepseek-api-key)\n :endpoint ollama-buddy-deepseek-api-endpoint\n :default-model ollama-buddy-deepseek-default-model\n :temperature ollama-buddy-deepseek-temperature\n :max-tokens ollama-buddy-deepseek-max-tokens\n :models '(\"deepseek-chat\" \"deepseek-reasoner\"))\n\n(provide 'ollama-buddy-deepseek)\n;;; ollama-buddy-deepseek.el ends here\n"}, "00fb0d6b5da63d5aa384841e2e5e462cce99e157": {"t": 1785764949.502925, "n": 2783, "h": "a8bb938770bd6be7", "c": ";;; ollama-buddy-deepseek.el --- DeepSeek integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n\n;;; Commentary:\n;;\n;; This extension provides DeepSeek integration for the ollama-buddy package.\n;; It allows users to interact with DeepSeek's language models using the same\n;; interface as ollama-buddy, providing seamless switching between local Ollama\n;; models and cloud-based DeepSeek models.\n;;\n;; This is a thin wrapper around `ollama-buddy-provider-create'. The\n;; defcustom variables below are preserved for backward compatibility so\n;; existing configurations continue to work.\n;;\n;; Usage:\n;; (require 'ollama-buddy-deepseek)\n;; (setq ollama-buddy-deepseek-api-key (getenv \"DEEPSEEK_API_KEY\"))\n\n;;; Code:\n\n(require 'ollama-buddy-provider)\n\n(defgroup ollama-buddy-deepseek nil\n \"DeepSeek integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-deepseek-\")\n\n(defcustom ollama-buddy-deepseek-marker-prefix \"d:\"\n \"Prefix used to identify DeepSeek models in the ollama-buddy interface.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-key \"\"\n \"API key for accessing DeepSeek services.\nGet your key from https://platform.deepseek.com/api_keys.\nConsider using `auth-source' instead of setting this directly.\"\n :type 'string\n :risky t\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-default-model \"deepseek-chat\"\n \"Default DeepSeek model to use.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-endpoint \"https://api.deepseek.com/chat/completions\"\n \"Endpoint for DeepSeek chat completions API.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-temperature 0.7\n \"Temperature setting for DeepSeek requests (0.0-2.0).\nLower values make the output more deterministic, higher values more creative.\"\n :type 'float\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-max-tokens nil\n \"Maximum number of tokens to generate in the response.\nUse nil for API default behavior (adaptive).\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-deepseek)\n\n;; Register via the generic provider system\n(ollama-buddy-provider-create\n :name \"DeepSeek\"\n :prefix ollama-buddy-deepseek-marker-prefix\n :api-key (lambda () ollama-buddy-deepseek-api-key)\n :endpoint ollama-buddy-deepseek-api-endpoint\n :default-model ollama-buddy-deepseek-default-model\n :temperature ollama-buddy-deepseek-temperature\n :max-tokens ollama-buddy-deepseek-max-tokens\n :models '(\"deepseek-chat\" \"deepseek-reasoner\"))\n\n(provide 'ollama-buddy-deepseek)\n;;; ollama-buddy-deepseek.el ends here\n"}, "fe3c950f51e7e0bfd66a750ebb06fee50a5929a5": {"t": 1785764951.6380131, "n": 2821, "h": "be5254c4d1de312d", "c": ";;; ollama-buddy-deepseek.el --- DeepSeek integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n;; Package-Requires: ((emacs \"29.1\"))\n\n;;; Commentary:\n;;\n;; This extension provides DeepSeek integration for the ollama-buddy package.\n;; It allows users to interact with DeepSeek's language models using the same\n;; interface as ollama-buddy, providing seamless switching between local Ollama\n;; models and cloud-based DeepSeek models.\n;;\n;; This is a thin wrapper around `ollama-buddy-provider-create'. The\n;; defcustom variables below are preserved for backward compatibility so\n;; existing configurations continue to work.\n;;\n;; Usage:\n;; (require 'ollama-buddy-deepseek)\n;; (setq ollama-buddy-deepseek-api-key (getenv \"DEEPSEEK_API_KEY\"))\n\n;;; Code:\n\n(require 'ollama-buddy-provider)\n\n(defgroup ollama-buddy-deepseek nil\n \"DeepSeek integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-deepseek-\")\n\n(defcustom ollama-buddy-deepseek-marker-prefix \"d:\"\n \"Prefix used to identify DeepSeek models in the ollama-buddy interface.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-key \"\"\n \"API key for accessing DeepSeek services.\nGet your key from https://platform.deepseek.com/api_keys.\nConsider using `auth-source' instead of setting this directly.\"\n :type 'string\n :risky t\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-default-model \"deepseek-chat\"\n \"Default DeepSeek model to use.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-endpoint \"https://api.deepseek.com/chat/completions\"\n \"Endpoint for DeepSeek chat completions API.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-temperature 0.7\n \"Temperature setting for DeepSeek requests (0.0-2.0).\nLower values make the output more deterministic, higher values more creative.\"\n :type 'float\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-max-tokens nil\n \"Maximum number of tokens to generate in the response.\nUse nil for API default behavior (adaptive).\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-deepseek)\n\n;; Register via the generic provider system\n(ollama-buddy-provider-create\n :name \"DeepSeek\"\n :prefix ollama-buddy-deepseek-marker-prefix\n :api-key (lambda () ollama-buddy-deepseek-api-key)\n :endpoint ollama-buddy-deepseek-api-endpoint\n :default-model ollama-buddy-deepseek-default-model\n :temperature ollama-buddy-deepseek-temperature\n :max-tokens ollama-buddy-deepseek-max-tokens\n :models '(\"deepseek-chat\" \"deepseek-reasoner\"))\n\n(provide 'ollama-buddy-deepseek)\n;;; ollama-buddy-deepseek.el ends here\n"}, "e617a30340e86eff6d68c59f2a9093e4f7c185e9": {"t": 1785764953.4127717, "n": 2821, "h": "a94200d5680cf3d4", "c": ";;; ollama-buddy-deepseek.el --- DeepSeek integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n;; Package-Requires: ((emacs \"28.1\"))\n\n;;; Commentary:\n;;\n;; This extension provides DeepSeek integration for the ollama-buddy package.\n;; It allows users to interact with DeepSeek's language models using the same\n;; interface as ollama-buddy, providing seamless switching between local Ollama\n;; models and cloud-based DeepSeek models.\n;;\n;; This is a thin wrapper around `ollama-buddy-provider-create'. The\n;; defcustom variables below are preserved for backward compatibility so\n;; existing configurations continue to work.\n;;\n;; Usage:\n;; (require 'ollama-buddy-deepseek)\n;; (setq ollama-buddy-deepseek-api-key (getenv \"DEEPSEEK_API_KEY\"))\n\n;;; Code:\n\n(require 'ollama-buddy-provider)\n\n(defgroup ollama-buddy-deepseek nil\n \"DeepSeek integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-deepseek-\")\n\n(defcustom ollama-buddy-deepseek-marker-prefix \"d:\"\n \"Prefix used to identify DeepSeek models in the ollama-buddy interface.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-key \"\"\n \"API key for accessing DeepSeek services.\nGet your key from https://platform.deepseek.com/api_keys.\nConsider using `auth-source' instead of setting this directly.\"\n :type 'string\n :risky t\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-default-model \"deepseek-chat\"\n \"Default DeepSeek model to use.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-endpoint \"https://api.deepseek.com/chat/completions\"\n \"Endpoint for DeepSeek chat completions API.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-temperature 0.7\n \"Temperature setting for DeepSeek requests (0.0-2.0).\nLower values make the output more deterministic, higher values more creative.\"\n :type 'float\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-max-tokens nil\n \"Maximum number of tokens to generate in the response.\nUse nil for API default behavior (adaptive).\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-deepseek)\n\n;; Register via the generic provider system\n(ollama-buddy-provider-create\n :name \"DeepSeek\"\n :prefix ollama-buddy-deepseek-marker-prefix\n :api-key (lambda () ollama-buddy-deepseek-api-key)\n :endpoint ollama-buddy-deepseek-api-endpoint\n :default-model ollama-buddy-deepseek-default-model\n :temperature ollama-buddy-deepseek-temperature\n :max-tokens ollama-buddy-deepseek-max-tokens\n :models '(\"deepseek-chat\" \"deepseek-reasoner\"))\n\n(provide 'ollama-buddy-deepseek)\n;;; ollama-buddy-deepseek.el ends here\n"}, "6436cf21e2728b4f7eebdd5eb6793235cbafe483": {"t": 1785764954.9246233, "n": 3513, "h": "50c52b27ae936b5b", "c": ";;; ollama-buddy-deepseek.el --- DeepSeek integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n;; Package-Requires: ((emacs \"28.1\"))\n\n;;; Commentary:\n;;\n;; This extension provides DeepSeek integration for the ollama-buddy package.\n;; It allows users to interact with DeepSeek's language models using the same\n;; interface as ollama-buddy, providing seamless switching between local Ollama\n;; models and cloud-based DeepSeek models.\n;;\n;; Usage:\n;; (require 'ollama-buddy-deepseek)\n;; (setq ollama-buddy-deepseek-api-key (getenv \"DEEPSEEK_API_KEY\"))\n\n;;; Code:\n\n(require 'json)\n(require 'url)\n(require 'cl-lib)\n(require 'ollama-buddy-core)\n(require 'ollama-buddy-remote)\n\n(defgroup ollama-buddy-deepseek nil\n \"DeepSeek integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-deepseek-\")\n\n(defcustom ollama-buddy-deepseek-marker-prefix \"d:\"\n \"Prefix used to identify DeepSeek models in the ollama-buddy interface.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-key \"\"\n \"API key for accessing DeepSeek services.\nGet your key from https://platform.deepseek.com/api_keys.\nConsider using `auth-source' instead of setting this directly.\"\n :type 'string\n :risky t\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-default-model \"deepseek-chat\"\n \"Default DeepSeek model to use.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-endpoint \"https://api.deepseek.com/chat/completions\"\n \"Endpoint for DeepSeek chat completions API.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-temperature 0.7\n \"Temperature setting for DeepSeek requests (0.0-2.0).\nLower values make the output more deterministic, higher values more creative.\"\n :type 'float\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-max-tokens nil\n \"Maximum number of tokens to generate in the response.\nUse nil for API default behavior (adaptive).\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-deepseek)\n\n;; Internal variables\n\n(defvar ollama-buddy-deepseek--current-token-count 0\n \"Counter for tokens in the current DeepSeek response.\")\n\n;; API interaction functions\n\n(defun ollama-buddy-deepseek--send (prompt &optional model)\n \"Send PROMPT to DeepSeek's API using MODEL or default model asynchronously.\"\n (when (ollama-buddy-remote--verify-api-key\n ollama-buddy-deepseek-api-key\n 'ollama-buddy-deepseek-api-key\n \"DeepSeek\")\n (ollama-buddy-remote--openai-send\n prompt model\n (list :prefix ollama-buddy-deepseek-marker-prefix\n :api-key ollama-buddy-deepseek-api-key\n :endpoint ollama-buddy-deepseek-api-endpoint\n :temperature ollama-buddy-deepseek-temperature\n :max-tokens ollama-buddy-deepseek-max-tokens\n :default-model ollama-buddy-deepseek-default-model\n :provider-name \"DeepSeek\"\n :token-count-var 'ollama-buddy-deepseek--current-token-count))))\n\n(defun ollama-buddy-deepseek--fetch-models ()\n \"Register available DeepSeek models.\"\n (ollama-buddy-remote--register-models\n ollama-buddy-deepseek-marker-prefix\n '(\"deepseek-chat\" \"deepseek-reasoner\")\n #'ollama-buddy-deepseek--send))\n\n(ollama-buddy-deepseek--fetch-models)\n\n(provide 'ollama-buddy-deepseek)\n;;; ollama-buddy-deepseek.el ends here\n"}, "217dfcc199e497170db3fb669f87d60080aea353": {"t": 1785764956.8603818, "n": 3439, "h": "a44ee4ee25696959", "c": ";;; ollama-buddy-deepseek.el --- DeepSeek integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n;; Package-Requires: ((emacs \"28.1\"))\n\n;;; Commentary:\n;;\n;; This extension provides DeepSeek integration for the ollama-buddy package.\n;; It allows users to interact with DeepSeek's language models using the same\n;; interface as ollama-buddy, providing seamless switching between local Ollama\n;; models and cloud-based DeepSeek models.\n;;\n;; Usage:\n;; (require 'ollama-buddy-deepseek)\n;; (setq ollama-buddy-deepseek-api-key (getenv \"DEEPSEEK_API_KEY\"))\n\n;;; Code:\n\n(require 'json)\n(require 'url)\n(require 'cl-lib)\n(require 'ollama-buddy-core)\n(require 'ollama-buddy-remote)\n\n(defgroup ollama-buddy-deepseek nil\n \"DeepSeek integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-deepseek-\")\n\n(defcustom ollama-buddy-deepseek-marker-prefix \"d:\"\n \"Prefix used to identify DeepSeek models in the ollama-buddy interface.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-key \"\"\n \"API key for accessing DeepSeek services.\nGet your key from https://platform.deepseek.com/api_keys.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-default-model \"deepseek-chat\"\n \"Default DeepSeek model to use.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-endpoint \"https://api.deepseek.com/chat/completions\"\n \"Endpoint for DeepSeek chat completions API.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-temperature 0.7\n \"Temperature setting for DeepSeek requests (0.0-2.0).\nLower values make the output more deterministic, higher values more creative.\"\n :type 'float\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-max-tokens nil\n \"Maximum number of tokens to generate in the response.\nUse nil for API default behavior (adaptive).\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-deepseek)\n\n;; Internal variables\n\n(defvar ollama-buddy-deepseek--current-token-count 0\n \"Counter for tokens in the current DeepSeek response.\")\n\n;; API interaction functions\n\n(defun ollama-buddy-deepseek--send (prompt &optional model)\n \"Send PROMPT to DeepSeek's API using MODEL or default model asynchronously.\"\n (when (ollama-buddy-remote--verify-api-key\n ollama-buddy-deepseek-api-key\n 'ollama-buddy-deepseek-api-key\n \"DeepSeek\")\n (ollama-buddy-remote--openai-send\n prompt model\n (list :prefix ollama-buddy-deepseek-marker-prefix\n :api-key ollama-buddy-deepseek-api-key\n :endpoint ollama-buddy-deepseek-api-endpoint\n :temperature ollama-buddy-deepseek-temperature\n :max-tokens ollama-buddy-deepseek-max-tokens\n :default-model ollama-buddy-deepseek-default-model\n :provider-name \"DeepSeek\"\n :token-count-var 'ollama-buddy-deepseek--current-token-count))))\n\n(defun ollama-buddy-deepseek--fetch-models ()\n \"Register available DeepSeek models.\"\n (ollama-buddy-remote--register-models\n ollama-buddy-deepseek-marker-prefix\n '(\"deepseek-chat\" \"deepseek-reasoner\")\n #'ollama-buddy-deepseek--send))\n\n(ollama-buddy-deepseek--fetch-models)\n\n(provide 'ollama-buddy-deepseek)\n;;; ollama-buddy-deepseek.el ends here\n"}, "d39718c3824a566ac90d90ce60d73497a25095b3": {"t": 1786068463.3927941, "n": 2783, "h": "a8bb938770bd6be7", "c": ";;; ollama-buddy-deepseek.el --- DeepSeek integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n\n;;; Commentary:\n;;\n;; This extension provides DeepSeek integration for the ollama-buddy package.\n;; It allows users to interact with DeepSeek's language models using the same\n;; interface as ollama-buddy, providing seamless switching between local Ollama\n;; models and cloud-based DeepSeek models.\n;;\n;; This is a thin wrapper around `ollama-buddy-provider-create'. The\n;; defcustom variables below are preserved for backward compatibility so\n;; existing configurations continue to work.\n;;\n;; Usage:\n;; (require 'ollama-buddy-deepseek)\n;; (setq ollama-buddy-deepseek-api-key (getenv \"DEEPSEEK_API_KEY\"))\n\n;;; Code:\n\n(require 'ollama-buddy-provider)\n\n(defgroup ollama-buddy-deepseek nil\n \"DeepSeek integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-deepseek-\")\n\n(defcustom ollama-buddy-deepseek-marker-prefix \"d:\"\n \"Prefix used to identify DeepSeek models in the ollama-buddy interface.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-key \"\"\n \"API key for accessing DeepSeek services.\nGet your key from https://platform.deepseek.com/api_keys.\nConsider using `auth-source' instead of setting this directly.\"\n :type 'string\n :risky t\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-default-model \"deepseek-chat\"\n \"Default DeepSeek model to use.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-api-endpoint \"https://api.deepseek.com/chat/completions\"\n \"Endpoint for DeepSeek chat completions API.\"\n :type 'string\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-temperature 0.7\n \"Temperature setting for DeepSeek requests (0.0-2.0).\nLower values make the output more deterministic, higher values more creative.\"\n :type 'float\n :group 'ollama-buddy-deepseek)\n\n(defcustom ollama-buddy-deepseek-max-tokens nil\n \"Maximum number of tokens to generate in the response.\nUse nil for API default behavior (adaptive).\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-deepseek)\n\n;; Register via the generic provider system\n(ollama-buddy-provider-create\n :name \"DeepSeek\"\n :prefix ollama-buddy-deepseek-marker-prefix\n :api-key (lambda () ollama-buddy-deepseek-api-key)\n :endpoint ollama-buddy-deepseek-api-endpoint\n :default-model ollama-buddy-deepseek-default-model\n :temperature ollama-buddy-deepseek-temperature\n :max-tokens ollama-buddy-deepseek-max-tokens\n :models '(\"deepseek-chat\" \"deepseek-reasoner\"))\n\n(provide 'ollama-buddy-deepseek)\n;;; ollama-buddy-deepseek.el ends here\n"}}, "ollama-buddy-opencode.el": {"d39718c3824a566ac90d90ce60d73497a25095b3": {"t": 1785846940.4611707, "n": 11718, "h": "c498bea1d9445ff8", "c": ";;; ollama-buddy-opencode.el --- OpenCode Go subscription integration for ollama-buddy -*- lexical-binding: t; -*-\n\n;; Author: James Dyer <captainflasmr@gmail.com>\n;; Keywords: applications, tools, convenience\n;; URL: https://github.com/captainflasmr/ollama-buddy\n\n;;; Commentary:\n;;\n;; This extension integrates the OpenCode Go subscription with\n;; ollama-buddy. Note: OpenCode Go is the flat-rate subscription product\n;; (the /go endpoints under opencode.ai), distinct from \"OpenCode Zen\"\n;; which is OpenCode's pay-as-you-go API. Only the subscription /go\n;; endpoints are wired up here.\n;;\n;; A single OpenCode Go subscription exposes models behind two API\n;; surfaces sharing one API key:\n;;\n;; - https://opencode.ai/zen/go/v1/chat/completions (OpenAI-compatible)\n;; - https://opencode.ai/zen/go/v1/messages (Anthropic-compatible)\n;;\n;; (The /zen/ segment is part of OpenCode's URL routing — these are the\n;; Go subscription endpoints, not the Zen pay-as-you-go API.)\n;;\n;; Models are exposed under a single prefix (`n:' by default) and one\n;; provider entry labelled \\\"OpenCode Go\\\". Per-model dispatch sends the\n;; request to the correct endpoint and uses the matching API shape.\n;; Usage budget ($12/5h, $30/wk, $60/mo as of April 2026) is shared\n;; across the whole subscription.\n;;\n;; Model discovery: the Go surface exposes an OpenAI-style listing at\n;; https://opencode.ai/zen/go/v1/models, so the model list is fetched\n;; dynamically (see `ollama-buddy-opencode-models-endpoint'), falling back\n;; to the static `ollama-buddy-opencode-chat-models' list when discovery\n;; is unavailable.\n;;\n;; All OpenCode Go models are OpenAI-native, so by default every model is\n;; routed to the chat/completions endpoint. The Anthropic-compatible\n;; /messages endpoint mis-proxies these models (it drops the request body\n;; and the upstream reports \\\"Empty input messages\\\"), so it is opt-in only\n;; via `ollama-buddy-opencode-msg-models' /\n;; `ollama-buddy-opencode-msg-model-families'.\n;;\n;; Usage:\n;; (require 'ollama-buddy-opencode)\n;; ;; with auth-source (~/.authinfo):\n;; ;; machine ollama-buddy-opencode login apikey password <YOUR_KEY>\n\n;;; Code:\n\n(require 'ollama-buddy-provider)\n\n(defgroup ollama-buddy-opencode nil\n \"OpenCode Go subscription integration for Ollama Buddy.\"\n :group 'ollama-buddy\n :prefix \"ollama-buddy-opencode-\")\n\n(defcustom ollama-buddy-opencode-api-key \"\"\n \"API key for the OpenCode Go subscription.\nA single key authorises both underlying endpoints. Get one from the\nOpenCode Go console. Consider using `auth-source' instead of setting\nthis directly, e.g.:\n\n (setq ollama-buddy-opencode-api-key\n (auth-source-pick-first-password\n :host \\\"ollama-buddy-opencode\\\" :user \\\"apikey\\\"))\"\n :type 'string\n :risky t\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-marker-prefix \"n:\"\n \"Prefix used to identify OpenCode Go models in the model list.\"\n :type 'string\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-chat-endpoint\n \"https://opencode.ai/zen/go/v1/chat/completions\"\n \"Endpoint for the OpenCode Go OpenAI-compatible chat API.\"\n :type 'string\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-msg-endpoint\n \"https://opencode.ai/zen/go/v1/messages\"\n \"Endpoint for the OpenCode Go Anthropic-compatible messages API.\"\n :type 'string\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-models-endpoint\n \"https://opencode.ai/zen/go/v1/models\"\n \"OpenAI-style model-discovery endpoint for OpenCode Go.\nWhen non-nil, the model list is fetched from here at registration time\ninstead of using the static `ollama-buddy-opencode-chat-models' /\n`ollama-buddy-opencode-msg-models' lists (which become the fallback if\ndiscovery fails). Set to nil to disable discovery and use only the\nstatic lists.\"\n :type '(choice (const :tag \"Disable discovery\" nil) string)\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-chat-models\n '(\"glm-5.1\"\n \"glm-5\"\n \"kimi-k2.6\"\n \"kimi-k2.5\"\n \"mimo-v2.5-pro\"\n \"mimo-v2.5\"\n \"mimo-v2-pro\"\n \"mimo-v2-omni\"\n \"qwen3.6-plus\"\n \"qwen3.5-plus\"\n \"deepseek-v4-pro\"\n \"deepseek-v4-flash\"\n \"minimax-m2.7\"\n \"minimax-m2.5\")\n \"OpenCode Go models served by the OpenAI-compatible chat endpoint.\nUsed as the offline fallback when `ollama-buddy-opencode-models-endpoint'\ndiscovery is unavailable; otherwise the live model list takes precedence.\nEvery OpenCode Go model is OpenAI-native, so the chat endpoint is the\ncorrect surface for all of them by default.\"\n :type '(repeat string)\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-msg-models nil\n \"OpenCode Go models forced onto the Anthropic-compatible messages endpoint.\nEmpty by default: every OpenCode Go model is OpenAI-native and works on\nthe chat endpoint, while the messages endpoint mis-proxies OpenAI-native\nmodels (it drops the request body, yielding \\\"Empty input messages\\\").\nThis is an explicit per-model override consulted by\n`ollama-buddy-opencode--shape'; only add a model here if OpenCode later\nserves one that genuinely requires the Anthropic shape.\"\n :type '(repeat string)\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-msg-model-families nil\n \"Model-name prefixes routed to the Anthropic-compatible messages API.\nEmpty by default (see `ollama-buddy-opencode-msg-models' for why). When\nnon-nil, a discovered model whose bare name begins with one of these\nprefixes is routed to the messages endpoint instead of the chat endpoint.\"\n :type '(repeat string)\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-default-model \"kimi-k2.6\"\n \"Default model when invoking OpenCode Go without an explicit selection.\"\n :type 'string\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-temperature 0.7\n \"Temperature setting for OpenCode Go requests (0.0-2.0).\"\n :type 'float\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-max-tokens nil\n \"Maximum tokens to generate, or nil for the API default.\nNote: the Anthropic-shape endpoint requires a max_tokens; the provider\nlayer falls back to 4096 when this is nil.\"\n :type '(choice integer (const nil))\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-usage-url \"\"\n \"URL to fetch OpenCode Go usage stats.\nThis is your unique workspace Go URL, e.g.:\nhttps://opencode.ai/workspace/wrk_.../go\"\n :type 'string\n :group 'ollama-buddy-opencode)\n\n(defcustom ollama-buddy-opencode-session-token \"\"\n \"Session token for fetching OpenCode Go usage stats.\nThis is the value of the `auth' cookie from opencode.ai.\nTo obtain it: sign in at https://opencode.ai, open browser DevTools (F12),\ngo to Application > Cookies > opencode.ai, and copy the `auth' value.\"\n :type 'string\n :group 'ollama-buddy-opencode)\n\n(defvar ollama-buddy-opencode--usage-cache nil\n \"Cached OpenCode usage data.\")\n\n(defvar ollama-buddy-opencode--usage-cache-time nil\n \"Time when OpenCode usage was last fetched.\")\n\n(defun ollama-buddy-opencode--fetch-usage ()\n \"Fetch OpenCode Go usage stats.\nReturns an alist with session, weekly, and monthly percentages.\"\n (when (and (not (string-empty-p ollama-buddy-opencode-usage-url))\n (not (string-empty-p ollama-buddy-opencode-session-token)))\n ;; Return cached value if still fresh (5 mins)\n (if (and ollama-buddy-opencode--usage-cache\n ollama-buddy-opencode--usage-cache-time\n (< (float-time (time-subtract (current-time)\n ollama-buddy-opencode--usage-cache-time))\n 300))\n ollama-buddy-opencode--usage-cache\n ;; Fetch fresh data\n (condition-case err\n (let ((buf (generate-new-buffer \" *opencode-usage*\")))\n (unwind-protect\n (let ((exit-code\n (call-process\n ollama-buddy-curl-executable nil buf nil\n \"-s\"\n \"-b\" (concat \"auth=\" ollama-buddy-opencode-session-token)\n ollama-buddy-opencode-usage-url)))\n (when (zerop exit-code)\n (with-current-buffer buf\n (goto-char (point-min))\n ;; Find the script tag containing the JSON data\n (when (re-search-forward \"rollingUsage:[^}]*usagePercent:\\\\([0-9]+\\\\)\" nil t)\n (let ((rolling (match-string 1))\n weekly monthly)\n (when (re-search-forward \"weeklyUsage:[^}]*usagePercent:\\\\([0-9]+\\\\)\" nil t)\n (setq weekly (match-string 1)))\n (when (re-search-forward \"monthlyUsage:[^}]*usagePercent:\\\\([0-9]+\\\\)\" nil t)\n (setq monthly (match-string 1)))\n (let ((result `((session . ,(concat rolling \"%\"))\n (weekly . ,(concat weekly \"%\"))\n (monthly . ,(concat monthly \"%\")))))\n (setq ollama-buddy-opencode--usage-cache result\n ollama-buddy-opencode--usage-cache-time (current-time))\n result))))))\n (kill-buffer buf)))\n (error\n (message \"Failed to fetch OpenCode usage: %s\" (error-message-string err))\n nil)))))\n\n(defun ollama-buddy-opencode--key ()\n \"Return the OpenCode Go API key.\nUsed as the `:api-key' thunk so a single `auth-source' update is\nreflected immediately.\"\n ollama-buddy-opencode-api-key)\n\n(defun ollama-buddy-opencode--bare-name (model)\n \"Strip the configured marker prefix from MODEL and return the bare name.\"\n (let ((p ollama-buddy-opencode-marker-prefix))\n (if (and model (stringp model) (string-prefix-p p model))\n (substring model (length p))\n (or model \"\"))))\n\n(defun ollama-buddy-opencode--shape (model)\n \"Return `chat' or `msg' for MODEL.\nA model takes the Anthropic-compatible `msg' shape when its bare name\nmatches one of `ollama-buddy-opencode-msg-model-families' or is listed\nexplicitly in `ollama-buddy-opencode-msg-models'. Otherwise it falls\nback to `chat' — the OpenAI-compatible endpoint is the more common\nsurface and yields a clearer error from the API than a silent shape\nmismatch.\"\n (let ((bare (ollama-buddy-opencode--bare-name model)))\n (if (or (member bare ollama-buddy-opencode-msg-models)\n (seq-some (lambda (family) (string-prefix-p family bare))\n ollama-buddy-opencode-msg-model-families))\n 'msg\n 'chat)))\n\n(defun ollama-buddy-opencode--api-type (model)\n \"Return the api-type symbol (`openai' or `claude') for MODEL.\"\n (pcase (ollama-buddy-opencode--shape model)\n ('msg 'claude)\n (_ 'openai)))\n\n(defun ollama-buddy-opencode--endpoint (model)\n \"Return the endpoint URL for MODEL.\"\n (pcase (ollama-buddy-opencode--shape model)\n ('msg ollama-buddy-opencode-msg-endpoint)\n (_ ollama-buddy-opencode-chat-endpoint)))\n\n(ollama-buddy-provider-create\n :name \"OpenCode Go\"\n :prefix ollama-buddy-opencode-marker-prefix\n :api-type #'ollama-buddy-opencode--api-type\n :api-key #'ollama-buddy-opencode--key\n :endpoint #'ollama-buddy-opencode--endpoint\n :default-model ollama-buddy-opencode-default-model\n :temperature ollama-buddy-opencode-temperature\n :max-tokens ollama-buddy-opencode-max-tokens\n :models-endpoint ollama-buddy-opencode-models-endpoint\n ;; Static fallback when discovery is unavailable.\n :models (append ollama-buddy-opencode-chat-models\n ollama-buddy-opencode-msg-models))\n\n(provide 'ollama-buddy-opencode)\n;;; ollama-buddy-opencode.el ends here\n"}}, "CHANGELOG.org": {"d39718c3824a566ac90d90ce60d73497a25095b3": {"t": 1785846943.1593149, "n": 104919, "h": "f2ad2cdae48fac06", "c": "#+title: Change Log for ollama-buddy\n#+author: James Dyer\n#+email: captainflasmr@gmail.com\n#+language: en\n#+options: ':t toc:nil author:nil email:nil num:nil title:nil\n#+todo: TODO DOING | DONE\n#+startup: showall\n\nThis document contains the release notes for each tagged commit on the\nproject's main git repository: [[https://github.com/captainflasmr/ollama-buddy\n\n* Versions\n\n** <2026-07-15 Wed> *7.6.1*\n\nFix =void-function ollama-buddy--open-chat= when the chat is opened from the role transient menu before the main package is loaded.\n\n*** Bug Fixes\n\n- *Role transient menu did not load the main package* -- =ollama-buddy-role-transient-menu= is autoloaded from =ollama-buddy-transient= (not =ollama-buddy=), so a =use-package :bind= setup that only binds that command never loads =ollama-buddy.el=. The transient module forward-declares =ollama-buddy--open-chat= via =declare-function=, which satisfies the byte-compiler but does not define the function at run time, so selecting \"Open Chat\" signalled =Symbol's function definition is void: ollama-buddy--open-chat=. =ollama-buddy-role-transient-menu= now calls =(require 'ollama-buddy)= before building the menu, matching the existing =ollama-buddy-transient-menu-wrapper= pattern. Reported in [[https://github.com/captainflasmr/ollama-buddy/issues/24][#24]].\n\n** <2026-06-22 Mon> *7.6.0*\n\nDynamic cloud model discovery — the static =ollama-buddy-cloud-models= list is replaced with automatic fetching from ollama.com.\n\n*** Features\n\n- *Dynamic cloud model discovery* -- =ollama-buddy-cloud-models= is now populated automatically from the =https://ollama.com/api/tags= endpoint on first access (model picker, Model Management buffer, provider summary), so newly released cloud models appear without a package update. No static fallback list is maintained: cloud models require internet access, so a hardcoded offline list added no value. The fetch is session-cached (one attempt per Emacs session) and skipped in airplane mode. =ollama-buddy-cloud-models-url= (a defcustom) controls the endpoint.\n- *=/sync= command* -- New slash command and =M-x ollama-buddy-cloud-sync-models= force-refresh the cloud model catalog on demand. Also bound to =y= in the auth transient menu.\n- *=?* transient binding* -- Pressing =?= in the chat buffer now opens the transient menu, matching the convention used by other Emacs packages. =C-c O= remains as an alternative.\n\n*** Breaking Changes\n\n- * =ollama-buddy-cloud-models= is now a defvar, not a defcustom* -- The variable is populated dynamically and no longer appears in the Customize interface. Users who customised the old defcustom should remove the saved value; the dynamic fetch supersedes it.\n\n** <2026-06-22 Mon> *7.5.5*\n\nPreserve newlines in streamed responses after a thinking block.\n\n*** Bug Fixes\n\n- *Reasoning newline stripping* -- Fixed a bug where the leading-newline trim applied after a thinking/reasoning block could stay active for the rest of the response, swallowing every subsequent newline and collapsing paragraphs and lists into one unbroken run of text. This was most visible with models that stream newlines as their own chunks combined with markdown-to-org conversion (e.g. gemma). Leading blank lines immediately after the thinking block are still trimmed, but once real response text begins newlines are now left intact. Thanks to Shintaro KATAYAMA (=@shintaro-katayama=) for reporting and diagnosing this in [[https://github.com/captainflasmr/ollama-buddy/pull/23][#23]].\n\n** <2026-06-22 Mon> *7.5.4*\n\nOpenCode Go dynamic model discovery and chat-endpoint routing fix.\n\n*** Features\n\n- *OpenCode Go model discovery* -- =ollama-buddy-opencode.el= now fetches its model list dynamically from the Go subscription's OpenAI-style listing endpoint (=ollama-buddy-opencode-models-endpoint=, https://opencode.ai/zen/go/v1/models) instead of a hand-maintained list, so newly released models (e.g. =minimax-m3=, =glm-5.2=, =qwen3.7-max=, =kimi-k2.7-code=, =hy3-preview=) appear automatically. The static =ollama-buddy-opencode-chat-models= list remains as an offline fallback when discovery is unavailable.\n\n*** Bug Fixes\n\n- *OpenCode Go \"Empty input messages\" error* -- All OpenCode Go models are OpenAI-native, but DeepSeek V4 and MiniMax M2.x were previously routed through the Anthropic-compatible =/messages= endpoint, which mis-proxies them so the upstream reports =Empty input messages=. Every OpenCode Go model now routes through =/chat/completions= by default. The Anthropic shape is retained as an opt-in override via the (now empty by default) =ollama-buddy-opencode-msg-models= and =ollama-buddy-opencode-msg-model-families= options.\n\n*** Maintenance\n\n- *Packaging conventions* -- Declared the =transient= dependency in the main package header, shortened the package summary line, added =ollama-buddy-annotate.el=, =ollama-buddy-opencode.el=, and =ollama-buddy-plan.el= to the build/CI file list, added a missing =cl-lib= require, removed a dead Emacs-28 =org-fold= compatibility shim, replaced an unnecessary =with-eval-after-load= for savehist with a direct registration, and dropped ineffective per-file =Package-Requires= / =Version= headers from secondary files (a multi-file package is built from the main file's header).\n\n** <2026-05-19 Tue> *7.5.3*\n\nSkill export command for Claude Code / opencode integration.\n\n*** Features\n\n- *Skill export* -- New =ollama-buddy-user-prompts-export-skills= and =ollama-buddy-user-prompts-export-skill= commands convert user prompts to the =SKILL.md= format used by Claude Code, opencode, and compatible AI agent tools. Each prompt becomes a named skill directory under =~/.claude/skills/= (configurable via =ollama-buddy-skills-export-directory=) with YAML frontmatter description, trigger phrases, and markdown body content. A secondary target directory (=ollama-buddy-skills-export-agents-directory=) is supported for project-local =.agents/skills/= copies.\n\n** <2026-04-30 Thu> *7.5.2*\n\nOpenCode Go usage tracking and Model Management reorganization.\n\n*** Features\n\n- *OpenCode Go usage tracking* -- Added =ollama-buddy-opencode-usage-url= and =ollama-buddy-opencode-session-token= to =ollama-buddy-opencode.el=. When configured, it parses your unique workspace Go page to display rolling, weekly, and monthly usage percentages alongside Ollama Cloud stats.\n- *Usage section in Model Management* -- Reorganized the =*Ollama Models Management*= buffer (=C-c M=) to include a dedicated =* Usage= section at the top. This section consolidates budget/usage pie charts for both Ollama Cloud and OpenCode Go, keeping them clearly separated from model selection.\n- *Cloud cookie lifecycle note* -- Updated documentation to note that both Ollama and OpenCode session cookies can rotate upon re-authentication, requiring a fresh copy from browser DevTools if usage stats stop appearing.\n\n** <2026-04-29 Wed> *7.5.1*\n\nOpenCode Go subscription integration.\n\n*** Features\n\n- *OpenCode Go provider* -- New =ollama-buddy-opencode.el= integrating the OpenCode Go flat-rate subscription ([[https://opencode.ai/docs/go]]). All 14 models register under a single prefix (=n:=) with one API key shared via =auth-source=, and the usage budget ($12 / 5h, $30 / week, $60 / month) is shared across the whole subscription. Per-model dispatch routes the OpenAI-shape models (GLM-5.x, Kimi K2.x, MiMo-V2.x, Qwen3.x) through =/chat/completions= and the Anthropic-shape models (DeepSeek V4, MiniMax M2.x) through =/messages=. Note: this is the flat-rate Go subscription, distinct from OpenCode's pay-as-you-go Zen API.\n- *Per-model api-type/endpoint dispatch* -- =ollama-buddy-provider-create= now accepts a function =(MODEL) -> value= for both =:api-type= and =:endpoint=, in addition to the existing static forms. This lets a single provider entry route different models to different API shapes / URLs while sharing one prefix, one API key, and one usage budget — the building block behind the OpenCode Go integration. All eight existing providers continue to use the static form unchanged.\n\n** <2026-04-24 Thu> *7.4.3*\n\nDeepSeek V4 Flash cloud model support.\n\n*** Features\n\n- *DeepSeek V4 Flash Cloud Model* -- Added =deepseek-v4-flash:cloud= to =ollama-buddy-cloud-models= (appears in =C-c m=). DeepSeek V4 Flash is a preview of the DeepSeek-V4 series, a Mixture-of-Experts model with 284B total parameters and 13B activated, built for efficient reasoning across a 1M-token context window. Runs on Ollama's cloud infrastructure.\n\n** <2026-04-21 Tue> *7.4.2*\n\nKimi K2.6 cloud model support.\n\n*** Features\n\n- *Kimi K2.6 Cloud Model* -- Added =kimi-k2.6:cloud= to =ollama-buddy-cloud-models= (appears in =C-c m= with the =☁= indicator). Kimi K2.6 is Moonshot AI's native multimodal agentic model, running on Ollama's cloud (Blackwell hardware) with capabilities in long-horizon coding, coding-driven design, proactive autonomous execution, and swarm-based task orchestration. *Requires a paid Ollama cloud subscription* ([[https://ollama.com/upgrade]]); sending a prompt without one returns an authentication error directing you to upgrade. Most other entries in =ollama-buddy-cloud-models= run on the free tier.\n\n** <2026-04-14 Tue> *7.4.1*\n\nResponse post-processing hook and a thinking-block point-anchor fix.\n\n*** Features\n\n- *=ollama-buddy-response-post-process-functions=* -- New hook run on the streamed response region just before markdown-to-org conversion. Each function is called with =(START END)= buffer positions and may edit the region freely. Useful for normalising output from models that concatenate structured content into a single line.\n- *=ollama-buddy--normalize-numbered-lists=* -- Default entry on the new hook. Splits glued numbered-list items of the form =N. [CATEGORY] ...= onto their own lines when the model emits them as one paragraph (notably cloud gemma). Regex is deliberately narrow -- it only fires when a bracketed uppercase tag follows the number, so prose like \"see rule 1. Then rule 2.\" is left alone. Idempotent on already-clean input.\n- *Emacs Blog Reviewer prompt* -- New =writing__Emacs-Blog-Reviewer__system.org= user prompt. Reviews an Emacs blog post for grammar and technical accuracy (function and variable name spelling, key-binding notation, elisp syntax, deprecated APIs, version claims, core vs third-party assertions). Output format is a numbered one-line-per-issue list so dense cloud models cannot collapse fields into a paragraph.\n\n*** Bug Fixes\n\n- *Thinking-block point anchor* -- Fixed the first response token being inserted at the top of the folded thinking block instead of after =*** Response=. =ollama-buddy--finalize-thinking-block= deletes the raw streamed thinking region and reinserts clean content plus the response heading, which collapses the outer =save-excursion= marker into the new content and leaves =(point)= inside the fold. Both the API-style (=message.thinking=) and tag-style (=</think>=) paths now re-anchor to =(point-max)= immediately after finalize returns.\n\n** <2026-04-13 Mon> *7.4.0*\n\nDirectory-scale project annotation via structured output.\n\n*** Features\n\n- *=/annotate-dir=* -- New slash command and =ollama-buddy-annotate-directory= iterate every source file under a directory, send one annotation request per file, and auto-apply the returned JSON to =.simply-annotations.el= without manual intervention. Prefix arg descends recursively. Cancel an in-flight batch with =/annotate-cancel= or =ollama-buddy-annotate-directory-cancel=.\n- *Context-aware batching* -- Each queued file's estimated token cost (characters / 4) is checked against the current model's context window. Oversized files are skipped with a message. The reserve fraction is configurable via =ollama-buddy-annotate-context-reserve= (default 0.5, leaving half the window for the response).\n- *Structured-output skill auto-load* -- The batch installs the =Annotate Project= skill (and its =#+FORMAT:= JSON schema) before starting, so the model is guaranteed to emit machine-readable output. The schema now allows the =file= tag alongside =defun= and =line=.\n- *Post-response hook* -- New =ollama-buddy-post-response-hook=, fired from the normal (non-multishot, non-tool) stream-completion path. Used by =annotate-directory= to chain successive requests and available for other automations that need to react when a response lands.\n- *=C-c A=* -- New chat-buffer binding for =ollama-buddy-annotate-apply-last-response=, so applying a one-off annotation response no longer requires typing the slash command.\n- *New cloud models* -- Added =deepseek-v3.2:cloud=, =gemini-3-flash-preview:cloud=, =qwen3-next:80b-cloud=, and =nemotron-3-super:cloud= to =ollama-buddy-cloud-models=.\n\n** <2026-04-11 Fri> *7.3.0*\n\nDirect launch support for external agents.\n\n*** Features\n\n- *Direct Agent Launch* -- The =/launch= system now supports external tools that are not built-in =ollama launch= integrations. Agent registry entries with =:direct t= are invoked as standalone executables in a terminal, bypassing =ollama launch= entirely. This allows tools like Oh My Pi (=omp=) to participate in the launch workflow alongside standard agents like Claude Code and Codex.\n- *Oh My Pi (omp)* -- Added to the built-in agent registry as the first direct agent.\n- *Flexible Model Passing* -- Direct agents receive =--model MODEL= by default. The new =:model-flag= property lets registry entries customise or disable model passing (set to =nil= to skip).\n- *Independent Detection* -- Direct agents only require their own executable on PATH; they no longer depend on =ollama= being installed.\n- *Detached Terminal Sessions* -- Launched terminal sessions are now fully decoupled from Emacs. Closing Emacs no longer kills running agent sessions.\n- *Standalone Launch Command* -- New =ollama-buddy-launch-external= command (=M-x= or transient menu =v=) launches an agent directly from the current directory without requiring the Ollama Buddy chat buffer. In Dired, the terminal opens in the displayed directory. The model prompt shows the target directory for confirmation.\n\n*** Documentation\n\n- *Direct Agents section* -- New section in the Texinfo manual covering direct vs standard agents, the =:direct= and =:model-flag= properties, and how to register custom direct agents.\n\n** <2026-04-10 Thu> *7.2.0*\n\nSmall model warning for agent launch.\n\n*** Features\n\n- *Small Model Launch Warning* -- When launching a local model below 7B parameters via =/launch= or the Model Management =Launch= button, Ollama Buddy now displays a confirmation warning explaining that coding agents prepend 20,000+ tokens of system prompt to every request, which can cause small models to appear frozen or take many minutes to respond. The threshold is configurable via =ollama-buddy-launch-small-model-threshold= (default 7; set to =nil= to disable). Cloud models skip the warning since they run on remote infrastructure.\n\n*** Documentation\n\n- *Small Model Warning section* -- New section in the Texinfo manual covering why small models struggle with agentic workflows, hardware recommendations, and how to diagnose unresponsive launches with =ollama ps=.\n\n** <2026-04-10 Thu> *7.1.4*\n\nExpanded launch agent registry.\n\n*** Features\n\n- *Full =ollama launch= Agent Registry* -- The built-in agent registry now includes all frontends supported by =ollama launch=: Cline, Droid, OpenCode, OpenClaw, and Pi, in addition to the existing Claude Code and Codex entries. Each agent only appears in the =/launch= picker and Model Management =Launch= button when its executable is found on PATH.\n\n** <2026-04-09 Thu> *7.1.3*\n\nFix process-filter crash on cloud usage limit responses.\n\n*** Bug Fixes\n\n- *Cloud limit crash* -- When an Ollama cloud model session was at 100% usage, the non-2xx error response from =/api/chat= could begin with a chunked-transfer-encoding chunk-size prefix (e.g. =82\\r\\n{...}=). =json-read-from-string= happily parsed the leading =82= as the integer =82=, which then crashed =ollama-buddy--handle-http-error= with =Wrong type argument: listp, 82= inside the network-process filter, repeating for every subsequent chunk. The streaming filter now strips any leading non-={= bytes before parsing and requires the parsed value to be a cons before treating it as an alist. =handle-http-error= itself is also defensive against non-alist input, falling back to a generic =HTTP NNN= message (or the raw string body) so a future caller can't reintroduce the crash. The same =consp= guard is mirrored in the curl backend filter for symmetry.\n\n** <2026-04-09 Thu> *7.1.2*\n\nGLM 5.1 cloud model support.\n\n*** Features\n\n- *GLM 5.1 Cloud Model* -- Added =glm-5.1:cloud= to =ollama-buddy-cloud-models=, so it appears in the =C-c m= model picker with the =☁= indicator. GLM-5.1 is Z.ai's next-generation flagship model for agentic engineering, with significantly stronger coding capabilities and support for tools and thinking.\n\n** <2026-04-08 Wed> *7.1.1*\n\nGemma 4 model support.\n\n*** Features\n\n- *Gemma 4 Cloud Model* -- Added =gemma4:31b-cloud= to =ollama-buddy-cloud-models=, so it appears in the =C-c m= model picker with the =☁= indicator.\n- *Gemma 4 Recommended Models* -- Added =gemma4:e2b=, =gemma4:e4b=, =gemma4:latest= and =gemma4:26b= to the \"Efficient & Capable\" category of =ollama-buddy-available-models= (shown via =C-c L=). =gemma4:26b= is a Mixture-of-Experts model with only 4B active parameters, so the Q4 quant runs on 16GB GPUs (with partial CPU offload) and on Apple Silicon shared-memory systems, despite its total weight size. The dense =gemma4:31b= is still left off the recommended list. =gemma2:27b= was dropped from the same list for consistency.\n- *Gemma 4 Vision Support* -- All Gemma 4 variants (=e2b=, =e4b=, =latest=, =26b=, =31b=, =31b-cloud=) are registered as vision models, so the =⊙= indicator lights up and image attachment works with them.\n\n** <2026-03-23 Sun> *7.1.0*\n\nThinking toggle and Ollama offline detection.\n\n*** Features\n\n- *Thinking toggle* -- New =ollama-buddy-thinking-enabled= variable controls whether the Ollama API =think= parameter is sent to reasoning-capable models. When enabled (default), models like DeepSeek-R1, QwQ, and Qwen3 emit a thinking block before responding. When disabled, they skip reasoning entirely for faster, cheaper responses. Toggle with =/think= slash command, =T= in the transient menu, or =M-x ollama-buddy-toggle-thinking=.\n- *Header indicator* -- =✦= (thinking enabled) / =✧= (thinking disabled) on both the header line and prompt line, shown only for thinking-capable models.\n\n** <2026-03-21 Fri> *7.0.0*\n\nPlan mode — structured task planning with org-mode TODO integration.\n\n*** Features\n\n- *Plan mode* -- A new planning workflow where the LLM generates structured plans as org-mode TODO headings. Activate with =/plan=, then describe your task. The LLM produces a plan with =** TODO Step N:= headings that support native org state cycling (=S-<right>=, =C-c C-t=).\n- *Plan TODO states* -- Custom org TODO sequence: =TODO= → =DOING= → =DONE= | =SKIP=, with colour-coded faces (red, orange, green, grey).\n- *=/plan-next= slash command* -- Execute the next =TODO= step. Marks it =DOING=, switches to a minimal execution system prompt so tool calling works cleanly, and sends the step to the LLM. A =** ⚒ DOING:= indicator with progress summary is inserted into the buffer.\n- *=/plan-all= slash command* -- Execute all remaining =TODO= steps sequentially.\n- *=/plan-done= slash command* -- Mark the current =DOING= step as =DONE= and restore the planning system prompt.\n- *=/plan-status= slash command* -- Display plan progress summary (e.g. \"Plan: 2/6 done, 1 doing, 3 remaining, 0 skipped\").\n- *=/plan-stop= slash command* -- Deactivate plan mode, restore previous system prompt and org TODO keywords.\n- *Quick continue* -- =C-u C-c C-c= (or =C-u C-c RET=) sends \"continue\" to the LLM without needing to type anything. Useful when a model stops mid-response or after tool results.\n- *Tool calling progress* -- Status line and echo area now show live feedback during tool execution: =⚒ Preparing write_file…= during streaming, =⚒ Running write_file…= during execution, =⚒ Tools complete= when finished.\n- *Enhanced =write_file= tool* -- Now reports file size and line count in both the echo area and tool results (e.g. \"Successfully wrote 142 lines (4.2k) to /path/to/file\").\n\n*** Key binding changes\n\n- =C-u C-c C-c= / =C-u C-c RET= now sends \"continue\" (was: set system prompt). System prompt can still be set via =/system= or the transient menu.\n\n** <2026-03-20 Thu> *6.1.0*\n\nParameter management improvements and keybinding cleanup.\n\n*** Features\n\n- *Unified parameter display* -- =ollama-buddy-params-display= now shows each parameter as a foldable org heading with built-in help text. Press =TAB= on any parameter to read a detailed description. The separate =ollama-buddy-params-help= buffer has been merged into this single view.\n- *Direct parameter display* -- =C-c t= opens the Ollama API Parameters buffer directly from the chat. Press =g= to refresh, =0= to reset all parameters, or =TAB= to expand a parameter for its help text.\n- Modified parameters are shown in *bold* in the parameter display buffer.\n- *Intro display fix* -- Fixed duplicate provider summary when launch frontends are available.\n\n** <2026-03-19 Wed> *6.0.0*\n\nLaunch external frontends from Ollama Buddy\n\n*** Features\n\n- *=/launch= slash command* -- Launch any Ollama model (local or cloud) in an external terminal with a frontend tool like Claude Code. Runs =ollama launch claude --model MODEL= in a detected terminal emulator. Auto-detects terminal via =$TERMINAL=, =$TERM_PROGRAM=, =xdg-terminal-exec=, or PATH scan of 16 common emulators. Supports multiple frontends (=ollama-buddy-launch-frontends=, default: =(\"claude\")=).\n- *Launch button in Model Management* -- Each model (local and cloud) now has a =Launch= button in the =C-c M= Model Management buffer when frontends are detected.\n- *Welcome screen launch indicator* -- Shows =⚡ launch: claude (via kitty)= (or your detected terminal) on the welcome screen when frontends are available.\n\n** <2026-03-19 Wed> *5.1.0*\n\nUnguarded tool mode.\n\n*** Features\n\n- *Unguarded mode* -- New =/unguarded= slash command, transient =G=, or =ollama-buddy-tools-toggle-unguarded= to bypass ALL safety prompts and let tools run to completion without interruption. No confirmation for unsafe tools (e.g. =execute_shell=), no large-result threshold warnings, and safe-mode restrictions are overridden. Header line turns *red* and shows =☠= as a clear visual warning. Toggle via =/unguarded=, transient menu =G=, or =M-x ollama-buddy-tools-toggle-unguarded=.\n\n** <2026-03-18 Tue> *5.0.1*\n\nAuto-scroll toggle for following streaming output.\n\n*** Features\n\n- *Auto-scroll toggle* -- =C-c g= toggles =ollama-buddy-auto-scroll=, jumping to the end of the buffer when enabled so you can immediately follow streaming tokens. Header line shows =↓= when active. Auto-scroll now works when toggled mid-stream (no longer requires cursor to already be at end of buffer).\n\n** <2026-03-17 Mon> *5.0.0*\n\nTool calling for all providers — OpenAI, Claude, and Gemini API types all support function calling through =ollama-buddy-provider-create=.\n\n*** Features\n\n- *Tool calling for external providers* -- Models registered via =ollama-buddy-provider-create= now support tool calling across all three API types: OpenAI-compatible (covers OpenAI, DeepSeek, Grok, OpenRouter, Copilot, Codestral, LM Studio, etc.), Anthropic Claude, and Google Gemini. Tools are automatically converted from the internal OpenAI format to each provider's native schema at send time.\n\n** <2026-03-17 Mon> *4.2.0*\n\nTool-augmented search — LLMs can now autonomously search the web and query local documents during tool calling.\n\n*** Features\n\n- *=web_search= tool* -- When =ollama-buddy-web-search= is loaded and tool calling is enabled, models can autonomously search the web for current information. The tool uses the existing Ollama web search API and returns plain-text results (titles, URLs, snippets) directly to the model as tool call context. This lets the model decide when it needs up-to-date information rather than requiring the user to manually attach searches.\n\n- *=rag_search= tool* -- When =ollama-buddy-rag= is loaded and tool calling is enabled, models can autonomously search local RAG indexes for relevant document chunks. Accepts a =query= and optional =index= name; if no index is specified, all available indexes are searched. Uses the configured embedding model, =top-k=, and similarity threshold settings.\n\n- *Emacs 29.1 minimum* -- Bumped from 28.1. All org folding now uses the =org-fold= text-property API directly, removing the overlay-based fallback paths. This fixes thinking block folding issues on Emacs 29+ where =org-fold='s fragility check could inadvertently reveal folds.\n\n- *Welcome screen improvements* -- Additional commands are now under a folded =** More Commands= org heading, replacing the =ollama-buddy-full-welcome-enabled= defcustom. Project path is a clickable org file link opening dired.\n\n- *Model Management* -- Running models are now listed individually in the Running Models section with per-model Unload buttons. The =[x]/[ ]= checkbox indicator is removed from Available Models since running status is shown in its own section.\n\n*** Key binding changes\n\n- =C-c E= -- Toggle tool auto-execute (was: role creator, now removed)\n- =E= in main transient Tools section -- Toggle tool auto-execute\n\n*** Removed\n\n- =ollama-buddy-full-welcome-enabled= defcustom (replaced by folded heading)\n- =ollama-buddy-role-creator-create-new-role= command and =C-c E= binding\n\n** <2026-03-16 Sun> *4.1.1*\n\nRecommended Models browser and model letter ordering.\n\n*** Features\n\n- *Recommended Models buffer* -- A new =ollama-buddy-recommended-models= command (=C-c L=) opens a dedicated =*Ollama Recommended Models*= buffer showing categorised models from the Ollama Hub that are not yet installed locally. Each model has a pull button and capability indicators (⚒⊙✦). The model management buffer (=C-c M=) no longer includes this section.\n\n- *Model letter ordering* -- Letter assignment now matches the display order in the model management buffer: cloud models get =a, b, c...= first, then local models.\n\n*** Key binding changes\n\n- =C-c L= — Recommended Models (was Session Load)\n- =C-c f= — Session Load (was =C-c L=)\n- Transient menu: =L= → Recommended, =f= → Load session\n\n** <2026-03-16 Sun> *4.1.0*\n\nResponse metadata and SVG context bar.\n\n*** Features\n\n- *Org property drawers on response headings* -- Every =** [model: RESPONSE]= heading now gets a =:PROPERTIES:= drawer with =:TIMESTAMP:=, =:TOKENS:=, =:RATE:=, =:ELAPSED:=, and =:WAIT:=. Queryable via =org-columns=; survives session save/load. The drawer is folded by default — press =TAB= to reveal.\n\n- *Org file links for attachments* -- Attached files in the chat buffer are now shown as =[[file:path][name]]= org links, clickable with =C-c C-o=.\n\n- *SVG context bar* -- When =ollama-buddy-context-display-type= is set to =bar= and Emacs is running in GUI mode (=display-graphic-p=), the header-line now renders a colour-coded SVG bar showing the context breakdown: history (green), system prompt (blue), attachments (orange), web search (purple), RAG (cyan), current prompt (red), and free space (grey). Terminal Emacs falls back to the existing text-character bar.\n\n*** Removed\n\n- *Token stats toggle (=C-c T=)* -- The =ollama-buddy-display-token-stats= defcustom and =ollama-buddy-toggle-token-display= command have been removed. Token data now lives in the property drawer on each response heading. The global stats viewer (=C-c #=) is unchanged.\n\n** <2026-03-14 Fri> *4.0.0*\n\nGeneric provider registration system for external LLMs.\n\n*** Breaking Changes\n\n- *External LLM providers now use a generic registration system* -- A new =ollama-buddy-provider.el= module provides =ollama-buddy-provider-create=, a single factory function for registering any external LLM provider. Three API types are supported: =openai= (default), =claude=, and =gemini=.\n\n *Migration:* The existing individual provider files (=ollama-buddy-openai.el=, =ollama-buddy-claude.el=, etc.) have been rewritten as thin wrappers around the new system. *Your current configuration with =(require 'ollama-buddy-openai)= and =(setq ollama-buddy-openai-api-key ...)= will continue to work unchanged.* However, these wrapper files are deprecated and will be removed in a future release.\n\n *New approach (recommended):*\n\n #+begin_src elisp\n (require 'ollama-buddy-provider)\n\n (ollama-buddy-provider-create\n :name \"OpenAI\" :prefix \"a:\"\n :api-key (lambda () (auth-source-pick-first-password\n :host \"ollama-buddy-openai\" :user \"apikey\"))\n :endpoint \"https://api.openai.com/v1/chat/completions\"\n :models-endpoint \"https://api.openai.com/v1/models\"\n :models-filter (lambda (id) (string-match-p \"gpt\" id)))\n\n (ollama-buddy-provider-create\n :name \"Claude\" :prefix \"c:\" :api-type 'claude\n :api-key (lambda () (auth-source-pick-first-password\n :host \"ollama-buddy-claude\" :user \"apikey\"))\n :endpoint \"https://api.anthropic.com/v1/messages\"\n :models-endpoint \"https://api.anthropic.com/v1/models\")\n\n (ollama-buddy-provider-create\n :name \"Gemini\" :prefix \"g:\" :api-type 'gemini\n :api-key (lambda () (auth-source-pick-first-password\n :host \"ollama-buddy-gemini\" :user \"apikey\"))\n :endpoint \"https://generativelanguage.googleapis.com/v1beta/models/%s:generateContent\"\n :models-endpoint \"https://generativelanguage.googleapis.com/v1/models\"\n :models-filter (lambda (id) (string-match-p \"gemini\" id)))\n #+end_src\n\n Any OpenAI-compatible server (LM Studio, llama.cpp, vLLM) can be registered\n with a single call -- no new file required.\n\n*** New Features\n\n- *=ollama-buddy-provider-create=* -- Register any LLM provider with one function call. Supports static model lists, dynamic model discovery with optional filters, and lazy API key resolution via function values.\n- *=ollama-buddy-provider-remove=* / *=ollama-buddy-provider-refresh=* / *=ollama-buddy-provider-list=* -- Manage registered providers at runtime.\n- *Welcome screen shows generic providers* -- Providers registered via =ollama-buddy-provider-create= now appear in the welcome screen alongside those loaded via the legacy =require= approach.\n\n*** Deprecated\n\n- *Individual provider files* -- =ollama-buddy-openai.el=, =ollama-buddy-claude.el=, =ollama-buddy-gemini.el=, =ollama-buddy-grok.el=, =ollama-buddy-codestral.el=, =ollama-buddy-openrouter.el=, and =ollama-buddy-deepseek.el= are now thin wrappers. They still work but will be removed in a future release. =ollama-buddy-copilot.el= and =ollama-buddy-openai-compat.el= are unaffected.\n\n** <2026-03-13 Thu> *3.7.1*\n\nCode quality, error handling, non-blocking async, and project directory switching.\n\n*** New Features\n\n- *Switch directory from chat* -- =/cd= slash command (or =C-c O= → =P= → =d=) switches the chat buffer's working directory without leaving the chat. If the new directory is a project, the welcome screen is re-displayed with project info and the cached project summary is automatically attached as context.\n\n*** Improvements\n\n- *Non-blocking model info* -- Fetching model capabilities (=/api/show=) is now fully asynchronous. Switching models or opening the chat no longer freezes Emacs, especially with cloud models like =qwen3-coder-next:cloud=.\n- *Tool call heading shows arguments* -- The =****= org heading for each tool call now includes the JSON arguments inline (e.g. =**** execute_shell {\"command\":\"git status\"}=), visible at a glance when the subtree is folded.\n\n*** Removed\n\n- *Fabric and Awesome ChatGPT Prompts* -- Removed =ollama-buddy-fabric.el= and =ollama-buddy-awesome.el= modules, along with all transient menu entries, keybindings, slash commands, texinfo chapters, and configuration variables. These external prompt collections were too maintenance-heavy.\n\n** <2026-03-13 Thu> *3.7.0*\n\nRAG pause/resume, periodic checkpointing, and new built-in tools.\n\n*** New Features\n\n- *RAG pause/resume* -- =M-x ollama-buddy-rag-pause= (or =c= in the RAG transient menu) pauses an in-progress indexing operation and saves all progress to disk. =M-x ollama-buddy-rag-resume= (or =r= in the RAG transient menu) continues from where it left off. Partial indexes are searchable immediately for already-embedded chunks.\n- *RAG periodic checkpointing* -- Progress is automatically saved every N batches (controlled by =ollama-buddy-rag-checkpoint-interval=, default 5). Even if Emacs crashes mid-indexing, partial progress is preserved and can be resumed.\n- *Partial index display* -- =M-x ollama-buddy-rag-list-indexes= shows partial indexes with a =[partial: N/M chunks]= indicator and pending chunk count.\n- *Update directory handles partial indexes* -- =M-x ollama-buddy-rag-update-directory= detects partial indexes and offers to resume or start fresh.\n- *New built-in tools* -- =search_files= (grep across files in a directory tree), =get_region= (active selection text), =get_buffer_info= (buffer metadata without full contents), =describe_symbol= (Emacs Lisp documentation lookup), =eval_elisp= (evaluate arbitrary elisp expressions).\n\n** <2026-03-12 Wed> *3.6.0*\n\nRAG incremental updates and cancellation.\n\n*** New Features\n\n- *Incremental RAG updates* -- =M-x ollama-buddy-rag-update-directory= (or =u= in the RAG transient menu) re-indexes only files that have been added or modified since the last indexing, and removes chunks for deleted files. File modification times are now stored in the index to enable change detection. Falls back to a full re-index when no prior metadata exists or when the embedding model has changed.\n- *Cancel RAG indexing* -- =M-x ollama-buddy-rag-cancel= (or =c= in the RAG transient menu) stops an in-progress indexing or update operation. The cancellation takes effect cleanly before the next embedding batch.\n\n** <2026-03-08 Sat> *3.5.1*\n\nCurl backend refactor — unified request pipeline and HTTP error handling.\n\n*** Improvements\n\n- *Shared request pipeline* -- Extracted four shared functions (=validate-send-request=, =process-inline-prompt=, =build-chat-payload=, =setup-chat-send=) used by both network-process and curl backends. The curl backend now has full feature parity: tool calling, =@search()=, =@file()=, =@rag()= inline processing, web search context, RAG context, effective system prompts, and eager response headers.\n- *Shared stream processor* -- Both backends now use =ollama-buddy--stream-process-json= for all response handling, eliminating duplicated thinking block, content insertion, tool call, and completion logic. The curl backend shrank from 918 to ~500 lines (46% reduction).\n- *Curl header indicator* -- =⇄= shown in the header line when the curl backend is active.\n- *CANCELLED heading* -- Both backends now insert =*** CANCELLED= in the chat buffer when a request is cancelled (curl already did; network-process previously showed =[Stream Interrupted]=).\n\n*** Tests\n\n- Added 25 backend parity tests covering dispatcher routing, effective backend fallback, request validation, inline processing, JSON delegation, cancellation flag behaviour, function signature parity, and HTTP error handling (429/401).\n\n** <2026-03-07 Fri> *3.5.0*\n\nProject Init (experimental) — a step towards a more code-oriented LLM workflow.\n\n*** New Features\n\n- *Project Init* -- =/init= generates and caches a project summary file (=.ollama-buddy-project.org=) at the project root. On future sessions the summary auto-loads as context, giving the model immediate awareness of your codebase without manual attachment. This is an experimental feature exploring tighter integration between project context and LLM conversations.\n- *Auto-load project context* -- Opening a chat buffer inside a project that has a cached summary automatically attaches it.\n- *Session directory persistence* -- Sessions now save and restore =default-directory=, so loading a project session restores the correct project context and =project.el= integration.\n- *Session rename* -- =/rename= sets a display name for the current session. =/save= uses it as the description suffix with a fresh timestamp prefix.\n- *New slash commands* -- =/login= and =/logout= for Ollama cloud authentication, =/manual= to open the Info manual, =/export= for =org-export-dispatch= on the chat buffer.\n\n** <2026-03-05 Wed> *3.4.1*\n\nThinking Peek and Conversation Rewind.\n\n*** New Features\n\n- *Thinking Peek* -- Thinking tokens now stream into the buffer under a folded =*** Thinking= heading. Press =TAB= on the heading to peek at accumulated content mid-stream; press =TAB= again to re-fold. On completion the raw text is replaced with converted org content and the heading is renamed to =*** Think=.\n- *Rewind* -- Press =C-u C-u C-c C-c= on a prompt heading to rewind the conversation to that point. Falls back to =completing-read= when not on a heading. Buffer content and conversation history are truncated and the prompt text is pre-filled for editing and resending.\n\n** <2026-03-04 Wed> *3.4.0*\n\nUnified Skills and User Prompts.\n\n*** New Features\n\n- *Unified Skills & Prompts* -- Integrated the \"Skills\" concept directly into `ollama-buddy-user-prompts.el`. Specialized personas are now managed as standard user prompts within the new =skills= category.\n- *Interactive @skill Selection* -- Typing `@skill` in the prompt now triggers a `completing-read` selection of available prompts from your library.\n- *Interactive @file Selection* -- Typing `@file` now triggers a `read-file-name` prompt for quick inline attachment.\n- *Slash Command Integration* -- The `/skill` slash command now pulls from the unified user prompts library.\n\n** <2026-03-03 Tue> *3.3.0*\n\nSmart Project Integration.\n\n*** New Features\n\n- *Smart Project Integration* -- Introduced `ollama-buddy-project.el` which leverages the built-in `project.el` library for deep context awareness.\n- *Project Slash Command* -- Added `/project` slash command to the chat buffer for quick file attachment from the current project.\n- *Project Meta-Context* -- New command `ollama-buddy-project-attach-context` to instantly attach standard project files like README, TODO, and CHANGELOG.\n- *Transient Menu Integration* -- Enhanced the \"Attachments\" menu (=C-c O a=) with a dynamic \"Project\" section that appears only when a project is detected.\n\n** <2026-03-03 Tue> *3.2.2*\n\nMain transient menu reorganization.\n\n*** New Features\n\n- *Transient Menu Reorganization* -- Reorganized the main transient menu (=C-c O=) into a compact 4x2 grid. Moved \"History\" and \"Sessions\" to the top level for faster access. Introduced specialized sub-menus for \"Settings\", \"System Prompts\", and \"Roles Management\" to keep the interface clean and efficient.\n- *Documentation Update* -- Updated all project documentation (READMEs, main manual, Texinfo, and docstrings) to reflect the new transient menu structure and logical groupings.\n\n** <2026-03-02 Sun> *3.2.1*\n\nBenchmark all models and multishot timeout.\n\n*** New Features\n\n- *Benchmark All Models* (=C-c u=) -- Send a configurable prompt to every available model via multishot, automatically building token usage statistics for all accessible models in one command. Embedding models are filtered out. Also available from the transient menu (=u Benchmark All=).\n- *Multishot Per-Model Timeout* -- Each model in a multishot or benchmark sequence gets a configurable timeout (default 120 seconds). If a model exceeds the limit its request is cancelled, a =*** TIMED OUT= marker is inserted, and the sequence continues with the next model.\n- *Model Rankings* on Token Stats page (=C-c #=) -- A composite ranking section appears at the top when multiple models have data, scoring each model across speed (40%), responsiveness (30%), and throughput (30%). Medals (🥇🥈🥉) mark the top 3 and are propagated into the Token Count, Token Rate, and TTFT charts for at-a-glance cross-referencing. Does not measure response accuracy or quality.\n- *New slash commands* -- =/new= starts a fresh session (same as =/clear=), =/exit= and =/bye= close the chat buffer, =/unload= lets you pick a running model to unload from memory (or unload all at once via =[All]=), =/set= edits a model parameter, =/show= displays current model info.\n\n*** New Customizations\n\n- =ollama-buddy-benchmark-prompt= -- Prompt sent to each model during benchmark (default: =\"Explain what a binary tree is in 2-3 sentences.\"=)\n- =ollama-buddy-multishot-timeout= -- Per-model timeout in seconds for multishot sequences (default: 120, set to =nil= to disable)\n\n** <2026-02-28 Fri> *3.2.0*\n\nCloud usage statistics on the Model Management page.\n\n*** New Features\n\n- *Cloud usage stats* -- The Model Management page (=C-c M=) now displays session and weekly usage percentages for Ollama cloud models, shown as visual progress bars in the =☁ Cloud Models= section.\n - Requires setting =ollama-buddy-cloud-session-token= to the =__Secure-session= cookie value from ollama.com (sign in via browser, then copy from DevTools > Cookies)\n - Results are cached for 5 minutes (configurable via =ollama-buddy-cloud-usage-cache-seconds=)\n - =M-x ollama-buddy-cloud-refresh-usage= clears cache and re-fetches\n - \"Refresh\" button available directly on the Model Management page\n - When no token is configured, a helpful hint is shown instead\n\n*** New Customizations\n\n- =ollama-buddy-cloud-session-token= -- Session token for fetching cloud usage stats\n- =ollama-buddy-cloud-usage-cache-seconds= -- Cache duration for usage data (default: 300)\n\n** <2026-02-27 Thu> *3.1.0*\n\nInline ghost-text code completions — a first, simple implementation of Copilot-style completions powered by Ollama's =/api/generate= endpoint.\n\n*** New Features\n\n- *Inline ghost-text completions* (=ollama-buddy-completion=) -- A new module providing manual code completions that appear as dimmed ghost text at point. This is a first effort and intentionally simple; results will vary depending on the model used — dedicated code models (e.g. =codellama=, =qwen2.5-coder=) work best, while general-purpose and thinking models may produce verbose or less useful suggestions.\n - =C-c TAB= triggers a completion at point\n - =TAB= accepts the ghost text into the buffer\n - Any other key dismisses the suggestion\n - *Fill-in-the-middle* (FIM) — sends both prefix (50 lines) and suffix (20 lines) context to the model, enabling better contextual completions for models that support FIM\n - *Thinking model support* — handles models that use =thinking= tokens (e.g. cloud thinking models); falls back to thinking output when =response= is empty\n - *Fence stripping* — automatically removes markdown code fences from model output\n - Multi-line ghost text display\n - Configurable via =ollama-buddy-completion-model=, =ollama-buddy-completion-max-tokens= (default 80), =ollama-buddy-completion-context-lines= (default 50), =ollama-buddy-completion-suffix-lines= (default 20)\n - Toggle with =M-x ollama-buddy-completion-mode= or =M-x ollama-buddy-completion-toggle=\n\n** <2026-02-26 Thu> *3.0.0*\n\nGeneric OpenAI-compatible chat provider — connect to LM Studio, llama.cpp, vLLM, Jan, or any OpenAI-API-compatible server.\n\n*** New Features\n\n- *Generic OpenAI-compatible chat provider* (=ollama-buddy-openai-compat=) -- A new provider module that works with any server speaking the OpenAI chat-completions API. Unlike the dedicated =ollama-buddy-openai= module (hardwired to =api.openai.com=), this module is fully configurable:\n - =ollama-buddy-openai-compat-base-url= -- server base URL (default: =http://localhost:1234= for LM Studio)\n - =ollama-buddy-openai-compat-api-key= -- optional Bearer token; leave empty for unauthenticated local servers\n - =ollama-buddy-openai-compat-models= -- fallback model list when auto-discovery is unavailable\n - =ollama-buddy-openai-compat-default-model= -- default model name\n - =ollama-buddy-openai-compat-provider-name= -- display name shown in the UI (default: =LocalAI=)\n - =ollama-buddy-openai-compat-fetch-models= -- whether to auto-discover models via =GET /v1/models= on load (default: =t=)\n - =M-x ollama-buddy-openai-compat-refresh-models= -- re-discover models at runtime after changing the base URL or loading a new model in LM Studio / Jan\n - Models are registered under a configurable prefix (default =l:=) and appear alongside all other providers in the model list\n - Status line shows =l= indicator when the module is loaded\n\n** <2026-02-26 Thu> *2.9.2*\n\nPer-command response destination routing for command definitions.\n\n*** New Features\n\n- *=:destination= property for command definitions* -- Each entry in =ollama-buddy-command-definitions= now accepts an optional =:destination= keyword that overrides the global =ollama-buddy-in-buffer-replace= toggle:\n - =in-buffer= -- always stream the response back into the buffer, replacing the selected region (requires =ollama-buddy-rewrite=).\n - =chat= -- always open the chat buffer, regardless of the global toggle.\n - =nil= / absent -- honour =ollama-buddy-in-buffer-replace= as before.\n- *Preset =:destination= annotations* -- All built-in presets and the default =ollama-buddy-command-definitions= have been annotated: transformation commands (=refactor-code=, =proofread=, translations, style rewrites, etc.) default to =in-buffer=; analytical and generative commands (=git-commit=, =describe-code=, =explain-code=, etc.) default to =chat=.\n\n** <2026-02-25 Tue> *2.9.1*\n\nRandom tips shown on the welcome screen to help users discover features.\n\n*** New Features\n\n- *Welcome screen tips* -- =ollama-buddy-tips.el= ships a curated list of tips shown at random on the welcome screen. Set =ollama-buddy-show-tips= to =nil= to disable, or extend the list with =(add-to-list 'ollama-buddy-tips \"My tip\" t)=.\n\n** <2026-02-24 Mon> *2.9*\n\nConfigurable embedding endpoint for RAG — point the RAG module at any OpenAI-compatible embedding service independently of your Ollama instance.\n\n*** New Features\n\n- *Configurable RAG embedding endpoint* -- Three new customization variables give full control over where embeddings are generated:\n - =ollama-buddy-rag-embedding-base-url= -- set to e.g.@: =\"http://localhost:9000\"= to use a separate embedding server; =nil= (default) keeps the existing behaviour of using the main Ollama host and port.\n - =ollama-buddy-rag-embedding-api-style= -- choose between =ollama= (default, POST =/api/embed=) and =openai= (POST =/v1/embeddings=) to match the API shape of the target server.\n - =ollama-buddy-rag-embedding-api-key= -- optional Bearer token for authenticated embedding services; leave =nil= for local servers.\n- *OpenAI-compatible embedding services* -- RAG can now use dedicated embedding backends!\n\n** <2026-02-24 Mon> *2.8.1*\n\nInline diff inspection and polish for in-buffer replace mode.\n\n*** New Features\n\n- *Inline diff view* (=C-c d=) -- After a rewrite streams in, pressing =C-c d= inserts the original text immediately below the new text in the same buffer. Word-level differences are highlighted using =smerge-refine-regions=: green overlays mark added/changed words in the new text; red strikethrough overlays mark removed words in the original block. Pressing =C-c d= again hides the view. Accepting or rejecting the rewrite automatically removes the diff block.\n- *Automatic \"In-Buffer\" tone* -- When in-buffer replace is active the system prompt is automatically prefixed with a clean-output instruction (\"Return only the requested content. No preamble, no introduction…\"), minimising extraneous text in rewritten regions.\n- *Code fence stripping* -- If the model wraps its response in a markdown code block (e.g.@: =```lisp … ```=), the fences are stripped before the text is placed in the buffer, leaving only the inner content.\n- *=C-c W= keybinding* in the chat buffer to toggle in-buffer replace without opening the transient menu.\n- *Tighter command prompts* -- All region-operating commands (Refactor, Git Commit, Describe Code, Dictionary Lookup, Synonym) now say \"Return ONLY …\" to suppress introductory phrases and commentary that look out of place when inserted directly into source code.\n- Transient menu Actions section shows a live =In-Buffer Replace [ON]/[OFF]= toggle with =✎= indicator; the custom role menu footer shows the same toggle.\n\n** <2026-02-22 Sun> *2.8.0*\n\nInitial in-buffer replace mode — an early-stage feature that streams LLM output directly back into the source buffer instead of the chat buffer.\n\n*** New Features\n\n- *In-buffer replace mode (initial pass)* -- New =ollama-buddy-in-buffer-replace= toggle allows commands that operate on a selected region (refactor, proofread, etc.) to stream their response back into the source buffer in place, replacing the selection. This is an initial attempt at in-buffer editing; the core chat buffer workflow is completely unchanged when the toggle is off.\n - Toggle via transient menu Actions → =W=, or =M-x ollama-buddy-toggle-in-buffer-replace=\n - The =✎= indicator appears in the header line and prompt line when the mode is active\n - While streaming, a =​[Rewriting...]=​ placeholder (dimmed italic) replaces the selection, then streams in with a green highlight\n - After streaming completes, a minor mode activates with two keys: =C-c C-c= to accept (keep new text, remove highlight) and =C-c C-k= to reject (restore original text)\n - Cancellation mid-stream with =C-c C-k= stops the network process and restores the original selection\n - The mode line shows =​ [Rewrite?]=​ while a rewrite is pending decision\n - Only the output destination changes; prompt construction, model selection, system prompts, and command definitions are unaffected\n - New module =ollama-buddy-rewrite.el= loaded optionally via =(require 'ollama-buddy-rewrite nil t)=\n\n** <2026-02-22 Sun> *2.7.3*\n\nNative org-mode collapsible thinking blocks for reasoning models.\n\n*** New Features\n\n- *Collapsible thinking blocks* -- Reasoning model output (=<think>= tags and DeepSeek =message.thinking= API field) is now rendered as a native org-mode heading (=*** ✦ Think=) that folds with =outline-hide-subtree=. While the model streams its reasoning the content is visible under the heading; when the thinking ends the heading is automatically folded, and a =*** ✦ Response= heading is inserted to mark the start of the actual response. Use =C-c V= to toggle all thinking blocks in the buffer, or =TAB= on any =*** ✦ Think= heading line to toggle that block individually.\n- *Thinking block visual demarcation* -- When a thinking block is expanded a blank line precedes the =*** ✦ Response= heading, giving clear visual separation between reasoning and response content.\n- *Thinking model indicator* -- The =✦= symbol is shown in the status line header and prompt line when the current model supports thinking/reasoning.\n\n** <2026-02-21 Fri> *2.7.2*\n\nEnhanced model completing-read with rich metadata annotations.\n\n*** New Features\n\n- *Rich model annotations in completing-read* -- The model selection prompt (=C-c m=) now shows metadata alongside each model name:\n - *Local Ollama models*: parameter size (e.g. =8.0B=), quantization level (=Q4_K_M=), disk size (=4.6 GB=), and a =▶= indicator when the model is currently loaded\n - *Remote provider models*: provider label (e.g. =OpenAI=, =Anthropic=, =Google=), context window size (e.g. =128k ctx=, =1M ctx=, =200k ctx=)\n - *Claude models*: human-readable display name (e.g. =Claude 3 Haiku=, =Claude Sonnet 4.6=) fetched from the Anthropic API\n - *Gemini models*: display name (e.g. =Gemini 2.5 Flash=) and context window fetched live from the Google API\n - *All models*: existing capability indicators (=☁= cloud, =▶= running, =⚒= tools, =⊙= vision) retained\n- *Static context window table* -- Built-in context window sizes for well-known models across OpenAI, Anthropic, Grok, DeepSeek, and Mistral/Codestral; falls back to live API data for Gemini\n\n** <2026-02-20 Thu> *2.7.1*\n\nSystem prompt selection directly from org browse buffers.\n\n*** New Features\n\n- *RET to set system prompt in org list buffers* -- Pressing =RET= on a level-2 heading in the =*User System Prompts*=, =*Awesome ChatGPT Prompts List*=, or =*Fabric Patterns List*= buffers immediately sets that entry as the current system prompt, without leaving the browse buffer or using the completion UI. A hint comment at the top of each buffer documents the binding. Category (level-1) headings produce a clear error message.\n\n** <2026-02-19 Wed> *2.7.0*\n\nAirplane mode for complete internet isolation.\n\n*** New Features\n\n- *Airplane Mode* -- New =ollama-buddy-toggle-airplane-mode= command (=C-c != / transient Actions =!=) completely isolates the package from the internet. When active:\n - All external LLM providers (OpenAI, Claude, Gemini, Grok, Copilot, Codestral, DeepSeek, OpenRouter) are blocked\n - Ollama cloud models are blocked and hidden from the Model Management buffer\n - Web search (=C-c / s= and =C-c / a=) is disabled\n - Only local Ollama models are available for model selection\n - Attempting to send a prompt to an internet-requiring model shows a minibuffer message\n - The =✈= indicator is shown in the chat buffer header line when active\n\n** <2026-02-17 Mon> *2.6.0*\n\nRefactor remote provider infrastructure into shared module.\n\n*** Internal\n\n- *=ollama-buddy-remote.el=* -- New shared infrastructure module for all remote LLM providers. Extracts common helper functions (prefix handling, API key verification, context building, message formatting, chat buffer preparation, response finalization, error handling, model registration) and a generic OpenAI-compatible send function.\n- *Provider modules refactored* -- OpenAI, Grok, Codestral, Copilot, Claude, and Gemini modules now use shared functions from =ollama-buddy-remote.el=, eliminating ~1400 lines of duplicated code. Each OpenAI-compatible provider (OpenAI, Grok, Codestral) is now a thin configuration wrapper (~100-140 lines). Claude and Gemini retain their unique API formats but share all common infrastructure.\n- *Duplicate =ollama-buddy-remote-models= declarations removed* -- Variable is now declared only in =ollama-buddy-core.el=.\n\n*** New Providers\n\n- *=ollama-buddy-deepseek.el=* -- DeepSeek integration (prefix: =d:=). Supports =deepseek-chat= and =deepseek-reasoner= models via the DeepSeek API.\n- *=ollama-buddy-openrouter.el=* -- OpenRouter integration (prefix: =r:=). Access 400+ models from all major providers through a single API. Supports dynamic model fetching with optional regex filtering via =ollama-buddy-openrouter-model-filter=.\n\n** <2026-02-16 Mon> *2.5.3*\n\nAutocomplete for inline =@= commands and =/= slash commands in chat prompt.\n\n*** New Features\n\n- *=@= Autocomplete* -- Typing =@= in the prompt area triggers =completing-read= with available inline commands (=search=, =rag=, =file=). Inserts the chosen syntax template (e.g., =@search()=) with cursor positioned inside the parentheses. Commands are filtered based on loaded modules. Outside the prompt area, =@= inserts literally. Press =C-g= to cancel and insert a literal =@=.\n- *=ollama-buddy-at-commands=* -- New customizable alist for defining available =@= commands and their templates, making it easy to add new inline commands.\n- *Inline =@file(path)= Syntax* -- Use =@file(/path/to/file)= in prompts to attach files to the conversation context inline. Paths are expanded and the file content is attached on send. Skips already-attached and non-existent files with a message. Works well with =dired-copy-filename-as-kill= for pasting paths.\n- *=/= Slash Commands* -- Typing =/= in the prompt area triggers =completing-read= with action commands that execute immediately without sending text to the LLM. Available commands: =model=, =system=, =clear=, =save=, =load=, =tools=, =context=, =help=, =copy=, =retry=, =tone=, =fabric=, =awesome=, =streaming=, =reset=. Filtered by loaded modules (=system= requires =ollama-buddy-user-prompts=, =tools= requires =ollama-buddy-tools=, =fabric= requires =ollama-buddy-fabric=, =awesome= requires =ollama-buddy-awesome=). Outside the prompt area, =/= inserts literally. Press =C-g= to cancel and insert a literal =/=.\n- *=ollama-buddy-slash-commands=* -- New customizable alist for defining available =/= slash commands and their action functions.\n- *=ollama-buddy-copy-last-response=* -- Copy the last assistant response to the kill ring (available as =/copy= slash command).\n- *=ollama-buddy-retry-last-prompt=* -- Resend the last user prompt to the current model (available as =/retry= slash command).\n- *RAG loaded by default* -- =ollama-buddy-rag= is now required by default (no longer needs manual =(require 'ollama-buddy-rag)=). All =@rag()= inline commands and RAG context features are always available.\n\n** <2026-02-16 Mon> *2.5.2*\n\nPDF support for RAG indexing.\n\n*** New Features\n\n- *PDF Indexing* -- RAG can now index PDF files using =pdftotext= (from =poppler-utils=). PDF text extraction is auto-detected at runtime; if =pdftotext= is not installed, PDF files are silently skipped during indexing. PDFs bypass the file size limit since binary size does not reflect extracted text size.\n\n** <2026-02-16 Mon> *2.5.1*\n\nUsability improvements and inline RAG syntax.\n\n*** New Features\n\n- *Inline =@rag(query)= Syntax* -- Use =@rag(query)= in prompts to automatically search and attach RAG context, mirroring =@search()= for web search. Multiple queries supported per prompt. Works across all providers (Ollama, OpenAI, Claude, Gemini, Grok, Copilot, Codestral).\n- *Selection Status in Role Menu* -- Role transient menu header now shows current selection info (character count and line count) so you can confirm text is selected before running commands.\n- *Session Name Improvements* -- Session names generated via stop-word filtering: removes ~60 common English words and short words, keeps up to 5 key terms joined by hyphens.\n- *Autosave Transcript* -- Chat buffer automatically saved to =~autosave.org= after each completed response. File is deleted when a proper session save is performed. Works with both network-process and curl backends.\n\n*** Keybinding Changes\n\n- =C-c r= now opens RAG transient menu directly (replaces individual =C-c r i/s/a/l/d/0= bindings)\n- =C-c C-r= resets system prompt in chat buffer\n- =C-r= in main transient menu (=C-c O=) resets system prompt\n\n** <2026-02-15 Sun> *2.5.0*\n\nRAG (Retrieval-Augmented Generation) Support\n\n*** Overview\n\nOllama Buddy now includes a local RAG system via =ollama-buddy-rag.el=, enabling semantic search over your documents and source code. Index any directory, then search and attach relevant context to conversations --- all without sending entire files to the LLM.\n\nRAG uses Ollama's =/api/embed= endpoint with embedding models (e.g. =nomic-embed-text=) to generate vector representations of document chunks, then performs cosine similarity search at query time to find the most relevant passages.\n\n*** RAG Features\n\n- New =ollama-buddy-rag.el= module with complete RAG pipeline\n- Configurable chunking: chunk size (default 400 words), overlap (50 words), batch size\n- Embedding via Ollama's =/api/embed= endpoint with batch support\n- Cosine similarity vector search with configurable threshold and top-k\n- Persistent index storage in =~/.emacs.d/ollama-buddy/rag-indexes/=\n- Fully asynchronous embedding --- Emacs stays responsive during indexing\n- Background operation progress shown in header line status (=RAG indexing 3/12...=)\n- Embedding model validation with clear error message if model not pulled\n- Embedding models added to recommended models in Model Management\n- RAG context shown in Show Attachments buffer (=⊕N= indicator)\n- Org heading escaping (=,*=) in all attachment display buffers\n- Inline =@rag(query)= syntax in prompts --- automatic search and attach, mirroring =@search()=\n\n*** RAG Commands & Keybindings\n\n| Key | Command | Description |\n|---------+----------------------------------------+---------------------------|\n| C-c r | =ollama-buddy-transient-rag-menu= | Open RAG transient menu |\n| C-c C-r | =ollama-buddy-reset-system-prompt= | Reset system prompt |\n\nRAG transient menu options (via =C-c r= or =C-c O= → =r=):\n\n| Key | Command | Description |\n|-----+--------------------------------------+---------------------------|\n| i | =ollama-buddy-rag-index-directory= | Index a directory |\n| s | =ollama-buddy-rag-search= | Search and display |\n| a | =ollama-buddy-rag-attach= | Search and attach context |\n| l | =ollama-buddy-rag-list-indexes= | List available indexes |\n| d | =ollama-buddy-rag-delete-index= | Delete an index |\n| 0 | =ollama-buddy-rag-clear-attached= | Clear RAG context |\n\n*** Inline =@rag(query)= Syntax\n\nUse =@rag(query)= directly in prompts to automatically search and attach RAG context:\n\n#+begin_example\nTell me about @rag(giant squid attack) from the book.\nCompare @rag(captain nemo) with @rag(ned land) in terms of character development.\n#+end_example\n\n*** Transient Menu\n\nRAG is accessible from the main transient menu: =C-c O= → =r= (RAG submenu) with index, search, and management options.\n\nReset system prompt is accessible via =C-c O= → =C-r= in the System Prompts section.\n\n*** Configuration\n\n| Variable | Default | Description |\n|-----------------------------------------+----------------------+-------------------------------|\n| =ollama-buddy-rag-embedding-model= | =\"nomic-embed-text\"= | Ollama model for embeddings |\n| =ollama-buddy-rag-chunk-size= | 400 | Words per chunk |\n| =ollama-buddy-rag-chunk-overlap= | 50 | Overlap between chunks |\n| =ollama-buddy-rag-top-k= | 5 | Results to return |\n| =ollama-buddy-rag-similarity-threshold= | 0.3 | Minimum similarity score |\n| =ollama-buddy-rag-batch-size= | 10 | Chunks per embedding API call |\n\n*** Test Suite\n\n49 new tests covering chunking, vector math, index management, formatting, search, and end-to-end roundtrip. Run with =make test-rag=.\n\n** <2026-02-12 Thu> *2.0.0*\n\nTool Calling Support and Tool-Capable Model Indicators\n\n*** Overview\n\nOllama Buddy now supports tool calling (function calling), enabling LLMs to invoke Emacs functions during conversations. Models can read files, list directories, search buffers, perform calculations, execute shell commands and more. A new =ollama-buddy-tools.el= module provides the tool framework with built-in tools, a registration API for custom tools, and safety controls.\n\nA ⚒ indicator is shown alongside tool-capable models across all model display surfaces (header line, model management buffer, and completing-read), following the same pattern as the existing vision (⊙) indicator.\n\n*** Tool Calling Features\n\n- New =ollama-buddy-tools.el= module with extensible tool calling framework\n- Built-in safe tools: =read_file=, =list_directory=, =get_buffer_content=, =list_buffers=, =calculate=, =search_buffer=\n- Built-in unsafe tools (require safe mode off): =write_file=, =execute_shell=\n- =ollama-buddy-tools-register= API for adding custom tools with JSON schema parameters\n- =ollama-buddy-tools-safe-mode= (default: t) restricts execution to read-only tools\n- =ollama-buddy-tools-auto-execute= (default: t) controls confirmation prompts\n- =ollama-buddy-tools-max-iterations= (default: 10) prevents infinite tool-call loops\n- =ollama-buddy-tools-toggle= to enable/disable tool calling\n- =ollama-buddy-tools-info= to view all registered tools and their status\n\n*** Tool-Capable Model Indicator\n\n- New =ollama-buddy-tools-models= customization listing models known to support tool calling\n- New =ollama-buddy--model-supports-tools= predicate function (strips prefixes and cloud suffixes for matching)\n- Header line shows ⚒ when the current model supports tools\n- =C-c m= completing-read shows ⚒ (and ⊙ for vision) annotations next to capable models\n- Model management buffer (=C-c M=) shows ⚒ next to tool-capable models in both Available Models and Cloud Models sections\n\n*** Supported Tool-Capable Models\n\nqwen3, qwen3:32b, qwen3:14b, qwen3:8b, qwen3-coder-next, qwen3-coder:480b, deepseek-v3.1:671b, gpt-oss:120b, gpt-oss:20b, glm-4.7, glm-4.7-flash, llama3.1, llama3.3, mistral, mistral-nemo, command-r+, granite4\n\n** <2026-02-12 Thu> *1.5.0*\n\nDynamic Transient Role Menu with Grouped Commands\n\n*** Overview\n\nRole-specific commands now display in a full transient popup menu instead of the minibuffer =read-key= menu, giving you persistent display, help, and discoverability. The menu rebuilds dynamically each time it opens, reflecting the current role's =ollama-buddy-command-definitions=. A new =:group= property on command definitions controls column layout in the transient menu.\n\n*** Binding Update\n\nThe recommended binding for the role menu is now =ollama-buddy-role-transient-menu=:\n\n#+begin_src elisp\n(use-package ollama-buddy\n :bind\n (\"C-c o\" . ollama-buddy-role-transient-menu)\n (\"C-c O\" . ollama-buddy-transient-menu-wrapper))\n#+end_src\n\nThe original =ollama-buddy-menu= minibuffer menu remains available via =M-x ollama-buddy-menu= as a fallback.\n\n*** Changes\n\n- New =ollama-buddy-role-transient-menu= interactive command generates a transient popup from =ollama-buddy-command-definitions=\n- New =:group= property on command definitions controls transient column grouping\n- Commands without =:group= fall into a single \"Commands\" column (full backwards compatibility)\n- Commands with =:model= show the model name in the transient description\n- Duplicate keys are deduplicated (first definition wins)\n- =quit= entries are skipped (transient handles quit natively with =C-g=)\n- Main transient menu =b= key now opens the role transient menu\n- =C-c b= in chat buffer remapped to =ollama-buddy-role-transient-menu=\n- All built-in presets updated with =:group= properties:\n - *default*: General, Custom, System\n - *developer*: General, Code Analysis, Code Generation, Custom, System\n - *bard*: General, Text Transformation, System\n - *buffy*: General, Characters, Supernatural, System\n - *emacs*: General, Emacs Enthusiasm, System\n - *janeway*: General, Starfleet, System\n - *translator*: General, Languages, Tools, System\n - *writer*: General, Writing, Editorial, Creative, Analysis, Research, Utility, System\n - *documenter*: General, Overview, Code Docs, Release, Support, Improve, System\n - *tutor*: General, Info Docs, Explanation, Assessment, Context, System\n\n*** Backwards Compatibility\n\nExisting role presets without =:group= properties continue to work. All commands appear in a single \"Commands\" column, matching the previous flat menu layout.\n\n** <2026-02-12 Thu> *1.4.0*\n\nTone Selector for Response Style\n\n*** Overview\n\nAdded a tone selector that lets users quickly switch between response styles (Normal, Concise, Learning, Explanatory, Formal) without manually editing system prompts.\n\n*** Changes\n\n- New =ollama-buddy-tone-alist= defcustom mapping tone names to system prompt modifier strings\n- New =ollama-buddy-set-tone= interactive command with =completing-read= interface\n- Tone text prepended to the effective system prompt (before global and session prompts)\n- Header line shows =~X= indicator when a non-Normal tone is active (e.g. =~C= for Concise)\n- Keybinding =C-c ~= in chat buffer\n- Transient menu entry =~= under Display Toggle section\n\n** <2026-02-12 Thu> *1.3.5*\n\nCloud Models in Model Management and Categorized Recommendations\n\n*** Overview\n\nEnhanced the Model Management page (=C-c M=) with a dedicated cloud models section and reorganized recommended models into categorized groups to help new users find the right model.\n\n*** Model Management Changes\n\n- Cloud models now displayed in their own =☁ Cloud Models= section with auth status indicator\n- Each cloud model has Select and Pull Manifest actions\n- Cloud models use =u:= prefix for clear visual distinction\n- Local Ollama models no longer show the =o:= prefix unless external providers (OpenAI, Claude, etc.) are loaded\n\n*** Categorized Recommended Models\n\n- Recommended models reorganized into categories: General Chat, Reasoning, Efficient & Capable, Coding, and General Alternatives\n- Each category displayed as a foldable org subheading with a description\n- Categories with no uninstalled models are automatically hidden\n- =ollama-buddy-available-models= now uses a plist structure with =:name=, =:description= and =:models= keys\n\n** <2026-02-11 Wed> *1.3.4*\n\nHeader Line and Interface Refinements\n\n*** Overview\n\nStreamlined the header line, transient menu, and session management for a cleaner, more focused interface.\n\n*** Header Line Changes\n\n- Removed ORG/MD format indicator from header line\n- Removed provider indicators (acgkps) from header line\n- History indicator now off by default (toggle with =C-c >=)\n- Added =<= indicator when global system prompt is disabled\n- Compact =V= indicator for hidden reasoning (was \"REASONING HIDDEN\")\n- Status feedback message when toggling global system prompt\n\n*** Transient Menu Changes\n\n- Removed numeric keys from transient menu bindings\n- Model management reassigned to =M= (was =W=)\n- Multishot reassigned to =U= (was =M=)\n- Added ORG/MD toggle (=C-o=) under Diagnostics section\n- Added History Display toggle (=>=) under Display Toggle section\n- Added Global Prompt toggle (=<=) under Display Toggle section\n- Context Type display reassigned to =&= (was =8=)\n\n*** Model Management\n\n- Tidied up model selection interface\n- Actions section (Import GGUF, Refresh, Custom Pull) moved to top\n- Unload All now refreshes the model list after completion\n- \"Pull Model from Hub\" renamed to \"Custom Pull Model\" for clarity\n- Recommended Models section relabelled \"Select or Pull to Install\"\n- Updated curated =ollama-buddy-available-models= list with categorised groupings\n\n*** Session Management\n\n- Simplified session management: replaced List and Delete commands with a single Directory command (=C-c Z=)\n- =ollama-buddy-sessions-directory= opens sessions folder in Dired for direct file management\n\n*** Other Changes\n\n- Web search module (=ollama-buddy-web-search=) now auto-loaded with the main package\n- =ollama-buddy-full-welcome-enabled= variable controls expanded welcome screen (default: t)\n- Smart =C-a= in chat buffer: first press goes to prompt start, second press goes to column 0\n- Improved =ollama-buddy--cloud-model-p= detection\n- Removed debug messages from =ollama-buddy--validate-model= and =ollama-buddy--get-valid-model=\n- Roles directory now opens in other window\n- Better global system prompt visibility with status bar feedback\n\n** <2026-02-10 Tue> *1.3.3*\n\nAuto-Pull Cloud Model Manifests\n\n*** Overview\n\nWhen selecting an Ollama cloud model that hasn't been used before, its manifest now gets pulled automatically. Previously, users would see a confusing \"model not found\" error because cloud models require a small manifest pull (~400 bytes) before first use.\n\n*** Details\n\n- Added ~ollama-buddy--ensure-cloud-model-available~ pre-flight check\n- Automatically runs ~ollama pull~ for unpulled cloud models before sending requests\n- Works with both network-process and curl communication backends\n- Shows \"Pulling cloud model manifest...\" message during the brief download\n- Invalidates models cache after successful pull so the model appears immediately\n\n** <2026-02-06 Fri> *1.3.2*\n\nNew Role Presets: Tutor and Documenter\n\n*** Tutor Preset\n\nA new educational assistant role for learning and understanding concepts. Features include:\n\n- *Explanation commands*: =explain-simply=, =explain-deeply=, =eli5=, =analogy=, =step-by-step=\n- *Assessment commands*: =quiz-me=, =check-understanding=, =practice-problems=\n- *Context commands*: =prerequisites=, =related-topics=, =real-world=, =common-mistakes=\n- *Emacs Info integration*: Browse and fetch info nodes with completion\n - =I= - Fetch info node with all subnodes\n - =b= - Fetch single info node\n - Completion support for browsing manuals (elisp, emacs, org, etc.)\n - Cached node lists for fast subsequent access\n\nExample workflow for learning Emacs:\n1. Press =I=, select \"elisp\", then browse to \"(elisp)Hooks\"\n2. Content is inserted into your buffer\n3. Select text and use =s= (explain simply) or =z= (quiz me)\n\n*** Documenter Preset\n\nA technical documentation assistant role. Features include:\n\n- *README & Overview*: =write-readme=, =quick-start=, =architecture-doc=\n- *Code Documentation*: =add-comments=, =write-docstring=, =api-docs=, =usage-examples=\n- *Release Notes*: =changelog-entry=, =release-notes=\n- *Support Docs*: =troubleshooting=, =faq=\n- *Improvement*: =improve-docs=, =simplify-docs=\n\n** <2026-02-06 Fri> *1.3.1*\n\nRole Menu Improvements\n\n*** Per-Role Menu Columns\n\nEach role preset can now define its own =ollama-buddy-menu-columns= setting, allowing different menu layouts per role. The role creator now prompts for column count when creating new roles.\n\n#+begin_src elisp\n;; In a role preset file:\n(setq ollama-buddy-menu-columns 3)\n#+end_src\n\n*** Menu Display Fix\n\nFixed an issue where the custom menu could be truncated when the number of rows exceeded =max-mini-window-height=. The menu now dynamically adjusts to ensure all items are visible.\n\n*** Role Preset Refinements\n\nStreamlined built-in role presets by removing less commonly used commands:\n- Removed: =kill-request=, =create-role=, =open-roles-directory=, =token-stats=, =show-history=, =delete-sessions=\n- All presets now include =ollama-buddy-menu-columns= setting (default: 3)\n\n** <2026-02-05 Thu> *1.3*\n\nAdded Web Search Integration\n\nThis release introduces real-time web search capabilities through Ollama's Web Search API, allowing LLMs to access current information from the web.\n\n*** Web Search Pipeline\n\nThe web search feature implements a multi-stage pipeline:\n\n1. *Query to Ollama API*: Search queries are sent to =https://ollama.com/api/web_search= via REST API with Bearer token authentication\n2. *URL Extraction*: The API returns search results with URLs (the content snippets from the API are currently ignored in favor of fetching full page content)\n3. *eww/shr Processing*: Each URL is fetched and processed through Emacs' built-in eww/shr HTML renderer, which:\n - Parses the HTML using =libxml-parse-html-region=\n - Extracts the main content (looking for =<article>=, =<main>=, or content divs)\n - Renders to clean plain text using =shr-insert-document=\n - Escapes org-mode special characters (=*= and =#= at line starts become =,*= and =,#=)\n4. *Context Attachment*: The cleaned text is formatted with org headings and attached to the conversation context\n5. *LLM Submission*: The search results are included when sending prompts to any configured LLM provider\n\n*** Features\n\n- Added =ollama-buddy-web-search.el= module\n- Inline search syntax: =@search(query)= in prompts automatically triggers search\n- Manual commands:\n - =M-x ollama-buddy-web-search= - Search and display results in a buffer\n - =M-x ollama-buddy-web-search-attach= - Search and attach to conversation context\n- Keybindings: =C-c / s= (search), =C-c / a= (attach)\n- Transient menu: =C-c O /= for web search operations\n- Async URL fetching for better performance\n- Status line shows ♁N indicator when web searches are attached\n- Web searches integrated into attachment system:\n - =C-c C-w= shows both file attachments and web searches\n - =C-c 0= clears all attachments including web searches\n- Full content display in attachment viewer with org-mode folding\n\n*** Provider Support\n\nWeb search works with all LLM providers:\n- Local Ollama models (=o:= prefix)\n- OpenAI (=a:= prefix)\n- Anthropic Claude (=c:= prefix)\n- Google Gemini (=g:= prefix)\n- X Grok (=k:= prefix)\n- GitHub Copilot (=p:= prefix)\n- Mistral Codestral (=s:= prefix)\n\n*** Configuration\n\n#+begin_src elisp\n;; Required: Get API key from https://ollama.com/settings/keys\n(setq ollama-buddy-web-search-api-key \"your-api-key\")\n\n;; Optional customizations\n(setq ollama-buddy-web-search-max-results 5) ; Number of URLs to fetch\n(setq ollama-buddy-web-search-snippet-length 2000) ; Max chars per result\n(setq ollama-buddy-web-search-include-urls nil) ; Include URLs in context\n(setq ollama-buddy-web-search-content-source 'eww) ; Content source (see below)\n\n;; Load the module\n(require 'ollama-buddy-web-search nil t)\n#+end_src\n\n*** Content Source Options\n\nThe =ollama-buddy-web-search-content-source= variable controls how content is retrieved:\n\n- =eww= (default, recommended) - Fetches each URL and renders HTML through Emacs' eww/shr. Produces cleaner, more complete content but requires additional HTTP requests.\n\n- =api= (experimental) - Uses content returned directly from the Ollama API without fetching individual URLs. Faster but content quality depends on what the API returns.\n\n*** Example Usage\n\n#+begin_src\n;; Inline search in prompt\nWhat are the key points from @search(emacs 30 new features)?\n\n;; Multiple searches\nCompare @search(rust async) with @search(go concurrency)\n#+end_src\n\n** <2026-02-02 Mon> *1.2.1*\n\nAdded attachment count indicator to header-line\n\n- Header-line now displays ≡N (paperclip + count) when files are attached\n- Provides constant visual reminder of attachment context before sending\n- Indicator appears in bold near the beginning of the status line\n- Empty when no attachments are present\n\n** <2026-02-01 Sun> *1.2*\n\nAdded GitHub Copilot integration\n\n- Added =ollama-buddy-copilot.el= for GitHub Copilot Chat API support\n- Implemented GitHub OAuth device flow authentication (no API key needed)\n- =M-x ollama-buddy-copilot-login= opens browser for secure GitHub authentication\n- =M-x ollama-buddy-copilot-logout= removes saved authentication\n- =M-x ollama-buddy-copilot-status= checks authentication status\n- OAuth token persisted to =~/.emacs.d/ollama-buddy-copilot-token.json=\n- Uses \"p:\" prefix to identify Copilot models\n- Supports OpenAI (gpt-4.1, gpt-4o, gpt-5), Anthropic (claude-sonnet-4, claude-opus-4.5), Google (gemini-2.5-pro, gemini-3-pro), and xAI (grok-code-fast-1) models\n- Supports conversation history and system prompts\n- Header line shows \"p\" indicator when Copilot provider is loaded\n\nTo use GitHub Copilot:\n1. Ensure you have an active GitHub Copilot subscription\n2. Run =M-x ollama-buddy-copilot-login=\n3. Enter the code shown in your browser at github.com/login/device\n4. Select a Copilot model with =C-c m= (e.g., p:gpt-4o)\n\n#+begin_src elisp\n(use-package ollama-buddy\n :bind\n (\"C-c o\" . ollama-buddy-menu)\n (\"C-c O\" . ollama-buddy-transient-menu-wrapper)\n :config\n (require 'ollama-buddy-copilot nil t))\n#+end_src\n\n** <2026-01-31 Sat> *1.1.6*\n\nRemoved model status buffer\n\n- Removed =ollama-buddy-show-model-status= function and =*Ollama Model Status*= buffer\n- Removed =C-c v= keybinding and transient menu entry\n- Model information is available in the model management buffer (=C-c W=)\n\n** <2026-01-31 Sat> *1.1.5*\n\nAdded global system prompt for consistent response formatting\n\n- Added =ollama-buddy-global-system-prompt= customization with sensible default instructing models to avoid markdown tables and use plain prose\n- Added =ollama-buddy-global-system-prompt-enabled= toggle (default: t) to enable/disable the global prompt\n- Global prompt is prepended to session-specific system prompts, providing baseline formatting across all models and providers\n- Added =ollama-buddy-toggle-global-system-prompt= command to quickly toggle the feature\n- Added toggle to transient menu under \"Display Toggle\" (key: 9)\n- Works with all providers: Ollama, OpenAI, Claude, Gemini, Grok, and Codestral\n\nThis feature helps ensure consistent response formatting across different models, avoiding issues like unexpected markdown tables in responses.\n\nConsolidated model management\n\n- Moved \"Recommended Models (Pull)\" section into =C-c W= model management buffer\n- Removed =C-c A= (Detailed Info) keybinding and =ollama-buddy-show-interface-info= function\n- Updated welcome screen to reference =C-c W= for model management\n\n** <2026-01-31 Sat> *1.1.4*\n\nHeader-line and keybinding improvements\n\n- Added =C-c RET= keybinding to send prompts (matches gptel convention)\n- Simplified header-line: removed backend indicator (N/C)\n- Changed header-line \"Markdown\" indicator to \"MD\" for compactness\n- Fixed markdown to org heading conversion: MD headings now offset by 2 levels so H1 becomes org level 3, properly nesting under the =** [MODEL] RESPONSE= heading\n\n** <2026-01-31 Sat> *1.1.3*\n\nImproved chat UX and simplified codebase\n\n- Added =ollama-buddy-auto-scroll= customization option (default: nil)\n- When nil, cursor stays in place during streaming output, allowing manual scrolling\n- When t, buffer auto-scrolls to follow new output (previous behavior)\n- Added =ollama-buddy-pulse-response= option (default: t) to flash/pulse the response text when streaming completes, providing visual feedback similar to gptel\n- Removed model name coloring feature (hash-based highlighting)\n- Removed =ollama-buddy-highlight-models-enabled=, =ollama-buddy-toggle-model-highlighting=\n- Simplifies codebase and may improve org-mode buffer performance\n\n** <2026-01-30 Fri> *1.1.2*\n\nSimplified chat interface\n\n- Streamlined welcome screen showing only essential commands\n- Full interface info (models, commands) moved to separate =*Ollama Buddy Info*= buffer via =C-c A=\n- Model selection now shows counts: =C-c m (10 ollama / 4 online)= and =C-u C-c m (7 cloud)=\n- Header line displays bold prefix characters for loaded external providers: =acgks=\n- Welcome screen lists enabled online LLM providers (e.g., \"Online: a: OpenAI | c: Claude\")\n\n** <2026-01-28 Wed> *1.1*\n\nAdded Ollama Cloud Models support\n\n- Cloud models (running on ollama.com infrastructure) now work seamlessly\n- =ollama-buddy-cloud-signin= to automatically open browser for authentication\n- Cloud models are proxied through the local Ollama server which handles authentication\n- Use =C-u C-c m= or transient menu \"Model > Cloud\" to select cloud models\n- Status line shows ☁ indicator when using a cloud model\n- Available cloud models include: qwen3-coder:480b-cloud, deepseek-v3.1:671b-cloud, gpt-oss:120b-cloud, minimax-m2.1:cloud, and more\n\nTo use cloud models:\n1. Sign in once with =M-x ollama-buddy-cloud-signin= (opens browser automatically)\n2. Select a cloud model with =C-u C-c m=\n3. Use normally - the local Ollama server handles cloud authentication\n\n#+begin_src elisp\n;; Cloud models work with no additional configuration\n;; Just sign in once via the transient menu: Cloud Auth > Sign In\n(use-package ollama-buddy\n :bind\n (\"C-c o\" . ollama-buddy-menu)\n (\"C-c O\" . ollama-buddy-transient-menu-wrapper))\n#+end_src\n\n** <2025-12-11 Thu> *1.0.2*\n\nAdded Mistral Codestral integration\n\n- Added ollama-buddy-codestral.el for Mistral Codestral API support\n- Implemented model handler registration for seamless switching between local Ollama and cloud-based Codestral models\n- Supports async streaming responses with real-time token counting\n- Follows the same integration pattern as other remote AI providers (OpenAI, Claude, Gemini, Grok)\n- Uses \"s:\" prefix to identify Codestral models in the model list\n\n** <2025-06-21 Sat> *0.13.1*\n\nRefactored content register processing to be more efficient and added a new Emacs package brainstorming prompt file.\n\n** <2025-06-15 Sun> *0.13.0*\n\nAdded curl communication backend with fallback support\n\n- Added ollama-buddy-curl.el as separate backend implementation\n- Implemented backend dispatcher system in ollama-buddy-core.el\n- Updated all async functions to use backend dispatcher\n- Added curl backend validation and testing functions\n- Maintained full compatibility with existing network process backend\n\n** <2025-05-31 Sat> *0.12.1*\n\nOptimized Unicode escape function to fix blocking with large file attachments\n\n- Fixed UI blocking when sending large attached files\n- Used temp buffer with delete-char/insert instead of repeated concat calls\n- Reduced processing time from minutes to milliseconds for large payloads\n\n** <2025-05-22 Thu> *0.12.0*\n\nFull system prompt in the status bar replaced with a more meaningful simple role title\n\n- Added system prompt metadata tracking with title, source, and timestamp registry\n- Implemented automatic title extraction and unified completing-read interface\n- Enhanced fabric/awesome prompt integration with proper metadata handling\n- Improved transient menu organization and org-mode formatting with folding\n- Added system prompt history display and better error handling for empty files\n- Transient menu has been simplified and reorganised\n\n** <2025-05-21 Wed> *0.11.1*\n\nQuite a bit of refactoring to generally make this project more maintainable and I have added a starter kit of user prompts.\n\n- Color System Reworking\n - Removed all model color-related functions and variables\n - Removed dependency on =color.el=\n - Replaced with =highlight-regexp= and hashing to =^font-lock= faces, so now using a more native built-in solutions for model colouring rather than shoe-horning in overlays.\n\n- UI Improvements\n - Simplified the display system by leveraging Org mode\n - Added org-mode styling for output buffers\n - Added =org-hide-emphasis-markers= and =org-hide-leading-stars= settings\n - Changed formatting to use Org markup instead of text properties\n - Converted plain text headers to proper Org headings\n - Replaced color properties with Org emphasis (bold)\n\n- History Management Updates\n - Streamlined history editing functionality\n - Improved model-specific history editing\n - Refactored history display and navigation\n\n- System Prompts\n - Added library of system prompts in these categories:\n - analysis (3 prompts)\n - coding (5 prompts)\n - creative (3 prompts)\n - documentation (3 prompts)\n - emacs (10 prompts)\n - general (3 prompts)\n - technical (3 prompts)\n - writing (3 prompts)\n\n** <2025-05-19 Mon> *0.11.0*\n\nAdded user system prompts management\n\n- You can now save, load and manage system prompts\n- Created new transient menu for user system prompts (C-c s)\n- Organized prompts by categories with org-mode format storage\n- Supported prompt editing, listing, creation and deletion\n- Updated key bindings to integrate with existing functionality\n- Added prompts directory customization with defaults\n \n** <2025-05-14 Wed> *0.10.0*\n\nAdded file attachment system for including documents in conversations\n\n- Added file attachment support with configurable file size limits (10MB default) and supported file types\n- Implemented session persistence for attachments in save/load functionality \n- Added attachment context inclusion in prompts with proper token counting\n- Created comprehensive attachment management commands:\n - Attach files to conversations\n - Show current attachments in dedicated buffer\n - Detach specific files\n - Clear all attachments\n- Added Dired integration for bulk file attachment\n- Included attachment menu in transient interface (C-c A)\n- Updated help text to document new attachment keybindings\n- Enhanced context calculation to include attachment token usage\n\n** <2025-05-12 Mon> *0.9.50*\n\nAdded context size management and monitoring\n\n- Added configurable context sizes for popular models (llama3.2, mistral, qwen, etc.)\n- Implemented real-time context usage display in status bar\n- Can display in text or bar display types\n- Added context size thresholds with visual warnings\n- Added interactive commands for context management:\n - =ollama-buddy-show-context-info=: View all model context sizes\n - =ollama-buddy-set-model-context-size=: Manually configure model context\n - =ollama-buddy-toggle-context-percentage=: Toggle context display\n- Implemented context size validation before sending prompts\n- Added token estimation and breakdown (history/system/current prompt)\n- Added keybindings: C-c $ (set context), C-c % (toggle display), C-c C (show info)\n- Updated status bar to show current/max context with fontification\n\n** <2025-05-05 Mon> *0.9.44*\n\n- Sorted model names alphabetically in intro message\n- Removed multishot writing to register name letters\n\n** <2025-05-05 Mon> *0.9.43*\n\nFix model reference error exceeding 26 models #15\n\nUpdate =ollama-buddy= to handle more than 26 models by using prefixed combinations for model references beyond 'z'. This prevents errors in =create-intro-message= when the local server hosts a large number of models.\n\n** <2025-05-03 Sat> *0.9.42*\n\nAdded the following to recommended models:\n\n- qwen3:0.6b\n- qwen3:1.7b\n- qwen3:4b\n- qwen3:8b\n\nand fixed pull model\n\n** <2025-05-02 Fri> *0.9.41*\n\nRefactored model prefixing again so that when using only ollama models no prefix is applied and is only applied when online LLMs are selected (for example claude, chatGPT e.t.c)\n\nI think this makes more sense and is cleaner for I suspect the majority who may use this package are probably more interested in just using ollama models and the prefix will probably be a bit confusing.\n\nThis could be a bit of a breaking change once again I'm afraid for those ollama users that have switched and are now familiar with prefixing \"o:\", sorry!\n\n** <2025-05-02 Fri> *0.9.40*\n\nAdded vision support for those ollama models that can support it!\n\n** <2025-04-29 Tue> *0.9.38*\n\nAdded model unloading functionality to free system resources\n\n- Add unload capability for individual models via the model management UI\n- Create keyboard shortcut (C-c C-u) for quick unloading of all models\n- Display running model count and unload buttons in model management buffer\n \n** <2025-04-25 Fri> *0.9.37*\n\n- Display modified parameters in token stats\n\n** <2025-04-25 Fri> *0.9.36*\n\nAdded Reasoning/Thinking section visibility toggle functionality\n\n** <2025-04-21 Mon> *0.9.35*\n\nAdded Grok support\n\n** <2025-04-20 Sun> *0.9.33*\n\nFixed utf-8 encoding stream response issues from remote LLMs.\n\n** <2025-03-20 Thu> *0.9.32*\n\nFinished the remote LLM decoupling process, meaning that the core =ollama-buddy= logic is now not dependent on any remote LLM, and each remote LLM package is self-contained and functions as a unique extension.\n\n** <2025-03-19 Wed> *0.9.31*\n\nRefactored model prefixing logic and cleaned up\n\n- Standardized model prefixing by introducing distinct prefixes for Ollama (=o:=), OpenAI (=a:=), Claude (=c:=), and Gemini (=g:=) models.\n- Centralized functions to get full model names with prefixes across different model types.\n- Removed redundant and unused variables related to model management.\n\nNote that there may be some breaking changes here especially regarding session recall as all models will now have a prefix to uniquely identify their type. For =ollama= recall, just edit the session files to prepend the ollama prefix of \"o:\"\n\n** <2025-04-17 Thu> *0.9.30*\n\nAdded Gemini integration!\n\nAs with the Claude and ChatGPT integration, you will need to add something similar to them in your configuration. I currently have the following set up to enable access to the remote LLMs:\n\n#+begin_src elisp\n(use-package ollama-buddy\n :bind\n (\"C-c o\" . ollama-buddy-menu)\n (\"C-c O\" . ollama-buddy-transient-menu-wrapper)\n :custom\n (ollama-buddy-openai-api-key\n (auth-source-pick-first-password :host \"ollama-buddy-openai\" :user \"apikey\"))\n (ollama-buddy-claude-api-key\n (auth-source-pick-first-password :host \"ollama-buddy-claude\" :user \"apikey\"))\n (ollama-buddy-gemini-api-key\n (auth-source-pick-first-password :host \"ollama-buddy-gemini\" :user \"apikey\"))\n :config\n (require 'ollama-buddy-openai nil t)\n (require 'ollama-buddy-claude nil t)\n (require 'ollama-buddy-gemini nil t))\n#+end_src\n\nAlso with the previous update all the latest model names will be pulled, so there should be a full comprehensive list for each of the main remote AI LLMs!\n\n** <2025-04-17 Thu> *0.9.23*\n\nRefactored history and model management for remote LLMs\n\n- Now pulling in latest model list for remote LLMs (so now ChatGPT 4.1 is available!)\n- Removed redundant history and model management functions from =ollama-buddy-claude.el= and =ollama-buddy-openai.el=. Replaced them with shared implementations to streamline code and reduce duplication\n\n** <2025-04-15 Tue> *0.9.22*\n\nEnhanced session management\n\n- Refactored =ollama-buddy-sessions-save= to autogenerate session names using timestamp and model.\n- Improved session saving/loading by integrating org file handling.\n- Updated mode line to display current session name dynamically.\n\n** <2025-04-10 Thu> *0.9.21*\n\nAdd history edit/view toggle features, so effectively merging the former history display into the history edit functionality.\n\n** <2025-04-04 Fri> *0.9.20*\n\n- Added =ollama-buddy-awesome.el= to integrate Awesome ChatGPT Prompts.\n \n** <2025-04-01 Tue> *0.9.17*\n\n- Added link to =ollama-buddy= info manual from the chat buffer and transient menu as MELPA has now picked it up and installed it!\n\n** <2025-03-28 Fri> *0.9.16*\n\n- Added =ollama-buddy-fix-encoding-issues= to handle text encoding problems.\n- Refactored and streamline fabric pattern description handling.\n- Removed unused fabric pattern categories to enhance maintainability.\n\n** <2025-03-28 Fri> *0.9.15*\n\n- Implement asynchronous operations for model management\n - Introduce non-blocking API requests for fetching, copying, and deleting models\n- Add caching mechanisms to improve efficiency\n - Cache model data to reduce redundant API calls\n - Manage cache expiration with timestamps and time-to-live settings\n- Update status line to reflect ongoing background operations\n- Ensure smooth user interaction by minimizing wait times and enhancing performance\n\n** <2025-03-26 Wed> *0.9.13*\n\n- Added automatic writing of last response to a register\n- Added M-r to search through prompt history\n\n** <2025-03-26 Wed> *0.9.12*\n\n- Added experimental Claude AI support!\n- removed curl and replaced with url.el for online AI integration\n\n** <2025-03-24 Mon> *0.9.11*\n\nAdded the ability to toggle streaming on and off\n\n- Added customization option to enable/disable streaming mode\n- Implemented toggle function with keybindings (C-c x) and transient menu option\n- Added streaming status indicator in the modeline\n\n** <2025-03-22 Sat> *0.9.10*\n\nAdded experimental OpenAI support!\n\n** <2025-03-22 Sat> *0.9.9.5*\n\nAdded texinfo documentation for future automatic installation through MELPA and created an Emacs manual.\n\n** <2025-03-20 Thu> *0.9.9*\n\nIntro message with model management options (select, pull, delete) and option for recommended models to pull\n\n- Enhance model management and selection features\n- Display models available for download but not yet pulled\n\n** <2025-03-19 Wed> *0.9.8*\n\nAdded model management interface to pull and delete models\n\n- Introduced `ollama-buddy-manage-models` to list and manage models.\n- Added actions for selecting, pulling, stopping, and deleting models.\n\n** <2025-03-19 Wed> *0.9.7*\n\n- Added GGUF file import and Dired integration\n\n** <2025-03-18 Tue> *0.9.6*\n\n- Added a transient menu containing all commands currently presented in the chat buffer\n- Added fabric prompting support, see https://github.com/danielmiessler/fabric\n- Moved the presets to the top level so they will be present in the package folder\n \n** <2025-03-17 Mon> *0.9.5*\n\nAdded conversation history editing\n\n- Added functions to edit conversation history (=ollama-buddy-history-edit=, =ollama-buddy-history-save=, etc.).\n- Updated =ollama-buddy-display-history= to support history editing.\n- Added keybinding =C-c E= for history editing.\n\n** <2025-03-17 Mon> *0.9.1*\n\nNew simple basic interface is available.\n\n** <2025-03-17> *0.9.0*\n\nAdded command-specific parameter customization\n\n- Added :parameters property to command definitions for granular control\n- Implemented functions to apply and restore parameter settings\n- Added example configuration to refactor-code command\n\n** <2025-03-16> *0.8.5*\n\nAdded system prompt support for commands\n\n- Introduced `:system` field to command definitions.\n- Added `ollama-buddy-show-system-prompt` to view active system prompt.\n- Updated UI elements to reflect system prompt status.\n\n** <2025-03-14> *0.8.0*\n\nAdded system prompt support\n\n- Added =ollama-buddy--current-system-prompt= variable to track system prompts\n- Updated prompt area rendering to distinguish system prompts\n- Modified request payload to include system prompt when set \n- Enhanced status bar to display system prompt indicator\n- Improved help menu with system prompt keybindings\n \n** <2025-03-13> *0.7.4*\n\nAdded model info command, update keybindings\n\n- Added `ollama-buddy-show-raw-model-info` to fetch and display raw JSON details \n of the current model in the chat buffer.\n- Updated keybindings:\n - `C-c i` now triggers model info display.\n - `C-c h` mapped to help assistant.\n - Improved shortcut descriptions in quick tips section.\n- Removed unused help assistant entry from menu.\n- Changed minibuffer-prompt key from `?i` to `?b`.\n\n** <2025-03-12> *0.7.3*\n\nAdded function to associate models with menu commands\n\n- Added =ollama-buddy-add-model-to-menu-entry= autoload function\n- Enabled dynamic modification of command-model associations\n\n** <2025-03-12> *0.7.2*\n\nAdded menu model colours back in and removed some redundant code\n\n** <2025-03-11> *0.7.1*\n\nAdded debug mode to display raw JSON messages in a debug buffer\n\n- Created new debug buffer to show raw JSON messages from Ollama API\n- Added toggle function to enable/disable debug mode (ollama-buddy-toggle-debug-mode)\n- Modified stream filter to log and pretty-print incoming JSON messages\n- Added keybinding C-c D to toggle debug mode\n- Updated documentation in welcome message\n\n** <2025-03-11> *0.7.0*\n\nAdded comprehensive Ollama parameter management\n\n- Added customization for all Ollama option API parameters with defaults\n- Only send modified parameters to preserve Ollama defaults\n- Display active parameters with visual indicators for modified values\n- Add keybindings and help system for parameter management\n- Remove redundant temperature controls in favor of unified parameters\n\n** <2025-03-10> *0.6.1*\n\nRefactored prompt handling so each org header line should now always have a prompt for better export\n\n- Added functionality to properly handle prompt text when showing/replacing prompts\n- Extracted inline lambdas in menu actions into named functions\n- Added fallback for when no default model is set\n\n** <2025-03-08> *0.6.0*\n\nChat buffer now in org-mode\n\n- Enabled =org-mode= in chat buffer for better text structure\n- Implemented =ollama-buddy--md-to-org-convert-region= for Markdown to Org conversion\n- Turn org conversion on and off\n- Updated keybindings =C-c C-o= to toggle Markdown to Org conversion\n\n** <2025-03-07> *0.5.1*\n\nAdded temperature control\n\n- Implemented temperature control parameter\n- Added menu commands for setting (T), resetting (0)\n- Added keybindings (C-c t/T/0) for quick temperature adjustments\n- Updated header line and prompt displays to show current temperature\n- Included temperature info in welcome screen with usage guidance\n\n** <2025-03-06> *0.5.0*\n\nImplemented session management, so you can now save your conversations and bring them back with the relevant context and chat history!\n\n- Chat history is now maintained separately for each model\n- Added session new/load/save/delete/list functionality\n- A switch in context can now be achieved by any of the following methods:\n - Loading a previous session\n - Creating a new session\n - Clearing history on the current session\n - Toggling history on and off\n\n** <2025-03-04> *0.4.1*\n\nAdded a sparse version of =ollama-buddy= called =ollama-buddy-mini=, see the github repository for the elisp file and a description in =README-mini.org=\n\n** <2025-03-03> *0.4.0*\n\nAdded conversation history support and navigation functions\n\n- Implemented conversation history tracking between prompts and responses\n- Added configurable history length limits and visual indicators\n- Created navigation functions to move between prompts/responses in buffer\n\n** <2025-03-02> *0.3.1*\n\nEnhanced model colour contrast with themes, allowing =ollama-buddy-enable-model-colors= to be enabled by default.\n\n** <2025-03-01> *0.3.0*\n\nAdded real-time token usage tracking and display\n\n- Introduce variables to track token counts, rates, and usage history\n- Implement real-time token rate updates with a timer\n- Add a function to display token usage statistics in a dedicated buffer\n- Allow toggling of token stats display after responses\n- Integrate token tracking into response processing and status updates\n- Ensure cleanup of timers and tracking variables on completion or cancellation\n\n** <2025-02-28> *0.2.4*\n\nAdded model-specific color highlighting (experimental)\n\n- Introduce `ollama-buddy-enable-model-colors` (default: nil) to toggle model-based color highlighting.\n- Assign consistent colors to models based on string hashing.\n- Apply colors to model names in the menu, status, headers, and responses.\n- Add `ollama-buddy-toggle-model-colors` command to toggle this feature.\n\nThis feature improves UI clarity, making it easier to visually distinguish models.\n\n** <2025-02-28> *0.2.3*\n\nAdded Prompt History Support\n\n- Prompts are now integrated into the Emacs history mechanism which means they persist across sessions. \n- Use =M-p= to navigate prompt history, and =M-p= / =M-n= within the minibuffer to insert previous prompts. \n\n** <2025-02-27> *0.2.2*\n\nAdded support for role-based presets\n\n- Introduced `ollama-buddy-roles-directory` for storing role preset files.\n- Implemented interactive functions to manage roles:\n - `ollama-buddy-roles-switch-role`\n - `ollama-buddy-role-creator-create-new-role`\n - `ollama-buddy-roles-open-directory`\n- Added ability to create and switch between role-specific commands.\n- Updated menu commands to include role management options.\n\n** <2025-02-26> *0.2.1*\n\nadded multishot execution with model selection\n\n- Assign letters to models for quick selection\n- Implement multishot mode for sequential requests to multiple models\n- Store responses per model in registers named after assigned letters\n- Display multishot progress in status\n- Bind `C-c C-l` to trigger multishot prompt\n\n** <2025-02-19> *0.2.0*\n\nImproved prompt handling in chat buffer and simplified setup\n\n- Chat buffer now more prompt based rather than ad-hoc using C-c C-c to send and C-c C-k to cancel\n- Connection monitor now optional, ollama status visibility now maintained by strategic status checks simplifying setup.\n- Can now change models from chat buffer using C-c C-m\n- Updated intro message with ascii logo\n- Suggested default \"C-c o\" for =ollama-buddy-menu=\n- defcustom ollama-buddy-command-definitions now will work in the customization interface.\n\n** <2025-02-13>\n\nModels can be assigned to individual commands\n\n- Set menu :model property to associate a command with a model\n- Introduce `ollama-buddy-fallback-model` for automatic fallback if the specified model is unavailable.\n- Improve `ollama-buddy--update-status-overlay` to indicate model substitution.\n- Expand `ollama-buddy-menu` with structured command definitions using properties for improved flexibility.\n- Add `ollama-buddy-show-model-status` to display available and used models.\n- Refactor command execution flow to ensure model selection is handled dynamically.\n\n** <2025-02-12>\n\n- =ollama-buddy= updated in preparation for MELPA submission\n- Removed C-c single key user keybinding as part of package definition and in the README gave guidance on defining a user keybinding to activate the ollama buddy menu\n- Added =ellama= comparison description\n- Activating and deactivating the =ollama= monitor process now users responsibility\n\n** <2025-02-11>\n\nSignificant improvements and refactoring, particularly around connection handling, streaming responses, and status monitoring.\n\n- Replace curl-based requests with native network processes\n- Added customizatble ollama host and port \n- Added connection monitoring with automatic status updates\n- Added permanently visible status showing connection state and current model\n- Improve error handling for connection failures\n- Refined AI assistant presentation\n\n** <2025-02-07>\n\nIncrease menu columns to 4, add dictionary lookup and save chat options \n\n- Change `ollama-buddy-menu-columns` from 3 to 4 \n- Rename \"Describe code\" menu key from `?d` to `?c` \n- Add dictionary lookup feature (`?d`) \n- Add synonym lookup feature (`?n`) \n- Add \"Save chat\" option (`?s`) to write chat buffer to a file \n\n** <2025-02-07>\n\nAdded query finished message.\n\n** <2025-02-06>\n\n- Initial release\n- Basic chat functionality\n- Menu-driven interface\n- Region-based interactions\n- Model switching support\n"}}}}