UAI Copilot Cluster Intelligence (VS Code Extension)
A VS Code extension that connects to the UAI Copilot backend and provides cluster intelligence, diagnostics, and operational guidance directly from within the editor.
Getting Started
- Install the extension from the VSIX or via the Marketplace (once published).
- Ensure the backend API is running and accessible (default:
http://127.0.0.1:11000).
- Open the extension from the command palette:
UAI Copilot: Open.
Configuration
The extension supports configuration under uaiCopilot in VS Code settings. You can also place a .vscode-extension-config.json file in the workspace root to override settings per-project.
uaiCopilot.apiUrl (default: http://localhost:10000): the base URL of the backend API.
uaiCopilot.apiUrl (default: http://127.0.0.1:11000): the base URL of the backend API.
uaiCopilot.enableHealthCheck (default: true): whether to validate connectivity when the extension starts and to run periodic health checks.
uaiCopilot.healthCheckInterval (default: 30000): interval (ms) between periodic health check pings when health checks are enabled.
uaiCopilot.timeout (default: 5000): request timeout (ms) for the health check.
uaiCopilot.retryAttempts (default: 3): number of retry attempts when connecting to the backend.
uaiCopilot.retryDelay (default: 1000): delay (ms) between retry attempts.
uaiCopilot.healthCheckPaths (default: [/health, /database/health]): array of endpoint paths to attempt during health checks.
uaiCopilot.enableDebugLogging (default: false): enable verbose logging for debugging.
uaiCopilot.enableDebugLogging (default: false): enable verbose logging for debugging.
uaiCopilot.notificationFailureThreshold (default: 1): consecutive failed checks before showing a disconnection notification.
uaiCopilot.healthCheckHistorySize (default: 25): maximum number of health check results retained in the diagnostics history.
Cluster & Routing
The extension can load-balance and fail over across multiple cluster endpoints automatically.
uaiCopilot.clusterEndpoints (default: []): list of cluster endpoint URLs to probe in parallel. When non-empty, overrides apiUrl for routing. Example: ["http://127.0.0.1:11000", "http://192.168.1.81:11000"].
uaiCopilot.routingStrategy (default: "round-robin"): how the next endpoint is chosen. Options: round-robin (even distribution), failover (always prefer the first healthy node), fastest (lowest-latency node wins).
The status bar shows live cluster health: CPU%, RAM, compute label, and a node counter (e.g. ⬡ CPU 12% · 7.8/16G · 0.4GF · ⬡ 2/2). A hardware stats item shows total CPU, GPU/CPU mode, RAM, and estimated Teraflops. Hovering the status bar shows per-node latency and online status.
Commands
UAI Copilot: Open (uai-copilot.open): Opens the UAI Copilot extension.
UAI Copilot: Reconnect (uai-copilot.reconnect): Forces a re-check of the backend connection.
UAI Copilot: Diagnostics (uai-copilot.diagnostics): Opens a diagnostics panel with connection state and logs.
UAI Copilot: Test Connection (uai-copilot.testConnection): Performs a single connection test and shows results.
Troubleshooting
- If you see Connection Error / -1ms, verify that the backend's health endpoint is reachable:
http://localhost:10000/database/health
Development
This extension is built in TypeScript and packaged with vsce.
cd modules/extension/vscode-extension
npm install
npm run compile
npm run package