mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-30 12:50:14 +08:00
feat(models): import external client configs
Add a model client import flow that scans local Codex, Claude Code, Gemini CLI, and common environment variable configurations without reading or copying OAuth tokens.
The new backend command returns safe import candidates with provider metadata, model IDs, and API key environment-variable references. Tauri and Web/dev-api both implement the scanner, and Web mode keeps the scan local even when a remote instance is active.
The Models page now offers an import wizard that lets users select importable candidates, adds providers without overwriting existing keys, preserves secrets as ${ENV_VAR} references, and leaves OAuth-only Codex entries as guidance rather than direct OpenClaw imports.
## Verification
- node --check src/pages/models.js
- node --check src/lib/tauri-api.js
- node --check src/locales/modules/models.js
- node --check scripts/dev-api.js
- cargo fmt --check
- cargo check
- npm run build
This commit is contained in:
@@ -4,6 +4,21 @@ export default {
|
||||
title: _('模型配置', 'Models', '模型設定', 'モデル設定', '모델 설정', 'Cấu hình mô hình', 'Configuración de modelos', 'Configuração de modelos', 'Настройка моделей', 'Configuration des modèles', 'Modell-Konfiguration'),
|
||||
desc: _('添加 AI 模型服务商,配置可用模型', 'Add AI model providers, configure available models', '新增 AI 模型服務商,設定可用模型', 'AI モデルプロバイダーとモデルの管理', 'AI 모델 프로바이더 및 모델 관리', 'Quản lý nhà cung cấp và mô hình AI', 'Gestionar proveedores y modelos de IA', 'Gerenciar provedores e modelos de IA', 'Управление провайдерами и моделями ИИ', 'Gérer les fournisseurs et modèles IA', 'KI-Anbieter und Modelle verwalten'),
|
||||
addProvider: _('+ 添加服务商', '+ Add Provider', '+ 新增服務商', '+ プロバイダー追加', '+ 프로바이더 추가', '+ Thêm nhà cung cấp', '+ Agregar proveedor', '+ Adicionar provedor', '+ Добавить провайдера', '+ Ajouter un fournisseur', '+ Anbieter hinzufügen'),
|
||||
importClientConfigs: _('导入客户端配置', 'Import Client Configs', '匯入用戶端設定'),
|
||||
importScanning: _('扫描中...', 'Scanning...', '掃描中...'),
|
||||
importClientTitle: _('导入客户端模型配置', 'Import Client Model Configs', '匯入用戶端模型設定'),
|
||||
importClientHint: _('扫描 Codex、Claude Code、Gemini CLI 和常见环境变量,只导入服务商、模型与环境变量引用,不读取或复制 OAuth Token。', 'Scan Codex, Claude Code, Gemini CLI, and common environment variables. Only providers, models, and environment variable references are imported; OAuth tokens are not read or copied.', '掃描 Codex、Claude Code、Gemini CLI 和常見環境變數,只匯入服務商、模型與環境變數引用,不讀取或複製 OAuth Token。'),
|
||||
importSelected: _('导入选中项', 'Import Selected', '匯入選中項'),
|
||||
importNoneSelected: _('请先选择要导入的配置', 'Select configs to import first', '請先選擇要匯入的設定'),
|
||||
importNoneFound: _('未发现可导入的客户端配置', 'No importable client configs found', '未發現可匯入的用戶端設定'),
|
||||
importScanFailed: _('扫描客户端配置失败', 'Failed to scan client configs', '掃描用戶端設定失敗'),
|
||||
importDone: _('已导入 {count} 个服务商', 'Imported {count} provider(s)', '已匯入 {count} 個服務商'),
|
||||
importKeyFound: _('已检测到', 'Detected', '已偵測到'),
|
||||
importKeyMissing: _('待补齐', 'Missing', '待補齊'),
|
||||
importKeyNone: _('无需密钥', 'No key needed', '無需金鑰'),
|
||||
importAuthHint: _('登录提示', 'Auth hint', '登入提示'),
|
||||
importNoModels: _('未识别到模型,无法导入', 'No model was detected, cannot import', '未識別到模型,無法匯入'),
|
||||
importNoImportable: _('没有可导入的配置', 'No importable configs', '沒有可匯入的設定'),
|
||||
undo: _('↩ 撤销', '↩ Undo'),
|
||||
undoN: _('↩ 撤销 ({n})', '↩ Undo ({n})'),
|
||||
undone: _('已撤销', 'Undone'),
|
||||
|
||||
Reference in New Issue
Block a user