LibreChat/client/src/store/submission.ts
Danny Avila d612cfcb45 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
2023-08-18 12:49:35 -04:00

28 lines
681 B
TypeScript

import { atom } from 'recoil';
import { TSubmission } from 'librechat-data-provider';
// current submission
// submit any new value to this state will cause new message to be send.
// set to null to give up any submission
// {
// conversation, // target submission, must have: model, chatGptLabel, promptPrefix
// messages, // old messages
// message, // request message
// initialResponse, // response message
// isRegenerate=false, // isRegenerate?
// }
const submission = atom<TSubmission | null>({
key: 'submission',
default: null,
});
const isSubmitting = atom({
key: 'isSubmitting',
default: false,
});
export default {
submission,
isSubmitting,
};