feat: add progress indicators for ai operations and bump version to 1.43.0
This commit is contained in:
@@ -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..."):
|
||||
|
||||
+16
-1
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user