feat: Add user variable processing function to chat history (#22863)
This commit is contained in:
parent
ef51678c73
commit
d1572f47a0
5 changed files with 37 additions and 4 deletions
|
|
@ -56,6 +56,10 @@ export type ChatWithHistoryContextValue = {
|
|||
currentConversationInputs: Record<string, any> | null,
|
||||
setCurrentConversationInputs: (v: Record<string, any>) => void,
|
||||
allInputsHidden: boolean,
|
||||
initUserVariables?: {
|
||||
name?: string
|
||||
avatar_url?: string
|
||||
}
|
||||
}
|
||||
|
||||
export const ChatWithHistoryContext = createContext<ChatWithHistoryContextValue>({
|
||||
|
|
@ -90,5 +94,6 @@ export const ChatWithHistoryContext = createContext<ChatWithHistoryContextValue>
|
|||
currentConversationInputs: {},
|
||||
setCurrentConversationInputs: noop,
|
||||
allInputsHidden: false,
|
||||
initUserVariables: {},
|
||||
})
|
||||
export const useChatWithHistoryContext = () => useContext(ChatWithHistoryContext)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue