mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-09 12:08:50 +01:00
* refactor(Nav): delegate Search-specific variables/hooks to SearchContext * fix: safely determine firstTodayConvoId if convo is undefined * chore: remove empty line * feat: initial render of search messages * feat: SearchButtons * update Ko.ts * update localizations with new key phrases * chore: localization comparisons * fix: clear conversation state on searchQuery navigation * style: search messages view styling * refactor(Convo): consolidate logic to navigateWithLastTools from useNavigateToConvo * fix(SearchButtons): styling and correct navigation logic * fix(SearchBar): invalidate all message queries and invoke `clearText` if onChange value is empty * refactor(NewChat): consolidate new chat button logic to NewChatButtonIcon * chore: localizations for Nav date groups * chore: update comparisons * fix: early return from sendRequest to avoid quick searchQuery reset * style: Link Icon * chore: bump tiktoken, use o200k_base for gpt-4o
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
import { cn } from '~/utils';
|
|
|
|
const MinimalMessages = React.forwardRef(
|
|
(
|
|
props: { children: React.ReactNode; className?: string },
|
|
ref: React.ForwardedRef<HTMLDivElement>,
|
|
) => {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'relative flex w-full grow overflow-hidden bg-white dark:bg-gray-800',
|
|
props.className,
|
|
)}
|
|
>
|
|
<div className="transition-width relative h-full w-full flex-1 overflow-auto bg-white dark:bg-gray-800">
|
|
<div className="flex h-full flex-col" role="presentation" tabIndex={0}>
|
|
<div className="flex-1 overflow-hidden overflow-y-auto">
|
|
<div className="dark:gpt-dark-gray relative h-full">
|
|
<div
|
|
ref={ref}
|
|
style={{
|
|
height: '100%',
|
|
overflowY: 'auto',
|
|
width: '100%',
|
|
}}
|
|
>
|
|
<div className="flex flex-col pb-9 text-sm dark:bg-transparent">
|
|
{props.children}
|
|
<div className="dark:gpt-dark-gray group h-0 w-full flex-shrink-0 dark:border-gray-800/50" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
},
|
|
);
|
|
|
|
export default MinimalMessages;
|