mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +01:00
refactor(MessageHandler -> useServerStream): convert all relating files to TS and correct typings based on this change: properly refactor MessageHandler to a custom hook, where it's passed a submission object to instantiate the stream. This is the bare minimum groundwork for potentially having multiple streams running, which would be a big project to modularize a lot of the global state into maps/multiple streams, particular useful for having multiple views in place
This commit is contained in:
parent
8b4d3c2c21
commit
c74c68a135
5 changed files with 83 additions and 87 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { v4 } from 'uuid';
|
||||
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
|
||||
import { parseConvo, getResponseSender } from 'librechat-data-provider';
|
||||
import type { TMessage } from 'librechat-data-provider';
|
||||
import type { TMessage, TSubmission } from 'librechat-data-provider';
|
||||
import store from '~/store';
|
||||
|
||||
type TAskProps = {
|
||||
|
|
@ -98,7 +98,7 @@ const useMessageHandler = () => {
|
|||
error: false,
|
||||
};
|
||||
|
||||
const submission = {
|
||||
const submission: TSubmission = {
|
||||
conversation: {
|
||||
...currentConversation,
|
||||
conversationId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue