Skip to content

Commit 6fcccdf

Browse files
Add tests
1 parent 7acd66f commit 6fcccdf

File tree

3 files changed

+683
-2
lines changed

3 files changed

+683
-2
lines changed

doc/mcphub.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*mcphub.nvim.txt* For NVIM v0.10.0 Last change: 2026 February 16
1+
*mcphub.nvim.txt* For NVIM v0.10.0 Last change: 2026 February 17
22

33
==============================================================================
44
Table of Contents *mcphub.nvim-table-of-contents*

lua/mcphub/config.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ local defaults = {
5757
--- Custom function to parse json file (e.g `require'json5'.parse` from `https://github.com/Joakker/lua-json5 to parse json5 syntax for .vscode/mcp.json like files)
5858
---@type function | nil
5959
json_decode = nil,
60-
---@type boolean | fun(parsed_params: MCPHub.ParsedParams): boolean | nil | string Function to determine if a call should be auto-approved
60+
---@type boolean | fun(parsed_params: MCPHub.ParsedParams): boolean | nil | string | {approve: boolean, review: boolean}
61+
--- Function to determine if a call should be auto-approved. Can return:
62+
--- - `boolean`: approve (true) or deny (false) the operation
63+
--- - `string`: error message (treated as denial)
64+
--- - `{approve: boolean, review: boolean}`: approve and optionally request review before sending to LLM
65+
--- - `nil`: denial
6166
auto_approve = false,
6267
auto_toggle_mcp_servers = true, -- Let LLMs start and stop MCP servers automatically
6368
use_bundled_binary = false, -- Whether to use bundled mcp-hub binary

0 commit comments

Comments
 (0)