mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
fix: Ensure Message Send Requires Key 🔑 (#1281)
* fix: only allow message send when key is provided when required - create useRequiresKey hook - pass same disabled prop to Textarea, AttachFile, and SendButton - EndpointItem: add localization, stopPropagation, and remove commented code - separate some hooks to new Input dir - completely remove textareaHeight recoil state as is not needed - update imports for moved hooks - pass disabled prop to useTextarea * feat: add localization to textarea placeholders
This commit is contained in:
parent
f6118879e5
commit
00b6af8c74
14 changed files with 54 additions and 50 deletions
|
|
@ -18,8 +18,8 @@ import type {
|
|||
import type { TAskFunction } from '~/common';
|
||||
import useSetFilesToDelete from './useSetFilesToDelete';
|
||||
import { useAuthContext } from './AuthContext';
|
||||
import useUserKey from './Input/useUserKey';
|
||||
import useNewConvo from './useNewConvo';
|
||||
import useUserKey from './useUserKey';
|
||||
import store from '~/store';
|
||||
|
||||
// this to be set somewhere else
|
||||
|
|
@ -324,7 +324,6 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {
|
|||
const [showPopover, setShowPopover] = useRecoilState(store.showPopoverFamily(index));
|
||||
const [abortScroll, setAbortScroll] = useRecoilState(store.abortScrollFamily(index));
|
||||
const [preset, setPreset] = useRecoilState(store.presetByIndex(index));
|
||||
const [textareaHeight, setTextareaHeight] = useRecoilState(store.textareaHeightFamily(index));
|
||||
const [optionSettings, setOptionSettings] = useRecoilState(store.optionSettingsFamily(index));
|
||||
const [showAgentSettings, setShowAgentSettings] = useRecoilState(
|
||||
store.showAgentSettingsFamily(index),
|
||||
|
|
@ -364,8 +363,6 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {
|
|||
setOptionSettings,
|
||||
showAgentSettings,
|
||||
setShowAgentSettings,
|
||||
textareaHeight,
|
||||
setTextareaHeight,
|
||||
files,
|
||||
setFiles,
|
||||
invalidateConvos,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue