You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(settings): auto-detect running CLIProxyAPI and show import banner
When the Models tab mounts, probes http://127.0.0.1:8317/v1/models via
the existing testEndpoint IPC bridge (anthropic wire, no key). If CPA is
running and no provider already points at localhost:8317, a
LocalCpaImportCard banner is shown above the provider list.
- Detection runs once per mount (guarded by 'idle' sentinel state).
- Skipped entirely if any existing provider row has a baseUrl matching
/^https?://(localhost|127.0.0.1):8317/ — avoids spam after import.
- "Import" opens AddCustomProviderModal pre-filled with the CPA preset
(same handler as the Add Provider menu item) and immediately hides the
banner.
- "Dismiss" writes cpa-detection-dismissed-v1=1 to localStorage so the
banner never reappears for this install.
- Detection failures are silently swallowed — best-effort enhancement.
- New i18n keys under settings.providers.cpaDetection.* (en + zh-CN).
- Changeset: patch bump for desktop + i18n.
Signed-off-by: hqhq1025 <1506751656@qq.com>
feat(settings): auto-detect running CLIProxyAPI and show import banner
7
+
8
+
When the Models tab mounts, probes `http://127.0.0.1:8317/v1/models` via the existing `testEndpoint` IPC bridge. If CLIProxyAPI is running and no provider is already configured at that address, displays a `LocalCpaImportCard` banner above the provider list offering one-click import into `AddCustomProviderModal`. The banner is dismissible and the preference persists to `localStorage` via key `cpa-detection-dismissed-v1`.
0 commit comments