persist models in localStorage, minor changes

This commit is contained in:
Daniel Avila 2023-02-22 21:30:48 -05:00
parent e2a3ecbf88
commit 1a6cddb8bb
6 changed files with 27 additions and 14 deletions

View file

@ -112,14 +112,14 @@ export default function TextChat({ messages }) {
const handleKeyUp = (e) => {
if (e.key === 'Enter' && e.shiftKey) {
console.log('Enter + Shift');
return console.log('Enter + Shift');
}
if (isSubmitting) {
return;
}
if (e.key === 'Enter' && !e.shiftKey) {
if (isSubmitting) {
return;
}
submitMessage();
}
};
@ -160,7 +160,7 @@ export default function TextChat({ messages }) {
onKeyDown={handleKeyDown}
onChange={changeHandler}
placeholder=""
className="m-0 h-auto max-h-52 resize-none overflow-auto border-0 bg-transparent p-0 pl-9 pr-7 leading-6 focus:outline-none focus:ring-0 focus-visible:ring-0 dark:bg-transparent md:pl-8"
className="m-0 h-auto max-h-52 resize-none overflow-auto border-0 bg-transparent p-0 pl-9 pr-9 leading-6 focus:outline-none focus:ring-0 focus-visible:ring-0 dark:bg-transparent md:pl-8"
/>
<SubmitButton submitMessage={submitMessage} />
</div>