🧹 chore: Sort Client Imports Left Behind by the Import Order Gate (#15139)

This commit is contained in:
Marco Beretta 2026-08-23 21:18:05 +02:00 • committed by GitHub
parent f3c6e24f84
commit 591f05d2e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 29 additions and 29 deletions

View file

@ -1,5 +1,5 @@
import { useForm, FormProvider } from 'react-hook-form';
import { createContext, useContext } from 'react';
import { useForm, FormProvider } from 'react-hook-form';
import type { UseFormReturn } from 'react-hook-form';
import type { AgentForm } from '~/common';
import { getDefaultAgentFormValues } from '~/utils';

View file

@ -1,5 +1,5 @@
import { useForm, FormProvider } from 'react-hook-form';
import { createContext, useContext } from 'react';
import { useForm, FormProvider } from 'react-hook-form';
import { defaultAssistantFormValues } from 'librechat-data-provider';
import type { UseFormReturn } from 'react-hook-form';
import type { AssistantForm } from '~/common';

View file

@ -1,5 +1,5 @@
import { AgentListResponse } from 'librechat-data-provider';
import React, { useState, useEffect } from 'react';
import { AgentListResponse } from 'librechat-data-provider';
interface SmartLoaderProps {
/** Whether the content is currently loading */

View file

@ -1,12 +1,12 @@
import React from 'react';
import * as t from 'librechat-data-provider';
import { render, screen, fireEvent } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import CategoryTabs from '../CategoryTabs';
import ErrorDisplay from '../ErrorDisplay';
import AgentGrid from '../AgentGrid';
import AgentCard from '../AgentCard';
import SearchBar from '../SearchBar';
import ErrorDisplay from '../ErrorDisplay';
import * as t from 'librechat-data-provider';
// Mock matchMedia
Object.defineProperty(window, 'matchMedia', {

View file

@ -1,9 +1,9 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import CategoryTabs from '../CategoryTabs';
import type t from 'librechat-data-provider';
import CategoryTabs from '../CategoryTabs';
// Mock useLocalize hook
jest.mock('~/hooks/useLocalize', () => () => (key: string) => {

View file

@ -1,6 +1,6 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import SearchBar from '../SearchBar';

View file

@ -1,8 +1,8 @@
/* eslint-disable jsx-a11y/media-has-caption */
import { useEffect } from 'react';
import { useRecoilValue } from 'recoil';
import type { TMessageAudio } from '~/common';
import { VolumeIcon, VolumeMuteIcon, Spinner } from '@librechat/client';
import type { TMessageAudio } from '~/common';
import { useLocalize, useTTSBrowser, useTTSExternal } from '~/hooks';
import { logger } from '~/utils';
import store from '~/store';

View file

@ -1,6 +1,6 @@
import React from 'react';
import { useApiErrorBoundary } from '~/hooks/ApiErrorBoundaryContext';
import { useNavigate } from 'react-router-dom';
import { useApiErrorBoundary } from '~/hooks/ApiErrorBoundaryContext';
const ApiErrorWatcher = () => {
const { error } = useApiErrorBoundary();

View file

@ -1,5 +1,5 @@
import type { ReactNode } from 'react';
import type { TFile } from 'librechat-data-provider';
import type { ReactNode } from 'react';
import type { ExtendedFile } from '~/common';
import { getFileType, cn } from '~/utils';
import FilePreview from './FilePreview';

View file

@ -1,6 +1,6 @@
/* eslint-disable react-hooks/rules-of-hooks */
import { ArrowUpDown, ArrowUp, ArrowDown, Database } from 'lucide-react';
import { FileSources, FileContext } from 'librechat-data-provider';
import { ArrowUpDown, ArrowUp, ArrowDown, Database } from 'lucide-react';
import {
Button,
Checkbox,

View file

@ -1,6 +1,6 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { RecoilRoot } from 'recoil';
import { render, screen } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { EModelEndpoint, mergeFileConfig } from 'librechat-data-provider';
import type { TEndpointsConfig, Agent } from 'librechat-data-provider';

View file

@ -1,5 +1,5 @@
import { useParams } from 'react-router-dom';
import { useEffect, useCallback } from 'react';
import { useParams } from 'react-router-dom';
import { QueryKeys } from 'librechat-data-provider';
import { useQueryClient } from '@tanstack/react-query';
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';

View file

@ -1,7 +1,7 @@
import { memo } from 'react';
import AddedConvo from './AddedConvo';
import type { TConversation } from 'librechat-data-provider';
import type { SetterOrUpdater } from 'recoil';
import AddedConvo from './AddedConvo';
export default memo(function TextareaHeader({
addedConvo,

View file

@ -1,7 +1,7 @@
import React from 'react';
import userEvent from '@testing-library/user-event';
import { RecoilRoot, MutableSnapshot } from 'recoil';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
jest.mock('~/hooks', () => ({
useLocalize: () => (key: string, params?: Record<string, unknown>) =>

View file

@ -1,8 +1,8 @@
import React from 'react';
import type { TModelSpec } from 'librechat-data-provider';
import { useModelSelectorContext } from '../ModelSelectorContext';
import { CustomMenu as Menu } from '../CustomMenu';
import { ModelSpecItem } from './ModelSpecItem';
import { useModelSelectorContext } from '../ModelSelectorContext';
import GroupIcon from './GroupIcon';
interface CustomGroupProps {

View file

@ -1,6 +1,6 @@
import { memo, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from 'react';
import { Loader2, AlertCircle, Download, ChevronDown, Files as FilesIcon } from 'lucide-react';
import { Tools } from 'librechat-data-provider';
import { Loader2, AlertCircle, Download, ChevronDown, Files as FilesIcon } from 'lucide-react';
import type { TAttachment, TFile, TAttachmentMetadata } from 'librechat-data-provider';
import type { ToolArtifactType } from '~/utils/artifacts';
import {
@ -13,14 +13,14 @@ import {
isTextAttachment,
renderAttachmentKey,
} from './attachmentTypes';
import FilePreview from '~/components/Chat/Input/Files/FilePreview';
import { useLocalize, useAttachmentPreviewSync, useExpandCollapse } from '~/hooks';
import FileContainer from '~/components/Chat/Input/Files/FileContainer';
import { fileToArtifact, TOOL_ARTIFACT_TYPES } from '~/utils/artifacts';
import FilePreview from '~/components/Chat/Input/Files/FilePreview';
import Image from '~/components/Chat/Messages/Content/Image';
import ToolMermaidArtifact from './ToolMermaidArtifact';
import ToolArtifactCard from './ToolArtifactCard';
import { useAttachmentLink } from './LogLink';
import { useLocalize, useAttachmentPreviewSync, useExpandCollapse } from '~/hooks';
import { cn, getFileType } from '~/utils';
const COLLAPSED_MAX_HEIGHT = 320;

View file

@ -1,5 +1,5 @@
import { isAfter } from 'date-fns';
import React, { useMemo } from 'react';
import { isAfter } from 'date-fns';
import { imageExtRegex } from 'librechat-data-provider';
import type { TFile, TAttachment, TAttachmentMetadata } from 'librechat-data-provider';
import type { Artifact } from '~/common';

View file

@ -13,8 +13,8 @@ import FilePreview from '~/components/Chat/Input/Files/FilePreview';
import { isCodeOnlyArtifact } from '~/utils/artifacts';
import { displayFilename } from './attachmentTypes';
import { useAttachmentLink } from './LogLink';
import { useLocalize } from '~/hooks';
import { cn, getFileType } from '~/utils';
import { useLocalize } from '~/hooks';
import store from '~/store';
interface ToolArtifactCardProps {

View file

@ -1,16 +1,16 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import Markdown from '../Markdown';
import MarkdownLite from '../MarkdownLite';
import { RecoilRoot } from 'recoil';
import { UI_RESOURCE_MARKER } from '~/components/MCPUIResource/plugin';
import { render, screen } from '@testing-library/react';
import {
useMessageContext,
useOptionalMessagesConversation,
useOptionalMessagesOperations,
} from '~/Providers';
import { UI_RESOURCE_MARKER } from '~/components/MCPUIResource/plugin';
import { useGetMessagesByConvoId } from '~/data-provider';
import MarkdownLite from '../MarkdownLite';
import { useLocalize } from '~/hooks';
import Markdown from '../Markdown';
// Mocks for hooks used by MCPUIResource when rendered inside Markdown.
// Keep Provider components intact while mocking only the hooks we use.

View file

@ -4,9 +4,9 @@ import type { Assistant, Agent } from 'librechat-data-provider';
import type { TMessageIcon } from '~/common';
import ConvoIconURL from '~/components/Endpoints/ConvoIconURL';
import { useGetEndpointsQuery } from '~/data-provider';
import { getIconEndpoint } from '~/utils';
import { isImageURL } from '~/utils/icons';
import Icon from '~/components/Endpoints/Icon';
import { isImageURL } from '~/utils/icons';
import { getIconEndpoint } from '~/utils';
type MessageIconProps = {
iconData?: TMessageIcon;

View file

@ -1,9 +1,9 @@
import { useMemo } from 'react';
import { presetSettings } from 'librechat-data-provider';
import { getSettingsKeys } from 'librechat-data-provider';
import type { SettingDefinition } from 'librechat-data-provider';
import type { TModelSelectProps } from '~/common';
import { componentMapping } from '~/components/SidePanel/Parameters/components';
import { presetSettings } from 'librechat-data-provider';
export default function AnthropicSettings({
conversation,