diff --git a/src/_locales/de/main.json b/src/_locales/de/main.json index 40556b6..743191c 100644 --- a/src/_locales/de/main.json +++ b/src/_locales/de/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Konversation speichern", "UNAUTHORIZED": "Unbefugt", "Please login at https://chat.openai.com first": "Bitte zuerst bei https://chat.openai.com anmelden", + "Please login at https://claude.ai first": "Bitte zuerst bei https://claude.ai anmelden", "Then open https://chat.openai.com/api/auth/session": "Dann öffne https://chat.openai.com/api/auth/sitzung", "And refresh this page or type you question again": "Klicken Sie anschließend auf die Schaltfläche Wiederholen in der oberen rechten Ecke", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Erwägen Sie ein API-Schlüssel unter https://platform.openai.com/account/api-keys zu erstellen", diff --git a/src/_locales/en/main.json b/src/_locales/en/main.json index cddcb20..0d98c89 100644 --- a/src/_locales/en/main.json +++ b/src/_locales/en/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Save Conversation", "UNAUTHORIZED": "UNAUTHORIZED", "Please login at https://chat.openai.com first": "Please login at https://chat.openai.com first", + "Please login at https://claude.ai first": "Please login at https://claude.ai first", "Then open https://chat.openai.com/api/auth/session": "Then open https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "And click the retry button in the top right corner", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Consider creating an api key at https://platform.openai.com/account/api-keys", diff --git a/src/_locales/es/main.json b/src/_locales/es/main.json index eebec2e..bfd5300 100644 --- a/src/_locales/es/main.json +++ b/src/_locales/es/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Guardar conversación", "UNAUTHORIZED": "NO AUTORIZADO", "Please login at https://chat.openai.com first": "Por favor, inicie sesión en https://chat.openai.com primero", + "Please login at https://claude.ai first": "Por favor, inicie sesión en https://claude.ai primero", "Then open https://chat.openai.com/api/auth/session": "Luego abra https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "A continuación, pulse el botón Reintentar situado en la esquina superior derecha.", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Considere crear una clave de API en https://platform.openai.com/account/api-keys", diff --git a/src/_locales/fr/main.json b/src/_locales/fr/main.json index e6d638a..0247057 100644 --- a/src/_locales/fr/main.json +++ b/src/_locales/fr/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Enregistrer la conversation", "UNAUTHORIZED": "NON AUTORISÉ", "Please login at https://chat.openai.com first": "Veuillez vous connecter d'abord sur https://chat.openai.com", + "Please login at https://claude.ai first": "Veuillez vous connecter d'abord sur https://claude.ai", "Then open https://chat.openai.com/api/auth/session": "Puis ouvrez https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "Cliquez ensuite sur le bouton Réessayer dans le coin supérieur droit", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Pensez à créer une clé API sur https://platform.openai.com/account/api-keys", diff --git a/src/_locales/in/main.json b/src/_locales/in/main.json index 288aa60..bb4bac8 100644 --- a/src/_locales/in/main.json +++ b/src/_locales/in/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Simpan Percakapan", "UNAUTHORIZED": "TIDAK DIIZINKAN", "Please login at https://chat.openai.com first": "Silakan masuk di https://chat.openai.com terlebih dahulu", + "Please login at https://claude.ai first": "Silakan masuk di https://claude.ai terlebih dahulu", "Then open https://chat.openai.com/api/auth/session": "Lalu buka https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "Setelah itu klik tombol Coba Lagi di sudut kanan atas", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Pertimbangkan untuk membuat kunci API di https://platform.openai.com/account/api-keys", diff --git a/src/_locales/it/main.json b/src/_locales/it/main.json index 905e98e..b08fc1d 100644 --- a/src/_locales/it/main.json +++ b/src/_locales/it/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Salva la conversazione", "UNAUTHORIZED": "Non autorizzato", "Please login at https://chat.openai.com first": "Effettua il login su https://chat.openai.com prima", + "Please login at https://claude.ai first": "Effettua il login su https://claude.ai prima", "Then open https://chat.openai.com/api/auth/session": "Quindi apri https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "Quindi fare clic sul pulsante Riprova nell'angolo in alto a destra", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Considera la creazione di una chiave API su https://platform.openai.com/account/api-keys", diff --git a/src/_locales/ja/main.json b/src/_locales/ja/main.json index cfb0d90..fcdb969 100644 --- a/src/_locales/ja/main.json +++ b/src/_locales/ja/main.json @@ -44,6 +44,7 @@ "Save Conversation": "会話を保存", "UNAUTHORIZED": "認証されていません", "Please login at https://chat.openai.com first": "最初にhttps://chat.openai.com/にログインしてください", + "Please login at https://claude.ai first": "最初にhttps://claude.ai/にログインしてください", "Then open https://chat.openai.com/api/auth/session": "次にhttps://chat.openai.com/api/auth/sessionにアクセス", "And refresh this page or type you question again": "次に、右上の「再試行」ボタンをクリックします", "Consider creating an api key at https://platform.openai.com/account/api-keys": "https://platform.openai.com/account/api-keysでAPIキーを作成してください", diff --git a/src/_locales/ko/main.json b/src/_locales/ko/main.json index fcf594e..7f104e4 100644 --- a/src/_locales/ko/main.json +++ b/src/_locales/ko/main.json @@ -44,6 +44,7 @@ "Save Conversation": "대화 저장", "UNAUTHORIZED": "인증되지 않음", "Please login at https://chat.openai.com first": "https://chat.openai.com에서 로그인하세요.", + "Please login at https://claude.ai first": "https://claude.ai에서 로그인하세요.", "Then open https://chat.openai.com/api/auth/session": "그런 다음 https://chat.openai.com/api/auth/session을 열거나 다시 질문을 입력하세요.", "And refresh this page or type you question again": "그런 다음 오른쪽 상단의 재시도 버튼을 클릭합니다.", "Consider creating an api key at https://platform.openai.com/account/api-keys": "https://platform.openai.com/account/api-keys에서 API 키를 생성하는 것을 고려하세요.", diff --git a/src/_locales/pt/main.json b/src/_locales/pt/main.json index 3ebb298..3f697bd 100644 --- a/src/_locales/pt/main.json +++ b/src/_locales/pt/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Salvar Conversa", "UNAUTHORIZED": "NÃO AUTORIZADO", "Please login at https://chat.openai.com first": "Por favor, faça login em https://chat.openai.com primeiro", + "Please login at https://claude.ai first": "Por favor, faça login em https://claude.ai primeiro", "Then open https://chat.openai.com/api/auth/session": "Então, abra https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "Depois clique no botão Retry, no canto superior direito", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Considere criar uma chave de API em https://platform.openai.com/account/api-keys", diff --git a/src/_locales/ru/main.json b/src/_locales/ru/main.json index 411389e..9f5f965 100644 --- a/src/_locales/ru/main.json +++ b/src/_locales/ru/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Сохранить разговор", "UNAUTHORIZED": "Несанкционированный", "Please login at https://chat.openai.com first": "Пожалуйста, сначала войдите на https://chat.openai.com", + "Please login at https://claude.ai first": "Пожалуйста, сначала войдите на https://claude.ai", "Then open https://chat.openai.com/api/auth/session": "Затем откройте https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "После этого нажмите кнопку Retry в правом верхнем углу", "Consider creating an api key at https://platform.openai.com/account/api-keys": "Рассмотрите возможность создания ключа API на https://platform.openai.com/account/api-keys", diff --git a/src/_locales/tr/main.json b/src/_locales/tr/main.json index 249edc0..af8b008 100644 --- a/src/_locales/tr/main.json +++ b/src/_locales/tr/main.json @@ -44,6 +44,7 @@ "Save Conversation": "Konuşmayı Kaydet", "UNAUTHORIZED": "Yetkilendirilmemiş", "Please login at https://chat.openai.com first": "Lütfen önce https://chat.openai.com adresinde oturum açın", + "Please login at https://claude.ai first": "Lütfen önce https://claude.ai adresinde oturum açın", "Then open https://chat.openai.com/api/auth/session": "Ardından https://chat.openai.com/api/auth/session adresini açın", "And refresh this page or type you question again": "Ve bu sayfayı yenileyin veya sorunuzu tekrar yazın", "Consider creating an api key at https://platform.openai.com/account/api-keys": "https://platform.openai.com/account/api-keys adresinde bir api anahtarı oluşturmayı düşünün", diff --git a/src/_locales/zh-hans/main.json b/src/_locales/zh-hans/main.json index a29caee..bcb222a 100644 --- a/src/_locales/zh-hans/main.json +++ b/src/_locales/zh-hans/main.json @@ -44,6 +44,7 @@ "Save Conversation": "保存对话", "UNAUTHORIZED": "未授权", "Please login at https://chat.openai.com first": "请先登录 https://chat.openai.com", + "Please login at https://claude.ai first": "请先登录 https://claude.ai", "Then open https://chat.openai.com/api/auth/session": "然后打开 https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "之后点击右上角的重试按钮", "Consider creating an api key at https://platform.openai.com/account/api-keys": "考虑在 https://platform.openai.com/account/api-keys 创建一个API Key", diff --git a/src/_locales/zh-hant/main.json b/src/_locales/zh-hant/main.json index 907b7c8..da2ff03 100644 --- a/src/_locales/zh-hant/main.json +++ b/src/_locales/zh-hant/main.json @@ -44,6 +44,7 @@ "Save Conversation": "儲存對話", "UNAUTHORIZED": "未授權", "Please login at https://chat.openai.com first": "請先在 https://chat.openai.com 登入", + "Please login at https://claude.ai first": "請先在 https://claude.ai 登入", "Then open https://chat.openai.com/api/auth/session": "然後開啟 https://chat.openai.com/api/auth/session", "And refresh this page or type you question again": "接著點擊右上角的「重試」按鈕", "Consider creating an api key at https://platform.openai.com/account/api-keys": "建議在 https://platform.openai.com/account/api-keys 建立一個 API 金鑰", diff --git a/src/services/wrappers.mjs b/src/services/wrappers.mjs index f6fa185..ab90681 100644 --- a/src/services/wrappers.mjs +++ b/src/services/wrappers.mjs @@ -1,4 +1,10 @@ -import { clearOldAccessToken, getUserConfig, Models, setAccessToken } from '../config/index.mjs' +import { + claudeWebModelKeys, + clearOldAccessToken, + getUserConfig, + Models, + setAccessToken, +} from '../config/index.mjs' import Browser from 'webextension-polyfill' import { t } from 'i18next' @@ -74,6 +80,11 @@ export function registerPortListener(executor) { port.postMessage({ error: t('Rate limit') + '\n\n' + err.message }) else if (['authentication token has expired'].some((m) => err.message.includes(m))) port.postMessage({ error: 'UNAUTHORIZED' }) + else if ( + claudeWebModelKeys.includes(session.modelName) && + ['Invalid authorization'].some((m) => err.message.includes(m)) + ) + port.postMessage({ error: t('Please login at https://claude.ai first') }) else port.postMessage({ error: err.message }) } }