mirror of https://github.com/buster-so/buster.git
logger fix + chat title
This commit is contained in:
parent
09ba7b315a
commit
35a160301a
|
@ -3,10 +3,11 @@ import pino from 'pino';
|
|||
|
||||
const isDev = process.env.NODE_ENV !== 'production';
|
||||
const logLevel = process.env.LOG_LEVEL || 'info';
|
||||
let isPinoPrettyAvailable = true;
|
||||
|
||||
// Create base pino instance
|
||||
const createBaseLogger = () => {
|
||||
if (isDev) {
|
||||
if (isDev && isPinoPrettyAvailable) {
|
||||
try {
|
||||
// Only use pino-pretty transport in development
|
||||
return pino({
|
||||
|
@ -19,6 +20,7 @@ const createBaseLogger = () => {
|
|||
} catch (error) {
|
||||
console.warn('pino-pretty not available, falling back to JSON logging');
|
||||
console.error(error);
|
||||
isPinoPrettyAvailable = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@ export const ChatHeaderTitle: React.FC<{
|
|||
}> = React.memo(({ chatTitle, chatId, isCompletedStream }) => {
|
||||
const { mutateAsync: updateChat } = useUpdateChat();
|
||||
|
||||
if (!chatTitle) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<AnimatePresence mode="wait" initial={!isCompletedStream}>
|
||||
<motion.div
|
||||
|
@ -29,7 +33,6 @@ export const ChatHeaderTitle: React.FC<{
|
|||
className="flex w-full items-center overflow-hidden">
|
||||
<EditableTitle
|
||||
className="w-full"
|
||||
placeholder="New chat"
|
||||
level={5}
|
||||
disabled={!chatTitle}
|
||||
id={CHAT_HEADER_TITLE_ID}
|
||||
|
|
Loading…
Reference in New Issue