style: update ChatInput

This commit is contained in:
canisminor1990
2025-12-30 16:15:48 +08:00
parent 9db8da82f6
commit 73b773260b
3 changed files with 6 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ const InputArea = () => {
<DragUploadZone onUploadFiles={handleUploadFiles}>
<ChatInputProvider
agentId={inboxAgentId}
allowExpand={false}
chatInputEditorRef={(instance) => {
if (!instance) return;
useChatStore.setState({ mainInputEditor: instance });

View File

@@ -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}

View File

@@ -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);