feat: MCP toolsets in WebUI + onboarding fix for non-standard providers — v0.50.63
Squash-merges PR #578 (rebased from #574 by @renheqiang + #575 by @nesquena-hermes). MCP server toolsets now included in WebUI sessions; onboarding wizard no longer fires for non-standard providers. 1331 tests pass. Nathan override applied for self-built #575.
This commit is contained in:
@@ -342,7 +342,6 @@ MAX_UPLOAD_BYTES = 20 * 1024 * 1024
|
||||
# ── File type maps ───────────────────────────────────────────────────────────
|
||||
IMAGE_EXTS = {".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".bmp"}
|
||||
MD_EXTS = {".md", ".markdown", ".mdown"}
|
||||
OFFICE_EXTS = {".xls", ".xlsx", ".doc", ".docx"}
|
||||
CODE_EXTS = {
|
||||
".py",
|
||||
".js",
|
||||
@@ -404,7 +403,19 @@ _DEFAULT_TOOLSETS = [
|
||||
"web",
|
||||
"webhook",
|
||||
]
|
||||
CLI_TOOLSETS = get_config().get("platform_toolsets", {}).get("cli", _DEFAULT_TOOLSETS)
|
||||
def _resolve_cli_toolsets(cfg=None):
|
||||
"""Resolve CLI toolsets using the agent's _get_platform_tools() so that
|
||||
MCP server toolsets are automatically included, matching CLI behaviour."""
|
||||
if cfg is None:
|
||||
cfg = get_config()
|
||||
try:
|
||||
from hermes_cli.tools_config import _get_platform_tools
|
||||
return list(_get_platform_tools(cfg, "cli"))
|
||||
except Exception:
|
||||
# Fallback: read raw list from config (MCP toolsets will be missing)
|
||||
return cfg.get("platform_toolsets", {}).get("cli", _DEFAULT_TOOLSETS)
|
||||
|
||||
CLI_TOOLSETS = _resolve_cli_toolsets()
|
||||
|
||||
# ── Model / provider discovery ───────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user