fix(client): resolve CI validation failures

This commit is contained in:
Marco Beretta 2026-07-25 14:06:36 +02:00
parent 7fc22139d4
commit 6caadc27e4
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
30 changed files with 45 additions and 49 deletions

View file

@ -3,8 +3,8 @@ import { Spinner } from '@librechat/client';
import { PermissionBits } from 'librechat-data-provider';
import type t from 'librechat-data-provider';
import { useMarketplaceAgentsInfiniteQuery } from '~/data-provider/Agents';
import { useAgentCategories, useLocalize } from '~/hooks';
import { useInfiniteScroll } from '~/hooks/useInfiniteScroll';
import { useAgentCategories, useLocalize } from '~/hooks';
import { useHasData } from './SmartLoader';
import ErrorDisplay from './ErrorDisplay';
import AgentCard from './AgentCard';

View file

@ -1,10 +1,9 @@
import React from 'react';
import { render, screen, fireEvent, waitFor, act } from '@testing-library/react';
import '@testing-library/jest-dom';
import AgentGrid from '../AgentGrid';
import type t from 'librechat-data-provider';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import type t from 'librechat-data-provider';
import AgentGrid from '../AgentGrid';
// Mock the marketplace agent query hook
jest.mock('~/data-provider/Agents', () => ({

View file

@ -422,7 +422,7 @@ export const ArtifactCodeEditor = function ArtifactCodeEditor({
quickSuggestions: !readOnly,
suggestOnTriggerCharacters: !readOnly,
parameterHints: { enabled: !readOnly },
hover: { enabled: !readOnly },
hover: { enabled: readOnly ? 'off' : 'on' },
matchBrackets: readOnly ? 'never' : 'always',
}),
[readOnly],

View file

@ -1,5 +1,5 @@
import { useLocalize } from '~/hooks';
import { TStartupConfig } from 'librechat-data-provider';
import { useLocalize } from '~/hooks';
function Footer({ startupConfig }: { startupConfig: TStartupConfig | null | undefined }) {
const localize = useLocalize();

View file

@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { ErrorTypes, registerPage } from 'librechat-data-provider';
import { OpenIDIcon, useToastContext } from '@librechat/client';
import { ErrorTypes, registerPage } from 'librechat-data-provider';
import { useOutletContext, useSearchParams, useLocation } from 'react-router-dom';
import type { TLoginLayoutContext } from '~/common';
import { getLoginError, persistRedirectToSession } from '~/utils';

View file

@ -1,7 +1,7 @@
import { useForm } from 'react-hook-form';
import { Spinner, Button, SecretInput, Alert } from '@librechat/client';
import { useOutletContext } from 'react-router-dom';
import { useNavigate, useSearchParams } from 'react-router-dom';
import { Spinner, Button, SecretInput, Alert } from '@librechat/client';
import { useResetPasswordMutation } from 'librechat-data-provider/react-query';
import type { TResetPassword } from 'librechat-data-provider';
import type { TLoginLayoutContext } from '~/common';

View file

@ -1,3 +1,4 @@
import { TStartupConfig } from 'librechat-data-provider';
import {
GoogleIcon,
FacebookIcon,
@ -7,13 +8,9 @@ import {
AppleIcon,
SamlIcon,
} from '@librechat/client';
import SocialButton from './SocialButton';
import { useLocalize } from '~/hooks';
import { TStartupConfig } from 'librechat-data-provider';
function SocialLoginRender({
startupConfig,
}: {

View file

@ -1,7 +1,7 @@
import { useEffect, useMemo, useRef } from 'react';
import { XIcon } from 'lucide-react';
import { useRecoilState } from 'recoil';
import { Button, cn } from '@librechat/client';
import { useEffect, useMemo, useRef } from 'react';
import {
CONFIG_HTML_TEXT_TAGS,
CONFIG_HTML_CLASS_ATTR,

View file

@ -1,6 +1,6 @@
import { FileSources, FileContext } from 'librechat-data-provider';
import type { TFile } from 'librechat-data-provider';
import { OGDialog, OGDialogContent, OGDialogHeader, OGDialogTitle } from '@librechat/client';
import type { TFile } from 'librechat-data-provider';
import { useGetFiles } from '~/data-provider';
import { DataTable, columns } from './Table';
import { useLocalize } from '~/hooks';

View file

@ -1,8 +1,8 @@
import { useState, useId, useMemo } from 'react';
import { ListFilter } from 'lucide-react';
import * as Menu from '@ariakit/react/menu';
import { useReactTable } from '@tanstack/react-table';
import { DropdownPopup } from '@librechat/client';
import { useReactTable } from '@tanstack/react-table';
import { useLocalize, TranslationKeys } from '~/hooks';
import { cn } from '~/utils';

View file

@ -1,5 +1,6 @@
import { useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { FileContext } from 'librechat-data-provider';
import {
flexRender,
useReactTable,
@ -8,13 +9,6 @@ import {
getFilteredRowModel,
getPaginationRowModel,
} from '@tanstack/react-table';
import type {
ColumnDef,
SortingState,
VisibilityState,
ColumnFiltersState,
} from '@tanstack/react-table';
import { FileContext } from 'librechat-data-provider';
import {
Table,
Button,
@ -28,6 +22,12 @@ import {
TableHeader,
useMediaQuery,
} from '@librechat/client';
import type {
ColumnDef,
SortingState,
VisibilityState,
ColumnFiltersState,
} from '@tanstack/react-table';
import type { TFile } from 'librechat-data-provider';
import { ColumnVisibilityDropdown } from './ColumnVisibilityDropdown';
import { useDeleteFilesFromTable } from '~/hooks/Files';

View file

@ -1,5 +1,5 @@
import { Tools } from 'librechat-data-provider';
import { useState, useRef, useMemo, useLayoutEffect, useEffect } from 'react';
import { Tools } from 'librechat-data-provider';
import type { MemoryArtifact, TAttachment } from 'librechat-data-provider';
import MemoryInfo from './MemoryInfo';
import { useLocalize } from '~/hooks';

View file

@ -1,6 +1,6 @@
import type { MemoryArtifact } from 'librechat-data-provider';
import { useMemo } from 'react';
import { Alert } from '@librechat/client';
import type { MemoryArtifact } from 'librechat-data-provider';
import { useLocalize } from '~/hooks';
export default function MemoryInfo({ memoryArtifacts }: { memoryArtifacts: MemoryArtifact[] }) {

View file

@ -1,9 +1,9 @@
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import MemoryArtifacts from '../MemoryArtifacts';
import type { TAttachment, MemoryArtifact } from 'librechat-data-provider';
import { Tools } from 'librechat-data-provider';
import type { TAttachment, MemoryArtifact } from 'librechat-data-provider';
import MemoryArtifacts from '../MemoryArtifacts';
// Mock the localize hook
jest.mock('~/hooks', () => ({

View file

@ -1,8 +1,8 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom/extend-expect';
import MemoryInfo from '../MemoryInfo';
import type { MemoryArtifact } from 'librechat-data-provider';
import MemoryInfo from '../MemoryInfo';
// Mock the localize hook
jest.mock('~/hooks', () => ({

View file

@ -1,6 +1,7 @@
import * as React from 'react';
import { ListFilter } from 'lucide-react';
import { useSetRecoilState } from 'recoil';
import { FileContext } from 'librechat-data-provider';
import {
flexRender,
getCoreRowModel,
@ -9,13 +10,6 @@ import {
getSortedRowModel,
useReactTable,
} from '@tanstack/react-table';
import type {
ColumnDef,
SortingState,
VisibilityState,
ColumnFiltersState,
} from '@tanstack/react-table';
import { FileContext } from 'librechat-data-provider';
import {
Input,
Table,
@ -32,6 +26,12 @@ import {
DropdownMenuTrigger,
DropdownMenuCheckboxItem,
} from '@librechat/client';
import type {
ColumnDef,
SortingState,
VisibilityState,
ColumnFiltersState,
} from '@tanstack/react-table';
import type { TFile } from 'librechat-data-provider';
import type { AugmentedColumnDef } from '~/common';
import ActionButton from '~/components/Files/ActionButton';

View file

@ -1,7 +1,7 @@
import React from 'react';
import FileSidePanel from './FileList/FileSidePanel';
import { Outlet, useNavigate, useParams } from 'react-router-dom';
import FilesSectionSelector from './FilesSectionSelector';
import FileSidePanel from './FileList/FileSidePanel';
import { useLocalize } from '~/hooks';
import { Button } from '../ui';

View file

@ -22,10 +22,10 @@ import type { TDialogProps } from '~/common';
import { useUserKey, useLocalize } from '~/hooks';
import { NotificationSeverity } from '~/common';
import CustomConfig from './CustomEndpoint';
import BedrockConfig from './BedrockConfig';
import GoogleConfig from './GoogleConfig';
import OpenAIConfig from './OpenAIConfig';
import OtherConfig from './OtherConfig';
import BedrockConfig from './BedrockConfig';
import HelpText from './HelpText';
import { logger } from '~/utils';

View file

@ -2,12 +2,12 @@ import React, { useMemo } from 'react';
import { useForm, Controller } from 'react-hook-form';
import { Label, Input, Button, SecretInput } from '@librechat/client';
import type { Control, FieldErrors } from 'react-hook-form';
import { useMCPAuthValuesQuery } from '~/data-provider/Tools/queries';
import {
CONFIG_HTML_INLINE_TAGS,
CONFIG_HTML_CLASS_ATTR,
createConfigHtmlSanitizer,
} from '~/utils/configHtml';
import { useMCPAuthValuesQuery } from '~/data-provider/Tools/queries';
import { useLocalize } from '~/hooks';
export interface CustomUserVarConfig {

View file

@ -1,15 +1,15 @@
import * as Ariakit from '@ariakit/react';
import { Check } from 'lucide-react';
import * as Ariakit from '@ariakit/react';
import { MCPIcon } from '@librechat/client';
import type { MCPServerDefinition } from '~/hooks/MCP/useMCPServerManager';
import type { MCPServerStatusIconProps } from './MCPServerStatusIcon';
import MCPServerStatusIcon from './MCPServerStatusIcon';
import {
getStatusColor,
getStatusTextKey,
shouldShowActionButton,
type ConnectionStatusMap,
} from './mcpServerUtils';
import MCPServerStatusIcon from './MCPServerStatusIcon';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';

View file

@ -1,8 +1,8 @@
import { forwardRef } from 'react';
import { CheckIcon } from 'lucide-react';
import { Spinner, DialogButton, InfoHoverCard, ESide } from '@librechat/client';
import type { TDangerButtonProps } from '~/common';
import type { ForwardedRef } from 'react';
import type { TDangerButtonProps } from '~/common';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';

View file

@ -1,7 +1,7 @@
import React from 'react';
import { Button, useMediaQuery } from '@librechat/client';
import { Users, X, ExternalLink } from 'lucide-react';
import { ResourceType } from 'librechat-data-provider';
import { Button, useMediaQuery } from '@librechat/client';
import type { TPrincipal, AccessRoleIds } from 'librechat-data-provider';
import AccessRolesPicker from '~/components/Sharing/AccessRolesPicker';
import PrincipalAvatar from '~/components/Sharing/PrincipalAvatar';

View file

@ -1,8 +1,8 @@
import { useMemo, useState } from 'react';
import { useFormContext } from 'react-hook-form';
import { Button, TooltipAnchor, useToastContext } from '@librechat/client';
import { ChevronLeft, Check, Copy } from 'lucide-react';
import { AgentCapabilities } from 'librechat-data-provider';
import { Button, TooltipAnchor, useToastContext } from '@librechat/client';
import type { AgentForm } from '~/common';
import { sectionLabelClass, groupHeadingClass } from './ui';
import { useAgentPanelContext } from '~/Providers';

View file

@ -1,6 +1,5 @@
import { useState, useRef, useCallback } from 'react';
import { Pencil, Trash2 } from 'lucide-react';
import type { TConversationTag } from 'librechat-data-provider';
import {
Button,
OGDialog,
@ -9,6 +8,7 @@ import {
TooltipAnchor,
useToastContext,
} from '@librechat/client';
import type { TConversationTag } from 'librechat-data-provider';
import { useDeleteConversationTagMutation } from '~/data-provider';
import { BookmarkEditDialog } from '~/components/Bookmarks';
import { NotificationSeverity } from '~/common';

View file

@ -1,6 +1,6 @@
import React from 'react';
import { Pencil, PlugZap, SlidersHorizontal, RefreshCw, X, Trash2 } from 'lucide-react';
import { Spinner, TooltipAnchor } from '@librechat/client';
import { Pencil, PlugZap, SlidersHorizontal, RefreshCw, X, Trash2 } from 'lucide-react';
import type { MCPServerStatus } from 'librechat-data-provider';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';

View file

@ -1,5 +1,5 @@
import { Check, PlugZap } from 'lucide-react';
import { Spinner } from '@librechat/client';
import { Check, PlugZap } from 'lucide-react';
import type { MCPServerStatus } from 'librechat-data-provider';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';

View file

@ -1,7 +1,7 @@
import { useMemo, useCallback } from 'react';
import { OptionTypes } from 'librechat-data-provider';
import type { DynamicSettingProps } from 'librechat-data-provider';
import { Label, Slider, HoverCard, Input, InputNumber, HoverCardTrigger } from '@librechat/client';
import type { DynamicSettingProps } from 'librechat-data-provider';
import { useLocalize, useDebouncedInput, useParameterEffects, TranslationKeys } from '~/hooks';
import { cn, defaultTextProps, optionText } from '~/utils';
import { ESide, defaultDebouncedDelay } from '~/common';

View file

@ -1,8 +1,8 @@
import { format } from 'date-fns';
import { useNavigate } from 'react-router-dom';
import { InvocationMode } from 'librechat-data-provider';
import { Button, TooltipAnchor } from '@librechat/client';
import { Pencil, Pin, User, Calendar, EarthIcon, Sparkles } from 'lucide-react';
import { InvocationMode } from 'librechat-data-provider';
import type { TSkill } from 'librechat-data-provider';
import type { TranslationKeys } from '~/hooks';
import { useLocalize, useAuthContext } from '~/hooks';

View file

@ -1,5 +1,5 @@
import { Download, FileImage, File } from 'lucide-react';
import { Button, Spinner } from '@librechat/client';
import { Download, FileImage, File } from 'lucide-react';
import { useGetSkillNodeContentQuery } from '~/data-provider';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';

View file

@ -1,7 +1,7 @@
import * as React from 'react';
import { Info, AlertCircle, AlertTriangle, CheckCircle2 } from 'lucide-react';
import { ClassProp } from 'class-variance-authority/types';
import { cva, type VariantProps } from 'class-variance-authority';
import { Info, AlertCircle, AlertTriangle, CheckCircle2 } from 'lucide-react';
import { cn } from '~/utils';
const alertVariants: (