mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 09:52:09 +01:00
Refactor code for improved readability and consistency
- Updated formatting in SessionDetails component for better readability. - Enhanced documentation in scheduler-fixes.md to clarify issues and solutions. - Improved error handling and logging in csvFetcher.js and processingScheduler.js. - Standardized code formatting across various scripts and components for consistency. - Added validation checks for CSV URLs and transcript content to prevent processing errors. - Enhanced logging messages for better tracking of processing status and errors.
This commit is contained in:
@ -30,18 +30,18 @@ export default function MessageViewer({ messages }: MessageViewerProps) {
|
||||
<div
|
||||
key={message.id}
|
||||
className={`flex ${
|
||||
message.role.toLowerCase() === 'user'
|
||||
? 'justify-end'
|
||||
: 'justify-start'
|
||||
message.role.toLowerCase() === "user"
|
||||
? "justify-end"
|
||||
: "justify-start"
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
className={`max-w-xs lg:max-w-md px-4 py-2 rounded-lg ${
|
||||
message.role.toLowerCase() === 'user'
|
||||
? 'bg-blue-500 text-white'
|
||||
: message.role.toLowerCase() === 'assistant'
|
||||
? 'bg-gray-200 text-gray-800'
|
||||
: 'bg-yellow-100 text-yellow-800'
|
||||
message.role.toLowerCase() === "user"
|
||||
? "bg-blue-500 text-white"
|
||||
: message.role.toLowerCase() === "assistant"
|
||||
? "bg-gray-200 text-gray-800"
|
||||
: "bg-yellow-100 text-yellow-800"
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-center justify-between mb-1">
|
||||
@ -66,7 +66,8 @@ export default function MessageViewer({ messages }: MessageViewerProps) {
|
||||
First message: {new Date(messages[0].timestamp).toLocaleString()}
|
||||
</span>
|
||||
<span>
|
||||
Last message: {new Date(messages[messages.length - 1].timestamp).toLocaleString()}
|
||||
Last message:{" "}
|
||||
{new Date(messages[messages.length - 1].timestamp).toLocaleString()}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user