diff --git a/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx b/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx index 8f737440f..5b43eea18 100644 --- a/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx +++ b/apps/ai-game-creator-shell/src/view/home/components/RichInputArea/index.tsx @@ -21,7 +21,7 @@ import { PASTE_COMMAND, } from 'lexical'; import { Upload } from 'lucide-react'; -import { useEffect, useMemo, useRef } from 'react'; +import React, { useEffect, useMemo, useRef } from 'react'; import type { HomeAttachmentDraft, RichText } from '../../useHomeDraftStore'; import AttachmentContext from './attachmentContext'; @@ -38,6 +38,7 @@ type RichInputAreaProps = { onChange: (value: RichText[]) => void; onAttachmentsAdd: (attachments: HomeAttachmentDraft[]) => void; onAttachmentRemove: (attachmentId: string) => void; + children?: React.ReactNode; }; const INSERT_ATTACHMENTS_COMMAND: LexicalCommand = createCommand('INSERT_HOME_ATTACHMENTS_COMMAND'); @@ -207,7 +208,7 @@ function collectRichText(node: LexicalNode, parts: RichText[]) { } } -function UploadButton({ +export function UploadButton({ onAttachmentsAdd, }: Pick) { const [editor] = useLexicalComposerContext(); @@ -290,9 +291,7 @@ export default function RichInputArea(props: RichInputAreaProps) { } ErrorBoundary={LexicalErrorBoundary} /> -
- -
+ {props.children} ) { event.preventDefault(); const prompt = richTextToPrompt(homeRichText, homeAttachments); @@ -171,8 +158,9 @@ export default function HomeView({ ); })} + {status}
- -
- {status} - -
+ > +
+ + +
+