This commit is contained in:
Mathew Pareles 2025-04-17 23:32:01 -07:00
parent b7db527866
commit a61fdd0419
2 changed files with 11 additions and 10 deletions

View file

@ -2685,12 +2685,13 @@ export const SidebarChat = () => {
<ErrorBoundary>
{landingPageInput}
</ErrorBoundary>
<ErrorBoundary>
<div className='pt-8 mb-2 text-void-fg-1 text-root'>Previous Threads</div>
<PastThreadsList />
</ErrorBoundary>
{Object.values(chatThreadsState.allThreads).length > 0 && // show if there are threads
<ErrorBoundary>
<div className='pt-8 mb-2 text-void-fg-1 text-root'>Previous Threads</div>
<PastThreadsList />
</ErrorBoundary>
}
</div>

View file

@ -295,11 +295,11 @@ const PastThreadElement = ({ pastThread, idx, hoveredIdx, setHoveredIdx }: { pas
const numMessages = pastThread.messages.filter((msg) => msg.role === 'assistant' || msg.role === 'user').length;
const optionsHTML = <span
const detailsHTML = <span
className='gap-1 inline-flex items-center'
// data-tooltip-id='void-tooltip'
// data-tooltip-content={`Last modified ${formatTime(new Date(pastThread.lastModified))}`}
// data-tooltip-place='top'
// data-tooltip-id='void-tooltip'
// data-tooltip-content={`Last modified ${formatTime(new Date(pastThread.lastModified))}`}
// data-tooltip-place='top'
>
{/* <span>{numMessages}</span> */}
{formatDate(new Date(pastThread.lastModified))}
@ -325,7 +325,7 @@ const PastThreadElement = ({ pastThread, idx, hoveredIdx, setHoveredIdx }: { pas
<div className="flex items-center gap-2 opacity-60">
{idx === hoveredIdx ?
<TrashButton threadId={pastThread.id} />
: optionsHTML
: detailsHTML
}
</div>
</div>