mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
feat: export to screenshot
This commit is contained in:
parent
6f0b559927
commit
96914387a6
5 changed files with 73 additions and 25 deletions
|
|
@ -6,6 +6,7 @@ import { CSSTransition } from 'react-transition-group';
|
|||
import ScrollToBottom from './ScrollToBottom';
|
||||
import MultiMessage from './MultiMessage';
|
||||
import MessageHeader from './MessageHeader';
|
||||
import { useScreenshot } from '~/utils/screenshotContext.jsx';
|
||||
|
||||
import store from '~/store';
|
||||
|
||||
|
|
@ -23,6 +24,8 @@ export default function Messages({ isSearchView = false }) {
|
|||
const conversation = useRecoilValue(store.conversation) || {};
|
||||
const { conversationId } = conversation;
|
||||
|
||||
const { screenshotTargetRef } = useScreenshot();
|
||||
|
||||
// const models = useRecoilValue(store.models) || [];
|
||||
// const modelName = models.find(element => element.model == model)?.name;
|
||||
|
||||
|
|
@ -84,8 +87,11 @@ export default function Messages({ isSearchView = false }) {
|
|||
ref={scrollableRef}
|
||||
onScroll={debouncedHandleScroll}
|
||||
>
|
||||
<div className="dark:gpt-dark-gray h-full">
|
||||
<div className="dark:gpt-dark-gray flex h-full flex-col items-center text-sm">
|
||||
<div
|
||||
className="dark:gpt-dark-gray h-auto"
|
||||
ref={screenshotTargetRef}
|
||||
>
|
||||
<div className="dark:gpt-dark-gray flex h-auto flex-col items-center text-sm">
|
||||
<MessageHeader isSearchView={isSearchView} />
|
||||
{_messagesTree === null ? (
|
||||
<Spinner />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue