refactor(askChatGPTBrowser.js): remove unused titleConvo import

style(Message.jsx, style.css): adjust margins and paddings to improve readability
This commit is contained in:
Danny Avila 2023-04-06 13:53:19 -04:00
parent 017447b064
commit e077f2b73d
3 changed files with 10 additions and 10 deletions

View file

@ -2,7 +2,7 @@ const express = require('express');
const crypto = require('crypto'); const crypto = require('crypto');
const router = express.Router(); const router = express.Router();
const { getChatGPTBrowserModels } = require('../endpoints'); const { getChatGPTBrowserModels } = require('../endpoints');
const { titleConvo, browserClient } = require('../../../app/'); const { browserClient } = require('../../../app/');
const { saveMessage, getConvoTitle, saveConvo, updateConvo, getConvo } = require('../../../models'); const { saveMessage, getConvoTitle, saveConvo, updateConvo, getConvo } = require('../../../models');
const { handleError, sendMessage, createOnProgress, handleText } = require('./handlers'); const { handleError, sendMessage, createOnProgress, handleText } = require('./handlers');

View file

@ -125,7 +125,7 @@ export default function Message({
/> />
</div> </div>
</div> </div>
<div className="relative flex w-[calc(100%-50px)] flex-col gap-1 whitespace-pre-wrap md:gap-3 lg:w-[calc(100%-115px)]"> <div className="relative flex w-[calc(100%-50px)] flex-col gap-1 md:gap-3 lg:w-[calc(100%-115px)]">
{searchResult && ( {searchResult && (
<SubRow <SubRow
classes={props.titleclass + ' rounded'} classes={props.titleclass + ' rounded'}
@ -137,13 +137,13 @@ export default function Message({
)} )}
<div className="flex flex-grow flex-col gap-3"> <div className="flex flex-grow flex-col gap-3">
{error ? ( {error ? (
<div className="flex flex min-h-[20px] flex-grow flex-col items-start gap-4 gap-2 whitespace-pre-wrap text-red-500"> <div className="flex flex min-h-[20px] flex-grow flex-col items-start gap-4 gap-2 text-red-500">
<div className="rounded-md border border-red-500 bg-red-500/10 py-2 px-3 text-sm text-gray-600 dark:text-gray-100"> <div className="rounded-md border border-red-500 bg-red-500/10 py-2 px-3 text-sm text-gray-600 dark:text-gray-100">
{`An error occurred. Please try again in a few moments.\n\nError message: ${text}`} {`An error occurred. Please try again in a few moments.\n\nError message: ${text}`}
</div> </div>
</div> </div>
) : edit ? ( ) : edit ? (
<div className="flex min-h-[20px] flex-grow flex-col items-start gap-4 whitespace-pre-wrap"> <div className="flex min-h-[20px] flex-grow flex-col items-start gap-4 ">
{/* <div className={`${blinker ? 'result-streaming' : ''} markdown prose dark:prose-invert light w-full break-words`}> */} {/* <div className={`${blinker ? 'result-streaming' : ''} markdown prose dark:prose-invert light w-full break-words`}> */}
<div <div
@ -171,7 +171,7 @@ export default function Message({
</div> </div>
</div> </div>
) : ( ) : (
<div className="flex min-h-[20px] flex-grow flex-col items-start gap-4 whitespace-pre-wrap"> <div className="flex min-h-[20px] flex-grow flex-col items-start gap-4 ">
{/* <div className={`${blinker ? 'result-streaming' : ''} markdown prose dark:prose-invert light w-full break-words`}> */} {/* <div className={`${blinker ? 'result-streaming' : ''} markdown prose dark:prose-invert light w-full break-words`}> */}
<div className="markdown prose dark:prose-invert light w-full break-words"> <div className="markdown prose dark:prose-invert light w-full break-words">
{!isCreatedByUser ? ( {!isCreatedByUser ? (

View file

@ -209,9 +209,9 @@ blockquote, dd, dl, fieldset, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {
} }
.prose :where(ol):not(:where([class~=not-prose] *)) { .prose :where(ol):not(:where([class~=not-prose] *)) {
list-style-type:decimal; list-style-type:decimal;
margin-bottom:0.1em; margin-bottom: 1.25em;
margin-top:0.1em; margin-top: 1.25em;
padding-left:1.625em padding-left: 1.625em
} }
.prose :where(ol[type=A]):not(:where([class~=not-prose] *)) { .prose :where(ol[type=A]):not(:where([class~=not-prose] *)) {
list-style-type:upper-alpha list-style-type:upper-alpha
@ -475,8 +475,8 @@ blockquote, dd, dl, fieldset, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {
line-height:1.75 line-height:1.75
} }
.prose :where(p):not(:where([class~=not-prose] *)) { .prose :where(p):not(:where([class~=not-prose] *)) {
margin-bottom:-1em; margin-bottom: 1.25em;
margin-top:0.3em margin-top: 1.25em
} }
.prose :where(video):not(:where([class~=not-prose] *)) { .prose :where(video):not(:where([class~=not-prose] *)) {
margin-bottom:2em; margin-bottom:2em;