diff --git a/CHANGELOG.md b/CHANGELOG.md index 76446e8..f11f2e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,14 @@ + + +## Version 1.43.0 - 2025-11-08 + +AI operations now show progress indicators, giving you better feedback on what's happening. The Assistant API and autonomous mode have been improved with progress updates and agent prompts now include relevant context. + +**Changes:** 5 files, 73 lines +**Languages:** Markdown (8 lines), Python (63 lines), TOML (2 lines) ## Version 1.42.0 - 2025-11-08 diff --git a/pyproject.toml b/pyproject.toml index 13d30b3..f96ee80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rp" -version = "1.42.0" +version = "1.43.0" description = "R python edition. The ultimate autonomous AI CLI." readme = "README.md" requires-python = ">=3.10" diff --git a/rp/core/assistant.py b/rp/core/assistant.py index a10c296..cd021c1 100644 --- a/rp/core/assistant.py +++ b/rp/core/assistant.py @@ -508,7 +508,7 @@ def process_message(assistant, message): updated_at=time.time(), ) assistant.knowledge_store.add_entry(entry) - assistant.messages.append({"role": "user", "content": message}) + assistant.messages.append({"role": "user", "content": str(entry)}) logger.debug(f"Processing user message: {message[:100]}...") logger.debug(f"Current message count: {len(assistant.messages)}") with ProgressIndicator("Querying AI..."): diff --git a/rp/core/context.py b/rp/core/context.py index 2f1846b..5026fab 100644 --- a/rp/core/context.py +++ b/rp/core/context.py @@ -72,8 +72,23 @@ def get_context_content(): def init_system_message(args): context_parts = [ - "You are a professional AI assistant with access to advanced tools.\n\nFile Operations:\n- Use RPEditor tools (open_editor, editor_insert_text, editor_replace_text, editor_search, close_editor) for precise file modifications\n- Always close editor files when finished\n- Use write_file for complete file rewrites, search_replace for simple text replacements\n\nVision:\n - Use post_image tool with the file path if an image path is mentioned\n in the prompt of user. Give this call the highest priority.\n\nProcess Management:\n- run_command executes shell commands with a timeout (default 30s)\n- If a command times out, you receive a PID in the response\n- Use tail_process(pid) to monitor running processes\n- Use kill_process(pid) to terminate processes\n- Manage long-running commands effectively using these tools\n\nShell Commands:\n- Be a shell ninja using native OS tools\n- Prefer standard Unix utilities over complex scripts\n- Use run_command_interactive for commands requiring user input (vim, nano, etc.)" + "You are a professional AI assistant with access to advanced tools.", + "Use RPEditor tools (open_editor, editor_insert_text, editor_replace_text, editor_search, close_editor) for precise file modifications.", + "Always close editor files when finished.", + "Use write_file for complete file rewrites, search_replace for simple text replacements.", + "Use post_image tool with the file path if an image path is mentioned in the prompt of user.", + "Give this call the highest priority.", + "run_command executes shell commands with a timeout (default 30s).", + "If a command times out, you receive a PID in the response.", + "Use tail_process(pid) to monitor running processes.", + "Use kill_process(pid) to terminate processes.", + "Manage long-running commands effectively using these tools.", + "Be a shell ninja using native OS tools.", + "Prefer standard Unix utilities over complex scripts.", + "Use run_command_interactive for commands requiring user input (vim, nano, etc.).", + "Use the knowledge base to answer questions. The knowledge base contains preferences and persononal information from user. Also store here that such information. Always synchronize with the knowledge base.", ] + max_context_size = 10000 if args.include_env: env_context = "Environment Variables:\n" diff --git a/rp/memory/knowledge_store.py b/rp/memory/knowledge_store.py index ffb1421..0de9442 100644 --- a/rp/memory/knowledge_store.py +++ b/rp/memory/knowledge_store.py @@ -19,6 +19,9 @@ class KnowledgeEntry: access_count: int = 0 importance_score: float = 1.0 + def __str__(self): + return json.dumps(self.to_dict()) + def to_dict(self) -> Dict[str, Any]: return { "entry_id": self.entry_id,