Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/main/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const CONFIG_EVENTS = {
OAUTH_LOGIN_START: 'config:oauth-login-start', // OAuth登录开始
OAUTH_LOGIN_SUCCESS: 'config:oauth-login-success', // OAuth登录成功
OAUTH_LOGIN_ERROR: 'config:oauth-login-error', // OAuth登录失败
PROXY_RESOLVED: 'config:proxy-resolved',
USER_INFO_CHANGED: 'config:user-info-changed' // 用户信息更新事件
}

Expand Down
15 changes: 15 additions & 0 deletions src/main/presenter/configPresenter/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,5 +562,20 @@ export const DEFAULT_PROVIDERS: LLM_PROVIDER_BASE[] = [
defaultBaseUrl:
'https://your-resource-name.openai.azure.com/openai/deployments/your-deployment-name'
}
},
{
id: 'easychat',
name: 'Easychat',
apiType: 'openai',
apiKey: '',
baseUrl: '',
enable: false,
websites: {
official: 'https://easychat.com',
apiKey: 'https://easychat.com/api-keys',
docs: 'https://easychat.com/docs',
models: 'https://easychat.com/models',
defaultBaseUrl: 'https://easychat.com/v1'
}
}
]
6 changes: 6 additions & 0 deletions src/renderer/src/components/settings/ProviderApiConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
t('settings.provider.howToGet')
}}
</Button>
<Button v-if="!provider.custom && provider.id === 'easychat'" variant="outline" size="xs"
class="text-xs text-normal rounded-lg" @click="openProviderWebsite">
<Icon icon="lucide:hand-helping" class="w-4 h-4 text-muted-foreground" />{{
t('settings.provider.oauthLogin')
}}
</Button>
<!-- Key Status Display -->
<div v-if="keyStatus && (keyStatus.usage !== undefined || keyStatus.limit_remaining !== undefined)"
class="flex items-center gap-2 text-xs text-muted-foreground">
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/en-US/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot Connected",
"githubCopilotNotConnected": "GitHub Copilot Not Connected",
"loginWithGitHub": "Login with GitHub",
"oauthLogin": "OAuth Login",
"loggingIn": "Logging in...",
"githubCopilotLoginTip": "Authorize DeepChat to access your GitHub Copilot subscription. 'read:user' and 'read:org' permissions are required to access the Copilot API.",
"loginSuccess": "Login successful",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/fa-IR/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "گیت‌هاب کوپایلت پیوند داده شده",
"githubCopilotNotConnected": "گیت‌هاب کوپایلت پیوند داده نشده",
"loginWithGitHub": "ورود با گیت‌هاب",
"oauthLogin": "ورود OAuth",
"loggingIn": "در حال ورود...",
"githubCopilotLoginTip": "دیپ‌چت را برای دسترسی به اشتراک گیت‌هاب کوپایلت خود مجاز کنید. دسترسی‌های 'read:user' و 'read:org' برای دسترسی به API کوپایلت لازم است.",
"loginSuccess": "ورود موفق",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/fr-FR/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot connecté",
"githubCopilotNotConnected": "GitHub Copilot non connecté",
"loginWithGitHub": "Se connecter avec GitHub",
"oauthLogin": "Connexion OAuth",
"loggingIn": "Connexion en cours...",
"githubCopilotLoginTip": "Autorisez DeepChat à accéder à votre abonnement GitHub Copilot. Les autorisations 'read:user' et 'read:org' sont requises pour accéder à l'API Copilot.",
"loginSuccess": "Connexion réussie",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/ja-JP/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot接続済み",
"githubCopilotNotConnected": "GitHub Copilot未接続",
"loginWithGitHub": "GitHubでログイン",
"oauthLogin": "OAuthログイン",
"loggingIn": "ログイン中...",
"githubCopilotLoginTip": "DeepChatがGitHub Copilotサブスクリプションにアクセスすることを許可します。Copilot APIにアクセスするには'read:user'と'read:org'の権限が必要です。",
"loginSuccess": "ログイン成功",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/ko-KR/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot 연결됨",
"githubCopilotNotConnected": "GitHub Copilot 연결되지 않음",
"loginWithGitHub": "GitHub로 로그인",
"oauthLogin": "승인 된 로그인",
"loggingIn": "로그인 중...",
"githubCopilotLoginTip": "DeepChat이 GitHub Copilot 구독에 액세스하도록 허용하세요. Copilot API에 액세스하려면 'read:user' 및 'read:org' 권한이 필요합니다.",
"loginSuccess": "로그인 성공",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/ru-RU/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot подключен",
"githubCopilotNotConnected": "GitHub Copilot не подключен",
"loginWithGitHub": "Войти через GitHub",
"oauthLogin": "Войти через OAuth",
"loggingIn": "Вход...",
"githubCopilotLoginTip": "Разрешите DeepChat доступ к вашей подписке GitHub Copilot. Для доступа к API Copilot требуются разрешения 'read:user' и 'read:org'.",
"loginSuccess": "Вход выполнен успешно",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/zh-CN/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot 已连接",
"githubCopilotNotConnected": "GitHub Copilot 未连接",
"loginWithGitHub": "使用 GitHub 登录",
"oauthLogin": "授权登录",
"loggingIn": "登录中...",
"githubCopilotLoginTip": "点击授权 DeepChat 访问您的 GitHub Copilot 订阅",
"loginSuccess": "登录成功",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/zh-HK/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot 已連接",
"githubCopilotNotConnected": "GitHub Copilot 未連接",
"loginWithGitHub": "用 GitHub 登入",
"oauthLogin": "OAuth 登入",
"loggingIn": "登入中...",
"githubCopilotLoginTip": "請授權 DeepChat 存取你的 GitHub Copilot 訂閱。需要 'read:user' 及 'read:org' 權限才能正常使用 Copilot API。",
"loginSuccess": "登入成功",
Expand Down
1 change: 1 addition & 0 deletions src/renderer/src/i18n/zh-TW/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@
"githubCopilotConnected": "GitHub Copilot 已連接",
"githubCopilotNotConnected": "GitHub Copilot 未連接",
"loginWithGitHub": "使用 GitHub 登入",
"oauthLogin": "OAuth 登入",
"loggingIn": "登入中...",
"githubCopilotLoginTip": "請授權 DeepChat 訪問您的 GitHub Copilot 訂閱。需要 'read:user' 和 'read:org' 權限才能正常使用 Copilot API。",
"loginSuccess": "登入成功",
Expand Down