{t("assistant.popover.title")}({pagination.total})
@@ -197,73 +203,29 @@ export function AssistantList({ assistantIDs = [] }: AssistantListProps) {
{assistants.length > 0 ? (
<>
- {assistants.map((assistant) => {
- const { _id, _source, name } = assistant;
-
- const isActive = currentAssistant?._id === _id;
-
+ {assistants.map((assistant, index) => {
return (
-
diff --git a/src/components/Common/Pagination.tsx b/src/components/Common/Pagination.tsx
new file mode 100644
index 00000000..67657b8d
--- /dev/null
+++ b/src/components/Common/Pagination.tsx
@@ -0,0 +1,39 @@
+import { ChevronLeft, ChevronRight } from "lucide-react";
+
+import VisibleKey from "./VisibleKey";
+
+interface PaginationProps {
+ current: number;
+ totalPage: number;
+ onPrev: () => void;
+ onNext: () => void;
+ className?: string;
+}
+
+function Pagination({
+ current,
+ totalPage,
+ onPrev,
+ onNext,
+ className = "",
+}: PaginationProps) {
+ return (
+
+
+
+
+
+
+ {current}/{totalPage}
+
+
+
+
+
+
+ );
+}
+
+export default Pagination;
diff --git a/src/components/Search/MCPPopover.tsx b/src/components/Search/MCPPopover.tsx
index 6ec46161..0fae34f5 100644
--- a/src/components/Search/MCPPopover.tsx
+++ b/src/components/Search/MCPPopover.tsx
@@ -1,13 +1,6 @@
import { useState, useEffect, useCallback, useRef } from "react";
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react";
-import {
- ChevronDownIcon,
- RefreshCw,
- Layers,
- Hammer,
- ChevronRight,
- ChevronLeft,
-} from "lucide-react";
+import { ChevronDownIcon, RefreshCw, Layers, Hammer } from "lucide-react";
import clsx from "clsx";
import { useTranslation } from "react-i18next";
import { useDebounce } from "ahooks";
@@ -21,7 +14,8 @@ import { useShortcutsStore } from "@/stores/shortcutsStore";
import VisibleKey from "@/components/Common/VisibleKey";
import { useChatStore } from "@/stores/chatStore";
import NoDataImage from "@/components/Common/NoDataImage";
-import PopoverInput from "../Common/PopoverInput";
+import PopoverInput from "@/components/Common/PopoverInput";
+import Pagination from "@/components/Common/Pagination";
interface MCPPopoverProps {
isMCPActive: boolean;
@@ -287,7 +281,11 @@ export default function MCPPopover({
) : (
@@ -329,19 +327,13 @@ export default function MCPPopover({