feat: introduce agent communication, autonomous detection, and plugin support
feat: add interactive modes and agent execution tool refactor: remove asyncio dependencies from core api and assistant refactor: remove asyncio dependencies from command handlers maintenance: bump version to 1.10.0 maintenance: update pyproject.toml dependencies and test configuration
This commit is contained in:
@@ -12,7 +12,7 @@ from pr.ui import Colors
|
||||
from pr.editor import RPEditor
|
||||
|
||||
|
||||
def handle_command(assistant, command):
|
||||
async def handle_command(assistant, command):
|
||||
command_parts = command.strip().split(maxsplit=1)
|
||||
cmd = command_parts[0].lower()
|
||||
|
||||
@@ -121,7 +121,7 @@ def handle_command(assistant, command):
|
||||
print(f"Model set to: {Colors.GREEN}{assistant.model}{Colors.RESET}")
|
||||
|
||||
elif cmd == "/models":
|
||||
models = list_models(assistant.model_list_url, assistant.api_key)
|
||||
models = await list_models(assistant.model_list_url, assistant.api_key)
|
||||
if isinstance(models, dict) and "error" in models:
|
||||
print(f"{Colors.RED}Error fetching models: {models['error']}{Colors.RESET}")
|
||||
else:
|
||||
|
||||
@@ -488,7 +488,7 @@ class Assistant:
|
||||
if not user_input:
|
||||
continue
|
||||
|
||||
cmd_result = handle_command(self, user_input)
|
||||
cmd_result = await handle_command(self, user_input)
|
||||
|
||||
if cmd_result is False:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user