Added plan_implementation_completed.
This commit is contained in:
parent
2b0efe5fd2
commit
c65fe077b3
|
|
@ -7,7 +7,7 @@ from ra_aid.tools import (
|
||||||
request_implementation, read_file_tool,
|
request_implementation, read_file_tool,
|
||||||
fuzzy_find_project_files, ripgrep_search, list_directory_tree,
|
fuzzy_find_project_files, ripgrep_search, list_directory_tree,
|
||||||
swap_task_order, monorepo_detected, existing_project_detected, ui_detected,
|
swap_task_order, monorepo_detected, existing_project_detected, ui_detected,
|
||||||
task_completed
|
task_completed, plan_implementation_completed
|
||||||
)
|
)
|
||||||
from ra_aid.tools.memory import one_shot_completed
|
from ra_aid.tools.memory import one_shot_completed
|
||||||
from ra_aid.tools.agent import request_research, request_task_implementation
|
from ra_aid.tools.agent import request_research, request_task_implementation
|
||||||
|
|
@ -78,7 +78,8 @@ def get_planning_tools(expert_enabled: bool = True) -> list:
|
||||||
emit_plan,
|
emit_plan,
|
||||||
emit_task,
|
emit_task,
|
||||||
swap_task_order,
|
swap_task_order,
|
||||||
request_task_implementation
|
request_task_implementation,
|
||||||
|
plan_implementation_completed
|
||||||
]
|
]
|
||||||
tools.extend(planning_tools)
|
tools.extend(planning_tools)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ from .ripgrep import ripgrep_search
|
||||||
from .memory import (
|
from .memory import (
|
||||||
delete_tasks, emit_research_notes, emit_plan, emit_task, get_memory_value, emit_key_facts,
|
delete_tasks, emit_research_notes, emit_plan, emit_task, get_memory_value, emit_key_facts,
|
||||||
request_implementation, delete_key_facts,
|
request_implementation, delete_key_facts,
|
||||||
emit_key_snippets, delete_key_snippets, emit_related_files, swap_task_order, task_completed
|
emit_key_snippets, delete_key_snippets, emit_related_files, swap_task_order, task_completed,
|
||||||
|
plan_implementation_completed
|
||||||
)
|
)
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|
@ -42,5 +43,6 @@ __all__ = [
|
||||||
'existing_project_detected',
|
'existing_project_detected',
|
||||||
'ui_detected',
|
'ui_detected',
|
||||||
'ask_human',
|
'ask_human',
|
||||||
'task_completed'
|
'task_completed',
|
||||||
|
'plan_implementation_completed'
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,8 @@ _global_memory: Dict[str, Union[List[Any], Dict[int, str], Dict[int, SnippetInfo
|
||||||
'key_snippets': {}, # Dict[int, SnippetInfo] - ID to snippet mapping
|
'key_snippets': {}, # Dict[int, SnippetInfo] - ID to snippet mapping
|
||||||
'key_snippet_id_counter': 0, # Counter for generating unique snippet IDs
|
'key_snippet_id_counter': 0, # Counter for generating unique snippet IDs
|
||||||
'implementation_requested': False,
|
'implementation_requested': False,
|
||||||
'related_files': set()
|
'related_files': set(),
|
||||||
|
'plan_completed': False
|
||||||
}
|
}
|
||||||
|
|
||||||
@tool("emit_research_notes")
|
@tool("emit_research_notes")
|
||||||
|
|
@ -311,6 +312,21 @@ def task_completed(message: str) -> str:
|
||||||
console.print(Panel(Markdown(message), title="✅ Task Completed"))
|
console.print(Panel(Markdown(message), title="✅ Task Completed"))
|
||||||
return "Completion noted."
|
return "Completion noted."
|
||||||
|
|
||||||
|
@tool("plan_implementation_completed")
|
||||||
|
def plan_implementation_completed(message: str) -> str:
|
||||||
|
"""Mark the entire implementation plan as completed.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
message: Message explaining how the implementation plan was completed
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Confirmation message
|
||||||
|
"""
|
||||||
|
_global_memory['plan_completed'] = True
|
||||||
|
_global_memory['completion_message'] = message
|
||||||
|
console.print(Panel(Markdown(message), title="✅ Plan Implementation Completed"))
|
||||||
|
return "Plan completion noted."
|
||||||
|
|
||||||
def get_related_files() -> Set[str]:
|
def get_related_files() -> Set[str]:
|
||||||
"""Get the current set of related files.
|
"""Get the current set of related files.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue