diff --git a/ra_aid/tools/__init__.py b/ra_aid/tools/__init__.py index 6e35857..9a13802 100644 --- a/ra_aid/tools/__init__.py +++ b/ra_aid/tools/__init__.py @@ -11,7 +11,7 @@ from .list_directory import list_directory_tree from .ripgrep import ripgrep_search from .memory import ( delete_tasks, emit_research_notes, emit_plan, emit_task, get_memory_value, emit_key_facts, - request_implementation, skip_implementation, delete_key_facts, request_research_subtask, + request_implementation, delete_key_facts, request_research_subtask, emit_key_snippets, delete_key_snippets, emit_related_files, swap_task_order ) @@ -33,7 +33,6 @@ __all__ = [ 'request_implementation', 'run_programming_task', 'run_shell_command', - 'skip_implementation', 'write_file_tool', 'request_research_subtask', 'ripgrep_search', diff --git a/ra_aid/tools/memory.py b/ra_aid/tools/memory.py index 9846f3c..5b678d0 100644 --- a/ra_aid/tools/memory.py +++ b/ra_aid/tools/memory.py @@ -2,6 +2,7 @@ from typing import Dict, List, Any, Union, TypedDict, Optional, Sequence, Set from rich.console import Console from rich.markdown import Markdown from rich.panel import Panel +from rich.rule import Rule from langchain_core.tools import tool class SnippetInfo(TypedDict): @@ -27,7 +28,6 @@ _global_memory: Dict[str, Union[List[Any], Dict[int, str], Dict[int, SnippetInfo 'key_snippets': {}, # Dict[int, SnippetInfo] - ID to snippet mapping 'key_snippet_id_counter': 0, # Counter for generating unique snippet IDs 'implementation_requested': False, - 'implementation_skipped': [], 'related_files': set() } @@ -184,24 +184,12 @@ def request_implementation() -> str: Empty string """ _global_memory['implementation_requested'] = True - console.print(Panel("Implementation stage requested", title="🚀 Implementation Requested")) + console.print() + console.print(Rule("🚀 Implementation Requested", style="yellow")) + console.print() return "" -@tool("skip_implementation") -def skip_implementation(reason: str) -> str: - """Indicate that implementation can be skipped. - Used when research/planning determines no changes are needed. - - Args: - reason: Why implementation can be skipped - - Returns: - The stored reason - """ - _global_memory['implementation_skipped'].append(reason) - console.print(Panel(Markdown(reason), title="⏭️ Implementation Skipped")) - return reason @tool("emit_key_snippets") def emit_key_snippets(snippets: List[SnippetInfo]) -> str: diff --git a/ra_aid/tools/research.py b/ra_aid/tools/research.py index 23cc827..783e8fb 100644 --- a/ra_aid/tools/research.py +++ b/ra_aid/tools/research.py @@ -1,6 +1,6 @@ from langchain_core.tools import tool from rich.console import Console -from rich.panel import Panel +from rich.rule import Rule console = Console() @@ -9,7 +9,9 @@ def existing_project_detected() -> dict: """ When to call: Once you have confirmed that the current working directory contains project files. """ - console.print(Panel("Existing project detected.", title="📁 Existing Project Detected", border_style="bright_blue")) + print() + console.print(Rule("📁 Existing Project Detected", style="bright_blue")) + print() return { 'hint': ( "You are working within an existing codebase that already has established patterns and standards. " @@ -28,7 +30,9 @@ def monorepo_detected() -> dict: """ When to call: After identifying that multiple packages or modules exist within a single repository. """ - console.print(Panel("Monorepo detected.", title="📦 Monorepo Detected", border_style="bright_blue")) + print() + console.print(Rule("📦 Monorepo Detected", style="bright_blue")) + print() return { 'hint': ( "You are researching in a monorepo environment that manages multiple packages or services under one roof. " @@ -50,7 +54,9 @@ def ui_detected() -> dict: """ When to call: After detecting that the project contains a user interface layer or front-end component. """ - console.print(Panel("UI detected.", title="🎯 UI Detected", border_style="bright_blue")) + print() + console.print(Rule("🎯 UI Detected", style="bright_blue")) + print() return { 'hint': ( "You are working with a user interface component where established UI conventions, styles, and frameworks are likely in place. "