Skip to content

Commit 9aea48c

Browse files
committed
Merge branch 'main' into 25.7
2 parents 28ef7b9 + a02665c commit 9aea48c

23 files changed

Lines changed: 36 additions & 1 deletion

react/src/components/Chat/ChatCard.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ const ChatCard: React.FC<ChatCardProps> = ({
168168
onRequestClose,
169169
onCreateNewChat,
170170
}) => {
171+
const { t } = useTranslation();
171172
const { message: appMessage } = App.useApp();
172173
const endpointResult = useLazyLoadQuery<ChatCardQuery>(
173174
graphql`
@@ -319,7 +320,7 @@ const ChatCard: React.FC<ChatCardProps> = ({
319320
}
320321
ref={dropContainerRef}
321322
>
322-
{endpoint && _.isEmpty(models) && (
323+
{baseURL && endpoint && _.isEmpty(models) && (
323324
<CustomModelForm
324325
baseURL={baseURL}
325326
token={chat.provider.apiKey}
@@ -349,13 +350,23 @@ const ChatCard: React.FC<ChatCardProps> = ({
349350
closable
350351
/>
351352
) : null}
353+
{!baseURL ? (
354+
<Alert
355+
message={t('error.InvalidBaseURL')}
356+
type="error"
357+
showIcon
358+
className={alertStyle}
359+
closable
360+
/>
361+
) : null}
352362
<ChatMessages
353363
messages={messages}
354364
input={input}
355365
isStreaming={isStreaming}
356366
startTime={startTime}
357367
/>
358368
<ChatInput
369+
disabled={!baseURL}
359370
sync={chat.sync}
360371
input={input}
361372
setInput={setInput}

react/src/components/Chat/ChatInput.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ interface ChatInputProps extends ChatRequest, ChatAttachmentsProps {
3434
chatRequestOptions?: ChatRequestOptions,
3535
) => Promise<string | null | undefined>;
3636
isStreaming: boolean;
37+
disabled?: boolean;
3738
}
3839

3940
const ChatInput: React.FC<ChatInputProps> = ({
@@ -43,6 +44,7 @@ const ChatInput: React.FC<ChatInputProps> = ({
4344
stop,
4445
append,
4546
isStreaming,
47+
disabled,
4648
dropContainerRef,
4749
}) => {
4850
const { token } = theme.useToken();
@@ -200,6 +202,7 @@ const ChatInput: React.FC<ChatInputProps> = ({
200202
<>
201203
<Flex style={ChatInputStyle} direction="column" align="center">
202204
<ChatSender
205+
disabled={disabled}
203206
placeholder="Say something..."
204207
autoFocus
205208
value={input}

resources/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@
564564
"CannotSharePrivateAutomountFolder": "Die Freigabe von automatisch eingehängten vOrdnern gemäß der Richtlinie ist nicht möglich.",
565565
"FolderSharingNotAvailableToUser": "Die gemeinsame Nutzung von Ordnern ist für den/die gewünschten Benutzer nicht verfügbar.",
566566
"InternalServerError": "Interner Serverfehler. Bitte versuchen Sie es später noch einmal.",
567+
"InvalidBaseURL": "Die Endpunkt-URL ist nicht gültig.",
567568
"InvalidSignupToken": "Ungültiges Anmelde-Token",
568569
"InvalidUrl": "Es handelt sich nicht um eine gültige URL",
569570
"LoginFailed": "Anmeldung fehlgeschlagen. Überprüfen Sie die Anmeldeinformationen.",

resources/i18n/el.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@
560560
"CannotSharePrivateAutomountFolder": "Δεν είναι δυνατή η κοινή χρήση φακέλων vfolders με αυτόματη προσάρτηση σύμφωνα με την πολιτική.",
561561
"FolderSharingNotAvailableToUser": "Η κοινή χρήση φακέλων δεν είναι διαθέσιμη για τον/τους ζητούμενο/ους χρήστη/ες.",
562562
"InternalServerError": "Σφάλμα εσωτερικού διακομιστή. Προσπαθήστε ξανά αργότερα.",
563+
"InvalidBaseURL": "Η διεύθυνση URL του τελικού σημείου δεν είναι έγκυρη.",
563564
"InvalidSignupToken": "Μη έγκυρο κουπόνι εγγραφής",
564565
"InvalidUrl": "Δεν είναι έγκυρη διεύθυνση URL",
565566
"LoginFailed": "Η σύνδεση απέτυχε. Ελέγξτε τα στοιχεία σύνδεσης.",

resources/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@
568568
"ErrorFetchingExternalContent": "Error fetching external content:",
569569
"FolderSharingNotAvailableToUser": "Folder sharing is not available for requested user(s).",
570570
"InternalServerError": "Internal Server Error. Please try again later.",
571+
"InvalidBaseURL": "Endpoint URL is not valid.",
571572
"InvalidSignupToken": "Invalid signup token",
572573
"InvalidUrl": "It is not a valid URL",
573574
"LoginFailed": "Login failed. Check login information.",

resources/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@
564564
"CannotSharePrivateAutomountFolder": "No se pueden compartir vfolders automount de acuerdo con la política.",
565565
"FolderSharingNotAvailableToUser": "El uso compartido de carpetas no está disponible para los usuarios solicitados.",
566566
"InternalServerError": "Error interno del servidor. Vuelva a intentarlo más tarde.",
567+
"InvalidBaseURL": "La URL del punto final no es válida.",
567568
"InvalidSignupToken": "Ficha de registro no válida",
568569
"InvalidUrl": "No es una URL válida",
569570
"LoginFailed": "Error en el inicio de sesión. Compruebe la información de inicio de sesión.",

resources/i18n/fi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@
563563
"CannotSharePrivateAutomountFolder": "Automaattisesti kiinnitettyjä v-kansioita ei voida jakaa käytäntöjen mukaisesti.",
564564
"FolderSharingNotAvailableToUser": "Kansioiden jakaminen ei ole käytettävissä pyydetyille käyttäjille.",
565565
"InternalServerError": "Sisäinen palvelinvirhe. Yritä myöhemmin uudelleen.",
566+
"InvalidBaseURL": "Päätepisteen URL-osoite ei ole kelvollinen.",
566567
"InvalidSignupToken": "Virheellinen kirjautumistunniste",
567568
"InvalidUrl": "Se ei ole kelvollinen URL-osoite",
568569
"LoginFailed": "Kirjautuminen epäonnistui. Tarkista kirjautumistiedot.",

resources/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@
564564
"CannotSharePrivateAutomountFolder": "Impossible de partager les dossiers virtuels d'automount conformément à la politique.",
565565
"FolderSharingNotAvailableToUser": "Le partage de dossiers n'est pas disponible pour le(s) utilisateur(s) demandé(s).",
566566
"InternalServerError": "Erreur de serveur interne. Veuillez réessayer plus tard.",
567+
"InvalidBaseURL": "L'URL du point final n'est pas valide.",
567568
"InvalidSignupToken": "Jeton d'inscription invalide",
568569
"InvalidUrl": "Ce n'est pas une URL valide",
569570
"LoginFailed": "La connexion a échoué. Vérifier les informations de connexion.",

resources/i18n/id.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@
563563
"CannotSharePrivateAutomountFolder": "Tidak dapat berbagi vfolder otomatis sesuai dengan kebijakan.",
564564
"FolderSharingNotAvailableToUser": "Berbagi folder tidak tersedia untuk pengguna yang diminta.",
565565
"InternalServerError": "Kesalahan Server Internal. Silakan coba lagi nanti.",
566+
"InvalidBaseURL": "URL titik akhir tidak valid.",
566567
"InvalidSignupToken": "Token pendaftaran tidak valid",
567568
"InvalidUrl": "Ini bukan URL yang valid",
568569
"LoginFailed": "Login gagal. Periksa informasi login.",

resources/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@
563563
"CannotSharePrivateAutomountFolder": "Impossibile condividere le vfolders automount in linea con il criterio.",
564564
"FolderSharingNotAvailableToUser": "La condivisione delle cartelle non è disponibile per gli utenti richiesti.",
565565
"InternalServerError": "Errore interno del server. Riprovare più tardi.",
566+
"InvalidBaseURL": "L'URL dell'endpoint non è valido.",
566567
"InvalidSignupToken": "Token di iscrizione non valido",
567568
"InvalidUrl": "Non è un URL valido",
568569
"LoginFailed": "Accesso non riuscito. Controllare le informazioni di accesso.",

0 commit comments

Comments
 (0)