feat: remove asyncio dependencies from core api, assistant, and command handlers converting to synchronous execution

This commit is contained in:
2025-11-07 16:36:03 +00:00
parent 7b80ce0a23
commit 8d29cc8fe8
20 changed files with 264 additions and 350 deletions
+2 -2
View File
@@ -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: