mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
feat(ui): migrate model_info_view to shadcn + RHF
- Replace antd Form.useForm/Form.Item with react-hook-form + Controller - Replace Tremor Card/Grid/TabGroup/TabList/TabPanels with shadcn Card + Tabs - Replace Tremor Title/Text/TextInput/Button with native h/p + shadcn Input/Button + lucide icons - Replace antd Button/Input/Select/Tooltip/Modal with shadcn equivalents - Add TagsLikeMultiSelect (mirrors antd Select mode="tags") and SearchableSingleSelect (mirrors antd Select showSearch allowClear) - VectorStoreSelector now receives value via Controller (field.value) - credentials modals: switch UploadProps import from antd/es/upload to the local add_model_upload_types shim so eslint no-banned-ui-imports stays green - model_info_view.test: mock vectorStoreListCall (now called in edit mode via VectorStoreSelector) Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
This commit is contained in:
parent
b34f9a118e
commit
18bc2211ab
5 changed files with 1406 additions and 810 deletions
|
|
@ -20,7 +20,7 @@ import {
|
|||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import type { UploadProps } from "antd/es/upload";
|
||||
import type { UploadProps } from "../add_model/add_model_upload_types";
|
||||
import React, { useState } from "react";
|
||||
import { Controller, FormProvider, useForm } from "react-hook-form";
|
||||
import ProviderSpecificFields from "../add_model/provider_specific_fields";
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import {
|
|||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import type { UploadProps } from "antd/es/upload";
|
||||
import type { UploadProps } from "../add_model/add_model_upload_types";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Controller, FormProvider, useForm } from "react-hook-form";
|
||||
import ProviderSpecificFields from "../add_model/provider_specific_fields";
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import {
|
|||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { UploadProps } from "antd/es/upload";
|
||||
import { UploadProps } from "../add_model/add_model_upload_types";
|
||||
import { useState } from "react";
|
||||
import DeleteResourceModal from "../common_components/DeleteResourceModal";
|
||||
import NotificationsManager from "../molecules/notifications_manager";
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ vi.mock("./networking", () => ({
|
|||
modelPatchUpdateCall: vi.fn(),
|
||||
modelDeleteCall: vi.fn(),
|
||||
credentialCreateCall: vi.fn(),
|
||||
vectorStoreListCall: vi.fn().mockResolvedValue({ data: [] }),
|
||||
}));
|
||||
|
||||
const mockUseModelsInfo = vi.fn();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue