refactor(provider): replace startup auto-import with manual import button

Remove the startup loop in lib.rs that auto-imported default providers
for Claude/Codex/Gemini. Move config snippet extraction logic into the
import_default_config command so it works when triggered manually.

Add an "Import Current Config" button to ProviderEmptyState, wired via
useMutation in ProviderList (shown only for standard apps). Update i18n
keys (zh/en/ja) with new button labels and revised empty state text.
This commit is contained in:
Jason
2026-02-20 22:01:18 +08:00
parent 5a72888852
commit 4c88174cb0
7 changed files with 81 additions and 59 deletions
+3 -1
View File
@@ -77,7 +77,9 @@
"tabProvider": "Provider",
"tabUniversal": "Universal",
"noProviders": "No providers added yet",
"noProvidersDescription": "Click the \"Add Provider\" button in the top right to configure your first API provider",
"noProvidersDescription": "Import your current live config below, or manually add a new provider",
"importCurrent": "Import Current Config",
"importCurrentDescription": "Import current live config as default provider",
"currentlyUsing": "Currently Using",
"enable": "Enable",
"inUse": "In Use",
+3 -1
View File
@@ -77,7 +77,9 @@
"tabProvider": "プロバイダー",
"tabUniversal": "統一プロバイダー",
"noProviders": "まだプロバイダーがありません",
"noProvidersDescription": "右上の「プロバイダーを追加」を押して最初の API プロバイダーを登録してください",
"noProvidersDescription": "下の「現在の設定をインポート」ボタンで既存の設定を取り込むか、新しいプロバイダーを手動で追加してください",
"importCurrent": "現在の設定をインポート",
"importCurrentDescription": "現在使用中の設定をデフォルトプロバイダーとしてインポート",
"currentlyUsing": "現在使用中",
"enable": "有効化",
"inUse": "使用中",
+3 -1
View File
@@ -77,7 +77,9 @@
"tabProvider": "供应商",
"tabUniversal": "统一供应商",
"noProviders": "还没有添加任何供应商",
"noProvidersDescription": "点击右上角的\"添加供应商\"按钮开始配置您的第一个API供应商",
"noProvidersDescription": "点击下方的\"导入当前配置\"按钮导入已有配置,或手动添加新的供应商",
"importCurrent": "导入当前配置",
"importCurrentDescription": "将当前正在使用的配置导入为默认供应商",
"currentlyUsing": "当前使用",
"enable": "启用",
"inUse": "使用中",