- Remove deprecated UNKNOWN.egg-info and user_context.py - Refactor crud_ops, db_tables, and init modules - Update settings UI and save handlers (appearance, general, security) - Update services list, remove, and test DSPY files - Update sessions list DSPY file - Add multi-user test script - Update pyproject.toml dependencies
27 lines
885 B
Plaintext
27 lines
885 B
Plaintext
# Get all services for display in services.ui
|
|
# This .dspy file uses functions provided by load_hermes_web_cli()
|
|
|
|
try:
|
|
# Get current user ID using ahserver's built-in get_user() function
|
|
user_id = await get_user()
|
|
|
|
# Use the function provided by the hermes-web-cli module
|
|
services = await get_all_services(user_id)
|
|
|
|
# Format services for UI display
|
|
result = []
|
|
for service in services:
|
|
result.append({
|
|
"id": service.get("id"),
|
|
"name": service.get("name", f"Service {service.get('id')}"),
|
|
"endpoint": service.get("service_url", ""),
|
|
"description": service.get("description", ""),
|
|
"status": service.get("status", "unknown"),
|
|
"created_at": service.get("created_at")
|
|
})
|
|
|
|
return result
|
|
except Exception as e:
|
|
# On error, return empty array
|
|
return []
|