added monorepo_detected tool
This commit is contained in:
parent
fcd7421d8e
commit
de45ae5c16
|
|
@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
- Added monorepo_detected tool so the agent can take specific actions.
|
||||
|
||||
## [0.6.3]
|
||||
|
||||
- Fix one shot completion signaling.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from ra_aid.tools import (
|
|||
emit_expert_context, get_memory_value, emit_key_facts, delete_key_facts,
|
||||
emit_key_snippets, delete_key_snippets,
|
||||
emit_research_subtask, request_implementation, read_file_tool, fuzzy_find_project_files, ripgrep_search, list_directory_tree,
|
||||
swap_task_order
|
||||
swap_task_order, monorepo_detected
|
||||
)
|
||||
from ra_aid.env import validate_environment
|
||||
from ra_aid.tools.memory import _global_memory, get_related_files, one_shot_completed
|
||||
|
|
@ -59,7 +59,8 @@ RESEARCH_TOOLS = [
|
|||
emit_research_subtask,
|
||||
run_shell_command,
|
||||
emit_research_notes,
|
||||
one_shot_completed
|
||||
one_shot_completed,
|
||||
monorepo_detected
|
||||
]
|
||||
|
||||
def parse_arguments():
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ Be thorough on locating all potential change sites/gauging blast radius.
|
|||
|
||||
If there is a top-level README.md or docs/ folder, always start with that.
|
||||
|
||||
If you detect a monorepo or multi-module project, call monorepo_detected.
|
||||
|
||||
You have often been criticized for:
|
||||
- Missing 2nd- or 3rd-level related files. You have to do a recursive crawl to get it right, and don't be afraid to spawn subtasks.
|
||||
- Missing related files spanning modules or parts of the monorepo.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from .shell import run_shell_command
|
||||
from .monorepo import monorepo_detected
|
||||
from .programmer import run_programming_task
|
||||
from .expert import ask_expert, emit_expert_context
|
||||
from .read_file import read_file_tool
|
||||
|
|
@ -36,5 +37,6 @@ __all__ = [
|
|||
'emit_research_subtask',
|
||||
'ripgrep_search',
|
||||
'file_str_replace',
|
||||
'swap_task_order'
|
||||
'swap_task_order',
|
||||
'monorepo_detected'
|
||||
]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
from langchain_core.tools import tool
|
||||
from rich.console import Console
|
||||
from rich.panel import Panel
|
||||
|
||||
console = Console()
|
||||
|
||||
@tool("monorepo_detected")
|
||||
def monorepo_detected() -> dict:
|
||||
"""
|
||||
Returns a hint message indicating monorepo detection.
|
||||
|
||||
Returns:
|
||||
dict: Contains a 'hint' key with the detection message
|
||||
"""
|
||||
console.print(Panel(
|
||||
"Mono repo detected.",
|
||||
title="🏢 Monorepo Detected",
|
||||
border_style="bright_blue"
|
||||
))
|
||||
return {
|
||||
'hint': 'Found indicators of a monorepo structure. Consider searching across all modules and packages for related code.'
|
||||
}
|
||||
Loading…
Reference in New Issue