Skip to content

Commit 833a2e8

Browse files
authored
fix(mcphub-nvim): add nil check in system_prompt configuration (#1582)
fix(mcphub): add nil check in system_prompt configuration
1 parent 0696fd6 commit 833a2e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lua/astrocommunity/editing-support/mcphub-nvim

lua/astrocommunity/editing-support/mcphub-nvim/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ return {
2929
opts = {
3030
system_prompt = function()
3131
local hub = require("mcphub").get_hub_instance()
32-
return hub:get_active_servers_prompt()
32+
return hub and hub:get_active_servers_prompt() or ""
3333
end,
3434
-- The custom_tools type supports both a list and a function that returns a list. Using a function here prevents requiring mcphub before it's loaded
3535
custom_tools = function()

0 commit comments

Comments
 (0)