mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
ux
This commit is contained in:
parent
b7db527866
commit
a61fdd0419
2 changed files with 11 additions and 10 deletions
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue