🐛 fix: resolve TypeScript type conflicts and React hooks warnings (#11148)

* 🐛 fix: resolve TypeScript type conflicts and React hooks warnings

- Add @smithy/types@4.7.1 to resolutions to unify AWS SDK dependencies
- Wrap updatePaintingState in useCallback to fix exhaustive-deps warning
- Fix AWS Bedrock client type incompatibility issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(i18n): Auto update translations for PR #11148

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
beyondkmp 2025-11-05 14:19:14 +08:00 committed by GitHub
parent caa59c4c50
commit 56c7a7f066
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 52 additions and 24 deletions

View File

@ -374,6 +374,7 @@
"zod": "^4.1.5"
},
"resolutions": {
"@smithy/types": "4.7.1",
"@codemirror/language": "6.11.3",
"@codemirror/lint": "6.8.5",
"@codemirror/view": "6.38.1",

View File

@ -4260,6 +4260,12 @@
"aws-bedrock": {
"access_key_id": "AWS-Zugriffsschlüssel-ID",
"access_key_id_help": "Ihre AWS-Zugriffsschlüssel-ID, um auf AWS Bedrock-Dienste zuzugreifen",
"api_key": "Bedrock-API-Schlüssel",
"api_key_help": "Ihr AWS Bedrock-API-Schlüssel für die Authentifizierung",
"auth_type": "Authentifizierungstyp",
"auth_type_api_key": "Bedrock-API-Schlüssel",
"auth_type_help": "Wählen Sie zwischen IAM-Anmeldeinformationen oder Bedrock-API-Schlüssel-Authentifizierung",
"auth_type_iam": "IAM-Anmeldeinformationen",
"description": "AWS Bedrock ist ein vollständig verwalteter Basismodell-Dienst von Amazon, der eine Vielzahl moderner großer Sprachmodelle unterstützt",
"region": "AWS-Region",
"region_help": "Ihre AWS-Serviceregion, z.B. us-east-1",

View File

@ -4260,6 +4260,12 @@
"aws-bedrock": {
"access_key_id": "Αναγνωριστικό κλειδιού πρόσβασης AWS",
"access_key_id_help": "Το ID του κλειδιού πρόσβασης AWS που χρησιμοποιείται για την πρόσβαση στην υπηρεσία AWS Bedrock",
"api_key": "Κλειδί API Bedrock",
"api_key_help": "Το κλειδί API του AWS Bedrock για έλεγχο ταυτότητας",
"auth_type": "Τύπος Πιστοποίησης",
"auth_type_api_key": "Κλειδί API Bedrock",
"auth_type_help": "Επιλέξτε μεταξύ πιστοποιητικών IAM ή πιστοποίησης με κλειδί API Bedrock",
"auth_type_iam": "Διαπιστευτήρια IAM",
"description": "Η AWS Bedrock είναι μια πλήρως διαχειριζόμενη υπηρεσία βασικών μοντέλων που παρέχεται από την Amazon και υποστηρίζει διάφορα προηγμένα μεγάλα γλωσσικά μοντέλα.",
"region": "Περιοχές AWS",
"region_help": "Η περιοχή υπηρεσίας AWS σας, για παράδειγμα us-east-1",

View File

@ -4260,6 +4260,12 @@
"aws-bedrock": {
"access_key_id": "ID de clave de acceso de AWS",
"access_key_id_help": "Su ID de clave de acceso de AWS, utilizado para acceder al servicio AWS Bedrock",
"api_key": "Clave de API de Bedrock",
"api_key_help": "Tu clave de API de AWS Bedrock para autenticación",
"auth_type": "Tipo de autenticación",
"auth_type_api_key": "Clave de API de Bedrock",
"auth_type_help": "Elige entre credenciales IAM o autenticación con clave API de Bedrock",
"auth_type_iam": "Credenciales de IAM",
"description": "AWS Bedrock es un servicio de modelos fundamentales completamente gestionado proporcionado por Amazon, que admite diversos modelos avanzados de lenguaje de gran tamaño.",
"region": "Región de AWS",
"region_help": "Su región de servicio AWS, por ejemplo us-east-1",

View File

@ -4260,6 +4260,12 @@
"aws-bedrock": {
"access_key_id": "Identifiant de clé d'accès AWS",
"access_key_id_help": "Votre identifiant de clé d'accès AWS, utilisé pour accéder au service AWS Bedrock",
"api_key": "Clé API Bedrock",
"api_key_help": "Votre clé API AWS Bedrock pour l'authentification",
"auth_type": "Type d'authentification",
"auth_type_api_key": "Clé API Bedrock",
"auth_type_help": "Choisissez entre l'authentification par identifiants IAM ou par clé API Bedrock",
"auth_type_iam": "Identifiants IAM",
"description": "AWS Bedrock est un service de modèles de base entièrement géré proposé par Amazon, prenant en charge divers grands modèles linguistiques avancés.",
"region": "Région AWS",
"region_help": "Votre région de service AWS, par exemple us-east-1",

View File

@ -4260,6 +4260,12 @@
"aws-bedrock": {
"access_key_id": "AWS アクセスキー ID",
"access_key_id_help": "あなたの AWS アクセスキー ID は、AWS Bedrock サービスへのアクセスに使用されます",
"api_key": "Bedrock APIキー",
"api_key_help": "認証用のAWS Bedrock APIキー",
"auth_type": "認証タイプ",
"auth_type_api_key": "Bedrock APIキー",
"auth_type_help": "IAM認証情報とBedrock APIキー認証のどちらかを選択してください",
"auth_type_iam": "IAM認証情報",
"description": "AWS Bedrock は、Amazon が提供する完全に管理されたベースモデルサービスで、さまざまな最先端の大言語モデルをサポートしています",
"region": "AWS リージョン",
"region_help": "あなたの AWS サービスリージョン、例us-east-1",

View File

@ -4260,6 +4260,12 @@
"aws-bedrock": {
"access_key_id": "ID da chave de acesso da AWS",
"access_key_id_help": "O seu ID da chave de acesso AWS, utilizado para aceder ao serviço AWS Bedrock",
"api_key": "Chave de API do Bedrock",
"api_key_help": "Sua Chave de API AWS Bedrock para autenticação",
"auth_type": "Tipo de Autenticação",
"auth_type_api_key": "Chave de API do Bedrock",
"auth_type_help": "Escolha entre credenciais IAM ou autenticação por chave de API do Bedrock",
"auth_type_iam": "Credenciais IAM",
"description": "A AWS Bedrock é um serviço de modelos fundamentais totalmente gerido fornecido pela Amazon, que suporta diversos modelos avançados de linguagem.",
"region": "Região da AWS",
"region_help": "A sua região de serviço da AWS, por exemplo, us-east-1",

View File

@ -4260,6 +4260,12 @@
"aws-bedrock": {
"access_key_id": "AWS Ключ доступа ID",
"access_key_id_help": "Ваш AWS Ключ доступа ID для доступа к AWS Bedrock",
"api_key": "Ключ API Bedrock",
"api_key_help": "Ваш ключ API AWS Bedrock для аутентификации",
"auth_type": "Тип аутентификации",
"auth_type_api_key": "Ключ API Bedrock",
"auth_type_help": "Выберите между аутентификацией с помощью учетных данных IAM или ключа API Bedrock",
"auth_type_iam": "Учетные данные IAM",
"description": "AWS Bedrock — это полное управляемое сервисное предложение для моделей, поддерживающее различные современные модели языка",
"region": "AWS регион",
"region_help": "Ваш регион AWS, например us-east-1",

View File

@ -96,11 +96,14 @@ const NewApiPage: FC<{ Options: string[] }> = ({ Options }) => {
return editImageFiles
}, [editImageFiles])
const updatePaintingState = (updates: Partial<PaintingAction>) => {
const updatedPainting = { ...painting, providerId: newApiProvider.id, ...updates }
setPainting(updatedPainting)
updatePainting(mode, updatedPainting)
}
const updatePaintingState = useCallback(
(updates: Partial<PaintingAction>) => {
const updatedPainting = { ...painting, providerId: newApiProvider.id, ...updates }
setPainting(updatedPainting)
updatePainting(mode, updatedPainting)
},
[painting, newApiProvider.id, mode, updatePainting]
)
// ---------------- Model Related Configurations ----------------
// const modelOptions = MODELS.map((m) => ({ label: m.name, value: m.name }))

View File

@ -9684,25 +9684,7 @@ __metadata:
languageName: node
linkType: hard
"@smithy/types@npm:^4.3.1":
version: 4.3.1
resolution: "@smithy/types@npm:4.3.1"
dependencies:
tslib: "npm:^2.6.2"
checksum: 10c0/8b350562b9ed4ff97465025b4ae77a34bb07b9d47fb6f9781755aac9401b0355a63c2fef307393e2dae3fa0277149dd7d83f5bc2a63d4ad3519ea32fd56b5cda
languageName: node
linkType: hard
"@smithy/types@npm:^4.3.2":
version: 4.3.2
resolution: "@smithy/types@npm:4.3.2"
dependencies:
tslib: "npm:^2.6.2"
checksum: 10c0/120c5d38f6362c86e6493cce3b9ca9902cd986dab773b39664ff6a95b787c45481f1b1d230f45a6f5ad0c045fb690dc96b51b9ca7b5e9487714a652ed98231f6
languageName: node
linkType: hard
"@smithy/types@npm:^4.7.1":
"@smithy/types@npm:4.7.1":
version: 4.7.1
resolution: "@smithy/types@npm:4.7.1"
dependencies: