MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / _legacy_get_module_tree

Function _legacy_get_module_tree

codewiki/mcp/server.py:513–545  ·  view source on GitHub ↗

Legacy get_module_tree.

(arguments: dict[str, Any])

Source from the content-addressed store, hash-verified

511 {"error": "API key not configured. Run 'codewiki config set --api-key <key>'"}
512 )
513 )
514 ]
515
516 agent_instructions = {}
517 if arguments.get("doc_type"):
518 agent_instructions["doc_type"] = arguments["doc_type"]
519 if arguments.get("language"):
520 agent_instructions["language"] = arguments["language"]
521 if arguments.get("include_patterns"):
522 agent_instructions["include_patterns"] = [
523 p.strip() for p in arguments["include_patterns"].split(",")
524 ]
525 if arguments.get("exclude_patterns"):
526 agent_instructions["exclude_patterns"] = [
527 p.strip() for p in arguments["exclude_patterns"].split(",")
528 ]
529
530 from codewiki.src.config import Config as BackendConfig, set_cli_context
531
532 set_cli_context(True)
533
534 backend_config = BackendConfig.from_cli(
535 repo_path=str(repo_path),
536 output_dir=str(output_dir),
537 llm_base_url=config.base_url,
538 llm_api_key=api_key,
539 main_model=config.main_model,
540 cluster_model=config.cluster_model,
541 fallback_model=config.fallback_model,
542 provider=getattr(config, "provider", "openai-compatible"),
543 aws_region=getattr(config, "aws_region", "us-east-1"),
544 max_tokens=config.max_tokens,
545 agent_instructions=agent_instructions or None,
546 use_gitignore=arguments.get("use_gitignore", True),
547 )
548

Callers 1

call_toolFunction · 0.85

Calls 4

_textFunction · 0.85
_summarize_treeFunction · 0.85
resolveMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected