@@ -87,7 +87,7 @@ export default function InputField({ onSubmit, messageStreaming }: InputFieldPro
8787 < div className = "flex flex-col items-center gap-2" >
8888 < form
8989 onSubmit = { handleSubmit }
90- className = "m-auto w-4 /6 rounded-lg border border-secondaryColor bg-white px-4 py-2 shadow-sm"
90+ className = "m-auto w-5 /6 rounded-lg border border-secondaryColor bg-white px-4 py-2 shadow-sm"
9191 >
9292 { /* TODO: If '.png,.jpg,.jpeg,.heif', display image */ }
9393 < div className = "flex gap-2" >
@@ -118,12 +118,22 @@ export default function InputField({ onSubmit, messageStreaming }: InputFieldPro
118118 ) ) }
119119 </ div >
120120 < div className = "flex items-center" >
121+ < textarea
122+ autoFocus
123+ ref = { textareaRef }
124+ onChange = { autoResizeTextarea }
125+ onKeyDown = { handleKeyDown }
126+ placeholder = { `Message ${ selectedModel } ` }
127+ className = "max-h-[150px] flex-1 resize-none border-none text-gray-700 placeholder-gray-400 outline-none"
128+ rows = { 1 }
129+ />
130+
121131 < button
122132 onClick = { ( e ) => {
123133 e . preventDefault ( ) ;
124134 fileInputRef . current ?. click ( ) ;
125135 } }
126- className = "mr-3 text-black hover:opacity-60"
136+ className = "ml-3 mr-3 text-black hover:opacity-60"
127137 >
128138 < svg
129139 xmlns = "http://www.w3.org/2000/svg"
@@ -142,18 +152,9 @@ export default function InputField({ onSubmit, messageStreaming }: InputFieldPro
142152 </ button >
143153 < input type = "file" ref = { fileInputRef } onChange = { handleFileChange } className = "hidden" />
144154
145- < textarea
146- autoFocus
147- ref = { textareaRef }
148- onChange = { autoResizeTextarea }
149- onKeyDown = { handleKeyDown }
150- placeholder = { `Message ${ selectedModel } ` }
151- className = "max-h-[150px] flex-1 resize-none border-none text-gray-700 placeholder-gray-400 outline-none"
152- rows = { 1 }
153- />
154-
155155 { messageStreaming ? (
156156 // TODO: Handle aborting message streaming
157+
157158 < button className = "ml-3" >
158159 < svg
159160 xmlns = "http://www.w3.org/2000/svg"
@@ -166,7 +167,12 @@ export default function InputField({ onSubmit, messageStreaming }: InputFieldPro
166167 < path
167168 strokeLinecap = "round"
168169 strokeLinejoin = "round"
169- d = "M14.25 9v6m-4.5 0V9M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
170+ d = "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
171+ />
172+ < path
173+ strokeLinecap = "round"
174+ strokeLinejoin = "round"
175+ d = "M9 9.563C9 9.252 9.252 9 9.563 9h4.874c.311 0 .563.252.563.563v4.874c0 .311-.252.563-.563.563H9.564A.562.562 0 0 1 9 14.437V9.564Z"
170176 />
171177 </ svg >
172178 </ button >
0 commit comments