feat: codegraph
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
|
||||
from agentci.adapters.codex import CodexClient, _session_id
|
||||
|
||||
|
||||
def test_enables_codegraph_in_shared_codex_config() -> None:
|
||||
root = Path(__file__).parents[1]
|
||||
config = tomllib.loads((root / "codex" / "config.toml").read_text())
|
||||
|
||||
codegraph = config["mcp_servers"]["codegraph"]
|
||||
assert codegraph["command"] == "codegraph"
|
||||
assert codegraph["args"] == ["serve", "--mcp"]
|
||||
assert codegraph["env"]["CODEGRAPH_TELEMETRY"] == "0"
|
||||
|
||||
|
||||
def test_extracts_thread_id_from_jsonl() -> None:
|
||||
output = '\n'.join(
|
||||
[
|
||||
@@ -49,6 +60,7 @@ def test_configures_research_agent_and_optional_context7_key(tmp_path) -> None:
|
||||
assert parsed["model"] == "research-model"
|
||||
assert parsed["model_reasoning_effort"] == "high"
|
||||
assert parsed["web_search"] == "live"
|
||||
assert parsed["mcp_servers"]["codegraph"]["enabled"] is False
|
||||
assert 'url = "https://mcp.context7.com/mcp"' in agent
|
||||
assert 'url = "https://mcp.grep.app"' in agent
|
||||
assert "ctx7-secret" not in agent
|
||||
|
||||
Reference in New Issue
Block a user