mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 11:20:15 +01:00
chore(Auth): reorder exports in Auth component
fix(PluginAuthForm): handle case when pluginKey is null or undefined fix(PluginStoreDialog): handle case when getAvailablePluginFromKey is null or undefined fix(AuthContext): make authConfig optional in AuthContextProvider feat(hooks): add useServerStream hook fix(conversation): setSubmission to null instead of empty object fix(preset): specify type for presets atom fix(search): specify type for isSearchEnabled atom fix(submission): specify type for submission atom
This commit is contained in:
parent
c40b95f424
commit
d612cfcb45
9 changed files with 13 additions and 12 deletions
|
|
@ -51,7 +51,7 @@ const messagesSiblingIdxFamily = atomFamily({
|
|||
const useConversation = () => {
|
||||
const setConversation = useSetRecoilState(conversation);
|
||||
const setMessages = useSetRecoilState<TMessagesAtom>(messages);
|
||||
const setSubmission = useSetRecoilState<TSubmission | object | null>(submission.submission);
|
||||
const setSubmission = useSetRecoilState<TSubmission | null>(submission.submission);
|
||||
const resetLatestMessage = useResetRecoilState(latestMessage);
|
||||
|
||||
const _switchToConversation = (
|
||||
|
|
@ -73,7 +73,7 @@ const useConversation = () => {
|
|||
|
||||
setConversation(conversation);
|
||||
setMessages(messages);
|
||||
setSubmission({});
|
||||
setSubmission({} as TSubmission);
|
||||
resetLatestMessage();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { TPreset } from 'librechat-data-provider';
|
|||
// an array of saved presets.
|
||||
// sample structure
|
||||
// [preset1, preset2, preset3]
|
||||
const presets = atom({
|
||||
const presets = atom<TPreset[]>({
|
||||
key: 'presets',
|
||||
default: [],
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { TMessage } from 'librechat-data-provider';
|
|||
import { atom, selector } from 'recoil';
|
||||
import { buildTree } from '~/utils';
|
||||
|
||||
const isSearchEnabled = atom({
|
||||
const isSearchEnabled = atom<boolean | null>({
|
||||
key: 'isSearchEnabled',
|
||||
default: null,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { TSubmission } from 'librechat-data-provider';
|
|||
// isRegenerate=false, // isRegenerate?
|
||||
// }
|
||||
|
||||
const submission = atom<TSubmission | object | null>({
|
||||
const submission = atom<TSubmission | null>({
|
||||
key: 'submission',
|
||||
default: null,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue