mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 11:20: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
|
|
@ -83,11 +83,6 @@ const latestMessageFamily = atomFamily<TMessage | null, string | number | null>(
|
|||
default: null,
|
||||
});
|
||||
|
||||
const textareaHeightFamily = atomFamily<number, string | number>({
|
||||
key: 'textareaHeightByIndex',
|
||||
default: 56,
|
||||
});
|
||||
|
||||
function useCreateConversationAtom(key: string | number) {
|
||||
const [keys, setKeys] = useRecoilState(conversationKeysAtom);
|
||||
const setConversation = useSetRecoilState(conversationByIndex(key));
|
||||
|
|
@ -115,7 +110,6 @@ export default {
|
|||
showBingToneSettingFamily,
|
||||
showPopoverFamily,
|
||||
latestMessageFamily,
|
||||
textareaHeightFamily,
|
||||
allConversationsSelector,
|
||||
useCreateConversationAtom,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue