Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🖼️ style: Conversation Menu and Dialogs update (#3601)

Marco Beretta96581d56df82
diff --git a/api/models/ConversationTag.js b/api/models/ConversationTag.js
index d64dcfa521..53d144e1f5 100644
--- a/api/models/ConversationTag.js
+++ b/api/models/ConversationTag.js
@@ -136,13 +136,13 @@ const adjustPositions = async (user, oldPosition, newPosition) => {
const position =
oldPosition < newPosition
? {
- $gt: Math.min(oldPosition, newPosition),
- $lte: Math.max(oldPosition, newPosition),
- }
+ $gt: Math.min(oldPosition, newPosition),
+ $lte: Math.max(oldPosition, newPosition),
+ }
: {
- $gte: Math.min(oldPosition, newPosition),
- $lt: Math.max(oldPosition, newPosition),
- };
+ $gte: Math.min(oldPosition, newPosition),
+ $lt: Math.max(oldPosition, newPosition),
+ };
await ConversationTag.updateMany(
{
diff --git a/client/package.json b/client/package.json
index 2693ada9f7..6046baf8fb 100644
--- a/client/package.json
+++ b/client/package.json
@@ -37,7 +37,7 @@
"@radix-ui/react-checkbox": "^1.0.3",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.2",
- "@radix-ui/react-dropdown-menu": "^2.0.2",
+ "@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-hover-card": "^1.0.5",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.0",
diff --git a/client/src/components/Bookmarks/BookmarkEditDialog.tsx b/client/src/components/Bookmarks/BookmarkEditDialog.tsx
index a57b61088f..3b85edce42 100644
--- a/client/src/components/Bookmarks/BookmarkEditDialog.tsx
+++ b/client/src/components/Bookmarks/BookmarkEditDialog.tsx
@@ -1,7 +1,7 @@
-import React, { useRef, useState } from 'react';
+import React, { useRef, useState, Dispatch, SetStateAction } from 'react';
import { TConversationTag, TConversation } from 'librechat-data-provider';
import OGDialogTemplate from '~/components/ui/OGDialogTemplate';
-import { OGDialog, OGDialogTrigger, OGDialogClose } from '~/components/ui/';
+import { OGDialog, OGDialogClose } from '~/components/ui/';
import BookmarkForm from './BookmarkForm';
import { useLocalize } from '~/hooks';
import { Spinner } from '../svg';
@@ -11,18 +11,20 @@ type BookmarkEditDialogProps = {
conversation?: TConversation;
tags?: string[];
setTags?: (tags: string[]) => void;
- trigger: React.ReactNode;
+ open: boolean;
+ setOpen: Dispatch<SetStateAction<boolean>>;
};
+
const BookmarkEditDialog = ({
bookmark,
conversation,
tags,
setTags,
- trigger,
+ open,
+ setOpen,
}: BookmarkEditDialogProps) => {
const localize = useLocalize();
const [isLoading, setIsLoading] = useState(false);
- const [open, setOpen] = useState(false);
const formRef = useRef<HTMLFormElement>(null);
const handleSubmitForm = () => {
@@ -33,10 +35,8 @@ const BookmarkEditDialog = ({
return (
<OGDialog open={open} onOpenChange={setOpen}>
- <OGDialogTrigger asChild>{trigger}</OGDialogTrigger>
<OGDialogTemplate
title="Bookmark"
- className="w-11/12 sm:w-1/4"
showCloseButton={false}
main={
<BookmarkForm
diff --git a/client/src/components/Bookmarks/BookmarkForm.tsx b/client/src/components/Bookmarks/BookmarkForm.tsx
index 38ebfb2b85..c5c96f4144 100644
--- a/client/src/components/Bookmarks/BookmarkForm.tsx
+++ b/client/src/components/Bookmarks/BookmarkForm.tsx
@@ -170,7 +170,7 @@ const BookmarkForm = ({
checked={field.value}
onCheckedChange={field.onChange}
className="relative float-left mr-2 inline-flex h-4 w-4 cursor-pointer"
- value={field?.value?.toString()}
+ value={field.value?.toString()}
/>
)}
/>
diff --git a/client/src/components/Bookmarks/BookmarkItem.tsx b/client/src/components/Bookmarks/BookmarkItem.tsx
index 62f8f79a73..07d66ddbb9 100644
--- a/client/src/components/Bookmarks/BookmarkItem.tsx
+++ b/client/src/components/Bookmarks/BookmarkItem.tsx
@@ -1,4 +1,5 @@
import { useState } from 'react';
+import { MenuItem } from '@headlessui/react';
import { BookmarkFilledIcon, BookmarkIcon } from '@radix-ui/react-icons';
import type { FC } from 'react';
import { Spinner } from '~/components/svg';
@@ -7,25 +8,19 @@ import { cn } from '~/utils';
type MenuItemProps = {
tag: string | React.ReactNode;
selected: boolean;
- ctx: 'header' | 'nav';
count?: number;
- handleSubmit: (tag: string) => Promise<void>;
+ handleSubmit: (tag?: string) => Promise<void>;
icon?: React.ReactNode;
- highlightSelected?: boolean;
};
-const BookmarkItem: FC<MenuItemProps> = ({
- tag,
- ctx,
- selected,
- count,
- handleSubmit,
- icon,
- highlightSelected,
- ...rest
-}) => {
+const BookmarkItem: FC<MenuItemProps> = ({ tag, selected, handleSubmit, icon, ...rest }) => {
const [isLoading, setIsLoading] = useState(false);
const clickHandler = async () => {
+ if (tag === 'New Bookmark') {
+ await handleSubmit();
+ return;
+ }
+
setIsLoading(true);
await handleSubmit(tag as string);
setIsLoading(false);
@@ -49,20 +44,15 @@ const BookmarkItem: FC<MenuItemProps> = ({
return <BookmarkIcon className="size-4" />;
};
- const ariaLabel =
- ctx === 'header' ? `${selected ? 'Remove' : 'Add'} bookmark for ${tag}` : (tag as string);
-
return (
- <button
- aria-label={ariaLabel}
- role="menuitem"
+ <MenuItem
+ aria-label={tag as string}
className={cn(
- 'group m-1.5 flex w-[225px] cursor-pointer gap-2 rounded bg-transparent px-2 py-2.5 !pr-3 text-sm !opacity-100 focus:ring-0 radix-disabled:pointer-events-none radix-disabled:opacity-50',
- highlightSelected && selected ? 'bg-surface-secondary' : '',
- ctx === 'header' ? 'hover:bg-header-hover' : 'hover:bg-surface-hover',
+ 'group flex w-full gap-2 rounded-lg p-2.5 text-sm text-text-primary transition-colors duration-200',
+ selected ? 'bg-surface-hover' : 'data-[focus]:bg-surface-hover',
)}
- tabIndex={-1}
{...rest}
+ as="button"
onClick={clickHandler}
>
<div className="flex grow items-center justify-between gap-2">
@@ -70,19 +60,8 @@ const BookmarkItem: FC<MenuItemProps> = ({
{renderIcon()}
<div style={breakWordStyle}>{tag}</div>
</div>
-
- {count !== undefined && (
- <div className="flex items-center justify-end">
- <span
- className="ml-auto w-7 min-w-max whitespace-nowrap rounded-md bg-surface-secondary px-2.5 py-0.5 text-center text-xs font-medium leading-5 text-text-secondary"
- aria-hidden="true"
- >
- {count}
- </span>
- </div>
- )}
</div>
- </button>
+ </MenuItem>
);
};
diff --git a/client/src/components/Bookmarks/BookmarkItems.tsx b/client/src/components/Bookmarks/BookmarkItems.tsx
index 9b4da3b565..845bf40925 100644
--- a/client/src/components/Bookmarks/BookmarkItems.tsx
+++ b/client/src/components/Bookmarks/BookmarkItems.tsx
@@ -2,35 +2,24 @@ import type { FC } from 'react';
import { useBookmarkContext } from '~/Providers/BookmarkContext';
import BookmarkItem from './BookmarkItem';
interface BookmarkItemsProps {
- ctx: 'header' | 'nav';
tags: string[];
- handleSubmit: (tag: string) => Promise<void>;
+ handleSubmit: (tag?: string) => Promise<void>;
header: React.ReactNode;
- highlightSelected?: boolean;
}
-const BookmarkItems: FC<BookmarkItemsProps> = ({
- ctx,
- tags,
- handleSubmit,
- header,
- highlightSelected,
-}) => {
+const BookmarkItems: FC<BookmarkItemsProps> = ({ tags, handleSubmit, header }) => {
const { bookmarks } = useBookmarkContext();
return (
<>
{header}
- <div className="my-1.5 h-px" role="none" />
+ {bookmarks.length > 0 && <div className="my-1.5 h-px" role="none" />}
{bookmarks.map((bookmark) => (
<BookmarkItem
- ctx={ctx}
key={bookmark.tag}
tag={bookmark.tag}
selected={tags.includes(bookmark.tag)}
- count={bookmark.count}
handleSubmit={handleSubmit}
- highlightSelected={highlightSelected}
/>
))}
</>
diff --git a/client/src/components/Bookmarks/DeleteBookmarkButton.tsx b/client/src/components/Bookmarks/DeleteBookmarkButton.tsx
index a3a2d0b474..e401f88843 100644
--- a/client/src/components/Bookmarks/DeleteBookmarkButton.tsx
+++ b/client/src/components/Bookmarks/DeleteBookmarkButton.tsx
@@ -46,7 +46,7 @@ const DeleteBookmarkButton: FC<{
</Label>
}
confirm={confirmDelete}
- className="transition-color flex h-7 w-7 min-w-7 items-center justify-center rounded-lg duration-200 hover:bg-gray-200 dark:hover:bg-gray-700"
+ className="transition-color flex size-7 items-center justify-center rounded-lg duration-200 hover:bg-surface-hover"
icon={<TrashIcon className="size-4" />}
tabIndex={tabIndex}
onFocus={onFocus}
diff --git a/client/src/components/Bookmarks/EditBookmarkButton.tsx b/client/src/components/Bookmarks/EditBookmarkButton.tsx
index 58f18d6677..63ab694870 100644
--- a/client/src/components/Bookmarks/EditBookmarkButton.tsx
+++ b/client/src/components/Bookmarks/EditBookmarkButton.tsx
@@ -1,3 +1,4 @@
+import { useState } from 'react';
import type { FC } from 'react';
import type { TConversationTag } from 'librechat-data-provider';
import BookmarkEditDialog from './BookmarkEditDialog';
@@ -12,30 +13,31 @@ const EditBookmarkButton: FC<{
onBlur?: () => void;
}> = ({ bookmark, tabIndex = 0, onFocus, onBlur }) => {
const localize = useLocalize();
+ const [open, setOpen] = useState(false);
+
return (
- <BookmarkEditDialog
- bookmark={bookmark}
- trigger={
- <button
- type="button"
- className="transition-color flex h-7 w-7 min-w-7 items-center justify-center rounded-lg duration-200 hover:bg-gray-200 dark:hover:bg-gray-700"
- tabIndex={tabIndex}
- onFocus={onFocus}
- onBlur={onBlur}
- >
- <TooltipProvider delayDuration={250}>
- <Tooltip>
- <TooltipTrigger asChild>
- <EditIcon />
- </TooltipTrigger>
- <TooltipContent side="top" sideOffset={0}>
- {localize('com_ui_edit')}
- </TooltipContent>
- </Tooltip>
- </TooltipProvider>
- </button>
- }
- />
+ <>
+ <BookmarkEditDialog bookmark={bookmark} open={open} setOpen={setOpen} />
+ <button
+ type="button"
+ className="transition-color flex size-7 items-center justify-center rounded-lg duration-200 hover:bg-surface-hover"
+ tabIndex={tabIndex}
+ onFocus={onFocus}
+ onBlur={onBlur}
+ onClick={() => setOpen(!open)}
+ >
+ <TooltipProvider delayDuration={250}>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <EditIcon />
+ </TooltipTrigger>
+ <TooltipContent side="top" sideOffset={0}>
+ {localize('com_ui_edit')}
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </button>
+ </>
);
};
diff --git a/client/src/components/Chat/AddMultiConvo.tsx b/client/src/components/Chat/AddMultiConvo.tsx
index 9daaded61d..34b11e4074 100644
--- a/client/src/components/Chat/AddMultiConvo.tsx
+++ b/client/src/components/Chat/AddMultiConvo.tsx
@@ -3,6 +3,7 @@ import { isAssistantsEndpoint } from 'librechat-data-provider';
import type { TConversation } from 'librechat-data-provider';
import { useChatContext, useAddedChatContext } from '~/Providers';
import { mainTextareaId } from '~/common';
+import { Button } from '~/components/ui';
import { cn } from '~/utils';
function AddMultiConvo({ className = '' }: { className?: string }) {
@@ -32,16 +33,15 @@ function AddMultiConvo({ className = '' }: { className?: string }) {
}
return (
- <button
+ <Button
+ id="add-multi-conversation-button"
aria-label="Add multi-conversation"
onClick={clickHandler}
- className={cn(
- 'group m-1.5 flex w-fit cursor-pointer items-center rounded text-sm hover:bg-border-medium focus-visible:bg-border-medium focus-visible:outline-offset-2',
- className,
- )}
+ variant="outline"
+ className={cn('h-10 w-10 p-0 transition-all duration-300 ease-in-out', className)}
>
<PlusCircle size={16} />
- </button>
+ </Button>
);
}
diff --git a/client/src/components/Chat/ExportAndShareMenu.tsx b/client/src/components/Chat/ExportAndShareMenu.tsx
index ba556499ee..59c1abff2e 100644
--- a/client/src/components/Chat/ExportAndShareMenu.tsx
+++ b/client/src/components/Chat/ExportAndShareMenu.tsx
@@ -1,64 +1,95 @@
import { useState } from 'react';
-import { Upload } from 'lucide-react';
+import { Upload, Share2 } from 'lucide-react';
import { useRecoilValue } from 'recoil';
-import DropDownMenu from '~/components/Conversations/DropDownMenu';
-import ShareButton from '~/components/Conversations/ShareButton';
-import HoverToggle from '~/components/Conversations/HoverToggle';
+import { ShareButton } from '~/components/Conversations/ConvoOptions';
+import { Button, DropdownPopup } from '~/components/ui';
import useLocalize from '~/hooks/useLocalize';
-import ExportButton from './ExportButton';
+import { ExportModal } from '../Nav';
import store from '~/store';
export default function ExportAndShareMenu({
isSharedButtonEnabled,
- className = '',
}: {
isSharedButtonEnabled: boolean;
- className?: string;
}) {
const localize = useLocalize();
-
const conversation = useRecoilValue(store.conversationByIndex(0));
const [isPopoverActive, setIsPopoverActive] = useState(false);
+ const [showExports, setShowExports] = useState(false);
+ const [showShareDialog, setShowShareDialog] = useState(false);
const exportable =
conversation &&
- conversation.conversationId &&
+ conversation.conversationId != null &&
conversation.conversationId !== 'new' &&
conversation.conversationId !== 'search';
- if (!exportable) {
+ if (exportable === false) {
return null;
}
- const isActiveConvo = exportable;
+ const onOpenChange = (value: boolean) => {
+ setShowExports(value);
+ };
+
+ const shareHandler = () => {
+ setIsPopoverActive(false);
+ setShowShareDialog(true);
+ };
+
+ const exportHandler = () => {
+ setIsPopoverActive(false);
+ setShowExports(true);
+ };
+
+ const dropdownItems = [
+ {
+ label: localize('com_endpoint_export'),
+ onClick: exportHandler,
+ icon: <Upload className="icon-md mr-2 dark:text-gray-300" />,
+ },
+ {
+ label: localize('com_ui_share'),
+ onClick: shareHandler,
+ icon: <Share2 className="icon-md mr-2 dark:text-gray-300" />,
+ show: isSharedButtonEnabled,
+ },
+ ];
return (
- <HoverToggle
- isActiveConvo={!!isActiveConvo}
- isPopoverActive={isPopoverActive}
- setIsPopoverActive={setIsPopoverActive}
- className={className}
- >
- <DropDownMenu
- icon={<Upload />}
- tooltip={localize('com_endpoint_export_share')}
- className="pointer-cursor relative z-50 flex h-[40px] min-w-4 flex-none flex-col items-center justify-center rounded-md border border-gray-100 bg-white px-3 text-left hover:bg-gray-50 focus:outline-none focus:ring-0 focus:ring-offset-0 radix-state-open:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700 dark:radix-state-open:bg-gray-700 sm:text-sm"
- >
- {conversation && conversation.conversationId && (
- <>
- <ExportButton conversation={conversation} setPopoverActive={setIsPopoverActive} />
- {isSharedButtonEnabled && (
- <ShareButton
- conversationId={conversation.conversationId}
- title={conversation.title ?? ''}
- appendLabel={true}
- className="mb-[3.5px]"
- setPopoverActive={setIsPopoverActive}
- />
- )}
- </>
- )}
- </DropDownMenu>
- </HoverToggle>
+ <>
+ <DropdownPopup
+ isOpen={isPopoverActive}
+ setIsOpen={setIsPopoverActive}
+ trigger={
+ <Button
+ id="export-menu-button"
+ aria-label="Export options"
+ variant="outline"
+ className="mr-4 h-10 w-10 p-0 transition-all duration-300 ease-in-out"
+ >
+ <Upload className="icon-md dark:text-gray-300" aria-hidden="true" focusable="false" />
+ </Button>
+ }
+ items={dropdownItems}
+ anchor="bottom end"
+ />
+ {showShareDialog && conversation.conversationId != null && (
+ <ShareButton
+ conversationId={conversation.conversationId}
+ title={conversation.title ?? ''}
+ showShareDialog={showShareDialog}
+ setShowShareDialog={setShowShareDialog}
+ />
+ )}
+ {showExports && (
+ <ExportModal
+ open={showExports}
+ onOpenChange={onOpenChange}
+ conversation={conversation}
+ aria-label="Export conversation modal"
+ />
+ )}
+ </>
);
}
diff --git a/client/src/components/Chat/ExportButton.tsx b/client/src/components/Chat/ExportButton.tsx
deleted file mode 100644
index 4f5cca388d..0000000000
--- a/client/src/components/Chat/ExportButton.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import React from 'react';
-
-import { useState } from 'react';
-import type { TConversation } from 'librechat-data-provider';
-import { Upload } from 'lucide-react';
-import { useLocalize } from '~/hooks';
-import { ExportModal } from '../Nav';
-
-function ExportButton({
- conversation,
- setPopoverActive,
-}: {
- conversation: TConversation;
- setPopoverActive: (value: boolean) => void;
-}) {
- const localize = useLocalize();
-
- const [showExports, setShowExports] = useState(false);
-
- const clickHandler = () => {
- setShowExports(true);
- };
-
- const onOpenChange = (value: boolean) => {
- setShowExports(value);
- setPopoverActive(value);
- };
-
- return (
- <>
- <button
- onClick={clickHandler}
- className="group m-1.5 flex w-full cursor-pointer items-center gap-2 rounded p-2.5 text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600"
- >
- <Upload size={16} /> {localize('com_nav_export')}
- </button>
- {showExports && (
- <ExportModal open={showExports} onOpenChange={onOpenChange} conversation={conversation} />
- )}
- </>
- );
-}
-
-export default ExportButton;
diff --git a/client/src/components/Chat/Footer.tsx b/client/src/components/Chat/Footer.tsx
index 11667ccfb5..d4b04698e2 100644
--- a/client/src/components/Chat/Footer.tsx
+++ b/client/src/components/Chat/Footer.tsx
@@ -12,31 +12,31 @@ export default function Footer({ className }: { className?: string }) {
const privacyPolicy = config?.interface?.privacyPolicy;
const termsOfService = config?.interface?.termsOfService;
- const privacyPolicyRender = privacyPolicy?.externalUrl && (
+ const privacyPolicyRender = privacyPolicy?.externalUrl != null && (
<a
- className=" text-gray-600 underline dark:text-gray-300"
+ className="text-text-secondary underline"
href={privacyPolicy.externalUrl}
- target={privacyPolicy.openNewTab ? '_blank' : undefined}
+ target={privacyPolicy.openNewTab === true ? '_blank' : undefined}
rel="noreferrer"
>
{localize('com_ui_privacy_policy')}
</a>
);
- const termsOfServiceRender = termsOfService?.externalUrl && (
+ const termsOfServiceRender = termsOfService?.externalUrl != null && (
<a
- className=" text-gray-600 underline dark:text-gray-300"
+ className="text-text-secondary underline"
href={termsOfService.externalUrl}
- target={termsOfService.openNewTab ? '_blank' : undefined}
+ target={termsOfService.openNewTab === true ? '_blank' : undefined}
rel="noreferrer"
>
{localize('com_ui_terms_of_service')}
</a>
);
- if (config?.analyticsGtmId) {
+ if (config?.analyticsGtmId != null) {
const tagManagerArgs = {
- gtmId: config?.analyticsGtmId,
+ gtmId: config.analyticsGtmId,
};
TagManager.initialize(tagManagerArgs);
}
@@ -54,19 +54,22 @@ export default function Footer({ className }: { className?: string }) {
<React.Fragment key={`main-content-part-${index}`}>
<ReactMarkdown
components={{
- a: (props) => {
- const { ['node']: _, href, ...otherProps } = props;
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ a: ({ node: _n, href, children, ...otherProps }) => {
return (
<a
- className=" text-gray-600 underline dark:text-gray-300"
+ className="text-text-secondary underline"
href={href}
target="_blank"
rel="noreferrer"
{...otherProps}
- />
+ >
+ {children}
+ </a>
);
},
- p: ({ node, ...props }) => <span {...props} />,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ p: ({ node: _n, ...props }) => <span {...props} />,
}}
>
{text.trim()}
@@ -81,8 +84,8 @@ export default function Footer({ className }: { className?: string }) {
return (
<div
className={
- className ||
- 'relative flex items-center justify-center gap-2 px-2 py-2 text-center text-xs text-gray-600 dark:text-gray-300 md:px-[60px]'
+ className ??
+ 'relative flex items-center justify-center gap-2 px-2 py-2 text-center text-xs text-text-primary md:px-[60px]'
}
role="contentinfo"
>
@@ -92,7 +95,7 @@ export default function Footer({ className }: { className?: string }) {
<React.Fragment key={`footer-element-${index}`}>
{contentRender}
{!isLastElement && (
- <div key={`separator-${index}`} className="h-2 border-r-[1px] border-gray-300" />
+ <div key={`separator-${index}`} className="h-2 border-r-[1px] border-border-medium" />
)}
</React.Fragment>
);
diff --git a/client/src/components/Chat/Header.tsx b/client/src/components/Chat/Header.tsx
index 6802fa8945..b65fa1ca16 100644
--- a/client/src/components/Chat/Header.tsx
+++ b/client/src/components/Chat/Header.tsx
@@ -29,17 +29,16 @@ export default function Header() {
<div className="flex items-center gap-2">
{!navVisible && <HeaderNewChat />}
{interfaceConfig.endpointsMenu && <EndpointsMenu />}
- {modelSpecs?.length > 0 && <ModelSpecsMenu modelSpecs={modelSpecs} />}
+ {modelSpecs.length > 0 && <ModelSpecsMenu modelSpecs={modelSpecs} />}
{<HeaderOptions interfaceConfig={interfaceConfig} />}
{interfaceConfig.presets && <PresetsMenu />}
+ <BookmarkMenu />
+ <AddMultiConvo />
{isSmallScreen && (
<ExportAndShareMenu
isSharedButtonEnabled={startupConfig?.sharedLinksEnabled ?? false}
- className="pl-0"
/>
)}
- <BookmarkMenu />
- <AddMultiConvo />
</div>
{!isSmallScreen && (
<ExportAndShareMenu isSharedButtonEnabled={startupConfig?.sharedLinksEnabled ?? false} />
diff --git a/client/src/components/Chat/Input/OptionsPopover.tsx b/client/src/components/Chat/Input/OptionsPopover.tsx
index 7c68bc4daf..02f5150bc5 100644
--- a/client/src/components/Chat/Input/OptionsPopover.tsx
+++ b/client/src/components/Chat/Input/OptionsPopover.tsx
@@ -33,12 +33,12 @@ export default function OptionsPopover({
(_target) => {
const target = _target as Element;
if (
- target?.id === 'presets-button' ||
- (target?.parentNode instanceof Element && target.parentNode.id === 'presets-button')
+ target.id === 'presets-button' ||
+ (target.parentNode instanceof Element && target.parentNode.id === 'presets-button')
) {
return false;
}
- const tagName = target?.tagName;
+ const tagName = target.tagName;
return tagName === 'path' || tagName === 'svg' || tagName === 'circle';
},
);
diff --git a/client/src/components/Chat/Menus/BookmarkMenu.tsx b/client/src/components/Chat/Menus/BookmarkMenu.tsx
index 80735262ea..1ed18e4053 100644
--- a/client/src/components/Chat/Menus/BookmarkMenu.tsx
+++ b/client/src/components/Chat/Menus/BookmarkMenu.tsx
@@ -1,106 +1,128 @@
-import { useState, type FC } from 'react';
+import { useState, type FC, useCallback } from 'react';
import { useRecoilValue } from 'recoil';
import { Constants } from 'librechat-data-provider';
-import { Content, Portal, Root, Trigger } from '@radix-ui/react-popover';
+import { Menu, MenuButton, MenuItems } from '@headlessui/react';
import { BookmarkFilledIcon, BookmarkIcon } from '@radix-ui/react-icons';
import { useConversationTagsQuery, useTagConversationMutation } from '~/data-provider';
import { BookmarkMenuItems } from './Bookmarks/BookmarkMenuItems';
import { BookmarkContext } from '~/Providers/BookmarkContext';
-import { useLocalize, useBookmarkSuccess } from '~/hooks';
+import { BookmarkEditDialog } from '~/components/Bookmarks';
+import { NotificationSeverity } from '~/common';
+import { useToastContext } from '~/Providers';
+import { useBookmarkSuccess } from '~/hooks';
import { Spinner } from '~/components';
import { cn } from '~/utils';
import store from '~/store';
const BookmarkMenu: FC = () => {
- const localize = useLocalize();
+ const { showToast } = useToastContext();
- const conversation = useRecoilValue(store.conversationByIndex(0));
+ const conversation = useRecoilValue(store.conversationByIndex(0)) || undefined;
const conversationId = conversation?.conversationId ?? '';
const onSuccess = useBookmarkSuccess(conversationId);
const [tags, setTags] = useState<string[]>(conversation?.tags || []);
-
- const [open, setIsOpen] = useState(false);
+ const [open, setOpen] = useState(false);
const { mutateAsync, isLoading } = useTagConversationMutation(conversationId);
const { data } = useConversationTagsQuery();
- const isActiveConvo =
+ const isActiveConvo = Boolean(
conversation &&
- conversationId &&
- conversationId !== Constants.NEW_CONVO &&
- conversationId !== 'search';
+ conversationId &&
+ conversationId !== Constants.NEW_CONVO &&
+ conversationId !== 'search',
+ );
- if (!isActiveConvo) {
- return <></>;
- }
+ const handleSubmit = useCallback(
+ async (tag?: string): Promise<void> => {
+ if (tag === undefined || tag === '' || !conversationId) {
+ showToast({
+ message: 'Invalid tag or conversationId',
+ severity: NotificationSeverity.ERROR,
+ });
+ return;
+ }
- const onOpenChange = async (open: boolean) => {
- if (!open) {
- setIsOpen(open);
- return;
- }
- if (open && tags && tags.length > 0) {
- setIsOpen(open);
- } else {
- if (conversation && conversationId) {
- await mutateAsync(
- {
- tags: [Constants.SAVED_TAG as 'Saved'],
+ const newTags = tags.includes(tag) ? tags.filter((t) => t !== tag) : [...tags, tag];
+ await mutateAsync(
+ {
+ tags: newTags,
+ },
+ {
+ onSuccess: (newTags: string[]) => {
+ setTags(newTags);
+ onSuccess(newTags);
},
- {
- onSuccess: (newTags: string[]) => {
- setTags(newTags);
- onSuccess(newTags);
- },
- onError: () => {
- console.error('Error adding bookmark');
- },
+ onError: () => {
+ showToast({
+ message: 'Error adding bookmark',
+ severity: NotificationSeverity.ERROR,
+ });
},
- );
- }
- }
- };
+ },
+ );
+ },
+ [tags, conversationId, mutateAsync, setTags, onSuccess, showToast],
+ );
+
+ if (!isActiveConvo) {
+ return <></>;
+ }
const renderButtonContent = () => {
if (isLoading) {
- return <Spinner />;
+ return <Spinner aria-label="Spinner" />;
}
- if (tags && tags.length > 0) {
- return <BookmarkFilledIcon className="icon-sm" />;
+ if (tags.length > 0) {
+ return <BookmarkFilledIcon className="icon-sm" aria-label="Filled Bookmark" />;
}
- return <BookmarkIcon className="icon-sm" />;
+ return <BookmarkIcon className="icon-sm" aria-label="Bookmark" />;
+ };
+
+ const handleToggleOpen = () => {
+ setOpen(!open);
+ return Promise.resolve();
};
return (
- <Root open={open} onOpenChange={onOpenChange}>
- <Trigger asChild>
- <button
- id="header-bookmarks-menu"
- className={cn(
- 'pointer-cursor relative flex flex-col rounded-md border border-border-light bg-transparent text-left focus:outline-none focus:ring-0 sm:text-sm',
- 'hover:bg-header-button-hover radix-state-open:bg-header-button-hover',
- 'z-50 flex h-[40px] min-w-4 flex-none items-center justify-center px-3 focus:outline-offset-2 focus:ring-0 focus-visible:ring-2 focus-visible:ring-ring-primary ',
- )}
- title={localize('com_ui_bookmarks')}
- >
- {renderButtonContent()}
- </button>
- </Trigger>
- <Portal>
- <Content
- className="mt-2 grid max-h-[500px] w-full min-w-[240px] overflow-y-auto rounded-lg border border-border-medium bg-header-primary text-text-primary shadow-lg"
- side="bottom"
- align="start"
- >
- {data && conversation && (
- <BookmarkContext.Provider value={{ bookmarks: data }}>
- <BookmarkMenuItems conversation={conversation} tags={tags ?? []} setTags={setTags} />
- </BookmarkContext.Provider>
- )}
- </Content>
- </Portal>
- </Root>
+ <>
+ <Menu as="div" className="group relative">
+ {({ open }) => (
+ <>
+ <MenuButton
+ aria-label="Add bookmarks"
+ className={cn(
+ 'mt-text-sm flex size-10 items-center justify-center gap-2 rounded-lg border border-border-light text-sm transition-colors duration-200 hover:bg-surface-hover',
+ open ? 'bg-surface-hover' : '',
+ )}
+ data-testid="bookmark-menu"
+ >
+ {renderButtonContent()}
+ </MenuButton>
+ <MenuItems
+ anchor="bottom start"
+ className="overflow-hidden rounded-lg bg-header-primary p-1.5 shadow-lg outline-none"
+ >
+ <BookmarkContext.Provider value={{ bookmarks: data || [] }}>
+ <BookmarkMenuItems
+ handleToggleOpen={handleToggleOpen}
+ tags={tags}
+ handleSubmit={handleSubmit}
+ />
+ </BookmarkContext.Provider>
+ </MenuItems>
+ </>
+ )}
+ </Menu>
+ <BookmarkEditDialog
+ conversation={conversation}
+ tags={tags}
+ setTags={setTags}
+ open={open}
+ setOpen={setOpen}
+ />
+ </>
);
};
diff --git a/client/src/components/Chat/Menus/Bookmarks/BookmarkMenuItems.tsx b/client/src/components/Chat/Menus/Bookmarks/BookmarkMenuItems.tsx
index 0a25350757..ed7b81180f 100644
--- a/client/src/components/Chat/Menus/Bookmarks/BookmarkMenuItems.tsx
+++ b/client/src/components/Chat/Menus/Bookmarks/BookmarkMenuItems.tsx
@@ -1,78 +1,34 @@
-import React, { useCallback } from 'react';
+import React from 'react';
import { BookmarkPlusIcon } from 'lucide-react';
import type { FC } from 'react';
-import type { TConversation } from 'librechat-data-provider';
-import { BookmarkItems, BookmarkEditDialog } from '~/components/Bookmarks';
-import { useTagConversationMutation } from '~/data-provider';
-import { useLocalize, useBookmarkSuccess } from '~/hooks';
-import { NotificationSeverity } from '~/common';
-import { useToastContext } from '~/Providers';
+import { BookmarkItems, BookmarkItem } from '~/components/Bookmarks';
+import { useLocalize } from '~/hooks';
export const BookmarkMenuItems: FC<{
- conversation: TConversation;
tags: string[];
- setTags: React.Dispatch<React.SetStateAction<string[]>>;
-}> = ({ conversation, tags, setTags }) => {
- const { showToast } = useToastContext();
+ handleToggleOpen?: () => Promise<void>;
+ handleSubmit: (tag?: string) => Promise<void>;
+}> = ({
+ tags,
+ handleSubmit,
+ handleToggleOpen = async () => {
+ ('');
+ },
+}) => {
const localize = useLocalize();
- const conversationId = conversation?.conversationId ?? '';
- const onSuccess = useBookmarkSuccess(conversationId);
-
- const { mutateAsync } = useTagConversationMutation(conversationId);
- const handleSubmit = useCallback(
- async (tag: string): Promise<void> => {
- if (tags !== undefined && conversationId) {
- const newTags = tags.includes(tag) ? tags.filter((t) => t !== tag) : [...tags, tag];
- await mutateAsync(
- {
- tags: newTags,
- },
- {
- onSuccess: (newTags: string[]) => {
- setTags(newTags);
- onSuccess(newTags);
- },
- onError: () => {
- showToast({
- message: 'Error adding bookmark',
- severity: NotificationSeverity.ERROR,
- });
- },
- },
- );
- }
- },
- [tags, conversationId, mutateAsync, setTags, onSuccess, showToast],
- );
-
return (
<BookmarkItems
- ctx="header"
tags={tags}
handleSubmit={handleSubmit}
header={
- <div>
- <BookmarkEditDialog
- conversation={conversation}
- tags={tags}
- setTags={setTags}
- trigger={
- <div
- role="menuitem"
- className="group m-1.5 flex cursor-pointer gap-2 rounded px-2 !pr-3.5 pb-2.5 pt-3 text-sm !opacity-100 hover:bg-header-hover focus:ring-0 radix-disabled:pointer-events-none radix-disabled:opacity-50"
- tabIndex={-1}
- >
- <div className="flex grow items-center justify-between gap-2">
- <div className="flex items-center gap-2">
- <BookmarkPlusIcon className="size-4" />
- <div className="break-all">{localize('com_ui_bookmarks_new')}</div>
- </div>
- </div>
- </div>
- }
- />
- </div>
+ <BookmarkItem
+ tag={localize('com_ui_bookmarks_new')}
+ data-testid="bookmark-item-new"
+ handleSubmit={handleToggleOpen}
+ selected={false}
+ icon={<BookmarkPlusIcon className="size-4" aria-label="Add Bookmark" />}
+ />
}
/>
);
diff --git a/client/src/components/Chat/Menus/Models/ModelSpec.tsx b/client/src/components/Chat/Menus/Models/ModelSpec.tsx
index 5b5e8fe009..272c6af2b1 100644
--- a/client/src/components/Chat/Menus/Models/ModelSpec.tsx
+++ b/client/src/components/Chat/Menus/Models/ModelSpec.tsx
@@ -36,7 +36,7 @@ const MenuItem: FC<MenuItemProps> = ({
const expiryTime = getExpiry();
const clickHandler = () => {
- if (!expiryTime) {
+ if (expiryTime == null) {
setDialogOpen(true);
}
if (onClick) {
@@ -60,6 +60,12 @@ const MenuItem: FC<MenuItemProps> = ({
{...rest}
onClick={clickHandler}
aria-label={title}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ clickHandler();
+ }
+ }}
>
<div className="flex grow items-center justify-between gap-2">
<div>
@@ -78,7 +84,7 @@ const MenuItem: FC<MenuItemProps> = ({
className={cn(
'invisible flex gap-x-1 group-hover:visible',
selected ? 'visible' : '',
- expiryTime
+ expiryTime != null
? 'w-full rounded-lg p-2 hover:bg-gray-200 dark:hover:bg-gray-900'
: '',
)}
@@ -88,10 +94,15 @@ const MenuItem: FC<MenuItemProps> = ({
setDialogOpen(true);
}}
>
- <div className={cn('invisible group-hover:visible', expiryTime ? 'text-xs' : '')}>
+ <div
+ className={cn(
+ 'invisible group-hover:visible',
+ expiryTime != null ? 'text-xs' : '',
+ )}
+ >
{localize('com_endpoint_config_key')}
</div>
- <Settings className={cn(expiryTime ? 'icon-sm' : 'icon-md stroke-1')} />
+ <Settings className={cn(expiryTime != null ? 'icon-sm' : 'icon-md stroke-1')} />
</button>
</div>
) : null}
diff --git a/client/src/components/Chat/Menus/Presets/PresetItems.tsx b/client/src/components/Chat/Menus/Presets/PresetItems.tsx
index 67aa035d4c..90021188c8 100644
--- a/client/src/components/Chat/Menus/Presets/PresetItems.tsx
+++ b/client/src/components/Chat/Menus/Presets/PresetItems.tsx
@@ -45,7 +45,7 @@ const PresetItems: FC<{
<div className="flex h-full grow items-center justify-end gap-2">
<label
htmlFor="default-preset"
- className="w-40 truncate rounded bg-transparent py-1 text-xs font-medium font-normal text-gray-600 transition-colors dark:bg-transparent dark:text-gray-300 sm:w-72"
+ className="w-40 truncate rounded bg-transparent py-1 text-xs font-medium text-gray-600 transition-colors dark:bg-transparent dark:text-gray-300 sm:w-72"
>
{defaultPreset
? `${localize('com_endpoint_preset_default_item')} ${defaultPreset.title}`
@@ -55,7 +55,7 @@ const PresetItems: FC<{
<DialogTrigger asChild>
<label
htmlFor="file-upload"
- className="mr-1 flex h-[32px] cursor-pointer items-center rounded bg-transparent px-2 py-1 text-xs font-medium font-normal text-gray-600 transition-colors hover:bg-gray-100 hover:text-red-700 dark:bg-transparent dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-green-500 dark:hover:text-red-700"
+ className="mr-1 flex h-[32px] cursor-pointer items-center rounded bg-transparent px-2 py-1 text-xs font-medium text-gray-600 transition-colors hover:bg-gray-100 hover:text-red-700 dark:bg-transparent dark:text-gray-300 dark:hover:bg-gray-700 dark:hover:text-red-700"
>
<svg
width="24"
@@ -159,7 +159,7 @@ const PresetItems: FC<{
<PinIcon unpin={defaultPreset?.presetId === preset.presetId} />
</button>
<button
- className="m-0 h-full rounded-md p-2 text-gray-400 hover:text-gray-700 dark:bg-gray-600 dark:text-gray-400 dark:hover:text-gray-200 sm:invisible sm:group-hover:visible"
+ className="m-0 h-full rounded-md p-2 text-gray-400 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 sm:invisible sm:group-hover:visible"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
@@ -169,7 +169,7 @@ const PresetItems: FC<{
<EditIcon />
</button>
<button
- className="m-0 h-full rounded-md p-2 text-gray-400 hover:text-gray-600 dark:bg-gray-600 dark:text-gray-400 dark:hover:text-gray-200 sm:invisible sm:group-hover:visible"
+ className="m-0 h-full rounded-md p-2 text-gray-400 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-200 sm:invisible sm:group-hover:visible"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
diff --git a/client/src/components/Conversations/Convo.tsx b/client/src/components/Conversations/Convo.tsx
index 3045b1d1e0..0eaedba27d 100644
--- a/client/src/components/Conversations/Convo.tsx
+++ b/client/src/components/Conversations/Convo.tsx
@@ -1,21 +1,17 @@
import { useRecoilValue } from 'recoil';
import { useParams } from 'react-router-dom';
-import { useState, useRef, useMemo } from 'react';
+import React, { useState, useEffect, useRef, useMemo } from 'react';
+
import { Constants } from 'librechat-data-provider';
-import { useGetEndpointsQuery, useGetStartupConfig } from 'librechat-data-provider/react-query';
+import { useGetEndpointsQuery } from 'librechat-data-provider/react-query';
+import { Check, X } from 'lucide-react';
import type { MouseEvent, FocusEvent, KeyboardEvent } from 'react';
+import { useConversations, useNavigateToConvo, useMediaQuery } from '~/hooks';
import { useUpdateConversationMutation } from '~/data-provider';
import EndpointIcon from '~/components/Endpoints/EndpointIcon';
-import { useConversations, useNavigateToConvo } from '~/hooks';
import { NotificationSeverity } from '~/common';
-import { ArchiveIcon } from '~/components/svg';
import { useToastContext } from '~/Providers';
-import ArchiveButton from './ArchiveButton';
-import DropDownMenu from './DropDownMenu';
-import DeleteButton from './DeleteButton';
-import RenameButton from './RenameButton';
-import HoverToggle from './HoverToggle';
-import ShareButton from './ShareButton';
+import { ConvoOptions } from './ConvoOptions';
import { cn } from '~/utils';
import store from '~/store';
@@ -28,7 +24,6 @@ export default function Conversation({ conversation, retainView, toggleNav, isLa
const activeConvos = useRecoilValue(store.allConversationsSelector);
const { data: endpointsConfig } = useGetEndpointsQuery();
const { navigateWithLastTools } = useNavigateToConvo();
- const { data: startupConfig } = useGetStartupConfig();
const { refreshConversations } = useConversations();
const { showToast } = useToastContext();
const { conversationId, title } = conversation;
@@ -36,6 +31,7 @@ export default function Conversation({ conversation, retainView, toggleNav, isLa
const [titleInput, setTitleInput] = useState(title);
const [renaming, setRenaming] = useState(false);
const [isPopoverActive, setIsPopoverActive] = useState(false);
+ const isSmallScreen = useMediaQuery('(max-width: 768px)');
const clickHandler = async (event: React.MouseEvent<HTMLAnchorElement>) => {
if (event.button === 0 && (event.ctrlKey || event.metaKey)) {
@@ -44,7 +40,7 @@ export default function Conversation({ conversation, retainView, toggleNav, isLa
}
event.preventDefault();
- if (currentConvoId === conversationId) {
+ if (currentConvoId === conversationId || isPopoverActive) {
return;
}
@@ -57,17 +53,17 @@ export default function Conversation({ conversation, retainView, toggleNav, isLa
};
const renameHandler = (e: MouseEvent<HTMLButtonElement>) => {
- e.preventDefault();
+ setIsPopoverActive(false);
setTitleInput(title);
setRenaming(true);
- setTimeout(() => {
- if (!inputRef.current) {
- return;
- }
- inputRef.current.focus();
- }, 25);
};
+ useEffect(() => {
+ if (renaming && inputRef.current) {
+ inputRef.current.focus();
+ }
+ }, [renaming]);
+
const onRename = (e: MouseEvent<HTMLButtonElement> | FocusEvent<HTMLInputElement> | KeyEvent) => {
e.preventDefault();
setRenaming(false);
@@ -99,6 +95,12 @@ export default function Conversation({ conversation, retainView, toggleNav, isLa
}
};
+ const cancelRename = (e: MouseEvent<HTMLButtonElement>) => {
+ e.preventDefault();
+ setTitleInput(title);
+ setRenaming(false);
+ };
+
const isActiveConvo =
currentConvoId === conversationId ||
(isLatestConvo && currentConvoId === 'new' && activeConvos[0] && activeConvos[0] !== 'new');
@@ -106,95 +108,77 @@ export default function Conversation({ conversation, retainView, toggleNav, isLa
return (
<div
className={cn(
- 'hover:bg-token-sidebar-surface-secondary group relative rounded-lg active:opacity-90',
+ 'group relative mt-2 flex h-9 items-center rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700',
+ isActiveConvo ? 'bg-gray-200 dark:bg-gray-700' : '',
+ isSmallScreen ? 'h-12' : '',
)}
>
{renaming ? (
- <div className="absolute inset-0 z-50 flex w-full items-center rounded-lg bg-gray-200 p-1.5 dark:bg-gray-700">
+ <div className="absolute inset-0 z-20 flex w-full items-center rounded-lg bg-gray-200 p-1.5 dark:bg-gray-700">
<input
ref={inputRef}
type="text"
- className="w-full rounded border border-blue-500 bg-transparent p-0.5 text-sm leading-tight outline-none"
+ className="w-full rounded bg-transparent p-0.5 text-sm leading-tight outline-none"
value={titleInput}
onChange={(e) => setTitleInput(e.target.value)}
- onBlur={onRename}
onKeyDown={handleKeyDown}
/>
+ <div className="flex gap-1">
+ <button onClick={cancelRename}>
+ <X className="transition-color h-4 w-4 duration-200 ease-in-out hover:opacity-70" />
+ </button>
+ <button onClick={onRename}>
+ <Check className="transition-color h-4 w-4 duration-200 ease-in-out hover:opacity-70" />
+ </button>
+ </div>
</div>
) : (
- <HoverToggle
- isActiveConvo={isActiveConvo}
- isPopoverActive={isPopoverActive}
- setIsPopoverActive={setIsPopoverActive}
+ <a
+ href={`/c/${conversationId}`}
+ data-testid="convo-item"
+ onClick={clickHandler}
+ className={cn(
+ 'flex grow cursor-pointer items-center gap-2 overflow-hidden whitespace-nowrap break-all rounded-lg px-2 py-2',
+ isActiveConvo ? 'bg-gray-200 dark:bg-gray-700' : '',
+ )}
+ title={title}
>
- <DropDownMenu>
- {startupConfig && startupConfig.sharedLinksEnabled && (
- <ShareButton
- conversationId={conversationId}
- title={title}
- appendLabel={true}
- className="mb-[3.5px]"
- setPopoverActive={setIsPopoverActive}
- />
- )}
-
- <RenameButton
- renaming={renaming}
- onRename={onRename}
- renameHandler={renameHandler}
- appendLabel={true}
- className="mb-[3.5px]"
- />
- <DeleteButton
- conversationId={conversationId}
- retainView={retainView}
- renaming={renaming}
- title={title}
- appendLabel={true}
- className="group m-1.5 mt-[3.5px] flex w-full cursor-pointer items-center gap-2 rounded p-2.5 text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600"
- />
- </DropDownMenu>
- <ArchiveButton
- className="z-50 hover:text-black dark:hover:text-white"
- conversationId={conversationId}
- retainView={retainView}
- shouldArchive={true}
- icon={<ArchiveIcon className="hover:text-gray-400" />}
+ <EndpointIcon
+ conversation={conversation}
+ endpointsConfig={endpointsConfig}
+ size={20}
+ context="menu-item"
/>
- </HoverToggle>
+ {!renaming && (
+ <div className="relative line-clamp-1 flex-1 grow overflow-hidden">{title}</div>
+ )}
+ {isActiveConvo ? (
+ <div
+ className={cn(
+ 'absolute bottom-0 right-0 top-0 w-20 rounded-r-lg bg-gradient-to-l',
+ !renaming ? 'from-gray-200 from-40% to-transparent dark:from-gray-700' : '',
+ )}
+ />
+ ) : (
+ <div className="absolute bottom-0 right-0 top-0 w-20 rounded-r-lg bg-gradient-to-l from-gray-50 from-0% to-transparent group-hover:from-gray-200 group-hover:from-40% dark:from-gray-850 dark:group-hover:from-gray-700" />
+ )}
+ </a>
)}
- <a
- href={`/c/${conversationId}`}
- data-testid="convo-item"
- onClick={clickHandler}
+ <div
className={cn(
- isActiveConvo || isPopoverActive
- ? 'group relative mt-2 flex cursor-pointer items-center gap-2 break-all rounded-lg bg-gray-200 px-2 py-2 active:opacity-50 dark:bg-gray-700'
- : 'group relative mt-2 flex grow cursor-pointer items-center gap-2 overflow-hidden whitespace-nowrap break-all rounded-lg px-2 py-2 hover:bg-gray-200 active:opacity-50 dark:hover:bg-gray-700',
- !isActiveConvo && !renaming ? 'peer-hover:bg-gray-200 dark:peer-hover:bg-gray-800' : '',
+ 'mr-2',
+ isPopoverActive || isActiveConvo ? 'flex' : 'hidden group-hover:flex',
)}
- title={title}
>
- <EndpointIcon
+ <ConvoOptions
conversation={conversation}
- endpointsConfig={endpointsConfig}
- size={20}
- context="menu-item"
+ retainView={retainView}
+ renameHandler={renameHandler}
+ isPopoverActive={isPopoverActive}
+ setIsPopoverActive={setIsPopoverActive}
+ isActiveConvo={isActiveConvo}
/>
- {!renaming && (
- <div className="relative line-clamp-1 max-h-5 flex-1 grow overflow-hidden">{title}</div>
- )}
- {isActiveConvo ? (
- <div
- className={cn(
- 'absolute bottom-0 right-0 top-0 w-20 rounded-r-lg bg-gradient-to-l',
- !renaming ? 'from-gray-200 from-60% to-transparent dark:from-gray-700' : '',
- )}
- />
- ) : (
- <div className="absolute bottom-0 right-0 top-0 w-20 rounded-r-lg bg-gradient-to-l from-gray-50 from-0% to-transparent group-hover:from-gray-200 group-hover:from-60% dark:from-gray-850 dark:group-hover:from-gray-700" />
- )}
- </a>
+ </div>
</div>
);
}
diff --git a/client/src/components/Conversations/ArchiveButton.tsx b/client/src/components/Conversations/ConvoOptions/ArchiveButton.tsx
similarity index 76%
rename from client/src/components/Conversations/ArchiveButton.tsx
rename to client/src/components/Conversations/ConvoOptions/ArchiveButton.tsx
index d35e61c914..3d6fe1dd4a 100644
--- a/client/src/components/Conversations/ArchiveButton.tsx
+++ b/client/src/components/Conversations/ConvoOptions/ArchiveButton.tsx
@@ -1,3 +1,4 @@
+import React from 'react';
import { useParams, useNavigate } from 'react-router-dom';
import type { MouseEvent, FocusEvent, KeyboardEvent } from 'react';
import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from '~/components/ui';
@@ -7,19 +8,19 @@ import { NotificationSeverity } from '~/common';
import { useToastContext } from '~/Providers';
type ArchiveButtonProps = {
+ children?: React.ReactNode;
conversationId: string;
retainView: () => void;
shouldArchive: boolean;
- icon: React.ReactNode;
+ icon?: React.ReactNode;
className?: string;
};
-export default function ArchiveButton({
- conversationId,
- retainView,
- shouldArchive,
- icon,
- className = '',
-}: ArchiveButtonProps) {
+
+export function useArchiveHandler(
+ conversationId: string,
+ shouldArchive: boolean,
+ retainView: () => void,
+) {
const localize = useLocalize();
const navigate = useNavigate();
const { showToast } = useToastContext();
@@ -29,14 +30,11 @@ export default function ArchiveButton({
const archiveConvoMutation = useArchiveConversationMutation(conversationId);
- const label = shouldArchive ? 'archive' : 'unarchive';
- const archiveHandler = (
- e:
- | MouseEvent<HTMLButtonElement>
- | FocusEvent<HTMLInputElement>
- | KeyboardEvent<HTMLInputElement>,
- ) => {
- e.preventDefault();
+ return async (e?: MouseEvent | FocusEvent | KeyboardEvent) => {
+ if (e) {
+ e.preventDefault();
+ }
+ const label = shouldArchive ? 'archive' : 'unarchive';
archiveConvoMutation.mutate(
{ conversationId, isArchived: shouldArchive },
{
@@ -58,6 +56,17 @@ export default function ArchiveButton({
},
);
};
+}
+
+export default function ArchiveButton({
+ conversationId,
+ retainView,
+ shouldArchive,
+ icon,
+ className = '',
+}: ArchiveButtonProps) {
+ const localize = useLocalize();
+ const archiveHandler = useArchiveHandler(conversationId, shouldArchive, retainView);
return (
<button type="button" className={className} onClick={archiveHandler}>
@@ -67,10 +76,12 @@ export default function ArchiveButton({
<span className="h-5 w-5">{icon}</span>
</TooltipTrigger>
<TooltipContent side="top" sideOffset={0}>
- {localize(`com_ui_${label}`)}
+ {localize(`com_ui_${shouldArchive ? 'archive' : 'unarchive'}`)}
</TooltipContent>
</Tooltip>
</TooltipProvider>
</button>
);
}
+
+export { useArchiveHandler as archiveHandler };
diff --git a/client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx b/client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx
new file mode 100644
index 0000000000..d10e6607d3
--- /dev/null
+++ b/client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx
@@ -0,0 +1,101 @@
+import { useState } from 'react';
+import { Ellipsis, Share2, Archive, Pen, Trash } from 'lucide-react';
+import { useGetStartupConfig } from 'librechat-data-provider/react-query';
+import { Button } from '~/components/ui';
+import { useArchiveHandler } from './ArchiveButton';
+import { DropdownPopup } from '~/components/ui';
+import DeleteButton from './DeleteButton';
+import ShareButton from './ShareButton';
+import { useLocalize } from '~/hooks';
+
+export default function ConvoOptions({
+ conversation,
+ retainView,
+ renameHandler,
+ isPopoverActive,
+ setIsPopoverActive,
+ isActiveConvo,
+}) {
+ const localize = useLocalize();
+ const { data: startupConfig } = useGetStartupConfig();
+ const { conversationId, title } = conversation;
+ const [showShareDialog, setShowShareDialog] = useState(false);
+ const [showDeleteDialog, setShowDeleteDialog] = useState(false);
+ const archiveHandler = useArchiveHandler(conversationId, true, retainView);
+
+ const shareHandler = () => {
+ setIsPopoverActive(false);
+ setShowShareDialog(true);
+ };
+
+ const deleteHandler = () => {
+ setIsPopoverActive(false);
+ setShowDeleteDialog(true);
+ };
+
+ const dropdownItems = [
+ {
+ label: localize('com_ui_rename'),
+ onClick: renameHandler,
+ icon: <Pen className="icon-md mr-2 text-text-secondary" />,
+ },
+ {
+ label: localize('com_ui_share'),
+ onClick: shareHandler,
+ icon: <Share2 className="icon-md mr-2 text-text-secondary" />,
+ show: startupConfig && startupConfig.sharedLinksEnabled,
+ },
+ {
+ label: localize('com_ui_archive'),
+ onClick: archiveHandler,
+ icon: <Archive className="icon-md mr-2 text-text-secondary" />,
+ },
+ {
+ label: localize('com_ui_delete'),
+ onClick: deleteHandler,
+ icon: <Trash className="icon-md mr-2 text-text-secondary" />,
+ },
+ ];
+
+ return (
+ <>
+ <DropdownPopup
+ isOpen={isPopoverActive}
+ setIsOpen={setIsPopoverActive}
+ trigger={
+ <Button
+ id="conversation-menu-button"
+ aria-label="conversation-menu-button"
+ variant="link"
+ className="z-10 h-7 w-7 border-none p-0 transition-all duration-200 ease-in-out"
+ >
+ <Ellipsis className="icon-md text-text-secondary" />
+ </Button>
+ }
+ items={dropdownItems}
+ className={`${
+ isActiveConvo === true
+ ? 'opacity-100'
+ : 'opacity-0 focus:opacity-100 group-hover:opacity-100 data-[open]:opacity-100'
+ }`}
+ />
+ {showShareDialog && (
+ <ShareButton
+ conversationId={conversationId}
+ title={title}
+ showShareDialog={showShareDialog}
+ setShowShareDialog={setShowShareDialog}
+ />
+ )}
+ {showDeleteDialog && (
+ <DeleteButton
+ conversationId={conversationId}
+ retainView={retainView}
+ title={title}
+ showDeleteDialog={showDeleteDialog}
+ setShowDeleteDialog={setShowDeleteDialog}
+ />
+ )}
+ </>
+ );
+}
diff --git a/client/src/components/Conversations/DeleteButton.tsx b/client/src/components/Conversations/ConvoOptions/DeleteButton.tsx
similarity index 50%
rename from client/src/components/Conversations/DeleteButton.tsx
rename to client/src/components/Conversations/ConvoOptions/DeleteButton.tsx
index ce39dd2bdf..73b4a5c345 100644
--- a/client/src/components/Conversations/DeleteButton.tsx
+++ b/client/src/components/Conversations/ConvoOptions/DeleteButton.tsx
@@ -1,4 +1,4 @@
-import { useCallback } from 'react';
+import React, { useCallback, useState } from 'react';
import { QueryKeys } from 'librechat-data-provider';
import { useQueryClient } from '@tanstack/react-query';
import { useParams, useNavigate } from 'react-router-dom';
@@ -14,22 +14,32 @@ import {
TooltipTrigger,
} from '~/components/ui';
import OGDialogTemplate from '~/components/ui/OGDialogTemplate';
-import { TrashIcon, CrossIcon } from '~/components/svg';
+import { TrashIcon } from '~/components/svg';
import { useLocalize, useNewConvo } from '~/hooks';
+type DeleteButtonProps = {
+ conversationId: string;
+ retainView: () => void;
+ title: string;
+ className?: string;
+ showDeleteDialog?: boolean;
+ setShowDeleteDialog?: (value: boolean) => void;
+};
+
export default function DeleteButton({
conversationId,
- renaming,
retainView,
title,
- appendLabel = false,
className = '',
-}) {
+ showDeleteDialog,
+ setShowDeleteDialog,
+}: DeleteButtonProps) {
const localize = useLocalize();
const navigate = useNavigate();
const queryClient = useQueryClient();
const { newConversation } = useNewConvo();
const { conversationId: currentConvoId } = useParams();
+ const [open, setOpen] = useState(false);
const deleteConvoMutation = useDeleteConversationMutation({
onSuccess: () => {
if (currentConvoId === conversationId || currentConvoId === 'new') {
@@ -47,57 +57,56 @@ export default function DeleteButton({
deleteConvoMutation.mutate({ conversationId, thread_id, source: 'button' });
}, [conversationId, deleteConvoMutation, queryClient]);
- const renderDeleteButton = () => {
- if (appendLabel) {
- return (
+ const dialogContent = (
+ <OGDialogTemplate
+ showCloseButton={false}
+ title={localize('com_ui_delete_conversation')}
+ className="max-w-[450px]"
+ main={
<>
- <TrashIcon /> {localize('com_ui_delete')}
+ <div className="flex w-full flex-col items-center gap-2">
+ <div className="grid w-full items-center gap-2">
+ <Label htmlFor="dialog-confirm-delete" className="text-left text-sm font-medium">
+ {localize('com_ui_delete_confirm')} <strong>{title}</strong>
+ </Label>
+ </div>
+ </div>
</>
- );
- }
+ }
+ selection={{
+ selectHandler: confirmDelete,
+ selectClasses:
+ 'bg-red-700 dark:bg-red-600 hover:bg-red-800 dark:hover:bg-red-800 text-white',
+ selectText: localize('com_ui_delete'),
+ }}
+ />
+ );
+
+ if (showDeleteDialog !== undefined && setShowDeleteDialog !== undefined) {
return (
+ <OGDialog open={showDeleteDialog} onOpenChange={setShowDeleteDialog}>
+ {dialogContent}
+ </OGDialog>
+ );
+ }
+
+ return (
+ <OGDialog open={open} onOpenChange={setOpen}>
<TooltipProvider delayDuration={250}>
<Tooltip>
- <TooltipTrigger asChild>
- <span>
- <TrashIcon className="h-5 w-5" />
- </span>
- </TooltipTrigger>
- <TooltipContent side="top" sideOffset={0}>
+ <OGDialogTrigger asChild>
+ <TooltipTrigger asChild>
+ <button>
+ <TrashIcon className="h-5 w-5" />
+ </button>
+ </TooltipTrigger>
+ </OGDialogTrigger>
+ <TooltipContent side="top" sideOffset={0} className={className}>
{localize('com_ui_delete')}
</TooltipContent>
</Tooltip>
</TooltipProvider>
- );
- };
-
- return (
- <OGDialog>
- <OGDialogTrigger asChild>
- <button className={className}>{renaming ? <CrossIcon /> : renderDeleteButton()}</button>
- </OGDialogTrigger>
- <OGDialogTemplate
- showCloseButton={false}
- title={localize('com_ui_delete_conversation')}
- className="max-w-[450px]"
- main={
- <>
- <div className="flex w-full flex-col items-center gap-2">
- <div className="grid w-full items-center gap-2">
- <Label htmlFor="dialog-confirm-delete" className="text-left text-sm font-medium">
- {localize('com_ui_delete_confirm')} <strong>{title}</strong>
- </Label>
- </div>
- </div>
- </>
- }
- selection={{
- selectHandler: confirmDelete,
- selectClasses:
- 'bg-red-700 dark:bg-red-600 hover:bg-red-800 dark:hover:bg-red-800 text-white',
- selectText: localize('com_ui_delete'),
- }}
- />
+ {dialogContent}
</OGDialog>
);
}
diff --git a/client/src/components/Conversations/ConvoOptions/ShareButton.tsx b/client/src/components/Conversations/ConvoOptions/ShareButton.tsx
new file mode 100644
index 0000000000..2bf5c91f6c
--- /dev/null
+++ b/client/src/components/Conversations/ConvoOptions/ShareButton.tsx
@@ -0,0 +1,100 @@
+import React, { useState, useEffect } from 'react';
+import { OGDialog } from '~/components/ui';
+import { useToastContext } from '~/Providers';
+import type { TSharedLink } from 'librechat-data-provider';
+import { useCreateSharedLinkMutation } from '~/data-provider';
+import OGDialogTemplate from '~/components/ui/OGDialogTemplate';
+import SharedLinkButton from './SharedLinkButton';
+import { NotificationSeverity } from '~/common';
+import { Spinner } from '~/components/svg';
+import { useLocalize } from '~/hooks';
+
+export default function ShareButton({
+ conversationId,
+ title,
+ showShareDialog,
+ setShowShareDialog,
+}: {
+ conversationId: string;
+ title: string;
+ showShareDialog: boolean;
+ setShowShareDialog: (value: boolean) => void;
+}) {
+ const localize = useLocalize();
+ const { showToast } = useToastContext();
+ const { mutate, isLoading } = useCreateSharedLinkMutation();
+ const [share, setShare] = useState<TSharedLink | null>(null);
+ const [isUpdated, setIsUpdated] = useState(false);
+ const [isNewSharedLink, setIsNewSharedLink] = useState(false);
+
+ useEffect(() => {
+ if (isLoading || share) {
+ return;
+ }
+ const data = {
+ conversationId,
+ title,
+ isAnonymous: true,
+ };
+
+ mutate(data, {
+ onSuccess: (result) => {
+ setShare(result);
+ setIsNewSharedLink(!result.isPublic);
+ },
+ onError: () => {
+ showToast({
+ message: localize('com_ui_share_error'),
+ severity: NotificationSeverity.ERROR,
+ showIcon: true,
+ });
+ },
+ });
+
+ // mutation.mutate should only be called once
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
+ const buttons = share && (
+ <SharedLinkButton
+ share={share}
+ conversationId={conversationId}
+ setShare={setShare}
+ isUpdated={isUpdated}
+ setIsUpdated={setIsUpdated}
+ />
+ );
+
+ return (
+ <OGDialog open={showShareDialog} onOpenChange={setShowShareDialog}>
+ <OGDialogTemplate
+ buttons={buttons}
+ showCloseButton={true}
+ showCancelButton={false}
+ title={localize('com_ui_share_link_to_chat')}
+ className="max-w-[550px]"
+ main={
+ <div>
+ <div className="h-full py-2 text-gray-400 dark:text-gray-200">
+ {(() => {
+ if (isLoading) {
+ return <Spinner className="m-auto h-14 animate-spin" />;
+ }
+
+ if (isUpdated) {
+ return isNewSharedLink
+ ? localize('com_ui_share_created_message')
+ : localize('com_ui_share_updated_message');
+ }
+
+ return share?.isPublic
+ ? localize('com_ui_share_update_message')
+ : localize('com_ui_share_create_message');
+ })()}
+ </div>
+ </div>
+ }
+ />
+ </OGDialog>
+ );
+}
diff --git a/client/src/components/Conversations/SharedLinkButton.tsx b/client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx
similarity index 100%
rename from client/src/components/Conversations/SharedLinkButton.tsx
rename to client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx
diff --git a/client/src/components/Conversations/ConvoOptions/index.ts b/client/src/components/Conversations/ConvoOptions/index.ts
new file mode 100644
index 0000000000..6f8794d063
--- /dev/null
+++ b/client/src/components/Conversations/ConvoOptions/index.ts
@@ -0,0 +1,5 @@
+export { default as ArchiveButton } from './ArchiveButton';
+export { default as DeleteButton } from './DeleteButton';
+export { default as ShareButton } from './ShareButton';
+export { default as SharedLinkButton } from './SharedLinkButton';
+export { default as ConvoOptions } from './ConvoOptions';
diff --git a/client/src/components/Conversations/RenameButton.tsx b/client/src/components/Conversations/RenameButton.tsx
deleted file mode 100644
index 327a793303..0000000000
--- a/client/src/components/Conversations/RenameButton.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import type { MouseEvent, ReactElement } from 'react';
-import { EditIcon, CheckMark } from '~/components/svg';
-import { useLocalize } from '~/hooks';
-import { cn } from '~/utils';
-
-interface RenameButtonProps {
- renaming: boolean;
- renameHandler: (e: MouseEvent<HTMLButtonElement>) => void;
- onRename?: (e: MouseEvent<HTMLButtonElement>) => void;
- appendLabel?: boolean;
- className?: string;
- disabled?: boolean;
-}
-
-export default function RenameButton({
- renaming,
- onRename,
- renameHandler,
- className = '',
- disabled = false,
- appendLabel = false,
-}: RenameButtonProps): ReactElement {
- const localize = useLocalize();
- const handler = renaming ? onRename : renameHandler;
-
- return (
- <button
- className={cn(
- 'group m-1.5 flex w-full cursor-pointer items-center gap-2 rounded p-2.5 text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600',
- className,
- )}
- disabled={disabled}
- onClick={handler}
- >
- {renaming ? (
- <CheckMark />
- ) : appendLabel ? (
- <>
- <EditIcon /> {localize('com_ui_rename')}
- </>
- ) : (
- <EditIcon />
- )}
- </button>
- );
-}
diff --git a/client/src/components/Conversations/ShareButton.tsx b/client/src/components/Conversations/ShareButton.tsx
deleted file mode 100644
index 450c348701..0000000000
--- a/client/src/components/Conversations/ShareButton.tsx
+++ /dev/null
@@ -1,113 +0,0 @@
-import { useState } from 'react';
-import {
- OGDialog,
- Tooltip,
- OGDialogTrigger,
- TooltipContent,
- TooltipTrigger,
- TooltipProvider,
-} from '~/components/ui';
-import { Share2Icon } from 'lucide-react';
-import type { TSharedLink } from 'librechat-data-provider';
-import OGDialogTemplate from '~/components/ui/OGDialogTemplate';
-import SharedLinkButton from './SharedLinkButton';
-import ShareDialog from './ShareDialog';
-import { useLocalize } from '~/hooks';
-import { cn } from '~/utils';
-
-export default function ShareButton({
- conversationId,
- title,
- className,
- appendLabel = false,
- setPopoverActive,
-}: {
- conversationId: string;
- title: string;
- className?: string;
- appendLabel?: boolean;
- setPopoverActive: (isActive: boolean) => void;
-}) {
- const localize = useLocalize();
- const [share, setShare] = useState<TSharedLink | null>(null);
- const [open, setOpen] = useState(false);
- const [isUpdated, setIsUpdated] = useState(false);
-
- const classProp: { className?: string } = {
- className: 'p-1 hover:text-black dark:hover:text-white',
- };
- if (className) {
- classProp.className = className;
- }
- const renderShareButton = () => {
- if (appendLabel) {
- return (
- <>
- <Share2Icon className="h-4 w-4" /> {localize('com_ui_share')}
- </>
- );
- }
- return (
- <TooltipProvider delayDuration={250}>
- <Tooltip>
- <TooltipTrigger asChild>
- <span>
- <Share2Icon />
- </span>
- </TooltipTrigger>
- <TooltipContent side="top" sideOffset={0}>
- {localize('com_ui_share')}
- </TooltipContent>
- </Tooltip>
- </TooltipProvider>
- );
- };
-
- const buttons = share && (
- <SharedLinkButton
- share={share}
- conversationId={conversationId}
- setShare={setShare}
- isUpdated={isUpdated}
- setIsUpdated={setIsUpdated}
- />
- );
-
- const onOpenChange = (open: boolean) => {
- setPopoverActive(open);
- setOpen(open);
- };
- return (
- <OGDialog open={open} onOpenChange={onOpenChange}>
- <OGDialogTrigger asChild>
- <button
- className={cn(
- 'group m-1.5 flex w-full cursor-pointer items-center gap-2 rounded p-2.5 text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600',
- className,
- )}
- >
- {renderShareButton()}
- </button>
- </OGDialogTrigger>
- <OGDialogTemplate
- buttons={buttons}
- showCloseButton={true}
- showCancelButton={false}
- title={localize('com_ui_share_link_to_chat')}
- className="max-w-[550px]"
- main={
- <>
- <ShareDialog
- setDialogOpen={setOpen}
- conversationId={conversationId}
- title={title}
- share={share}
- setShare={setShare}
- isUpdated={isUpdated}
- />
- </>
- }
- />
- </OGDialog>
- );
-}
diff --git a/client/src/components/Conversations/ShareDialog.tsx b/client/src/components/Conversations/ShareDialog.tsx
deleted file mode 100644
index 094e53c322..0000000000
--- a/client/src/components/Conversations/ShareDialog.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import { useLocalize } from '~/hooks';
-
-import { useCreateSharedLinkMutation } from '~/data-provider';
-import { useEffect, useState } from 'react';
-import { TSharedLink } from 'librechat-data-provider';
-import { useToastContext } from '~/Providers';
-import { NotificationSeverity } from '~/common';
-import { Spinner } from '~/components/svg';
-
-export default function ShareDialog({
- conversationId,
- title,
- share,
- setShare,
- setDialogOpen,
- isUpdated,
-}: {
- conversationId: string;
- title: string;
- share: TSharedLink | null;
- setShare: (share: TSharedLink | null) => void;
- setDialogOpen: (open: boolean) => void;
- isUpdated: boolean;
-}) {
- const localize = useLocalize();
- const { showToast } = useToastContext();
- const { mutate, isLoading } = useCreateSharedLinkMutation();
- const [isNewSharedLink, setIsNewSharedLink] = useState(false);
-
- useEffect(() => {
- if (isLoading || share) {
- return;
- }
- const data = {
- conversationId,
- title,
- isAnonymous: true,
- };
-
- mutate(data, {
- onSuccess: (result) => {
- setShare(result);
- setIsNewSharedLink(!result.isPublic);
- },
- onError: () => {
- showToast({
- message: localize('com_ui_share_error'),
- severity: NotificationSeverity.ERROR,
- showIcon: true,
- });
- setDialogOpen(false);
- },
- });
-
- // mutation.mutate should only be called once
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
- return (
- <div>
- <div className="h-full py-2 text-gray-400 dark:text-gray-200">
- {(() => {
- if (isLoading) {
- return <Spinner className="m-auto h-14 animate-spin" />;
- }
-
- if (isUpdated) {
- return isNewSharedLink
- ? localize('com_ui_share_created_message')
- : localize('com_ui_share_updated_message');
- }
-
- return share?.isPublic
- ? localize('com_ui_share_update_message')
- : localize('com_ui_share_create_message');
- })()}
- </div>
- </div>
- );
-}
diff --git a/client/src/components/Conversations/index.ts b/client/src/components/Conversations/index.ts
index 1e68c0bae3..a3665e37ef 100644
--- a/client/src/components/Conversations/index.ts
+++ b/client/src/components/Conversations/index.ts
@@ -1,4 +1,4 @@
export { default as Fork } from './Fork';
export { default as Pages } from './Pages';
-export { default as RenameButton } from './RenameButton';
export { default as Conversations } from './Conversations';
+export * from './ConvoOptions';
diff --git a/client/src/components/Nav/Bookmarks/BookmarkNav.tsx b/client/src/components/Nav/Bookmarks/BookmarkNav.tsx
index d82affc61f..8e65245d5b 100644
--- a/client/src/components/Nav/Bookmarks/BookmarkNav.tsx
+++ b/client/src/components/Nav/Bookmarks/BookmarkNav.tsx
@@ -1,8 +1,8 @@
-import { useState, type FC } from 'react';
+import { type FC } from 'react';
import { useRecoilValue } from 'recoil';
import { useLocation } from 'react-router-dom';
import { TConversation } from 'librechat-data-provider';
-import { Content, Portal, Root, Trigger } from '@radix-ui/react-popover';
+import { Menu, MenuButton, MenuItems } from '@headlessui/react';
import { BookmarkFilledIcon, BookmarkIcon } from '@radix-ui/react-icons';
import { BookmarkContext } from '~/Providers/BookmarkContext';
import { useGetConversationTags } from '~/data-provider';
@@ -25,8 +25,6 @@ const BookmarkNav: FC<BookmarkNavProps> = ({ tags, setTags }: BookmarkNavProps)
const activeConvo = useRecoilValue(store.conversationByIndex(0));
const globalConvo = useRecoilValue(store.conversation) ?? ({} as TConversation);
- const [open, setIsOpen] = useState(false);
-
let conversation: TConversation | null | undefined;
if (location.state?.from?.pathname.includes('/chat')) {
conversation = globalConvo;
@@ -35,38 +33,29 @@ const BookmarkNav: FC<BookmarkNavProps> = ({ tags, setTags }: BookmarkNavProps)
}
return (
- <Root open={open} onOpenChange={setIsOpen}>
- <Trigger asChild>
- <button
- className={cn(
- 'relative mt-1 flex h-10 w-full cursor-pointer items-center gap-1 rounded-lg border-border-light bg-transparent px-1 py-2 text-text-primary transition-colors duration-200 focus-within:bg-surface-hover hover:bg-surface-hover',
- open ? 'bg-surface-hover' : '',
- )}
- id="show-bookmarks"
- data-testid="show-bookmarks"
- title={localize('com_ui_bookmarks')}
- >
- <div className="relative flex h-8 w-8 items-center justify-center rounded-full p-1 text-text-primary">
- {tags.length > 0 ? (
- <BookmarkFilledIcon className="h-5 w-5" />
- ) : (
- <BookmarkIcon className="h-5 w-5" />
+ <Menu as="div" className="group relative">
+ {({ open }) => (
+ <>
+ <MenuButton
+ className={cn(
+ 'mt-text-sm flex h-10 w-full items-center gap-2 rounded-lg p-2 text-sm transition-colors duration-200 hover:bg-surface-hover',
+ open ? 'bg-surface-hover' : '',
)}
- </div>
- <div className="grow overflow-hidden whitespace-nowrap text-left text-sm text-text-primary">
- {tags.length > 0 ? tags.join(', ') : localize('com_ui_bookmarks')}
- </div>
- </button>
- </Trigger>
- <Portal>
- <div className="fixed left-0 top-0 z-auto translate-x-[268px] translate-y-[50px]">
- <Content
- side="bottom"
- align="start"
- className="mt-2 max-h-96 min-w-[240px] overflow-y-auto rounded-lg border border-border-medium bg-surface-primary-alt text-text-primary shadow-lg lg:max-h-96"
+ data-testid="bookmark-menu"
>
+ <div className="relative flex h-8 w-8 items-center justify-center rounded-full p-1 text-text-primary">
+ {tags.length > 0 ? (
+ <BookmarkFilledIcon className="h-5 w-5" />
+ ) : (
+ <BookmarkIcon className="h-5 w-5" />
+ )}
+ </div>
+ <div className="grow overflow-hidden whitespace-nowrap text-left text-sm text-text-primary">
+ {tags.length > 0 ? tags.join(', ') : localize('com_ui_bookmarks')}
+ </div>
+ </MenuButton>
+ <MenuItems className="absolute left-0 top-full z-[100] mt-1 w-full translate-y-0 overflow-hidden rounded-lg bg-header-primary p-1.5 shadow-lg outline-none">
{data && conversation && (
- // Display bookmarks and highlight the selected tag
<BookmarkContext.Provider value={{ bookmarks: data.filter((tag) => tag.count > 0) }}>
<BookmarkNavItems
// Currently selected conversation
@@ -78,10 +67,10 @@ const BookmarkNav: FC<BookmarkNavProps> = ({ tags, setTags }: BookmarkNavProps)
/>
</BookmarkContext.Provider>
)}
- </Content>
- </div>
- </Portal>
- </Root>
+ </MenuItems>
+ </>
+ )}
+ </Menu>
);
};
diff --git a/client/src/components/Nav/Bookmarks/BookmarkNavItems.tsx b/client/src/components/Nav/Bookmarks/BookmarkNavItems.tsx
index 4d0c6485b2..62444904f3 100644
--- a/client/src/components/Nav/Bookmarks/BookmarkNavItems.tsx
+++ b/client/src/components/Nav/Bookmarks/BookmarkNavItems.tsx
@@ -43,9 +43,8 @@ const BookmarkNavItems: FC<{
return (
<div className="flex flex-col">
<BookmarkItem
- ctx="nav"
tag={localize('com_ui_no_bookmarks')}
- data-testid="bookmark-item-clear"
+ data-testid="bookmark-item-no-bookmarks"
handleSubmit={() => Promise.resolve()}
selected={false}
icon={'🤔'}
@@ -57,18 +56,15 @@ const BookmarkNavItems: FC<{
return (
<div className="flex flex-col">
<BookmarkItems
- ctx="nav"
tags={tags}
handleSubmit={handleSubmit}
- highlightSelected={true}
header={
<BookmarkItem
- ctx="nav"
- tag="Clear all"
+ tag={localize('com_ui_clear_all')}
data-testid="bookmark-item-clear"
handleSubmit={clear}
selected={false}
- icon={<CrossCircledIcon className="h-4 w-4" />}
+ icon={<CrossCircledIcon className="size-4" />}
/>
}
/>
diff --git a/client/src/components/Nav/ExportConversation/ExportModal.tsx b/client/src/components/Nav/ExportConversation/ExportModal.tsx
index 7cb7c28aba..27c4db2a6e 100644
--- a/client/src/components/Nav/ExportConversation/ExportModal.tsx
+++ b/client/src/components/Nav/ExportConversation/ExportModal.tsx
@@ -1,9 +1,9 @@
import filenamify from 'filenamify';
import { useEffect, useState } from 'react';
import type { TConversation } from 'librechat-data-provider';
-import { Dialog, DialogButton, Input, Label, Checkbox, Dropdown } from '~/components/ui';
+import { OGDialog, Button, Input, Label, Checkbox, Dropdown } from '~/components/ui';
+import OGDialogTemplate from '~/components/ui/OGDialogTemplate';
import { useLocalize, useExportConversation } from '~/hooks';
-import DialogTemplate from '~/components/ui/DialogTemplate';
import { cn, defaultTextProps } from '~/utils';
export default function ExportModal({
@@ -62,8 +62,8 @@ export default function ExportModal({
});
return (
- <Dialog open={open} onOpenChange={onOpenChange}>
- <DialogTemplate
+ <OGDialog open={open} onOpenChange={onOpenChange}>
+ <OGDialogTemplate
title={localize('com_nav_export_conversation')}
className="max-w-full sm:max-w-2xl"
main={
@@ -164,16 +164,13 @@ export default function ExportModal({
}
buttons={
<>
- <DialogButton
- onClick={exportConversation}
- className="dark:hover:gray-400 border-gray-700 bg-green-500 text-white hover:bg-green-600 dark:hover:bg-green-600"
- >
+ <Button onClick={exportConversation} variant="success">
{localize('com_endpoint_export')}
- </DialogButton>
+ </Button>
</>
}
selection={undefined}
/>
- </Dialog>
+ </OGDialog>
);
}
diff --git a/client/src/components/Nav/Nav.tsx b/client/src/components/Nav/Nav.tsx
index ec15e681a3..95bfcaae6c 100644
--- a/client/src/components/Nav/Nav.tsx
+++ b/client/src/components/Nav/Nav.tsx
@@ -24,7 +24,13 @@ import NewChat from './NewChat';
import { cn } from '~/utils';
import store from '~/store';
-const Nav = ({ navVisible, setNavVisible }) => {
+const Nav = ({
+ navVisible,
+ setNavVisible,
+}: {
+ navVisible: boolean;
+ setNavVisible: React.Dispatch<React.SetStateAction<boolean>>;
+}) => {
const localize = useLocalize();
const { conversationId } = useParams();
const { isAuthenticated } = useAuthContext();
@@ -80,7 +86,9 @@ const Nav = ({ navVisible, setNavVisible }) => {
setShowLoading,
hasNextPage: searchQuery ? searchQueryRes?.hasNextPage : hasNextPage,
fetchNextPage: searchQuery ? searchQueryRes?.fetchNextPage : fetchNextPage,
- isFetchingNextPage: searchQuery ? searchQueryRes?.isFetchingNextPage : isFetchingNextPage,
+ isFetchingNextPage: searchQuery
+ ? searchQueryRes?.isFetchingNextPage ?? false
+ : isFetchingNextPage,
});
const conversations = useMemo(
@@ -155,24 +163,37 @@ const Nav = ({ navVisible, setNavVisible }) => {
onMouseLeave={handleMouseLeave}
ref={containerRef}
>
- <NewChat
- toggleNav={itemToggleNav}
- subHeaders={
- <>
- {isSearchEnabled && <SearchBar clearSearch={clearSearch} />}
- <BookmarkNav tags={tags} setTags={setTags} />
- </>
- }
- />
+ {isSmallScreen == true ? (
+ <div className="pt-3.5">
+ {isSearchEnabled === true && (
+ <SearchBar clearSearch={clearSearch} isSmallScreen={isSmallScreen} />
+ )}
+ <BookmarkNav tags={tags} setTags={setTags} />
+ </div>
+ ) : (
+ <NewChat
+ toggleNav={itemToggleNav}
+ subHeaders={
+ <>
+ {isSearchEnabled === true && (
+ <SearchBar
+ clearSearch={clearSearch}
+ isSmallScreen={isSmallScreen}
+ />
+ )}
+ <BookmarkNav tags={tags} setTags={setTags} />
+ </>
+ }
+ />
+ )}
+
<Conversations
conversations={conversations}
moveToTop={moveToTop}
toggleNav={itemToggleNav}
/>
{(isFetchingNextPage || showLoading) && (
- <Spinner
- className={cn('m-1 mx-auto mb-4 h-4 w-4 text-black dark:text-white')}
- />
+ <Spinner className={cn('m-1 mx-auto mb-4 h-4 w-4 text-text-primary')} />
)}
</div>
<NavLinks />
diff --git a/client/src/components/Nav/NavLinks.tsx b/client/src/components/Nav/NavLinks.tsx
index 6ae3826a60..c7d16a238c 100644
--- a/client/src/components/Nav/NavLinks.tsx
+++ b/client/src/components/Nav/NavLinks.tsx
@@ -54,7 +54,7 @@ function NavLinks() {
<UserIcon />
</div>
) : (
- <img className="rounded-full" src={user?.avatar || avatarSrc} alt="avatar" />
+ <img className="rounded-full" src={user.avatar || avatarSrc} alt="avatar" />
)}
</div>
</div>
@@ -68,7 +68,7 @@ function NavLinks() {
<Transition
as={Fragment}
- enter="transition ease-out duration-110 transform"
+ enter="transition ease-out duration-100 transform"
enterFrom="translate-y-2 opacity-0"
enterTo="translate-y-0 opacity-100"
leave="transition ease-in duration-100 transform"
diff --git a/client/src/components/Nav/NewChat.tsx b/client/src/components/Nav/NewChat.tsx
index 737e01e69a..f9e476b16b 100644
--- a/client/src/components/Nav/NewChat.tsx
+++ b/client/src/components/Nav/NewChat.tsx
@@ -82,14 +82,14 @@ export default function NewChat({
return (
<TooltipProvider delayDuration={250}>
<Tooltip>
- <div className="sticky left-0 right-0 top-0 z-20 bg-gray-50 pt-3.5 dark:bg-gray-850">
+ <div className="sticky left-0 right-0 top-0 z-20 bg-surface-primary-alt pt-3.5">
<div className="pb-0.5 last:pb-0" style={{ transform: 'none' }}>
<a
href="/"
tabIndex={0}
data-testid="nav-new-chat"
onClick={clickHandler}
- className="group flex h-10 items-center gap-2 rounded-lg px-2 font-medium hover:bg-gray-200 dark:hover:bg-gray-700"
+ className="group flex h-10 items-center gap-2 rounded-lg px-2 font-medium transition-colors duration-200 hover:bg-surface-hover"
aria-label={localize('com_ui_new_chat')}
>
<NewChatButtonIcon conversation={conversation} />
@@ -104,7 +104,7 @@ export default function NewChat({
aria-label="nav-new-chat-btn"
className="text-token-text-primary"
>
- <NewChatIcon className="h-[18px] w-[18px]" />
+ <NewChatIcon className="size-5" />
</button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={20}>
diff --git a/client/src/components/Nav/SearchBar.tsx b/client/src/components/Nav/SearchBar.tsx
index 27ff860936..143c9818fa 100644
--- a/client/src/components/Nav/SearchBar.tsx
+++ b/client/src/components/Nav/SearchBar.tsx
@@ -10,10 +10,11 @@ import store from '~/store';
type SearchBarProps = {
clearSearch: () => void;
+ isSmallScreen?: boolean;
};
const SearchBar = forwardRef((props: SearchBarProps, ref: Ref<HTMLDivElement>) => {
- const { clearSearch } = props;
+ const { clearSearch, isSmallScreen } = props;
const queryClient = useQueryClient();
const clearConvoState = store.useClearConvoState();
const setSearchQuery = useSetRecoilState(store.searchQuery);
@@ -58,7 +59,10 @@ const SearchBar = forwardRef((props: SearchBarProps, ref: Ref<HTMLDivElement>) =
return (
<div
ref={ref}
- className="relative mt-1 flex h-10 cursor-pointer items-center gap-3 rounded-lg border-border-medium px-3 py-2 text-text-primary transition-colors duration-200 focus-within:bg-surface-hover hover:bg-surface-hover dark:focus-within:bg-surface-hover"
+ className={cn(
+ 'relative mt-1 flex h-10 cursor-pointer items-center gap-3 rounded-lg border-border-medium px-3 py-2 text-text-primary transition-colors duration-200 focus-within:bg-surface-hover hover:bg-surface-hover dark:focus-within:bg-surface-hover',
+ isSmallScreen === true ? 'h-16 rounded-2xl' : '',
+ )}
>
{<Search className="absolute left-3 h-4 w-4" />}
<input
@@ -77,8 +81,9 @@ const SearchBar = forwardRef((props: SearchBarProps, ref: Ref<HTMLDivElement>) =
/>
<X
className={cn(
- 'absolute right-[7px] h-5 w-5 cursor-pointer transition-opacity duration-1000',
+ 'absolute right-[7px] h-5 w-5 cursor-pointer transition-opacity duration-200',
showClearIcon ? 'opacity-100' : 'opacity-0',
+ isSmallScreen === true ? 'right-[16px]' : '',
)}
onClick={clearText}
/>
diff --git a/client/src/components/Nav/Settings.tsx b/client/src/components/Nav/Settings.tsx
index f69fb3b7da..fc3f27ed02 100644
--- a/client/src/components/Nav/Settings.tsx
+++ b/client/src/components/Nav/Settings.tsx
@@ -94,7 +94,7 @@ export default function Settings({ open, onOpenChange }: TDialogProps) {
<Tabs.Trigger
tabIndex={0}
className={cn(
- 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-primary',
+ 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-active',
isSmallScreen
? 'flex-1 items-center justify-center text-nowrap p-1 px-3 text-sm text-text-secondary'
: 'bg-surface-tertiary-alt',
@@ -108,7 +108,7 @@ export default function Settings({ open, onOpenChange }: TDialogProps) {
<Tabs.Trigger
tabIndex={0}
className={cn(
- 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-primary',
+ 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-active',
isSmallScreen
? 'flex-1 items-center justify-center text-nowrap p-1 px-3 text-sm text-text-secondary'
: 'bg-surface-tertiary-alt',
@@ -122,7 +122,7 @@ export default function Settings({ open, onOpenChange }: TDialogProps) {
<Tabs.Trigger
tabIndex={0}
className={cn(
- 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-primary',
+ 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-active',
isSmallScreen
? 'flex-1 items-center justify-center text-nowrap p-1 px-3 text-sm text-text-secondary'
: 'bg-surface-tertiary-alt',
@@ -136,7 +136,7 @@ export default function Settings({ open, onOpenChange }: TDialogProps) {
<Tabs.Trigger
tabIndex={0}
className={cn(
- 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-primary',
+ 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-active',
isSmallScreen
? 'flex-1 items-center justify-center text-nowrap text-sm text-text-secondary'
: 'bg-surface-tertiary-alt',
@@ -150,7 +150,7 @@ export default function Settings({ open, onOpenChange }: TDialogProps) {
<Tabs.Trigger
tabIndex={0}
className={cn(
- 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-primary',
+ 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-active',
isSmallScreen
? 'flex-1 items-center justify-center text-nowrap p-1 px-3 text-sm text-text-secondary'
: 'bg-surface-tertiary-alt',
@@ -164,7 +164,7 @@ export default function Settings({ open, onOpenChange }: TDialogProps) {
<Tabs.Trigger
tabIndex={0}
className={cn(
- 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-primary',
+ 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-active',
isSmallScreen
? 'flex-1 items-center justify-center text-nowrap p-1 px-3 text-sm text-text-secondary'
: 'bg-surface-tertiary-alt',
@@ -178,7 +178,7 @@ export default function Settings({ open, onOpenChange }: TDialogProps) {
<Tabs.Trigger
tabIndex={0}
className={cn(
- 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-primary',
+ 'group m-1 flex items-center justify-start gap-2 rounded-md px-2 py-1.5 text-sm text-text-primary transition-all duration-200 ease-in-out radix-state-active:bg-surface-tertiary radix-state-active:text-text-primary dark:radix-state-active:bg-surface-active',
isSmallScreen
? 'flex-1 items-center justify-center text-nowrap p-1 px-3 text-sm text-text-secondary'
: 'bg-surface-tertiary-alt',
diff --git a/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx b/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx
index 1234cd70c9..0c257a26b3 100644
--- a/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx
+++ b/client/src/components/Nav/SettingsTabs/General/ArchivedChats.tsx
@@ -1,6 +1,6 @@
import { useLocalize } from '~/hooks';
-import DialogTemplate from '~/components/ui/DialogTemplate';
-import { Dialog, DialogTrigger } from '~/components/ui';
+import OGDialogTemplate from '~/components/ui/OGDialogTemplate';
+import { OGDialog, OGDialogTrigger } from '~/components/ui';
import ArchivedChatsTable from './ArchivedChatsTable';
@@ -10,19 +10,19 @@ export default function ArchivedChats() {
return (
<div className="flex items-center justify-between">
<div>{localize('com_nav_archived_chats')}</div>
- <Dialog>
- <DialogTrigger asChild>
+ <OGDialog>
+ <OGDialogTrigger asChild>
<button className="btn btn-neutral relative ">
{localize('com_nav_archived_chats_manage')}
</button>
- </DialogTrigger>
- <DialogTemplate
+ </OGDialogTrigger>
+ <OGDialogTemplate
title={localize('com_nav_archived_chats')}
className="max-w-[1000px]"
showCancelButton={false}
main={<ArchivedChatsTable />}
/>
- </Dialog>
+ </OGDialog>
</div>
);
}
diff --git a/client/src/components/Nav/SettingsTabs/General/ArchivedChatsTable.tsx b/client/src/components/Nav/SettingsTabs/General/ArchivedChatsTable.tsx
index 4425cd203e..205326f151 100644
--- a/client/src/components/Nav/SettingsTabs/General/ArchivedChatsTable.tsx
+++ b/client/src/components/Nav/SettingsTabs/General/ArchivedChatsTable.tsx
@@ -2,8 +2,8 @@ import { useMemo, useState } from 'react';
import { MessageCircle, ArchiveRestore } from 'lucide-react';
import { useConversationsInfiniteQuery } from '~/data-provider';
import { useAuthContext, useLocalize, useNavScrolling } from '~/hooks';
-import ArchiveButton from '~/components/Conversations/ArchiveButton';
-import DeleteButton from '~/components/Conversations/DeleteButton';
+import ArchiveButton from '~/components/Conversations/ConvoOptions/ArchiveButton';
+import DeleteButton from '~/components/Conversations/ConvoOptions/DeleteButton';
import { Spinner } from '~/components/svg';
import { cn } from '~/utils';
import { ConversationListResponse } from 'librechat-data-provider';
@@ -90,10 +90,7 @@ export default function ArchivedChatsTable({ className }: { className?: string }
<DeleteButton
conversationId={conversation.conversationId}
retainView={moveToTop}
- renaming={false}
- title={conversation.title}
- appendLabel={false}
- className="group ml-4 flex w-full cursor-pointer items-center items-center gap-2 rounded text-sm hover:bg-gray-200 focus-visible:bg-gray-200 focus-visible:outline-0 radix-disabled:pointer-events-none radix-disabled:opacity-50 dark:hover:bg-gray-600 dark:focus-visible:bg-gray-600"
+ title={conversation.title ?? ''}
/>
</div>
</>
diff --git a/client/src/components/Prompts/Groups/FilterPrompts.tsx b/client/src/components/Prompts/Groups/FilterPrompts.tsx
index 81b79d7d39..e19e9a3f75 100644
--- a/client/src/components/Prompts/Groups/FilterPrompts.tsx
+++ b/client/src/components/Prompts/Groups/FilterPrompts.tsx
@@ -152,7 +152,7 @@ export default function FilterPrompts({
setDisplayName(e.target.value);
setName(e.target.value);
}}
- className="max-w-xs border-border-light focus:bg-surface-tertiary"
+ className="w-full border-border-light"
/>
</div>
);
diff --git a/client/src/components/Prompts/Groups/PanelNavigation.tsx b/client/src/components/Prompts/Groups/PanelNavigation.tsx
index 5d20e7f464..39df43f160 100644
--- a/client/src/components/Prompts/Groups/PanelNavigation.tsx
+++ b/client/src/components/Prompts/Groups/PanelNavigation.tsx
@@ -24,10 +24,15 @@ function PanelNavigation({
{!isChatRoute && <ThemeSelector returnThemeOnly={true} />}
</div>
<div className="mb-2 flex gap-2">
- <Button variant="outline" onClick={() => prevPage()} disabled={!hasPreviousPage}>
+ <Button variant="outline" size="sm" onClick={() => prevPage()} disabled={!hasPreviousPage}>
{localize('com_ui_prev')}
</Button>
- <Button variant="outline" onClick={() => nextPage()} disabled={!hasNextPage || isFetching}>
+ <Button
+ variant="outline"
+ size="sm"
+ onClick={() => nextPage()}
+ disabled={!hasNextPage || isFetching}
+ >
{localize('com_ui_next')}
</Button>
</div>
diff --git a/client/src/components/SidePanel/Bookmarks/BookmarkPanel.tsx b/client/src/components/SidePanel/Bookmarks/BookmarkPanel.tsx
index 0eedf04e79..dc48aa20e1 100644
--- a/client/src/components/SidePanel/Bookmarks/BookmarkPanel.tsx
+++ b/client/src/components/SidePanel/Bookmarks/BookmarkPanel.tsx
@@ -1,3 +1,4 @@
+import { useState } from 'react';
import { BookmarkPlusIcon } from 'lucide-react';
import { useConversationTagsQuery } from '~/data-provider';
import { Button } from '~/components/ui';
@@ -9,20 +10,18 @@ import { useLocalize } from '~/hooks';
const BookmarkPanel = () => {
const localize = useLocalize();
const { data } = useConversationTagsQuery();
+ const [open, setOpen] = useState(false);
return (
<div className="h-auto max-w-full overflow-x-hidden">
<BookmarkContext.Provider value={{ bookmarks: data || [] }}>
<BookmarkTable />
<div className="flex justify-between gap-2">
- <BookmarkEditDialog
- trigger={
- <Button variant="outline" className="w-full text-sm">
- <BookmarkPlusIcon className="mr-1 size-4" />
- <div className="break-all">{localize('com_ui_bookmarks_new')}</div>
- </Button>
- }
- />
+ <BookmarkEditDialog open={open} setOpen={setOpen} />
+ <Button variant="outline" className="w-full text-sm" onClick={() => setOpen(!open)}>
+ <BookmarkPlusIcon className="mr-1 size-4" />
+ <div className="break-all">{localize('com_ui_bookmarks_new')}</div>
+ </Button>
</div>
</BookmarkContext.Provider>
</div>
diff --git a/client/src/components/SidePanel/Bookmarks/BookmarkTable.tsx b/client/src/components/SidePanel/Bookmarks/BookmarkTable.tsx
index d85d64829b..1ca5569800 100644
--- a/client/src/components/SidePanel/Bookmarks/BookmarkTable.tsx
+++ b/client/src/components/SidePanel/Bookmarks/BookmarkTable.tsx
@@ -16,7 +16,7 @@ const BookmarkTable = () => {
useEffect(() => {
setRows(
bookmarks
- ?.map((item) => ({ id: item.tag, ...item }))
+ .map((item) => ({ id: item.tag, ...item }))
.sort((a, b) => a.position - b.position) || [],
);
}, [bookmarks]);
@@ -50,7 +50,7 @@ const BookmarkTable = () => {
placeholder={localize('com_ui_bookmarks_filter')}
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
- className="w-full dark:border-gray-700"
+ className="w-full border-border-light"
/>
</div>
<div className="overflow-y-auto rounded-md border border-black/10 dark:border-white/10">
diff --git a/client/src/components/SidePanel/Files/PanelTable.tsx b/client/src/components/SidePanel/Files/PanelTable.tsx
index 69f025a74d..3b6c5ddd8f 100644
--- a/client/src/components/SidePanel/Files/PanelTable.tsx
+++ b/client/src/components/SidePanel/Files/PanelTable.tsx
@@ -77,7 +77,7 @@ export default function DataTable<TData, TValue>({ columns, data }: DataTablePro
placeholder={localize('com_files_filter')}
value={(table.getColumn('filename')?.getFilterValue() as string) ?? ''}
onChange={(event) => table.getColumn('filename')?.setFilterValue(event.target.value)}
- className="w-full dark:border-gray-700"
+ className="w-full border-border-light"
/>
</div>
<div className="overflow-y-auto rounded-md border border-black/10 dark:border-white/10">
diff --git a/client/src/components/SidePanel/Nav.tsx b/client/src/components/SidePanel/Nav.tsx
index 226c29a681..2bcd3aded9 100644
--- a/client/src/components/SidePanel/Nav.tsx
+++ b/client/src/components/SidePanel/Nav.tsx
@@ -84,7 +84,7 @@ export default function Nav({ links, isCollapsed, resize, defaultActive }: NavPr
variant === 'default'
? 'dark:bg-muted dark:hover:bg-muted dark:text-white dark:hover:text-white'
: '',
- 'hover:bg-gray-50 data-[state=open]:bg-gray-50 data-[state=open]:text-black dark:hover:bg-gray-700 dark:data-[state=open]:bg-gray-700 dark:data-[state=open]:text-white',
+ 'hover:bg-gray-200 data-[state=open]:bg-gray-200 data-[state=open]:text-black dark:hover:bg-gray-700 dark:data-[state=open]:bg-gray-700 dark:data-[state=open]:text-white',
'w-full justify-start rounded-md border dark:border-gray-700',
)}
onClick={(e) => {
diff --git a/client/src/components/ui/Button.tsx b/client/src/components/ui/Button.tsx
index 6854f4c72c..a48e650292 100644
--- a/client/src/components/ui/Button.tsx
+++ b/client/src/components/ui/Button.tsx
@@ -3,26 +3,50 @@ import { VariantProps, cva } from 'class-variance-authority';
import { cn } from '~/utils';
const buttonVariants = cva(
- 'rounded-md inline-flex items-center justify-center text-sm font-medium transition-colors dark:hover:bg-gray-700 dark:hover:text-gray-100 disabled:opacity-50 disabled:pointer-events-none data-[state=open]:bg-gray-100 dark:data-[state=open]:bg-gray-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-500',
+ 'rounded-md inline-flex items-center justify-center text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none',
{
variants: {
variant: {
- default: 'bg-gray-850 text-white hover:bg-gray-800 dark:bg-gray-50 dark:text-gray-900',
- destructive: 'bg-red-500 text-white hover:bg-red-600 dark:hover:bg-red-600',
+ default:
+ 'bg-gray-600 text-white hover:bg-gray-800 dark:bg-gray-200 dark:text-gray-900 dark:hover:bg-gray-300',
+ destructive: 'bg-red-600 text-white hover:bg-red-700 dark:bg-red-600 dark:hover:bg-red-700',
outline:
- 'bg-transparent border border-gray-200 hover:bg-gray-100 dark:border-gray-700 dark:text-gray-100',
- subtle: 'bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100',
+ 'bg-transparent border border-gray-200 text-gray-700 hover:bg-gray-200 dark:border-gray-700 dark:text-gray-100 dark:hover:bg-gray-700',
+ subtle:
+ 'bg-gray-100 text-gray-900 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600',
ghost:
- 'bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 dark:text-gray-100 dark:hover:text-gray-100 data-[state=open]:bg-transparent dark:data-[state=open]:bg-transparent',
- link: 'bg-transparent underline-offset-4 hover:underline text-gray-900 dark:text-gray-100 hover:bg-transparent dark:hover:bg-transparent',
+ 'bg-transparent text-gray-900 hover:bg-gray-100 dark:text-gray-100 dark:hover:bg-gray-800 data-[state=open]:bg-transparent',
+ link: 'bg-transparent underline-offset-4 hover:underline text-gray-600 dark:text-gray-400 hover:bg-transparent dark:hover:bg-transparent',
+ success:
+ 'bg-green-500 text-white hover:bg-green-700 dark:bg-green-500 dark:hover:bg-green-700',
+ warning:
+ 'bg-yellow-500 text-white hover:bg-yellow-600 dark:bg-yellow-600 dark:hover:bg-yellow-700',
+ info: 'bg-blue-500 text-white hover:bg-blue-600 dark:bg-blue-600 dark:hover:bg-blue-700',
},
size: {
default: 'h-10 py-2 px-4',
- sm: 'h-9 px-2 rounded-md',
- lg: 'h-11 px-8 rounded-md',
+ sm: 'h-8 px-3 rounded',
+ lg: 'h-12 px-6 rounded-md',
+ xl: 'h-14 px-8 rounded-lg text-base',
icon: 'h-10 w-10',
},
+ fullWidth: {
+ true: 'w-full',
+ },
+ loading: {
+ true: 'opacity-80 pointer-events-none',
+ },
},
+ compoundVariants: [
+ {
+ variant: ['default', 'destructive', 'success', 'warning', 'info'],
+ className: 'focus-visible:ring-white focus-visible:ring-offset-2',
+ },
+ {
+ variant: 'outline',
+ className: 'focus-visible:ring-gray-400 dark:focus-visible:ring-gray-500',
+ },
+ ],
defaultVariants: {
variant: 'default',
size: 'default',
@@ -32,17 +56,63 @@ const buttonVariants = cva(
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
- VariantProps<typeof buttonVariants> {}
+ VariantProps<typeof buttonVariants> {
+ loading?: boolean;
+ leftIcon?: React.ReactNode;
+ rightIcon?: React.ReactNode;
+}
const Button = React.forwardRef<HTMLButtonElement, ButtonProps & { customId?: string }>(
- ({ className, variant, size, customId, ...props }, ref) => {
+ (
+ {
+ className,
+ variant,
+ size,
+ fullWidth,
+ loading,
+ leftIcon,
+ rightIcon,
+ children,
+ customId,
+ ...props
+ },
+ ref,
+ ) => {
return (
<button
- className={cn(buttonVariants({ variant, size, className }))}
+ className={cn(buttonVariants({ variant, size, fullWidth, loading, className }))}
ref={ref}
{...props}
id={customId ?? props.id ?? 'shadcn-button'}
- />
+ disabled={props.disabled || loading}
+ aria-busy={loading}
+ >
+ {loading && (
+ <svg
+ className="-ml-1 mr-3 h-5 w-5 animate-spin text-current"
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 24 24"
+ >
+ <circle
+ className="opacity-25"
+ cx="12"
+ cy="12"
+ r="10"
+ stroke="currentColor"
+ strokeWidth="4"
+ ></circle>
+ <path
+ className="opacity-75"
+ fill="currentColor"
+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
+ ></path>
+ </svg>
+ )}
+ {leftIcon && <span className="mr-2">{leftIcon}</span>}
+ {children}
+ {rightIcon && <span className="ml-2">{rightIcon}</span>}
+ </button>
);
},
);
diff --git a/client/src/components/ui/DropdownPopup.tsx b/client/src/components/ui/DropdownPopup.tsx
new file mode 100644
index 0000000000..e8aa63ba4c
--- /dev/null
+++ b/client/src/components/ui/DropdownPopup.tsx
@@ -0,0 +1,100 @@
+import React from 'react';
+import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react';
+
+interface DropdownProps {
+ trigger: React.ReactNode;
+ items: {
+ label?: string;
+ onClick?: () => void;
+ icon?: React.ReactNode;
+ kbd?: string;
+ show?: boolean;
+ disabled?: boolean;
+ separate?: boolean;
+ }[];
+ isOpen: boolean;
+ setIsOpen: (isOpen: boolean) => void;
+ className?: string;
+ anchor?: string;
+}
+
+const DropdownPopup: React.FC<DropdownProps> = ({
+ trigger,
+ items,
+ isOpen,
+ setIsOpen,
+ className,
+ anchor = { x: 'bottom', y: 'start' },
+}) => {
+ const handleButtonClick = () => {
+ setIsOpen(!isOpen);
+ };
+
+ return (
+ <Menu>
+ {({ open }) => (
+ <>
+ <MenuButton
+ onClick={handleButtonClick}
+ className={`inline-flex items-center gap-2 rounded-md ${className}`}
+ >
+ {trigger}
+ </MenuButton>
+ <Transition
+ show={open}
+ enter="transition-opacity duration-150"
+ enterFrom="opacity-0"
+ enterTo="opacity-100"
+ leave="transition-opacity duration-150"
+ leaveFrom="opacity-100"
+ leaveTo="opacity-0"
+ afterLeave={() => setIsOpen(false)}
+ >
+ <div className={`${isOpen ? 'visible' : 'invisible'}`}>
+ {open && (
+ <MenuItems
+ static
+ // @ts-ignore
+ anchor={anchor}
+ className="mt-2 overflow-hidden rounded-lg bg-header-primary p-1.5 shadow-lg outline-none focus-visible:ring-2 focus-visible:ring-ring-primary"
+ >
+ <div>
+ {items
+ .filter((item) => item.show !== false)
+ .map((item, index) =>
+ item.separate ? (
+ <div key={index} className="my-1 h-px bg-white/10" />
+ ) : (
+ <MenuItem key={index}>
+ <button
+ onClick={item.onClick}
+ className="group flex w-full gap-2 rounded-lg p-2.5 text-sm text-text-primary transition-colors duration-200 data-[focus]:bg-surface-hover"
+ disabled={item.disabled}
+ >
+ {item.icon && (
+ <span className="mr-2 h-5 w-5" aria-hidden="true">
+ {item.icon}
+ </span>
+ )}
+ {item.label}
+ {item.kbd && (
+ <kbd className="ml-auto hidden font-sans text-xs text-black/50 group-data-[focus]:inline dark:text-white/50">
+ ⌘{item.kbd}
+ </kbd>
+ )}
+ </button>
+ </MenuItem>
+ ),
+ )}
+ </div>
+ </MenuItems>
+ )}
+ </div>
+ </Transition>
+ </>
+ )}
+ </Menu>
+ );
+};
+
+export default DropdownPopup;
diff --git a/client/src/components/ui/Slider.tsx b/client/src/components/ui/Slider.tsx
index 75baaf9acc..c944a93a71 100644
--- a/client/src/components/ui/Slider.tsx
+++ b/client/src/components/ui/Slider.tsx
@@ -15,8 +15,8 @@ const Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, S
className={cn('relative flex w-full touch-none select-none items-center', className ?? '')}
{...props}
>
- <SliderPrimitive.Track className="relative h-1 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-gray-800">
- <SliderPrimitive.Range className="absolute h-full bg-gray-400 dark:bg-gray-400" />
+ <SliderPrimitive.Track className="relative h-1 w-full grow overflow-hidden rounded-full bg-gray-200 dark:bg-gray-850">
+ <SliderPrimitive.Range className="absolute h-full bg-gray-850 dark:bg-white" />
</SliderPrimitive.Track>
<SliderPrimitive.Thumb
onClick={
@@ -25,7 +25,7 @@ const Slider = React.forwardRef<React.ElementRef<typeof SliderPrimitive.Root>, S
return;
})
}
- className="block h-4 w-4 cursor-pointer rounded-full border-2 border-gray-400 bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:border-gray-200 dark:bg-gray-400 dark:focus:ring-gray-400 dark:focus:ring-offset-gray-800"
+ className="block h-4 w-4 cursor-pointer rounded-full border border-border-medium-alt bg-white shadow ring-ring-primary transition-colors focus-visible:ring-1 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50 dark:border-none"
/>
</SliderPrimitive.Root>
),
diff --git a/client/src/components/ui/index.ts b/client/src/components/ui/index.ts
index 85466663f9..c5a8b3f99f 100644
--- a/client/src/components/ui/index.ts
+++ b/client/src/components/ui/index.ts
@@ -31,3 +31,4 @@ export { default as SelectDropDown } from './SelectDropDown';
export { default as MultiSelectPop } from './MultiSelectPop';
export { default as SelectDropDownPop } from './SelectDropDownPop';
export { default as MultiSelectDropDown } from './MultiSelectDropDown';
+export { default as DropdownPopup } from './DropdownPopup';
diff --git a/client/src/data-provider/mutations.ts b/client/src/data-provider/mutations.ts
index c45dc2793c..b0f0c1e6f8 100644
--- a/client/src/data-provider/mutations.ts
+++ b/client/src/data-provider/mutations.ts
@@ -570,7 +570,7 @@ export const useUploadFileMutation = (
return {
...prev,
- data: prev?.data.map((assistant) => {
+ data: prev.data.map((assistant) => {
if (assistant.id !== assistant_id) {
return assistant;
}
@@ -817,7 +817,7 @@ export const useUpdateAssistantMutation = (
({ assistant_id, data }: { assistant_id: string; data: t.AssistantUpdateParams }) => {
const { endpoint } = data;
const endpointsConfig = queryClient.getQueryData<t.TEndpointsConfig>([QueryKeys.endpoints]);
- const version = endpointsConfig?.[endpoint]?.version ?? defaultAssistantsVersion[endpoint];
+ const version = endpointsConfig?.[endpoint].version ?? defaultAssistantsVersion[endpoint];
return dataService.updateAssistant({
data,
version,
@@ -1020,7 +1020,7 @@ export const useDeleteAction = (
return {
...prev,
- data: prev?.data.map((assistant) => {
+ data: prev.data.map((assistant) => {
if (assistant.id === variables.assistant_id) {
return {
...assistant,
diff --git a/client/src/hooks/Chat/useChatFunctions.ts b/client/src/hooks/Chat/useChatFunctions.ts
index fd9ef09832..f4e9d18970 100644
--- a/client/src/hooks/Chat/useChatFunctions.ts
+++ b/client/src/hooks/Chat/useChatFunctions.ts
@@ -123,7 +123,7 @@ export default function useChatFunctions({
conversationId = null;
}
- const parentMessage = currentMessages?.find(
+ const parentMessage = currentMessages.find(
(msg) => msg.messageId === latestMessage?.parentMessageId,
);
diff --git a/client/src/hooks/Conversations/useSearch.ts b/client/src/hooks/Conversations/useSearch.ts
index 60980b2ab6..5bcefd429c 100644
--- a/client/src/hooks/Conversations/useSearch.ts
+++ b/client/src/hooks/Conversations/useSearch.ts
@@ -2,6 +2,8 @@ import { useEffect, useState, useCallback } from 'react';
import { useRecoilValue, useSetRecoilState } from 'recoil';
import { useNavigate, useLocation } from 'react-router-dom';
import { useGetSearchEnabledQuery } from 'librechat-data-provider/react-query';
+import type { UseInfiniteQueryResult } from '@tanstack/react-query';
+import type { ConversationListResponse } from 'librechat-data-provider';
import { useSearchInfiniteQuery } from '~/data-provider';
import useConversation from './useConversation';
import store from '~/store';
@@ -19,7 +21,7 @@ export default function useSearchMessages({ isAuthenticated }: { isAuthenticated
const searchQueryRes = useSearchInfiniteQuery(
{ pageNumber: pageNumber.toString(), searchQuery: searchQuery, isArchived: false },
{ enabled: isAuthenticated && !!searchQuery.length },
- );
+ ) as UseInfiniteQueryResult<ConversationListResponse, unknown> | undefined;
useEffect(() => {
if (searchQuery && searchQuery.length > 0) {
@@ -36,7 +38,7 @@ export default function useSearchMessages({ isAuthenticated }: { isAuthenticated
}, [navigate, searchQuery]);
useEffect(() => {
- if (searchEnabledQuery.data) {
+ if (searchEnabledQuery.data === true) {
setIsSearchEnabled(searchEnabledQuery.data);
} else if (searchEnabledQuery.isError) {
console.error('Failed to get search enabled', searchEnabledQuery.error);
@@ -55,10 +57,10 @@ export default function useSearchMessages({ isAuthenticated }: { isAuthenticated
useEffect(() => {
//we use isInitialLoading here instead of isLoading because query is disabled by default
- if (searchQueryRes.data) {
+ if (searchQueryRes?.data) {
onSearchSuccess();
}
- }, [searchQueryRes.data, searchQueryRes.isInitialLoading, onSearchSuccess]);
+ }, [searchQueryRes?.data, searchQueryRes?.isInitialLoading, onSearchSuccess]);
return {
pageNumber,
diff --git a/client/src/hooks/Messages/useSubmitMessage.ts b/client/src/hooks/Messages/useSubmitMessage.ts
index 551b0ec170..a5adf0f304 100644
--- a/client/src/hooks/Messages/useSubmitMessage.ts
+++ b/client/src/hooks/Messages/useSubmitMessage.ts
@@ -31,7 +31,7 @@ export default function useSubmitMessage(helpers?: { clearDraft?: () => void })
}
const rootMessages = getMessages();
const isLatestInRootMessages = rootMessages?.some(
- (message) => message?.messageId === latestMessage?.messageId,
+ (message) => message.messageId === latestMessage?.messageId,
);
if (!isLatestInRootMessages && latestMessage) {
setMessages([...(rootMessages || []), latestMessage]);
@@ -86,7 +86,7 @@ export default function useSubmitMessage(helpers?: { clearDraft?: () => void })
}
const currentText = methods.getValues('text');
- const newText = currentText?.trim()?.length > 1 ? `\n${parsedText}` : parsedText;
+ const newText = currentText.trim().length > 1 ? `\n${parsedText}` : parsedText;
setActivePrompt(newText);
},
[autoSendPrompts, submitMessage, setActivePrompt, methods, user],
diff --git a/client/src/hooks/Nav/useNavScrolling.ts b/client/src/hooks/Nav/useNavScrolling.ts
index 78c075c5eb..f32154cb08 100644
--- a/client/src/hooks/Nav/useNavScrolling.ts
+++ b/client/src/hooks/Nav/useNavScrolling.ts
@@ -11,16 +11,18 @@ export default function useNavScrolling<TData>({
hasNextPage?: boolean;
isFetchingNextPage: boolean;
setShowLoading: React.Dispatch<React.SetStateAction<boolean>>;
- fetchNextPage: (
- options?: FetchNextPageOptions | undefined,
- ) => Promise<InfiniteQueryObserverResult<TData, unknown>>;
+ fetchNextPage:
+ | ((
+ options?: FetchNextPageOptions | undefined,
+ ) => Promise<InfiniteQueryObserverResult<TData, unknown>>)
+ | undefined;
}) {
const scrollPositionRef = useRef<number | null>(null);
const containerRef = useRef<HTMLDivElement | null>(null);
// eslint-disable-next-line react-hooks/exhaustive-deps
const fetchNext = useCallback(
- throttle(() => fetchNextPage(), 750, { leading: true }),
+ throttle(() => (fetchNextPage != null ? fetchNextPage() : () => ({})), 750, { leading: true }),
[fetchNextPage],
);
@@ -29,7 +31,7 @@ export default function useNavScrolling<TData>({
const { scrollTop, clientHeight, scrollHeight } = containerRef.current;
const nearBottomOfList = scrollTop + clientHeight >= scrollHeight * 0.97;
- if (nearBottomOfList && hasNextPage && !isFetchingNextPage) {
+ if (nearBottomOfList && hasNextPage === true && !isFetchingNextPage) {
setShowLoading(true);
fetchNext();
} else {
diff --git a/client/src/localization/languages/Eng.ts b/client/src/localization/languages/Eng.ts
index f4a900f628..e24908ecd6 100644
--- a/client/src/localization/languages/Eng.ts
+++ b/client/src/localization/languages/Eng.ts
@@ -310,6 +310,7 @@ export default {
com_ui_bookmarks_add_to_conversation: 'Add to current conversation',
com_ui_bookmarks_filter: 'Filter bookmarks...',
com_ui_no_bookmarks: 'it seems like you have no bookmarks yet. Click on a chat and add a new one',
+ com_ui_no_conversation_id: 'No conversation ID found',
com_auth_error_login:
'Unable to login with the information provided. Please check your credentials and try again.',
com_auth_error_login_rl:
@@ -591,6 +592,7 @@ export default {
com_ui_drag_drop_file: 'Drag and drop a file here',
com_ui_upload_image: 'Upload an image',
com_ui_select_a_category: 'No category selected',
+ com_ui_clear_all: 'Clear all',
com_nav_tool_dialog_description: 'Assistant must be saved to persist tool selections.',
com_show_agent_settings: 'Show Agent Settings',
com_show_completion_settings: 'Show Completion Settings',
diff --git a/client/src/routes/Root.tsx b/client/src/routes/Root.tsx
index 4f810885ac..25722b3f7e 100644
--- a/client/src/routes/Root.tsx
+++ b/client/src/routes/Root.tsx
@@ -8,7 +8,7 @@ import { Nav, MobileNav } from '~/components/Nav';
export default function Root() {
const { isAuthenticated } = useAuthContext();
- const [navVisible, setNavVisible] = useState(() => {
+ const [navVisible, setNavVisible] = useState<boolean>(() => {
const savedNavVisible = localStorage.getItem('navVisible');
return savedNavVisible !== null ? JSON.parse(savedNavVisible) : true;
});
diff --git a/client/src/store/settings.ts b/client/src/store/settings.ts
index 7e57f54639..01d62c4ba9 100644
--- a/client/src/store/settings.ts
+++ b/client/src/store/settings.ts
@@ -28,7 +28,7 @@ const localStorageAtoms = {
enterToSend: atomWithLocalStorage('enterToSend', true),
chatDirection: atomWithLocalStorage('chatDirection', 'LTR'),
showCode: atomWithLocalStorage('showCode', false),
- saveDrafts: atomWithLocalStorage('saveDrafts', false),
+ saveDrafts: atomWithLocalStorage('saveDrafts', true),
forkSetting: atomWithLocalStorage('forkSetting', ''),
splitAtTarget: atomWithLocalStorage('splitAtTarget', false),
diff --git a/client/src/style.css b/client/src/style.css
index 30c87361cd..b0d97bc77e 100644
--- a/client/src/style.css
+++ b/client/src/style.css
@@ -4,8 +4,8 @@
/* Custom Variables */
:root {
- --white:#fff;
- --black:#000;
+ --white: #fff;
+ --black: #000;
--gray-20: #ececf1;
--gray-50: #f7f7f8;
--gray-100: #ececec;
@@ -18,9 +18,9 @@
--gray-800: #212121;
--gray-850: #171717;
--gray-900: #0d0d0d;
- --gizmo-gray-500:#999;
- --gizmo-gray-600:#666;
- --gizmo-gray-950:#0f0f0f;
+ --gizmo-gray-500: #999;
+ --gizmo-gray-600: #666;
+ --gizmo-gray-950: #0f0f0f;
--font-size-xs: 0.75rem;
--font-size-sm: 0.875rem;
--font-size-base: 1rem;
@@ -28,154 +28,155 @@
--font-size-xl: 1.25rem;
}
html {
- --text-primary:var(--gray-800);
- --text-secondary:var(--gray-600);
- --text-secondary-alt:var(--gray-500);
- --text-tertiary:var(--gray-500);
- --ring-primary:var(--gray-500);
- --header-primary:var(--white);
- --header-hover:var(--gray-50);
- --header-button-hover:var(--gray-50);
- --surface-active:var(--gray-100);
- --surface-hover:var(--gray-200);
- --surface-primary:var(--white);
- --surface-primary-alt:var(--white);
- --surface-primary-contrast:var(--gray-100);
- --surface-secondary:var(--gray-50);
- --surface-tertiary:var(--gray-100);
- --surface-tertiary-alt:var(--white);
- --border-light:var(--gray-100);
- --border-medium-alt:var(--gray-300);
- --border-medium:var(--gray-200);
- --border-heavy:var(--gray-300);
- --border-xheavy:var(--gray-400)
+ --text-primary: var(--gray-800);
+ --text-secondary: var(--gray-600);
+ --text-secondary-alt: var(--gray-500);
+ --text-tertiary: var(--gray-500);
+ --ring-primary: var(--gray-500);
+ --header-primary: var(--white);
+ --header-hover: var(--gray-50);
+ --header-button-hover: var(--gray-50);
+ --surface-active: var(--gray-100);
+ --surface-hover: var(--gray-200);
+ --surface-primary: var(--white);
+ --surface-primary-alt: var(--gray-50);
+ --surface-primary-contrast: var(--gray-100);
+ --surface-secondary: var(--gray-50);
+ --surface-tertiary: var(--gray-100);
+ --surface-tertiary-alt: var(--white);
+ --border-light: var(--gray-200);
+ --border-medium-alt: var(--gray-300);
+ --border-medium: var(--gray-300);
+ --border-heavy: var(--gray-400);
+ --border-xheavy: var(--gray-500);
}
.dark {
- --text-primary:var(--gray-100);
- --text-secondary:var(--gray-300);
- --text-secondary-alt:var(--gray-400);
- --text-tertiary:var(--gray-500);
- --header-primary:var(--gray-700);
- --header-hover:var(--gray-600);
- --header-button-hover:var(--gray-700);
- --surface-active:var(--gray-600);
- --surface-hover:var(--gray-700);
- --surface-primary:var(--gray-900);
- --surface-primary-alt:var(--gray-850);
- --surface-primary-contrast:var(--gray-850);
- --surface-secondary:var(--gray-800);
- --surface-tertiary:var(--gray-700);
- --surface-tertiary-alt:var(--gray-700);
- --border-light:var(--gray-700);
- --border-medium-alt:var(--gray-600);
- --border-medium:var(--gray-600);
- --border-heavy:var(--gray-500);
- --border-xheavy:var(--gray-400)
+ --text-primary: var(--gray-100);
+ --text-secondary: var(--gray-300);
+ --text-secondary-alt: var(--gray-400);
+ --text-tertiary: var(--gray-500);
+ --header-primary: var(--gray-700);
+ --header-hover: var(--gray-600);
+ --header-button-hover: var(--gray-700);
+ --surface-active: var(--gray-500);
+ --surface-hover: var(--gray-600);
+ --surface-primary: var(--gray-900);
+ --surface-primary-alt: var(--gray-850);
+ --surface-primary-contrast: var(--gray-850);
+ --surface-secondary: var(--gray-800);
+ --surface-tertiary: var(--gray-700);
+ --surface-tertiary-alt: var(--gray-700);
+ --border-light: var(--gray-700);
+ --border-medium-alt: var(--gray-600);
+ --border-medium: var(--gray-600);
+ --border-heavy: var(--gray-500);
+ --border-xheavy: var(--gray-400);
}
.gizmo {
- --text-primary:var(--gizmo-gray-950);
- --text-secondary:var(--gizmo-gray-600);
- --text-tertiary:var(--gizmo-gray-500);
- --surface-primary:var(--white);
- --surface-secondary:var(--gray-50);
- --surface-tertiary:var(--gray-100);
- --border-light:rgba(0,0,0,.1);
- --border-medium:rgba(0,0,0,.15);
- --border-heavy:rgba(0,0,0,.2);
- --border-xheavy:rgba(0,0,0,.25)
+ --text-primary: var(--gizmo-gray-950);
+ --text-secondary: var(--gizmo-gray-600);
+ --text-tertiary: var(--gizmo-gray-500);
+ --surface-primary: var(--white);
+ --surface-secondary: var(--gray-50);
+ --surface-tertiary: var(--gray-100);
+ --border-light: rgba(0, 0, 0, 0.1);
+ --border-medium: rgba(0, 0, 0, 0.15);
+ --border-heavy: rgba(0, 0, 0, 0.2);
+ --border-xheavy: rgba(0, 0, 0, 0.25);
}
.gizmo.dark {
- --text-primary:var(--gray-100);
- --text-secondary:var(--gray-300);
- --text-tertiary:var(--gizmo-gray-500);
- --surface-primary:var(--gray-900);
- --surface-secondary:var(--gray-800);
- --surface-tertiary:var(--gray-700);
- --border-light:rgba(217,217,227,.1);
- --border-medium:rgba(217,217,227,.15);
- --border-heavy:rgba(217,217,227,.2);
- --border-xheavy:rgba(217,217,227,.25)
+ --text-primary: var(--gray-100);
+ --text-secondary: var(--gray-300);
+ --text-tertiary: var(--gizmo-gray-500);
+ --surface-primary: var(--gray-900);
+ --surface-secondary: var(--gray-800);
+ --surface-tertiary: var(--gray-700);
+ --border-light: rgba(217, 217, 227, 0.1);
+ --border-medium: rgba(217, 217, 227, 0.15);
+ --border-heavy: rgba(217, 217, 227, 0.2);
+ --border-xheavy: rgba(217, 217, 227, 0.25);
}
.text-token-text-primary {
- color:#171717;
- color:var(--text-primary)
+ color: #171717;
+ color: var(--text-primary);
}
.text-token-text-secondary {
- color:#565869;
- color:var(--text-secondary)
+ color: #565869;
+ color: var(--text-secondary);
}
.text-token-text-tertiary {
- color:#8e8ea0;
- color:var(--text-tertiary)
+ color: #8e8ea0;
+ color: var(--text-tertiary);
}
.icon-xs {
- stroke-width:1.5;
- height:.75rem;
- width:.75rem
+ stroke-width: 1.5;
+ height: 0.75rem;
+ width: 0.75rem;
}
.icon-sm {
- stroke-width:2;
- height:1rem;
- width:1rem
+ stroke-width: 2;
+ height: 1rem;
+ width: 1rem;
}
-.icon-md, .icon-md-heavy {
- stroke-width:1.5;
- height:1.125rem;
- width:1.125rem
+.icon-md,
+.icon-md-heavy {
+ stroke-width: 1.5;
+ height: 1.125rem;
+ width: 1.125rem;
}
.icon-md-heavy {
stroke-width: 2.5;
}
.icon-lg {
- stroke-width:1.5;
- height:1.5rem;
- width:1.5rem
+ stroke-width: 1.5;
+ height: 1.5rem;
+ width: 1.5rem;
}
.icon-xl {
- stroke-width:1.5;
- height:1.75rem;
- width:1.75rem
+ stroke-width: 1.5;
+ height: 1.75rem;
+ width: 1.75rem;
}
.icon-2xl {
- stroke-width:1.5;
- height:2rem;
- width:2rem
+ stroke-width: 1.5;
+ height: 2rem;
+ width: 2rem;
}
.icon-cover {
- stroke-width:1.5;
- height:234px;
- width:234px
+ stroke-width: 1.5;
+ height: 234px;
+ width: 234px;
}
.border-token-border-heavy {
border-color: #c5c5d2;
- border-color: var(--border-heavy)
+ border-color: var(--border-heavy);
}
.border-token-border-light {
border-color: #ececf1;
- border-color: var(--border-light)
+ border-color: var(--border-light);
}
.border-token-border-medium {
border-color: #d9d9e3;
- border-color: var(--border-medium)
+ border-color: var(--border-medium);
}
.border-token-surface-primary {
border-color: #fff;
- border-color: var(--surface-primary)
+ border-color: var(--surface-primary);
}
.border-token-surface-secondary {
- border-color: var(--surface-secondary)
+ border-color: var(--surface-secondary);
}
.border-token-surface-tertiary {
border-color: #ececf1;
- border-color: var(--surface-tertiary)
+ border-color: var(--surface-tertiary);
}
.bg-token-surface-secondary {
@@ -199,7 +200,7 @@ html {
font-family: Inter;
font-style: normal;
font-weight: 400;
- src: url("$fonts/Inter-Regular.woff2") format("woff2");
+ src: url('$fonts/Inter-Regular.woff2') format('woff2');
size-adjust: 94%;
}
@@ -208,7 +209,7 @@ html {
font-family: Inter;
font-style: italic;
font-weight: 400;
- src: url("$fonts/Inter-Italic.woff2") format("woff2");
+ src: url('$fonts/Inter-Italic.woff2') format('woff2');
size-adjust: 94%;
}
@@ -217,7 +218,7 @@ html {
font-family: Inter;
font-style: normal;
font-weight: 500;
- src: url("$fonts/Inter-SemiBold.woff2") format("woff2");
+ src: url('$fonts/Inter-SemiBold.woff2') format('woff2');
size-adjust: 94%;
}
@@ -226,7 +227,7 @@ html {
font-family: Inter;
font-style: italic;
font-weight: 500;
- src: url("$fonts/Inter-SemiBoldItalic.woff2") format("woff2");
+ src: url('$fonts/Inter-SemiBoldItalic.woff2') format('woff2');
size-adjust: 94%;
}
@@ -235,7 +236,7 @@ html {
font-family: Inter;
font-style: normal;
font-weight: 600;
- src: url("$fonts/Inter-Bold.woff2") format("woff2");
+ src: url('$fonts/Inter-Bold.woff2') format('woff2');
size-adjust: 94%;
}
@@ -244,7 +245,7 @@ html {
font-family: Inter;
font-style: italic;
font-weight: 600;
- src: url("$fonts/Inter-BoldItalic.woff2") format("woff2");
+ src: url('$fonts/Inter-BoldItalic.woff2') format('woff2');
size-adjust: 94%;
}
@@ -253,7 +254,7 @@ html {
font-family: Roboto Mono;
font-style: normal;
font-weight: 400;
- src: url("$fonts/roboto-mono-latin-400-normal.woff2") format("woff2")
+ src: url('$fonts/roboto-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
@@ -261,7 +262,7 @@ html {
font-family: Roboto Mono;
font-style: normal;
font-weight: 700;
- src: url("$fonts/roboto-mono-latin-700-normal.woff2") format("woff2")
+ src: url('$fonts/roboto-mono-latin-700-normal.woff2') format('woff2');
}
@font-face {
@@ -269,7 +270,7 @@ html {
font-family: Roboto Mono;
font-style: italic;
font-weight: 400;
- src: url("$fonts/roboto-mono-latin-400-italic.woff2") format("woff2")
+ src: url('$fonts/roboto-mono-latin-400-italic.woff2') format('woff2');
}
/*
@@ -403,7 +404,7 @@ select {
-webkit-appearance: none;
appearance: none;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%238e8ea0' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
- background-position: right .5rem center;
+ background-position: right 0.5rem center;
background-repeat: no-repeat;
background-size: 1.5em 1.5em;
padding-right: 2.5rem;
@@ -471,19 +472,19 @@ select {
.creative-tab {
/* background: linear-gradient(90deg, #904887 10.79%, #8B257E 87.08%); */
- background: linear-gradient(90deg, #904887 10.79%, #8B257E 87.08%);
+ background: linear-gradient(90deg, #904887 10.79%, #8b257e 87.08%);
}
.fast-tab {
- background: linear-gradient(90deg, #2870EA 10.79%, #1B4AEF 87.08%);
+ background: linear-gradient(90deg, #2870ea 10.79%, #1b4aef 87.08%);
}
.balanced-tab {
- background: linear-gradient(90deg, #D7871A 10.79%, #9F6005 87.08%);
+ background: linear-gradient(90deg, #d7871a 10.79%, #9f6005 87.08%);
}
.precise-tab {
- background: linear-gradient(90deg, #006880 10.79%, #005366 87.08%)
+ background: linear-gradient(90deg, #006880 10.79%, #005366 87.08%);
}
p > small {
@@ -505,12 +506,31 @@ p > small {
}
@keyframes fadein {
- from { opacity: 0; transform: translateY(-20px); }
- to { opacity: 1; transform: translateY(0); }
+ from {
+ opacity: 0;
+ transform: translateY(-20px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
}
-blockquote, dd, dl, fieldset, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {
- margin: 0;
+blockquote,
+dd,
+dl,
+fieldset,
+figure,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+hr,
+p,
+pre {
+ margin: 0;
}
.scroll-down-enter {
@@ -589,409 +609,408 @@ blockquote, dd, dl, fieldset, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {
color: var(--tw-prose-body);
max-width: 65ch;
font-size: var(--markdown-font-size, var(--font-size-base));
- line-height: calc(28px * var(--markdown-font-size, var(--font-size-base)) / var(--font-size-base));
-}
-
- .prose :where([class~=lead]):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-lead);
- font-size:1.25em;
- line-height:1.6;
- margin-bottom:1.2em;
- margin-top:1.2em
- }
- .prose :where(a):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-links);
- font-weight:500;
- text-decoration:underline
- }
- .prose :where(strong):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-bold);
- font-weight:600
- }
- .prose :where(a strong):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(blockquote strong):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(thead th strong):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(ul):not(:where([class~=not-prose] *)) {
- list-style-type:disc;
- margin-bottom:0.1em;
- margin-top:0.1em;
- padding-left:1.625em
- }
- .prose :where(ul>li):not(:where([class~=not-prose] *))::marker {
- color:var(--tw-prose-bullets)
- }
- .prose :where(hr):not(:where([class~=not-prose] *)) {
- border-color:var(--tw-prose-hr);
- border-top-width:1px;
- margin-bottom:3em;
- margin-top:3em
- }
- .prose :where(blockquote):not(:where([class~=not-prose] *)) {
- border-left-color:var(--tw-prose-quote-borders);
- border-left-width:.25rem;
- color:var(--tw-prose-quotes);
- font-style:italic;
- font-style:normal;
- font-weight:500;
- margin-bottom:1.6em;
- margin-top:1.6em;
- padding-left:1em;
- quotes:"\201C""\201D""\2018""\2019"
- }
- .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose] *)):before {
- content:open-quote
- }
- .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose] *)):after {
- content:close-quote
- }
- .prose :where(h1):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-headings);
- font-size:2.25em;
- font-weight:800;
- line-height:1.1111111;
- margin-bottom:.8888889em;
- margin-top:0
- }
- .prose :where(h1 strong):not(:where([class~=not-prose] *)) {
- color:inherit;
- font-weight:900
- }
- .prose :where(h2):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-headings);
- font-size:1.5em;
- font-weight:700;
- line-height:1.3333333;
- margin-bottom:1em;
- margin-top:2em
- }
- .prose :where(h2 strong):not(:where([class~=not-prose] *)) {
- color:inherit;
- font-weight:800
- }
- .prose :where(h3):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-headings);
- font-size:1.25em;
- font-weight:600;
- line-height:1.6;
- margin-bottom:.6em;
- margin-top:1.6em
- }
- .prose :where(h3 strong):not(:where([class~=not-prose] *)) {
- color:inherit;
- font-weight:700
- }
- .prose :where(h4):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-headings);
- font-weight:600;
- line-height:1.5;
- margin-bottom:.5em;
- margin-top:1.5em
- }
- .prose :where(h4 strong):not(:where([class~=not-prose] *)) {
- color:inherit;
- font-weight:700
- }
- .prose :where(img):not(:where([class~=not-prose] *)) {
- margin-bottom:2em;
- margin-top:2em
- }
- .prose :where(figure>*):not(:where([class~=not-prose] *)) {
- margin-bottom:0;
- margin-top:0
- }
- .prose :where(figcaption):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-captions);
- font-size:.875em;
- line-height:1.4285714;
- margin-top:.8571429em
- }
- .prose :where(code):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-code);
- font-size:.875em;
- font-weight:600;
- }
- .prose :where(code):not(:where([class~=not-prose] *)):before {
- content:"`"
- }
- .prose :where(code):not(:where([class~=not-prose] *)):after {
- content:"`"
- }
- .prose :where(a code):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(h1 code):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(h2 code):not(:where([class~=not-prose] *)) {
- color:inherit;
- font-size:.875em
- }
- .prose :where(h3 code):not(:where([class~=not-prose] *)) {
- color:inherit;
- font-size:.9em
- }
- .prose :where(h4 code):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(blockquote code):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(thead th code):not(:where([class~=not-prose] *)) {
- color:inherit
- }
- .prose :where(pre):not(:where([class~=not-prose] *)) {
- background-color:transparent;
- border-radius:.375rem;
- color:currentColor;
- font-size:.875em;
- font-weight:400;
- line-height:1.7142857;
- margin:0;
- overflow-x:auto;
- padding:0
- }
- .prose :where(pre code):not(:where([class~=not-prose] *)) {
- background-color:transparent;
- border-radius:0;
- border-width:0;
- color:inherit;
- font-family:inherit;
- font-size:inherit;
- font-weight:inherit;
- line-height:inherit;
- padding:0
- }
- .prose :where(pre code):not(:where([class~=not-prose] *)):before {
- content:none
- }
- .prose :where(pre code):not(:where([class~=not-prose] *)):after {
- content:none
- }
- .prose :where(table):not(:where([class~=not-prose] *)) {
- font-size:.875em;
- line-height:1.7142857;
- margin-bottom:2em;
- margin-top:2em;
- table-layout:auto;
- text-align:left;
- width:100%
- }
- .prose :where(thead):not(:where([class~=not-prose] *)) {
- border-bottom-color:var(--tw-prose-th-borders);
- border-bottom-width:1px
- }
- .prose :where(thead th):not(:where([class~=not-prose] *)) {
- color:var(--tw-prose-headings);
- font-weight:600;
- padding-bottom:.5714286em;
- padding-left:.5714286em;
- padding-right:.5714286em;
- vertical-align:bottom
- }
- .prose :where(tbody tr):not(:where([class~=not-prose] *)) {
- border-bottom-color:var(--tw-prose-td-borders);
- border-bottom-width:1px
- }
- .prose :where(tbody tr:last-child):not(:where([class~=not-prose] *)) {
- border-bottom-width:0
- }
- .prose :where(tbody td):not(:where([class~=not-prose] *)) {
- vertical-align:baseline
- }
- .prose :where(tfoot):not(:where([class~=not-prose] *)) {
- border-top-color:var(--tw-prose-th-borders);
- border-top-width:1px
- }
- .prose :where(tfoot td):not(:where([class~=not-prose] *)) {
- vertical-align:top
- }
- .prose {
- --tw-prose-body:#374151;
- --tw-prose-headings:#111827;
- --tw-prose-lead:#4b5563;
- --tw-prose-links:#111827;
- --tw-prose-bold:#111827;
- --tw-prose-counters:#6b7280;
- --tw-prose-bullets:#d1d5db;
- --tw-prose-hr:#e5e7eb;
- --tw-prose-quotes:#111827;
- --tw-prose-quote-borders:#e5e7eb;
- --tw-prose-captions:#6b7280;
- --tw-prose-code:#111827;
- --tw-prose-pre-code:#e5e7eb;
- --tw-prose-pre-bg:#1f2937;
- --tw-prose-th-borders:#d1d5db;
- --tw-prose-td-borders:#e5e7eb;
- --tw-prose-invert-body:#d1d5db;
- --tw-prose-invert-headings:#fff;
- --tw-prose-invert-lead:#9ca3af;
- --tw-prose-invert-links:#fff;
- --tw-prose-invert-bold:#fff;
- --tw-prose-invert-counters:#9ca3af;
- --tw-prose-invert-bullets:#4b5563;
- --tw-prose-invert-hr:#374151;
- --tw-prose-invert-quotes:#f3f4f6;
- --tw-prose-invert-quote-borders:#374151;
- --tw-prose-invert-captions:#9ca3af;
- --tw-prose-invert-code:#fff;
- --tw-prose-invert-pre-code:#d1d5db;
- --tw-prose-invert-pre-bg:rgba(0,0,0,.5);
- --tw-prose-invert-th-borders:#4b5563;
- --tw-prose-invert-td-borders:#374151;
- font-size:1rem;
- line-height:1.75
- }
- .prose :where(p):not(:where([class~=not-prose] *)) {
+ line-height: calc(
+ 28px * var(--markdown-font-size, var(--font-size-base)) / var(--font-size-base)
+ );
+}
+
+.prose :where([class~='lead']):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-lead);
+ font-size: 1.25em;
+ line-height: 1.6;
+ margin-bottom: 1.2em;
+ margin-top: 1.2em;
+}
+.prose :where(a):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-links);
+ font-weight: 500;
+ text-decoration: underline;
+}
+.prose :where(strong):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-bold);
+ font-weight: 600;
+}
+.prose :where(a strong):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(blockquote strong):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(thead th strong):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(ul):not(:where([class~='not-prose'] *)) {
+ list-style-type: disc;
+ margin-bottom: 0.1em;
+ margin-top: 0.1em;
+ padding-left: 1.625em;
+}
+.prose :where(ul > li):not(:where([class~='not-prose'] *))::marker {
+ color: var(--tw-prose-bullets);
+}
+.prose :where(hr):not(:where([class~='not-prose'] *)) {
+ border-color: var(--tw-prose-hr);
+ border-top-width: 1px;
+ margin-bottom: 3em;
+ margin-top: 3em;
+}
+.prose :where(blockquote):not(:where([class~='not-prose'] *)) {
+ border-left-color: var(--tw-prose-quote-borders);
+ border-left-width: 0.25rem;
+ color: var(--tw-prose-quotes);
+ font-style: italic;
+ font-style: normal;
+ font-weight: 500;
+ margin-bottom: 1.6em;
+ margin-top: 1.6em;
+ padding-left: 1em;
+ quotes: '\201C''\201D''\2018''\2019';
+}
+.prose :where(blockquote p:first-of-type):not(:where([class~='not-prose'] *)):before {
+ content: open-quote;
+}
+.prose :where(blockquote p:last-of-type):not(:where([class~='not-prose'] *)):after {
+ content: close-quote;
+}
+.prose :where(h1):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-headings);
+ font-size: 2.25em;
+ font-weight: 800;
+ line-height: 1.1111111;
+ margin-bottom: 0.8888889em;
+ margin-top: 0;
+}
+.prose :where(h1 strong):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+ font-weight: 900;
+}
+.prose :where(h2):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-headings);
+ font-size: 1.5em;
+ font-weight: 700;
+ line-height: 1.3333333;
+ margin-bottom: 1em;
+ margin-top: 2em;
+}
+.prose :where(h2 strong):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+ font-weight: 800;
+}
+.prose :where(h3):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-headings);
+ font-size: 1.25em;
+ font-weight: 600;
+ line-height: 1.6;
+ margin-bottom: 0.6em;
+ margin-top: 1.6em;
+}
+.prose :where(h3 strong):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+ font-weight: 700;
+}
+.prose :where(h4):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-headings);
+ font-weight: 600;
+ line-height: 1.5;
+ margin-bottom: 0.5em;
+ margin-top: 1.5em;
+}
+.prose :where(h4 strong):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+ font-weight: 700;
+}
+.prose :where(img):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 2em;
+ margin-top: 2em;
+}
+.prose :where(figure > *):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+.prose :where(figcaption):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-captions);
+ font-size: 0.875em;
+ line-height: 1.4285714;
+ margin-top: 0.8571429em;
+}
+.prose :where(code):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-code);
+ font-size: 0.875em;
+ font-weight: 600;
+}
+.prose :where(code):not(:where([class~='not-prose'] *)):before {
+ content: '`';
+}
+.prose :where(code):not(:where([class~='not-prose'] *)):after {
+ content: '`';
+}
+.prose :where(a code):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(h1 code):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(h2 code):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+ font-size: 0.875em;
+}
+.prose :where(h3 code):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+ font-size: 0.9em;
+}
+.prose :where(h4 code):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(blockquote code):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(thead th code):not(:where([class~='not-prose'] *)) {
+ color: inherit;
+}
+.prose :where(pre):not(:where([class~='not-prose'] *)) {
+ background-color: transparent;
+ border-radius: 0.375rem;
+ color: currentColor;
+ font-size: 0.875em;
+ font-weight: 400;
+ line-height: 1.7142857;
+ margin: 0;
+ overflow-x: auto;
+ padding: 0;
+}
+.prose :where(pre code):not(:where([class~='not-prose'] *)) {
+ background-color: transparent;
+ border-radius: 0;
+ border-width: 0;
+ color: inherit;
+ font-family: inherit;
+ font-size: inherit;
+ font-weight: inherit;
+ line-height: inherit;
+ padding: 0;
+}
+.prose :where(pre code):not(:where([class~='not-prose'] *)):before {
+ content: none;
+}
+.prose :where(pre code):not(:where([class~='not-prose'] *)):after {
+ content: none;
+}
+.prose :where(table):not(:where([class~='not-prose'] *)) {
+ font-size: 0.875em;
+ line-height: 1.7142857;
+ margin-bottom: 2em;
+ margin-top: 2em;
+ table-layout: auto;
+ text-align: left;
+ width: 100%;
+}
+.prose :where(thead):not(:where([class~='not-prose'] *)) {
+ border-bottom-color: var(--tw-prose-th-borders);
+ border-bottom-width: 1px;
+}
+.prose :where(thead th):not(:where([class~='not-prose'] *)) {
+ color: var(--tw-prose-headings);
+ font-weight: 600;
+ padding-bottom: 0.5714286em;
+ padding-left: 0.5714286em;
+ padding-right: 0.5714286em;
+ vertical-align: bottom;
+}
+.prose :where(tbody tr):not(:where([class~='not-prose'] *)) {
+ border-bottom-color: var(--tw-prose-td-borders);
+ border-bottom-width: 1px;
+}
+.prose :where(tbody tr:last-child):not(:where([class~='not-prose'] *)) {
+ border-bottom-width: 0;
+}
+.prose :where(tbody td):not(:where([class~='not-prose'] *)) {
+ vertical-align: baseline;
+}
+.prose :where(tfoot):not(:where([class~='not-prose'] *)) {
+ border-top-color: var(--tw-prose-th-borders);
+ border-top-width: 1px;
+}
+.prose :where(tfoot td):not(:where([class~='not-prose'] *)) {
+ vertical-align: top;
+}
+.prose {
+ --tw-prose-body: #374151;
+ --tw-prose-headings: #111827;
+ --tw-prose-lead: #4b5563;
+ --tw-prose-links: #111827;
+ --tw-prose-bold: #111827;
+ --tw-prose-counters: #6b7280;
+ --tw-prose-bullets: #d1d5db;
+ --tw-prose-hr: #e5e7eb;
+ --tw-prose-quotes: #111827;
+ --tw-prose-quote-borders: #e5e7eb;
+ --tw-prose-captions: #6b7280;
+ --tw-prose-code: #111827;
+ --tw-prose-pre-code: #e5e7eb;
+ --tw-prose-pre-bg: #1f2937;
+ --tw-prose-th-borders: #d1d5db;
+ --tw-prose-td-borders: #e5e7eb;
+ --tw-prose-invert-body: #d1d5db;
+ --tw-prose-invert-headings: #fff;
+ --tw-prose-invert-lead: #9ca3af;
+ --tw-prose-invert-links: #fff;
+ --tw-prose-invert-bold: #fff;
+ --tw-prose-invert-counters: #9ca3af;
+ --tw-prose-invert-bullets: #4b5563;
+ --tw-prose-invert-hr: #374151;
+ --tw-prose-invert-quotes: #f3f4f6;
+ --tw-prose-invert-quote-borders: #374151;
+ --tw-prose-invert-captions: #9ca3af;
+ --tw-prose-invert-code: #fff;
+ --tw-prose-invert-pre-code: #d1d5db;
+ --tw-prose-invert-pre-bg: rgba(0, 0, 0, 0.5);
+ --tw-prose-invert-th-borders: #4b5563;
+ --tw-prose-invert-td-borders: #374151;
+ font-size: 1rem;
+ line-height: 1.75;
+}
+.prose :where(p):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.25em;
+ margin-top: 1.25em;
+}
+.prose :where(video):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 2em;
+ margin-top: 2em;
+}
+.prose :where(figure):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 2em;
+ margin-top: 2em;
+}
+.prose :where(li):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.5em;
+ margin-top: 0.5em;
+}
+.prose :where(ul > li):not(:where([class~='not-prose'] *)) {
+ padding-left: 0.375em;
+}
+.prose :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.75em;
+ margin-top: 0.75em;
+}
+.prose :where(.prose > ul > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose :where(.prose > ul > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.25em;
+}
+.prose :where(hr + *):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose :where(h2 + *):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose :where(h3 + *):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose :where(h4 + *):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose :where(thead th:first-child):not(:where([class~='not-prose'] *)) {
+ padding-left: 0;
+}
+.prose :where(thead th:last-child):not(:where([class~='not-prose'] *)) {
+ padding-right: 0;
+}
+.prose :where(tbody td, tfoot td):not(:where([class~='not-prose'] *)) {
+ padding: 0.5714286em;
+}
+.prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~='not-prose'] *)) {
+ padding-left: 0;
+}
+.prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~='not-prose'] *)) {
+ padding-right: 0;
+}
+.prose :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0;
+}
+.prose-sm :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.5714286em;
+ margin-top: 0.5714286em;
+}
+.prose-sm :where(.prose > ul > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.1428571em;
+}
+.prose-sm :where(.prose > ul > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.1428571em;
+}
+.prose-sm :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose-sm :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0;
+}
+.prose-base :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.75em;
+ margin-top: 0.75em;
+}
+.prose-base :where(.prose > ul > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose-base :where(.prose > ul > li > :last-child):not(:where([class~='not-prose'] *)) {
margin-bottom: 1.25em;
- margin-top: 1.25em
- }
- .prose :where(video):not(:where([class~=not-prose] *)) {
- margin-bottom:2em;
- margin-top:2em
- }
- .prose :where(figure):not(:where([class~=not-prose] *)) {
- margin-bottom:2em;
- margin-top:2em
- }
- .prose :where(li):not(:where([class~=not-prose] *)) {
- margin-bottom:.5em;
- margin-top:.5em
- }
- .prose :where(ul>li):not(:where([class~=not-prose] *)) {
- padding-left:.375em
- }
- .prose :where(.prose>ul>li p):not(:where([class~=not-prose] *)) {
- margin-bottom:.75em;
- margin-top:.75em
- }
- .prose :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.25em
- }
- .prose :where(hr+*):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose :where(h2+*):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose :where(h3+*):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose :where(h4+*):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose :where(thead th:first-child):not(:where([class~=not-prose] *)) {
- padding-left:0
- }
- .prose :where(thead th:last-child):not(:where([class~=not-prose] *)) {
- padding-right:0
- }
- .prose :where(tbody td,
- tfoot td):not(:where([class~=not-prose] *)) {
- padding:.5714286em
- }
- .prose :where(tbody td:first-child,
- tfoot td:first-child):not(:where([class~=not-prose] *)) {
- padding-left:0
- }
- .prose :where(tbody td:last-child,
- tfoot td:last-child):not(:where([class~=not-prose] *)) {
- padding-right:0
- }
- .prose :where(.prose>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose :where(.prose>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:0
- }
- .prose-sm :where(.prose>ul>li p):not(:where([class~=not-prose] *)) {
- margin-bottom:.5714286em;
- margin-top:.5714286em
- }
- .prose-sm :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.1428571em
- }
- .prose-sm :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.1428571em
- }
- .prose-sm :where(.prose>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose-sm :where(.prose>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:0
- }
- .prose-base :where(.prose>ul>li p):not(:where([class~=not-prose] *)) {
- margin-bottom:.75em;
- margin-top:.75em
- }
- .prose-base :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose-base :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.25em
- }
- .prose-base :where(.prose>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose-base :where(.prose>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:0
- }
- .prose-lg :where(.prose>ul>li p):not(:where([class~=not-prose] *)) {
- margin-bottom:.8888889em;
- margin-top:.8888889em
- }
- .prose-lg :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.3333333em
- }
- .prose-lg :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.3333333em
- }
- .prose-lg :where(.prose>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose-lg :where(.prose>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:0
- }
- .prose-xl :where(.prose>ul>li p):not(:where([class~=not-prose] *)) {
- margin-bottom:.8em;
- margin-top:.8em
- }
- .prose-xl :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.2em
- }
- .prose-xl :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.2em
- }
- .prose-xl :where(.prose>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose-xl :where(.prose>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:0
- }
- .prose-2xl :where(.prose>ul>li p):not(:where([class~=not-prose] *)) {
- margin-bottom:.8333333em;
- margin-top:.8333333em
- }
- .prose-2xl :where(.prose>ul>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.3333333em
- }
- .prose-2xl :where(.prose>ul>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.3333333em
- }
- .prose-2xl :where(.prose>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
- }
- .prose-2xl :where(.prose>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:0
- }
+}
+.prose-base :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose-base :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0;
+}
+.prose-lg :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.8888889em;
+ margin-top: 0.8888889em;
+}
+.prose-lg :where(.prose > ul > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.3333333em;
+}
+.prose-lg :where(.prose > ul > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.3333333em;
+}
+.prose-lg :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose-lg :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0;
+}
+.prose-xl :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.8em;
+ margin-top: 0.8em;
+}
+.prose-xl :where(.prose > ul > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.2em;
+}
+.prose-xl :where(.prose > ul > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.2em;
+}
+.prose-xl :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose-xl :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0;
+}
+.prose-2xl :where(.prose > ul > li p):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.8333333em;
+ margin-top: 0.8333333em;
+}
+.prose-2xl :where(.prose > ul > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.3333333em;
+}
+.prose-2xl :where(.prose > ul > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.3333333em;
+}
+.prose-2xl :where(.prose > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
+}
+.prose-2xl :where(.prose > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0;
+}
code,
pre {
@@ -1008,7 +1027,7 @@ pre[class*='language-'] {
color: #fff;
-webkit-hyphens: none;
hyphens: none;
- font-size: .85rem;
+ font-size: 0.85rem;
line-height: 1.5;
tab-size: 4;
text-align: left;
@@ -1073,17 +1092,17 @@ button {
}
.btn {
- align-items:center;
- border-color:transparent;
- border-radius:.5rem;
- border-width:1px;
+ align-items: center;
+ border-color: transparent;
+ border-radius: 0.5rem;
+ border-width: 1px;
cursor: pointer;
- display:inline-flex;
- font-size:.875rem;
- font-weight:500;
- line-height:1.25rem;
- padding:.5rem .75rem;
- pointer-events:auto;
+ display: inline-flex;
+ font-size: 0.875rem;
+ font-weight: 500;
+ line-height: 1.25rem;
+ padding: 0.5rem 0.75rem;
+ pointer-events: auto;
transition: all 0.1s ease-in-out;
}
.custom-btn {
@@ -1122,8 +1141,7 @@ button {
var(--tw-ring-color);
--tw-ring-offset-width: 2px;
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), 0 0 transparent;
- box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
- var(--tw-shadow, 0 0 transparent);
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 transparent);
}
.btn-primary.focus-visible {
--tw-ring-opacity: 1;
@@ -1189,8 +1207,8 @@ button {
.from-token-surface-secondary {
--tw-gradient-from: var(--surface-secondary) var(--tw-gradient-from-position);
- --tw-gradient-to: hsla(0,0%,100%,0) var(--tw-gradient-to-position);
- --tw-gradient-stops: var(--tw-gradient-from),var(--tw-gradient-to);
+ --tw-gradient-to: hsla(0, 0%, 100%, 0) var(--tw-gradient-to-position);
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
/* Webkit scrollbar */
@@ -1254,7 +1272,9 @@ html {
.markdown {
max-width: none;
font-size: var(--markdown-font-size, var(--font-size-base));
- line-height: calc(28px * var(--markdown-font-size, var(--font-size-base)) / var(--font-size-base));
+ line-height: calc(
+ 28px * var(--markdown-font-size, var(--font-size-base)) / var(--font-size-base)
+ );
}
.markdown h1 {
@@ -1436,47 +1456,49 @@ html {
.form-multiselect,
.form-select,
.form-textarea {
- --tw-shadow:0 0 transparent;
- -webkit-appearance:none;
- appearance:none;
- background-color:#fff;
- border-color:#8e8ea0;
- border-radius:0;
- border-width:1px;
- font-size:1rem;
- line-height:1.5rem;
- padding:.5rem .75rem
+ --tw-shadow: 0 0 transparent;
+ -webkit-appearance: none;
+ appearance: none;
+ background-color: #fff;
+ border-color: #8e8ea0;
+ border-radius: 0;
+ border-width: 1px;
+ font-size: 1rem;
+ line-height: 1.5rem;
+ padding: 0.5rem 0.75rem;
}
.form-input:focus,
.form-multiselect:focus,
.form-select:focus,
.form-textarea:focus {
- --tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);
- --tw-ring-offset-width:0px;
- --tw-ring-offset-color:#fff;
- --tw-ring-color:#2563eb;
- --tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
- --tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
- border-color:#2563eb;
- box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);
- outline:2px solid transparent;
- outline-offset:2px
+ --tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
+ --tw-ring-offset-width: 0px;
+ --tw-ring-offset-color: #fff;
+ --tw-ring-color: #2563eb;
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width)
+ var(--tw-ring-offset-color);
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width))
+ var(--tw-ring-color);
+ border-color: #2563eb;
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
+ outline: 2px solid transparent;
+ outline-offset: 2px;
}
.form-input::-webkit-input-placeholder,
.form-textarea::-webkit-input-placeholder {
- color:#8e8ea0;
- opacity:1
+ color: #8e8ea0;
+ opacity: 1;
}
.form-input::placeholder,
.form-textarea::placeholder {
- color:#8e8ea0;
- opacity:1
+ color: #8e8ea0;
+ opacity: 1;
}
.form-input::-webkit-datetime-edit-fields-wrapper {
- padding:0
+ padding: 0;
}
.form-input::-webkit-date-and-time-value {
- min-height:1.5em
+ min-height: 1.5em;
}
.form-input::-webkit-datetime-edit,
.form-input::-webkit-datetime-edit-day-field,
@@ -1487,281 +1509,285 @@ html {
.form-input::-webkit-datetime-edit-month-field,
.form-input::-webkit-datetime-edit-second-field,
.form-input::-webkit-datetime-edit-year-field {
- padding-bottom:0;
- padding-top:0
+ padding-bottom: 0;
+ padding-top: 0;
}
.grow {
- flex-grow:1
+ flex-grow: 1;
}
.transform {
- -webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
- transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
+ -webkit-transform: translate(var(--tw-translate-x), var(--tw-translate-y))
+ rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
+ scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate))
+ skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x))
+ scaleY(var(--tw-scale-y));
}
body,
html {
- height:100%
+ height: 100%;
}
.dark body,
.dark html {
- --tw-bg-opacity:1;
- background-color:rgba(33,33,33,var(--tw-bg-opacity))
+ --tw-bg-opacity: 1;
+ background-color: rgba(33, 33, 33, var(--tw-bg-opacity));
}
#__next,
#root {
- height:100%
+ height: 100%;
}
-
.markdown ul li {
- display:block;
- margin:0;
- position:relative
+ display: block;
+ margin: 0;
+ position: relative;
}
.markdown ul li:before {
- content:"•";
- font-size: calc(var(--markdown-font-size) * 0.875);
- line-height: calc(var(--markdown-font-size) * 1.25);
- margin-left:-1rem;
- position:absolute
+ content: '•';
+ font-size: calc(var(--markdown-font-size) * 0.875);
+ line-height: calc(var(--markdown-font-size) * 1.25);
+ margin-left: -1rem;
+ position: absolute;
}
.markdown {
- max-width:none
+ max-width: none;
}
.markdown h1,
.markdown h2 {
- font-weight:600
+ font-weight: 600;
}
.markdown h2 {
- margin-bottom:1rem;
- margin-top:2rem
+ margin-bottom: 1rem;
+ margin-top: 2rem;
}
.markdown h3 {
- font-weight:600
+ font-weight: 600;
}
.markdown h3,
.markdown h4 {
- margin-bottom:.5rem;
- margin-top:1rem
+ margin-bottom: 0.5rem;
+ margin-top: 1rem;
}
.markdown h4 {
- font-weight:400
+ font-weight: 400;
}
.markdown h5 {
- font-weight:600
+ font-weight: 600;
}
.markdown blockquote {
- --tw-border-opacity:1;
- border-color:rgba(142,142,160,var(--tw-border-opacity));
- border-left-width:2px;
- line-height:1rem;
- padding-left:1rem
+ --tw-border-opacity: 1;
+ border-color: rgba(142, 142, 160, var(--tw-border-opacity));
+ border-left-width: 2px;
+ line-height: 1rem;
+ padding-left: 1rem;
}
.markdown table {
- --tw-border-spacing-x:0px;
- --tw-border-spacing-y:0px;
- border-collapse:separate;
- border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);
- width:100%
+ --tw-border-spacing-x: 0px;
+ --tw-border-spacing-y: 0px;
+ border-collapse: separate;
+ border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
+ width: 100%;
}
.markdown th {
- background-color:rgba(236,236,241,.2);
- border-bottom-width:1px;
- border-left-width:1px;
- border-top-width:1px;
- padding:.25rem .75rem
+ background-color: rgba(236, 236, 241, 0.2);
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-width: 1px;
+ padding: 0.25rem 0.75rem;
}
.markdown th:first-child {
- border-top-left-radius:.375rem
+ border-top-left-radius: 0.375rem;
}
.markdown th:last-child {
- border-right-width:1px;
- border-top-right-radius:.375rem
+ border-right-width: 1px;
+ border-top-right-radius: 0.375rem;
}
.markdown td {
- border-bottom-width:1px;
- border-left-width:1px;
- padding:.25rem .75rem
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ padding: 0.25rem 0.75rem;
}
.markdown td:last-child {
- border-right-width:1px
+ border-right-width: 1px;
}
.markdown tbody tr:last-child td:first-child {
- border-bottom-left-radius:.375rem
+ border-bottom-left-radius: 0.375rem;
}
.markdown tbody tr:last-child td:last-child {
- border-bottom-right-radius:.375rem
+ border-bottom-right-radius: 0.375rem;
}
.markdown a {
- text-decoration-line:underline;
- text-underline-offset:2px
+ text-decoration-line: underline;
+ text-underline-offset: 2px;
}
.conversation-item-time:before {
- content:attr(data-time)
+ content: attr(data-time);
}
.tooltip-label:before {
- content:attr(data-content)
+ content: attr(data-content);
}
button.scroll-convo {
- display:none
+ display: none;
}
@-webkit-keyframes blink {
- to {
- visibility:hidden
- }
+ to {
+ visibility: hidden;
+ }
}
@keyframes blink {
- to {
- visibility:hidden
- }
+ to {
+ visibility: hidden;
+ }
}
.animate-flash {
- -webkit-animation:flash 2s steps(60,start);
- animation:flash 2s steps(60,start)
+ -webkit-animation: flash 2s steps(60, start);
+ animation: flash 2s steps(60, start);
}
@-webkit-keyframes flash {
- 0% {
- background-color:hsla(0,0%,100%,.4)
- }
+ 0% {
+ background-color: hsla(0, 0%, 100%, 0.4);
+ }
}
@keyframes flash {
- 0% {
- background-color:hsla(0,0%,100%,.4)
- }
+ 0% {
+ background-color: hsla(0, 0%, 100%, 0.4);
+ }
}
.hidden-visibility {
visibility: hidden;
}
.toast-root {
- align-items:center;
- display:flex;
- flex-direction:column;
- height:0;
- transition:all .24s cubic-bezier(0,0,.2,1)
+ align-items: center;
+ display: flex;
+ flex-direction: column;
+ height: 0;
+ transition: all 0.24s cubic-bezier(0, 0, 0.2, 1);
}
-.toast-root[data-state=open] {
- -webkit-animation:toast-open .24s cubic-bezier(.175,.885,.32,1.175) both;
- animation:toast-open .24s cubic-bezier(.175,.885,.32,1.175) both
+.toast-root[data-state='open'] {
+ -webkit-animation: toast-open 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.175) both;
+ animation: toast-open 0.24s cubic-bezier(0.175, 0.885, 0.32, 1.175) both;
}
-.toast-root[data-state=closed] {
- -webkit-animation:toast-close .12s cubic-bezier(.4,0,1,1) both;
- animation:toast-close .12s cubic-bezier(.4,0,1,1) both
+.toast-root[data-state='closed'] {
+ -webkit-animation: toast-close 0.12s cubic-bezier(0.4, 0, 1, 1) both;
+ animation: toast-close 0.12s cubic-bezier(0.4, 0, 1, 1) both;
}
.toast-root .alert-root {
- box-shadow:0 0 1px rgba(67,90,111,.3),0 5px 8px -4px rgba(67,90,111,.3);
- flex-shrink:0;
- pointer-events:all
+ box-shadow: 0 0 1px rgba(67, 90, 111, 0.3), 0 5px 8px -4px rgba(67, 90, 111, 0.3);
+ flex-shrink: 0;
+ pointer-events: all;
}
@-webkit-keyframes toast-open {
0% {
- opacity:0;
- -webkit-transform:translateY(-100%);
- transform:translateY(-100%)
+ opacity: 0;
+ -webkit-transform: translateY(-100%);
+ transform: translateY(-100%);
}
to {
- -webkit-transform:translateY(0);
- transform:translateY(0)
+ -webkit-transform: translateY(0);
+ transform: translateY(0);
}
}
@keyframes toast-open {
0% {
- opacity:0;
- -webkit-transform:translateY(-100%);
- transform:translateY(-100%)
+ opacity: 0;
+ -webkit-transform: translateY(-100%);
+ transform: translateY(-100%);
}
to {
- -webkit-transform:translateY(0);
- transform:translateY(0)
+ -webkit-transform: translateY(0);
+ transform: translateY(0);
}
}
@-webkit-keyframes toast-close {
0% {
- opacity:1
+ opacity: 1;
}
to {
- opacity:0
+ opacity: 0;
}
}
@keyframes toast-close {
0% {
- opacity:1
+ opacity: 1;
}
to {
- opacity:0
+ opacity: 0;
}
}
@-webkit-keyframes pulseSize {
0%,
to {
- -webkit-transform:scaleX(1);
- transform:scaleX(1)
+ -webkit-transform: scaleX(1);
+ transform: scaleX(1);
}
50% {
- -webkit-transform:scale3d(1.25,1.25,1);
- transform:scale3d(1.25,1.25,1)
+ -webkit-transform: scale3d(1.25, 1.25, 1);
+ transform: scale3d(1.25, 1.25, 1);
}
}
@keyframes pulseSize {
0%,
to {
- -webkit-transform:scaleX(1);
- transform:scaleX(1)
+ -webkit-transform: scaleX(1);
+ transform: scaleX(1);
}
50% {
- -webkit-transform:scale3d(1.25,1.25,1);
- transform:scale3d(1.25,1.25,1)
+ -webkit-transform: scale3d(1.25, 1.25, 1);
+ transform: scale3d(1.25, 1.25, 1);
}
}
.result-thinking:empty:last-child:after {
- -webkit-font-smoothing:subpixel-antialiased;
- -webkit-animation:pulseSize 1.25s ease-in-out infinite;
- animation:pulseSize 1.25s ease-in-out infinite;
- -webkit-backface-visibility:hidden;
- backface-visibility:hidden;
- background-color:#0d0d0d;
- background-color:var(--text-primary);
- border-radius:50%;
- box-sizing:border-box;
- content:" ";
- display:block;
- height:12px;
- position:absolute;
- top:-11px;
- -webkit-transform:translateZ(0);
- transform:translateZ(0);
- -webkit-transform-origin:center;
- transform-origin:center;
- width:12px;
- will-change:transform
+ -webkit-font-smoothing: subpixel-antialiased;
+ -webkit-animation: pulseSize 1.25s ease-in-out infinite;
+ animation: pulseSize 1.25s ease-in-out infinite;
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
+ background-color: #0d0d0d;
+ background-color: var(--text-primary);
+ border-radius: 50%;
+ box-sizing: border-box;
+ content: ' ';
+ display: block;
+ height: 12px;
+ position: absolute;
+ top: -11px;
+ -webkit-transform: translateZ(0);
+ transform: translateZ(0);
+ -webkit-transform-origin: center;
+ transform-origin: center;
+ width: 12px;
+ will-change: transform;
}
.shadow-stroke {
- position:relative
+ position: relative;
}
.shadow-stroke:after {
- --tw-shadow:inset 0 0 0 1px rgba(0,0,0,.1);
- --tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);
- border-radius:9999px;
- bottom:0;
- content:"";
- left:0;
- position:absolute;
- right:0;
- top:0
+ --tw-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
+ --tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);
+ border-radius: 9999px;
+ bottom: 0;
+ content: '';
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
}
.dark .shadow-stroke:after,
.shadow-stroke:after {
- box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);
- box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)
+ box-shadow: 0 0 transparent, 0 0 transparent, var(--tw-shadow);
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent),
+ var(--tw-shadow);
}
.dark .shadow-stroke:after {
- --tw-shadow:inset 0 0 0 1px hsla(0,0%,100%,.3);
- --tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color)
+ --tw-shadow: inset 0 0 0 1px hsla(0, 0%, 100%, 0.3);
+ --tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);
}
.assistant-item {
@@ -1769,89 +1795,143 @@ button.scroll-convo {
}
.assistant-item:after {
- --tw-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
+ --tw-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);
border-radius: 9999px;
bottom: 0;
- content: "";
+ content: '';
left: 0;
position: absolute;
right: 0;
top: 0;
box-shadow: 0 0 transparent, 0 0 transparent, var(--tw-shadow);
- box-shadow: var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow);
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent),
+ var(--tw-shadow);
}
.dark .assistant-item:after {
- --tw-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
+ --tw-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
--tw-shadow-colored: inset 0 0 0 1px var(--tw-shadow-color);
}
-.result-streaming>:not(ol):not(ul):not(pre):last-child:after,
-.result-streaming>pre:last-child code:after {
+.result-streaming > :not(ol):not(ul):not(pre):last-child:after,
+.result-streaming > pre:last-child code:after {
display: inline-block;
- content:"⬤";
+ content: '⬤';
width: 12px;
height: 12px;
- font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
- line-height:normal;
- margin-left:.25rem;
- vertical-align:middle;
+ font-family: system-ui, Inter, Söhne Circle, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
+ Noto Sans, sans-serif;
+ line-height: normal;
+ margin-left: 0.25rem;
+ vertical-align: middle;
font-size: 0.5rem;
}
@supports (selector(:has(*))) {
- .result-streaming>ol:last-child>li:last-child>ol:last-child>li:last-child:after,
- .result-streaming>ol:last-child>li:last-child>ol:last-child>li:last-child>ol:last-child>li:last-child:after,
- .result-streaming>ol:last-child>li:last-child>ol:last-child>li:last-child>ul:last-child>li:last-child:after,
- .result-streaming>ol:last-child>li:last-child>ul:last-child>li:last-child:after,
- .result-streaming>ol:last-child>li:last-child>ul:last-child>li:last-child>ol:last-child>li:last-child:after,
- .result-streaming>ol:last-child>li:last-child>ul:last-child>li:last-child>ul:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child>ol:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child>ol:last-child>li:last-child>ol:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child>ol:last-child>li:last-child>ul:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child>ul:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child>ul:last-child>li:last-child>ol:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child>ul:last-child>li:last-child>ul:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child[*|\:not-has\(]:after {
- content:"⬤";
- font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
- line-height:normal;
- margin-left:.25rem;
- vertical-align:middle;
+ .result-streaming > ol:last-child > li:last-child > ol:last-child > li:last-child:after,
+ .result-streaming
+ > ol:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child:after,
+ .result-streaming
+ > ol:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child:after,
+ .result-streaming > ol:last-child > li:last-child > ul:last-child > li:last-child:after,
+ .result-streaming
+ > ol:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child:after,
+ .result-streaming
+ > ol:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child:after,
+ .result-streaming > ul:last-child > li:last-child > ol:last-child > li:last-child:after,
+ .result-streaming
+ > ul:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child:after,
+ .result-streaming
+ > ul:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child:after,
+ .result-streaming > ul:last-child > li:last-child > ul:last-child > li:last-child:after,
+ .result-streaming
+ > ul:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child
+ > ol:last-child
+ > li:last-child:after,
+ .result-streaming
+ > ul:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child
+ > ul:last-child
+ > li:last-child:after,
+ .result-streaming > ul:last-child > li:last-child[*|\:not-has\(]:after {
+ content: '⬤';
+ font-family: system-ui, Inter, Söhne Circle, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
+ Noto Sans, sans-serif;
+ line-height: normal;
+ margin-left: 0.25rem;
+ vertical-align: middle;
font-size: 0.5rem;
display: inline-block;
width: 12px;
height: 12px;
}
- .result-streaming>ul:last-child>li:last-child:not(:has(*>li)):after {
- content:"⬤";
- font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
- line-height:normal;
- margin-left:.25rem;
- vertical-align:middle;
+ .result-streaming > ul:last-child > li:last-child:not(:has(* > li)):after {
+ content: '⬤';
+ font-family: system-ui, Inter, Söhne Circle, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
+ Noto Sans, sans-serif;
+ line-height: normal;
+ margin-left: 0.25rem;
+ vertical-align: middle;
font-size: 0.5rem;
display: inline-block;
width: 12px;
height: 12px;
}
- .result-streaming>ol:last-child>li:last-child[*|\:not-has\(]:after {
- content:"⬤";
- font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
- line-height:normal;
- margin-left:.25rem;
- vertical-align:middle;
+ .result-streaming > ol:last-child > li:last-child[*|\:not-has\(]:after {
+ content: '⬤';
+ font-family: system-ui, Inter, Söhne Circle, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
+ Noto Sans, sans-serif;
+ line-height: normal;
+ margin-left: 0.25rem;
+ vertical-align: middle;
font-size: 0.5rem;
display: inline-block;
width: 12px;
height: 12px;
}
- .result-streaming>ol:last-child>li:last-child:not(:has(*>li)):after {
- content:"⬤";
- font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
- line-height:normal;
- margin-left:.25rem;
- vertical-align:middle;
+ .result-streaming > ol:last-child > li:last-child:not(:has(* > li)):after {
+ content: '⬤';
+ font-family: system-ui, Inter, Söhne Circle, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
+ Noto Sans, sans-serif;
+ line-height: normal;
+ margin-left: 0.25rem;
+ vertical-align: middle;
font-size: 0.5rem;
display: inline-block;
width: 12px;
@@ -1859,13 +1939,14 @@ button.scroll-convo {
}
}
@supports not (selector(:has(*))) {
- .result-streaming>ol:last-child>li:last-child:after,
- .result-streaming>ul:last-child>li:last-child:after {
- content:"⬤";
- font-family:system-ui,Inter,Söhne Circle,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
- line-height:normal;
- margin-left:.25rem;
- vertical-align:middle;
+ .result-streaming > ol:last-child > li:last-child:after,
+ .result-streaming > ul:last-child > li:last-child:after {
+ content: '⬤';
+ font-family: system-ui, Inter, Söhne Circle, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
+ Noto Sans, sans-serif;
+ line-height: normal;
+ margin-left: 0.25rem;
+ vertical-align: middle;
font-size: 0.5rem;
display: inline-block;
width: 12px;
@@ -1887,174 +1968,173 @@ button.scroll-convo {
}
/* Ordered Listing */
-.prose :where(ol):not(:where([class~=not-prose] *)) {
- list-style-type:decimal;
- margin-bottom:1.25em;
- margin-top:0;
- padding-left:1.625em
+.prose :where(ol):not(:where([class~='not-prose'] *)) {
+ list-style-type: decimal;
+ margin-bottom: 1.25em;
+ margin-top: 0;
+ padding-left: 1.625em;
}
-.prose :where(ol[type=A]):not(:where([class~=not-prose] *)) {
- list-style-type:upper-alpha
+.prose :where(ol[type='A']):not(:where([class~='not-prose'] *)) {
+ list-style-type: upper-alpha;
}
-.prose :where(ol[type=a]):not(:where([class~=not-prose] *)) {
- list-style-type:lower-alpha
+.prose :where(ol[type='a']):not(:where([class~='not-prose'] *)) {
+ list-style-type: lower-alpha;
}
-.prose :where(ol[type=A s]):not(:where([class~=not-prose] *)) {
- list-style-type:upper-alpha
+.prose :where(ol[type='A s']):not(:where([class~='not-prose'] *)) {
+ list-style-type: upper-alpha;
}
-.prose :where(ol[type=a s]):not(:where([class~=not-prose] *)) {
- list-style-type:lower-alpha
+.prose :where(ol[type='a s']):not(:where([class~='not-prose'] *)) {
+ list-style-type: lower-alpha;
}
-.prose :where(ol[type=I]):not(:where([class~=not-prose] *)) {
- list-style-type:upper-roman
+.prose :where(ol[type='I']):not(:where([class~='not-prose'] *)) {
+ list-style-type: upper-roman;
}
-.prose :where(ol[type=i]):not(:where([class~=not-prose] *)) {
- list-style-type:lower-roman
+.prose :where(ol[type='i']):not(:where([class~='not-prose'] *)) {
+ list-style-type: lower-roman;
}
-.prose :where(ol[type=I s]):not(:where([class~=not-prose] *)) {
- list-style-type:upper-roman
+.prose :where(ol[type='I s']):not(:where([class~='not-prose'] *)) {
+ list-style-type: upper-roman;
}
-.prose :where(ol[type=i s]):not(:where([class~=not-prose] *)) {
- list-style-type:lower-roman
+.prose :where(ol[type='i s']):not(:where([class~='not-prose'] *)) {
+ list-style-type: lower-roman;
}
-.prose :where(ol[type="1"]):not(:where([class~=not-prose] *)) {
- list-style-type:decimal
+.prose :where(ol[type='1']):not(:where([class~='not-prose'] *)) {
+ list-style-type: decimal;
}
-.prose :where(ol>li):not(:where([class~=not-prose] *))::marker {
- color:var(--tw-prose-counters);
- font-weight:400
+.prose :where(ol > li):not(:where([class~='not-prose'] *))::marker {
+ color: var(--tw-prose-counters);
+ font-weight: 400;
}
-.prose :where(ol>li):not(:where([class~=not-prose] *)) {
- padding-left:.375em
+.prose :where(ol > li):not(:where([class~='not-prose'] *)) {
+ padding-left: 0.375em;
}
-.prose :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
+.prose :where(.prose > ol > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
}
-.prose :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.25em
+.prose :where(.prose > ol > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.25em;
}
-.prose :where(ul ul,
-ul ol,
-ol ul,
-ol ol):not(:where([class~=not-prose] *)) {
- margin-bottom:.75em;
- margin-top:.75em
+.prose :where(ul ul, ul ol, ol ul, ol ol):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 0.75em;
+ margin-top: 0.75em;
}
-.prose-sm :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.1428571em
+.prose-sm :where(.prose > ol > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.1428571em;
}
-.prose-sm :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.1428571em
+.prose-sm :where(.prose > ol > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.1428571em;
}
-.prose-base :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:0
+.prose-base :where(.prose > ol > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 0;
}
-.prose-base :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.25em
+.prose-base :where(.prose > ol > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.25em;
}
-.prose-lg :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.3333333em
+.prose-lg :where(.prose > ol > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.3333333em;
}
-.prose-lg :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.3333333em
+.prose-lg :where(.prose > ol > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.3333333em;
}
-.prose-xl :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.2em
+.prose-xl :where(.prose > ol > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.2em;
}
-.prose-xl :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.2em
+.prose-xl :where(.prose > ol > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.2em;
}
-.prose-2xl :where(.prose>ol>li>:first-child):not(:where([class~=not-prose] *)) {
- margin-top:1.3333333em
+.prose-2xl :where(.prose > ol > li > :first-child):not(:where([class~='not-prose'] *)) {
+ margin-top: 1.3333333em;
}
-.prose-2xl :where(.prose>ol>li>:last-child):not(:where([class~=not-prose] *)) {
- margin-bottom:1.3333333em
+.prose-2xl :where(.prose > ol > li > :last-child):not(:where([class~='not-prose'] *)) {
+ margin-bottom: 1.3333333em;
}
.markdown .prose ol,
.markdown .prose p,
.markdown .prose ul {
- margin-bottom:1rem
+ margin-bottom: 1rem;
}
.markdown .prose ol:last-child,
.markdown .prose p:last-child,
.markdown .prose ul:last-child {
- margin-bottom:0
+ margin-bottom: 0;
}
.markdown .prose p {
margin-bottom: 1rem;
margin-top: 1rem;
- line-height: calc(28px * var(--markdown-font-size, var(--font-size-base)) / var(--font-size-base));
+ line-height: calc(
+ 28px * var(--markdown-font-size, var(--font-size-base)) / var(--font-size-base)
+ );
}
.markdown .prose ol,
.markdown .prose ul {
- display:contents;
- list-style-position:inside;
- list-style-type:none;
- margin-top:0
-}
-.markdown .prose ol>li,
-.markdown .prose ul>li {
- margin-bottom:0;
- margin-top:0;
- position:relative
-}
-.markdown .prose ol>li[\:has\(\.title-citation\)],
-.markdown .prose ul>li[\:has\(\.title-citation\)] {
- margin-bottom:.75rem
-}
-.markdown .prose ol>li:has(.title-citation),
-.markdown .prose ul>li:has(.title-citation) {
- margin-bottom:.75rem
-}
-.markdown .prose ol>li[\:has\(\.title-citation\)]:last-child,
-.markdown .prose ul>li[\:has\(\.title-citation\)]:last-child {
- margin-bottom:0
-}
-.markdown .prose ol>li:has(.title-citation):last-child,
-.markdown .prose ul>li:has(.title-citation):last-child {
- margin-bottom:0
-}
-.markdown .prose ol>li:before,
-.markdown .prose ul>li:before {
- left:0;
- position:absolute
-}
-.markdown .prose ol>li button,
-.markdown .prose ol>li>a,
-.markdown .prose ul>li button,
-.markdown .prose ul>li>a {
- margin-bottom:0;
- margin-top:0
-}
-.markdown .prose ol>li p,
-.markdown .prose ul>li p {
- margin-bottom:.5rem;
- margin-top:0
-}
-.markdown .prose ol>li ol,
-.markdown .prose ol>li ul,
-.markdown .prose ul>li ol,
-.markdown .prose ul>li ul {
- display:block;
- margin-bottom:0;
- margin-left:1rem;
- margin-top:0;
- padding:0
+ display: contents;
+ list-style-position: inside;
+ list-style-type: none;
+ margin-top: 0;
+}
+.markdown .prose ol > li,
+.markdown .prose ul > li {
+ margin-bottom: 0;
+ margin-top: 0;
+ position: relative;
+}
+.markdown .prose ol > li[\:has\(\.title-citation\)],
+.markdown .prose ul > li[\:has\(\.title-citation\)] {
+ margin-bottom: 0.75rem;
+}
+.markdown .prose ol > li:has(.title-citation),
+.markdown .prose ul > li:has(.title-citation) {
+ margin-bottom: 0.75rem;
+}
+.markdown .prose ol > li[\:has\(\.title-citation\)]:last-child,
+.markdown .prose ul > li[\:has\(\.title-citation\)]:last-child {
+ margin-bottom: 0;
+}
+.markdown .prose ol > li:has(.title-citation):last-child,
+.markdown .prose ul > li:has(.title-citation):last-child {
+ margin-bottom: 0;
+}
+.markdown .prose ol > li:before,
+.markdown .prose ul > li:before {
+ left: 0;
+ position: absolute;
+}
+.markdown .prose ol > li button,
+.markdown .prose ol > li > a,
+.markdown .prose ul > li button,
+.markdown .prose ul > li > a {
+ margin-bottom: 0;
+ margin-top: 0;
+}
+.markdown .prose ol > li p,
+.markdown .prose ul > li p {
+ margin-bottom: 0.5rem;
+ margin-top: 0;
+}
+.markdown .prose ol > li ol,
+.markdown .prose ol > li ul,
+.markdown .prose ul > li ol,
+.markdown .prose ul > li ul {
+ display: block;
+ margin-bottom: 0;
+ margin-left: 1rem;
+ margin-top: 0;
+ padding: 0;
}
.markdown .prose ol {
- counter-reset:list-counter
+ counter-reset: list-counter;
}
-.markdown .prose ol>li {
- counter-increment:list-counter;
- padding-left:2rem
+.markdown .prose ol > li {
+ counter-increment: list-counter;
+ padding-left: 2rem;
}
-.markdown .prose ol>li:before {
- color:var(--text-secondary);
- content:counter(list-counter) "."
+.markdown .prose ol > li:before {
+ color: var(--text-secondary);
+ content: counter(list-counter) '.';
}
-.markdown .prose ul>li {
- padding-left:1.5rem
+.markdown .prose ul > li {
+ padding-left: 1.5rem;
}
/* Keyframes */
@@ -2062,27 +2142,28 @@ ol ol):not(:where([class~=not-prose] *)) {
@keyframes slideFromLeftToRightAndFade {
0% {
opacity: 0;
- transform: translateX(-10%);
+ transform: translateX(-10%);
}
20% {
opacity: 1;
- transform: translateX(0);
+ transform: translateX(0);
}
70% {
opacity: 1;
- transform: translateX(0);
+ transform: translateX(0);
}
75% {
opacity: 1;
- transform: translateX(10%);
+ transform: translateX(10%);
}
80% {
opacity: 0;
- transform: translateX(20%);
+ transform: translateX(20%);
}
- 85%, 100% {
+ 85%,
+ 100% {
opacity: 0;
- transform: translateX(30%);
+ transform: translateX(30%);
}
}
@@ -2093,11 +2174,11 @@ ol ol):not(:where([class~=not-prose] *)) {
@keyframes slideDownAndFadeOut {
0% {
opacity: 1;
- transform: translateY(-10%);
+ transform: translateY(-10%);
}
20% {
opacity: 1;
- transform: translateY(0);
+ transform: translateY(0);
}
70% {
opacity: 1;
@@ -2105,15 +2186,16 @@ ol ol):not(:where([class~=not-prose] *)) {
}
75% {
opacity: 1;
- transform: translateY(10%);
+ transform: translateY(10%);
}
80% {
opacity: 0;
transform: translateY(20%);
}
- 85%, 100% {
+ 85%,
+ 100% {
opacity: 0;
- transform: translateY(30%);
+ transform: translateY(30%);
}
}
@@ -2121,37 +2203,41 @@ ol ol):not(:where([class~=not-prose] *)) {
animation: slideDownAndFadeOut 2s ease-in-out infinite;
}
-
@keyframes rotateAdjustAndBack {
0% {
- transform: rotate(-33deg) scale(1);
+ transform: rotate(-33deg) scale(1);
}
5% {
- transform: rotate(67deg) scale(1);
+ transform: rotate(67deg) scale(1);
}
- 6%, 20% {
- transform: rotate(57deg) scale(1);
+ 6%,
+ 20% {
+ transform: rotate(57deg) scale(1);
}
22% {
- transform: rotate(65deg) scale(1);
+ transform: rotate(65deg) scale(1);
}
- 26%, 40% {
- transform: rotate(-33deg) scale(1);
+ 26%,
+ 40% {
+ transform: rotate(-33deg) scale(1);
}
42% {
- transform: rotate(-40deg) scale(1);
+ transform: rotate(-40deg) scale(1);
}
- 45%, 75% {
- transform: rotate(30deg) scale(0.7);
+ 45%,
+ 75% {
+ transform: rotate(30deg) scale(0.7);
}
- 77%, 85% {
- transform: rotate(57deg) scale(1);
+ 77%,
+ 85% {
+ transform: rotate(57deg) scale(1);
}
87% {
- transform: rotate(65deg) scale(1);
+ transform: rotate(65deg) scale(1);
}
- 90%,100% {
- transform: rotate(-33deg) scale(1);
+ 90%,
+ 100% {
+ transform: rotate(-33deg) scale(1);
}
}
@@ -2177,7 +2263,8 @@ ol ol):not(:where([class~=not-prose] *)) {
transform: translate(0, 0px) rotate(34deg);
opacity: 1;
}
- 60%,100% {
+ 60%,
+ 100% {
transform: translate(0, 0px) rotate(34deg);
opacity: 1;
}
@@ -2205,7 +2292,8 @@ ol ol):not(:where([class~=not-prose] *)) {
transform: translateY(0px); /* Move um pouco para cima */
opacity: 1;
}
- 60%,100% {
+ 60%,
+ 100% {
transform: translateY(0px); /* Move um pouco para cima */
opacity: 1;
}
@@ -2213,7 +2301,6 @@ ol ol):not(:where([class~=not-prose] *)) {
.move-up {
animation: moveUp 4s ease-in-out infinite;
-
}
.message-content {
@@ -2253,3 +2340,4 @@ ol ol):not(:where([class~=not-prose] *)) {
font-size: inherit;
line-height: inherit;
}
+
diff --git a/client/src/utils/messages.ts b/client/src/utils/messages.ts
index 411065752f..88ab105866 100644
--- a/client/src/utils/messages.ts
+++ b/client/src/utils/messages.ts
@@ -21,7 +21,7 @@ export const getLatestText = (message?: TMessage | null, includeIndex?: boolean)
if (message.content?.length) {
for (let i = message.content.length - 1; i >= 0; i--) {
const part = message.content[i];
- if (part.type === ContentTypes.TEXT && part[ContentTypes.TEXT]?.value?.length > 0) {
+ if (part.type === ContentTypes.TEXT && part[ContentTypes.TEXT].value.length > 0) {
const text = part[ContentTypes.TEXT].value;
if (includeIndex) {
return `${text}-${i}`;
diff --git a/client/tailwind.config.cjs b/client/tailwind.config.cjs
index ab36de54ea..1e51b98927 100644
--- a/client/tailwind.config.cjs
+++ b/client/tailwind.config.cjs
@@ -16,7 +16,7 @@ module.exports = {
// },
extend: {
width: {
- 'authPageWidth': '370px',
+ authPageWidth: '370px',
},
keyframes: {
'accordion-down': {
diff --git a/package-lock.json b/package-lock.json
index d942e032cb..3f10b8faa8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1126,7 +1126,7 @@
"@radix-ui/react-checkbox": "^1.0.3",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.2",
- "@radix-ui/react-dropdown-menu": "^2.0.2",
+ "@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-hover-card": "^1.0.5",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.0",
@@ -8359,24 +8359,101 @@
}
},
"node_modules/@radix-ui/react-dropdown-menu": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.0.6.tgz",
- "integrity": "sha512-i6TuFOoWmLWq+M/eCLGd/bQ2HfAX1RJgvrBQ6AQLmzfvsLdefxbWu8G9zczcPFfcSPehz9GcpF6K9QYreFV8hA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.1.tgz",
+ "integrity": "sha512-y8E+x9fBq9qvteD2Zwa4397pUVhYsh9iq44b5RD5qu1GMJWBCBuVg1hMyItbc6+zH00TxGRqd9Iot4wzf3OoBQ==",
+ "license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "1.0.1",
- "@radix-ui/react-compose-refs": "1.0.1",
- "@radix-ui/react-context": "1.0.1",
- "@radix-ui/react-id": "1.0.1",
- "@radix-ui/react-menu": "2.0.6",
- "@radix-ui/react-primitive": "1.0.3",
- "@radix-ui/react-use-controllable-state": "1.0.1"
+ "@radix-ui/primitive": "1.1.0",
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-context": "1.1.0",
+ "@radix-ui/react-id": "1.1.0",
+ "@radix-ui/react-menu": "2.1.1",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-use-controllable-state": "1.1.0"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/primitive": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz",
+ "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz",
+ "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-context": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz",
+ "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-id": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz",
+ "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz",
+ "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
@@ -8387,6 +8464,72 @@
}
}
},
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz",
+ "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz",
+ "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz",
+ "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-callback-ref": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz",
+ "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-focus-guards": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.0.1.tgz",
@@ -8510,35 +8653,300 @@
}
},
"node_modules/@radix-ui/react-menu": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.0.6.tgz",
- "integrity": "sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.1.tgz",
+ "integrity": "sha512-oa3mXRRVjHi6DZu/ghuzdylyjaMXLymx83irM7hTxutQbD+7IhPKdMdRHD26Rm+kHRrWcrUkkRPv5pd47a2xFQ==",
+ "license": "MIT",
"dependencies": {
- "@babel/runtime": "^7.13.10",
- "@radix-ui/primitive": "1.0.1",
- "@radix-ui/react-collection": "1.0.3",
- "@radix-ui/react-compose-refs": "1.0.1",
- "@radix-ui/react-context": "1.0.1",
- "@radix-ui/react-direction": "1.0.1",
- "@radix-ui/react-dismissable-layer": "1.0.5",
- "@radix-ui/react-focus-guards": "1.0.1",
- "@radix-ui/react-focus-scope": "1.0.4",
- "@radix-ui/react-id": "1.0.1",
- "@radix-ui/react-popper": "1.1.3",
- "@radix-ui/react-portal": "1.0.4",
- "@radix-ui/react-presence": "1.0.1",
- "@radix-ui/react-primitive": "1.0.3",
- "@radix-ui/react-roving-focus": "1.0.4",
- "@radix-ui/react-slot": "1.0.2",
- "@radix-ui/react-use-callback-ref": "1.0.1",
+ "@radix-ui/primitive": "1.1.0",
+ "@radix-ui/react-collection": "1.1.0",
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-context": "1.1.0",
+ "@radix-ui/react-direction": "1.1.0",
+ "@radix-ui/react-dismissable-layer": "1.1.0",
+ "@radix-ui/react-focus-guards": "1.1.0",
+ "@radix-ui/react-focus-scope": "1.1.0",
+ "@radix-ui/react-id": "1.1.0",
+ "@radix-ui/react-popper": "1.2.0",
+ "@radix-ui/react-portal": "1.1.1",
+ "@radix-ui/react-presence": "1.1.0",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-roving-focus": "1.1.0",
+ "@radix-ui/react-slot": "1.1.0",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
"aria-hidden": "^1.1.1",
- "react-remove-scroll": "2.5.5"
+ "react-remove-scroll": "2.5.7"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
- "react": "^16.8 || ^17.0 || ^18.0",
- "react-dom": "^16.8 || ^17.0 || ^18.0"
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/primitive": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.0.tgz",
+ "integrity": "sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-arrow": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz",
+ "integrity": "sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.0.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-collection": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.0.tgz",
+ "integrity": "sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-context": "1.1.0",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-slot": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-compose-refs": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz",
+ "integrity": "sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-context": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.0.tgz",
+ "integrity": "sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-direction": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.0.tgz",
+ "integrity": "sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-dismissable-layer": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz",
+ "integrity": "sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.0",
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
+ "@radix-ui/react-use-escape-keydown": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-focus-guards": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.0.tgz",
+ "integrity": "sha512-w6XZNUPVv6xCpZUqb/yN9DL6auvpGX3C/ee6Hdi16v2UUy25HV2Q5bcflsiDyT/g5RwbPQ/GIT1vLkeRb+ITBw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-focus-scope": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.0.tgz",
+ "integrity": "sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-use-callback-ref": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-id": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.0.tgz",
+ "integrity": "sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.0.tgz",
+ "integrity": "sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==",
+ "license": "MIT",
+ "dependencies": {
+ "@floating-ui/react-dom": "^2.0.0",
+ "@radix-ui/react-arrow": "1.1.0",
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-context": "1.1.0",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
+ "@radix-ui/react-use-layout-effect": "1.1.0",
+ "@radix-ui/react-use-rect": "1.1.0",
+ "@radix-ui/react-use-size": "1.1.0",
+ "@radix-ui/rect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-portal": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.1.tgz",
+ "integrity": "sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-use-layout-effect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-presence": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.0.tgz",
+ "integrity": "sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-use-layout-effect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
@@ -8549,6 +8957,211 @@
}
}
},
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz",
+ "integrity": "sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-slot": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-roving-focus": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.0.tgz",
+ "integrity": "sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/primitive": "1.1.0",
+ "@radix-ui/react-collection": "1.1.0",
+ "@radix-ui/react-compose-refs": "1.1.0",
+ "@radix-ui/react-context": "1.1.0",
+ "@radix-ui/react-direction": "1.1.0",
+ "@radix-ui/react-id": "1.1.0",
+ "@radix-ui/react-primitive": "2.0.0",
+ "@radix-ui/react-use-callback-ref": "1.1.0",
+ "@radix-ui/react-use-controllable-state": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "@types/react-dom": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "@types/react-dom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.1.0.tgz",
+ "integrity": "sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-compose-refs": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-callback-ref": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz",
+ "integrity": "sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-controllable-state": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz",
+ "integrity": "sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-callback-ref": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-escape-keydown": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz",
+ "integrity": "sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-callback-ref": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz",
+ "integrity": "sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-rect": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz",
+ "integrity": "sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/rect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz",
+ "integrity": "sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==",
+ "license": "MIT",
+ "dependencies": {
+ "@radix-ui/react-use-layout-effect": "1.1.0"
+ },
+ "peerDependencies": {
+ "@types/react": "*",
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/@radix-ui/rect": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.0.tgz",
+ "integrity": "sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==",
+ "license": "MIT"
+ },
+ "node_modules/@radix-ui/react-menu/node_modules/react-remove-scroll": {
+ "version": "2.5.7",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz",
+ "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==",
+ "license": "MIT",
+ "dependencies": {
+ "react-remove-scroll-bar": "^2.3.4",
+ "react-style-singleton": "^2.2.1",
+ "tslib": "^2.1.0",
+ "use-callback-ref": "^1.3.0",
+ "use-sidecar": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0",
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@radix-ui/react-popover": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.0.7.tgz",
@@ -30878,7 +31491,7 @@
},
"packages/data-provider": {
"name": "librechat-data-provider",
- "version": "0.7.41",
+ "version": "0.7.41.0",
"license": "ISC",
"dependencies": {
"@types/js-yaml": "^4.0.9",
diff --git a/packages/data-provider/src/types/queries.ts b/packages/data-provider/src/types/queries.ts
index 735128fc48..13fb6a577a 100644
--- a/packages/data-provider/src/types/queries.ts
+++ b/packages/data-provider/src/types/queries.ts
@@ -16,7 +16,7 @@ export type ConversationListParams = {
before?: string | null;
after?: string | null;
order?: 'asc' | 'desc';
- pageNumber: string; // Add this line
+ pageNumber: string;
conversationId?: string;
isArchived?: boolean;
tags?: string[];