mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
style: update ChatInput
This commit is contained in:
@@ -44,6 +44,7 @@ const InputArea = () => {
|
||||
<DragUploadZone onUploadFiles={handleUploadFiles}>
|
||||
<ChatInputProvider
|
||||
agentId={inboxAgentId}
|
||||
allowExpand={false}
|
||||
chatInputEditorRef={(instance) => {
|
||||
if (!instance) return;
|
||||
useChatStore.setState({ mainInputEditor: instance });
|
||||
|
||||
@@ -21,6 +21,7 @@ export const ChatInputProvider = memo<ChatInputProviderProps>(
|
||||
chatInputEditorRef,
|
||||
onMarkdownContentChange,
|
||||
mentionItems,
|
||||
allowExpand,
|
||||
}) => {
|
||||
const editor = useEditor();
|
||||
const slashMenuRef = useRef<HTMLDivElement>(null);
|
||||
@@ -29,6 +30,7 @@ export const ChatInputProvider = memo<ChatInputProviderProps>(
|
||||
<Provider
|
||||
createStore={() =>
|
||||
createStore({
|
||||
allowExpand,
|
||||
editor,
|
||||
leftActions,
|
||||
mentionItems,
|
||||
@@ -42,6 +44,7 @@ export const ChatInputProvider = memo<ChatInputProviderProps>(
|
||||
>
|
||||
<StoreUpdater
|
||||
agentId={agentId}
|
||||
allowExpand={allowExpand}
|
||||
chatInputEditorRef={chatInputEditorRef}
|
||||
leftActions={leftActions}
|
||||
mentionItems={mentionItems}
|
||||
|
||||
@@ -22,6 +22,7 @@ const StoreUpdater = memo<StoreUpdaterProps>(
|
||||
onMarkdownContentChange,
|
||||
sendMenu,
|
||||
mentionItems,
|
||||
allowExpand,
|
||||
}) => {
|
||||
const storeApi = useStoreApi();
|
||||
const useStoreUpdater = createStoreUpdater(storeApi);
|
||||
@@ -33,6 +34,7 @@ const StoreUpdater = memo<StoreUpdaterProps>(
|
||||
useStoreUpdater('mentionItems', mentionItems);
|
||||
useStoreUpdater('leftActions', leftActions!);
|
||||
useStoreUpdater('rightActions', rightActions!);
|
||||
useStoreUpdater('allowExpand', allowExpand);
|
||||
|
||||
useStoreUpdater('sendButtonProps', sendButtonProps);
|
||||
useStoreUpdater('onSend', onSend);
|
||||
|
||||
Reference in New Issue
Block a user