diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx index beddaa219f..1fe1306fbf 100644 --- a/client/src/components/Chat/Input/ChatForm.tsx +++ b/client/src/components/Chat/Input/ChatForm.tsx @@ -157,116 +157,119 @@ const ChatForm = ({ index = 0 }) => { : `pl-${uploadActive ? '12' : '4'} pr-12`; return ( -
submitMessage(data))} - className={cn( - 'mx-auto flex flex-row gap-3 pl-2 transition-all duration-200 last:mb-2', - maximizeChatSpace ? 'w-full max-w-full' : 'md:max-w-2xl xl:max-w-3xl', - )} - > -
-
- {showPlusPopover && !isAssistantsEndpoint(endpoint) && ( - - )} - {showMentionPopover && ( - - )} - -
- - - - {endpoint && ( - <> - - { - ref(e); - textAreaRef.current = e; - }} - disabled={disableInputs} - onPaste={handlePaste} - onKeyDown={handleKeyDown} - onKeyUp={handleKeyUp} - onHeightChange={() => { - if (textAreaRef.current) { - const scrollable = checkIfScrollable(textAreaRef.current); - setIsScrollable(scrollable); - } - }} - onCompositionStart={handleCompositionStart} - onCompositionEnd={handleCompositionEnd} - id={mainTextareaId} - tabIndex={0} - data-testid="text-input" - rows={1} - onFocus={() => isCollapsed && setIsCollapsed(false)} - onClick={() => isCollapsed && setIsCollapsed(false)} - style={{ height: 44, overflowY: 'auto' }} - className={cn( - baseClasses, - speechClass, - removeFocusRings, - 'transition-[max-height] duration-200', - )} - /> - - )} - - {SpeechToText && ( - + submitMessage(data))} + className={cn( + 'mx-auto flex flex-row gap-3 pl-2 transition-all duration-200 last:mb-2', + maximizeChatSpace ? 'w-full max-w-full' : 'md:max-w-2xl xl:max-w-3xl', + )} + > +
+
+ {showPlusPopover && !isAssistantsEndpoint(endpoint) && ( + )} - {TextToSpeech && automaticPlayback && } -
-
)} - style={{ alignSelf: 'flex-end' }} - > - {(isSubmitting || isSubmittingAdded) && (showStopButton || showStopAdded) ? ( - - ) : ( - endpoint && ( - +
+ + + + {endpoint && ( + <> + + { + ref(e); + textAreaRef.current = e; + }} + disabled={disableInputs} + onPaste={handlePaste} + onKeyDown={handleKeyDown} + onKeyUp={handleKeyUp} + onHeightChange={() => { + if (textAreaRef.current) { + const scrollable = checkIfScrollable(textAreaRef.current); + setIsScrollable(scrollable); + } + }} + onCompositionStart={handleCompositionStart} + onCompositionEnd={handleCompositionEnd} + id={mainTextareaId} + tabIndex={0} + data-testid="text-input" + rows={1} + onFocus={() => isCollapsed && setIsCollapsed(false)} + onClick={() => isCollapsed && setIsCollapsed(false)} + style={{ height: 44, overflowY: 'auto' }} + className={cn( + baseClasses, + speechClass, + removeFocusRings, + 'transition-[max-height] duration-200', + )} + /> + + )} + + {SpeechToText && ( + - ) - )} + )} + {TextToSpeech && automaticPlayback && } +
+
+ {(isSubmitting || isSubmittingAdded) && (showStopButton || showStopAdded) ? ( + + ) : ( + endpoint && ( + + ) + )} +
-
- + + + ); }; diff --git a/client/vite.config.ts b/client/vite.config.ts index 745e4897f6..809601e990 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -62,7 +62,7 @@ export default defineConfig({ useCredentials: true, workbox: { globPatterns: ['assets/**/*.{png,jpg,svg,ico}', '**/*.{js,css,html,ico,woff2}'], - maximumFileSizeToCacheInBytes: 4 * 1024 * 1024, + maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, navigateFallbackDenylist: [/^\/oauth/], }, manifest: {