fix: expose context engine tools with saved toolsets
This commit is contained in:
committed by
Teknium
parent
1a9ef83147
commit
8595281f3c
@@ -81,6 +81,46 @@ def test_get_platform_tools_uses_default_when_platform_not_configured():
|
||||
def test_configurable_toolsets_include_messaging():
|
||||
assert any(ts_key == "messaging" for ts_key, _, _ in CONFIGURABLE_TOOLSETS)
|
||||
|
||||
|
||||
def test_configurable_toolsets_include_context_engine():
|
||||
assert any(ts_key == "context_engine" for ts_key, _, _ in CONFIGURABLE_TOOLSETS)
|
||||
|
||||
|
||||
def test_get_platform_tools_active_context_engine_is_enabled_for_explicit_config():
|
||||
config = {
|
||||
"context": {"engine": "lcm"},
|
||||
"platform_toolsets": {"cli": ["web", "terminal"]},
|
||||
}
|
||||
|
||||
enabled = _get_platform_tools(config, "cli", include_default_mcp_servers=False)
|
||||
|
||||
assert "context_engine" in enabled
|
||||
assert "web" in enabled
|
||||
assert "terminal" in enabled
|
||||
|
||||
|
||||
def test_get_platform_tools_context_engine_not_added_for_default_compressor():
|
||||
config = {
|
||||
"context": {"engine": "compressor"},
|
||||
"platform_toolsets": {"cli": ["web", "terminal"]},
|
||||
}
|
||||
|
||||
enabled = _get_platform_tools(config, "cli", include_default_mcp_servers=False)
|
||||
|
||||
assert "context_engine" not in enabled
|
||||
|
||||
|
||||
def test_get_platform_tools_context_engine_respects_explicit_empty_selection():
|
||||
config = {
|
||||
"context": {"engine": "lcm"},
|
||||
"platform_toolsets": {"cli": []},
|
||||
}
|
||||
|
||||
enabled = _get_platform_tools(config, "cli", include_default_mcp_servers=False)
|
||||
|
||||
assert "context_engine" not in enabled
|
||||
|
||||
|
||||
def test_get_platform_tools_default_telegram_includes_messaging():
|
||||
enabled = _get_platform_tools({}, "telegram")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user