Commit a918dc0
committed
fix: show raw MCP tool names in server popup and harden MCP client init
- Expose original_tool_names alongside namespaced tools in
/api/tools/mcp/servers so the MCP "available tools" popup can render
human-friendly names while persona tool matching continues to use
namespaced identifiers.
- Render the popup list from item.original_tool_names with a fallback to
item.tools for forward compatibility.
- Replace `assert mcp_client is not None` in _start_mcp_server with an
explicit RuntimeError so the post-init invariant still holds when
running under `python -O`, which strips asserts.
- Tighten the _find_mcp_tool_by_original_name docstring to match the
surrounding single-line style.1 parent 41066ce commit a918dc0
3 files changed
Lines changed: 22 additions & 16 deletions
File tree
- astrbot
- core/provider
- dashboard/routes
- dashboard/src/components/extension
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 324 | + | |
331 | 325 | | |
332 | 326 | | |
333 | 327 | | |
| |||
361 | 355 | | |
362 | 356 | | |
363 | 357 | | |
364 | | - | |
365 | | - | |
| 358 | + | |
366 | 359 | | |
367 | 360 | | |
368 | 361 | | |
| |||
609 | 602 | | |
610 | 603 | | |
611 | 604 | | |
612 | | - | |
613 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
614 | 612 | | |
615 | 613 | | |
616 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 104 | + | |
| 105 | + | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
110 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
114 | 121 | | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments