Commit 5a53975
committed
gptel-integrations: Guard activate-tools against nil tools list
When `gptel-mcp-connect` is called for specific servers that fail to
start or return no tools, the `add-all-tools` callback passes nil to
`gptel-mcp--activate-tools`. Its `(unless tools ...)` fallback then
fetches tools from ALL connected MCP servers and tries to look them up
via `gptel-get-tool`, crashing on tools from servers that were never
registered with `gptel-make-tool`.
Guard the call with `when` so nil means "nothing to activate" rather
than "activate everything".1 parent 23a0ec9 commit 5a53975
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments