Skip to content

Commit 08663bd

Browse files
committed
fix bug for code_index
1 parent c35838d commit 08663bd

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

tools/code_indexer.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from mcp_agent.workflows.llm.augmented_llm_openai import OpenAIAugmentedLLM
2929
import yaml
3030

31+
3132
def get_preferred_llm_class(config_path: str = "mcp_agent.secrets.yaml"):
3233
"""
3334
Automatically select the LLM class based on API key availability in configuration.
@@ -1534,8 +1535,10 @@ async def main():
15341535
api_config_file = "DeepCode/mcp_agent.secrets.yaml"
15351536

15361537
# You can override these parameters or let them be read from config
1537-
code_base_path = "DeepCode/deepcode_lab/papers/1/code_base/" # Will use config file value if None
1538-
output_dir = "DeepCode/deepcode_lab/papers/1/indexes/" # Will use config file value if None
1538+
code_base_path = "DeepCode/deepcode_lab/papers/1/code_base/" # Will use config file value if None
1539+
output_dir = (
1540+
"DeepCode/deepcode_lab/papers/1/indexes/" # Will use config file value if None
1541+
)
15391542

15401543
# Target structure - this should be customized for your specific project
15411544
target_structure = """
@@ -1592,7 +1595,9 @@ async def main():
15921595
# Display configuration information
15931596
print(f"📁 Code base path: {indexer.code_base_path}")
15941597
print(f"📂 Output directory: {indexer.output_dir}")
1595-
print(f"🤖 Default models: Anthropic={indexer.default_models['anthropic']}, OpenAI={indexer.default_models['openai']}")
1598+
print(
1599+
f"🤖 Default models: Anthropic={indexer.default_models['anthropic']}, OpenAI={indexer.default_models['openai']}"
1600+
)
15961601
print(f"🔧 Preferred LLM: {get_preferred_llm_class(api_config_file).__name__}")
15971602
print(
15981603
f"⚡ Concurrent analysis: {'enabled' if indexer.enable_concurrent_analysis else 'disabled'}"

workflows/agent_orchestration_engine.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ async def paper_reference_analyzer(paper_dir: str, logger) -> str:
437437
Focus on:
438438
1. **References section analysis** - Extract all citations from the References/Bibliography part
439439
2. References with high-quality GitHub implementations
440-
3. Papers cited for methodology, algorithms, or core techniques
440+
3. Papers cited for methodology, algorithms, or core techniques
441441
4. Related work that shares similar technical approaches
442442
5. Implementation references that could provide code patterns
443443
@@ -579,9 +579,7 @@ async def orchestrate_reference_intelligence_agent(
579579
return f.read()
580580

581581
# Execute reference analysis
582-
reference_result = await paper_reference_analyzer(
583-
dir_info["paper_dir"], logger
584-
)
582+
reference_result = await paper_reference_analyzer(dir_info["paper_dir"], logger)
585583

586584
# Save reference analysis result
587585
with open(reference_path, "w", encoding="utf-8") as f:

0 commit comments

Comments
 (0)