feat: add progress indicators for ai operations and bump version to 1.43.0

This commit is contained in:
retoor 2025-11-08 06:07:35 +00:00
parent ebe1b871dd
commit 72c0567314
5 changed files with 29 additions and 3 deletions

View File

@ -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

View File

@ -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"

View File

@ -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..."):

View File

@ -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"

View File

@ -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,