Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

refactor(ui): colocate the skills view, keeping the AIHub-shared skill components (#32803)

ryan-crabbe-berri81cd07118de1
diff --git a/ui/litellm-dashboard/eslint-suppressions.json b/ui/litellm-dashboard/eslint-suppressions.json
index d12ad1df199..2448348bbce 100644
--- a/ui/litellm-dashboard/eslint-suppressions.json
+++ b/ui/litellm-dashboard/eslint-suppressions.json
@@ -1261,7 +1261,7 @@
"count": 1
}
},
- "src/app/(dashboard)/agents/_components/index.tsx": {
+ "src/app/(dashboard)/agents/_components/AgentsPanel.tsx": {
"no-restricted-imports": {
"count": 1
},
@@ -1363,7 +1363,7 @@
"count": 2
}
},
- "src/components/claude_code_plugins.tsx": {
+ "src/app/(dashboard)/skills/_components/ClaudeCodePluginsPanel.tsx": {
"no-restricted-imports": {
"count": 1
},
@@ -1379,12 +1379,12 @@
"count": 1
}
},
- "src/components/claude_code_plugins/add_plugin_form.tsx": {
+ "src/app/(dashboard)/skills/_components/add_plugin_form.tsx": {
"no-restricted-imports": {
"count": 1
}
},
- "src/components/claude_code_plugins/plugin_table.tsx": {
+ "src/app/(dashboard)/skills/_components/plugin_table.tsx": {
"no-nested-ternary": {
"count": 1
},
@@ -1534,7 +1534,7 @@
"count": 1
}
},
- "src/app/(dashboard)/guardrails/_components/index.tsx": {
+ "src/app/(dashboard)/guardrails/_components/GuardrailsPanel.tsx": {
"react-hooks/set-state-in-effect": {
"count": 1
}
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/agents/_components/index.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/agents/_components/AgentsPanel.test.tsx
similarity index 99%
rename from ui/litellm-dashboard/src/app/(dashboard)/agents/_components/index.test.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/agents/_components/AgentsPanel.test.tsx
index 6228253222a..48674f21883 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/agents/_components/index.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/agents/_components/AgentsPanel.test.tsx
@@ -1,7 +1,7 @@
import React from "react";
import { render, screen, waitFor, act, fireEvent, within } from "@testing-library/react";
import { describe, it, expect, vi, beforeEach } from "vitest";
-import AgentsPanel from "./index";
+import AgentsPanel from "./AgentsPanel";
import * as networking from "@/components/networking";
vi.mock("@/components/networking", () => ({
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/agents/_components/index.tsx b/ui/litellm-dashboard/src/app/(dashboard)/agents/_components/AgentsPanel.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/app/(dashboard)/agents/_components/index.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/agents/_components/AgentsPanel.tsx
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/agents/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/agents/page.tsx
index 98085ab20a9..885c9a36f30 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/agents/page.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/agents/page.tsx
@@ -1,6 +1,6 @@
"use client";
-import AgentsPanel from "./_components";
+import AgentsPanel from "./_components/AgentsPanel";
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
import { useTeams } from "@/app/(dashboard)/hooks/teams/useTeams";
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/index.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/GuardrailsPanel.test.tsx
similarity index 98%
rename from ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/index.test.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/GuardrailsPanel.test.tsx
index ee33276cfd6..adaf7e4c63f 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/index.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/GuardrailsPanel.test.tsx
@@ -1,6 +1,6 @@
import { render, screen, fireEvent } from "@testing-library/react";
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
-import GuardrailsPanel from "./index";
+import GuardrailsPanel from "./GuardrailsPanel";
import { getGuardrailsList } from "@/components/networking";
vi.mock("@/components/networking", () => ({
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/index.tsx b/ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/GuardrailsPanel.tsx
similarity index 100%
rename from ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/index.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/guardrails/_components/GuardrailsPanel.tsx
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/guardrails/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/guardrails/page.tsx
index 2d378437371..e27fb3495eb 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/guardrails/page.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/guardrails/page.tsx
@@ -1,6 +1,6 @@
"use client";
-import GuardrailsPanel from "./_components";
+import GuardrailsPanel from "./_components/GuardrailsPanel";
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
export default function Guardrails() {
diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins.tsx b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/ClaudeCodePluginsPanel.tsx
similarity index 92%
rename from ui/litellm-dashboard/src/components/claude_code_plugins.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/skills/_components/ClaudeCodePluginsPanel.tsx
index 4fa5269672f..178cd36857f 100644
--- a/ui/litellm-dashboard/src/components/claude_code_plugins.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/ClaudeCodePluginsPanel.tsx
@@ -1,13 +1,13 @@
import React, { useState, useEffect } from "react";
import { Button } from "@tremor/react";
import { Modal } from "antd";
-import { getClaudeCodePluginsList, deleteClaudeCodePlugin } from "./networking";
-import AddPluginForm from "./claude_code_plugins/add_plugin_form";
-import PluginTable from "./claude_code_plugins/plugin_table";
-import SkillDetail from "./claude_code_plugins/skill_detail";
+import { getClaudeCodePluginsList, deleteClaudeCodePlugin } from "@/components/networking";
+import AddPluginForm from "./add_plugin_form";
+import PluginTable from "./plugin_table";
+import SkillDetail from "@/components/claude_code_plugins/skill_detail";
import { isAdminRole } from "@/utils/roles";
-import NotificationsManager from "./molecules/notifications_manager";
-import { Plugin, ListPluginsResponse } from "./claude_code_plugins/types";
+import NotificationsManager from "@/components/molecules/notifications_manager";
+import { Plugin, ListPluginsResponse } from "@/components/claude_code_plugins/types";
interface ClaudeCodePluginsPanelProps {
accessToken: string | null;
diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/add_plugin_form.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/add_plugin_form.test.tsx
similarity index 98%
rename from ui/litellm-dashboard/src/components/claude_code_plugins/add_plugin_form.test.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/skills/_components/add_plugin_form.test.tsx
index 0453cd8a695..8ea4dfac32c 100644
--- a/ui/litellm-dashboard/src/components/claude_code_plugins/add_plugin_form.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/add_plugin_form.test.tsx
@@ -1,12 +1,12 @@
import React from "react";
import { act, fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, it, expect, vi, beforeEach } from "vitest";
-import { renderWithProviders } from "../../../tests/test-utils";
+import { renderWithProviders } from "@/../tests/test-utils";
import AddPluginForm from "./add_plugin_form";
-import { registerClaudeCodePlugin } from "../networking";
+import { registerClaudeCodePlugin } from "@/components/networking";
import MessageManager from "@/components/molecules/message_manager";
-vi.mock("../networking", () => ({
+vi.mock("@/components/networking", () => ({
registerClaudeCodePlugin: vi.fn().mockResolvedValue({ status: "success" }),
}));
diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/add_plugin_form.tsx b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/add_plugin_form.tsx
similarity index 98%
rename from ui/litellm-dashboard/src/components/claude_code_plugins/add_plugin_form.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/skills/_components/add_plugin_form.tsx
index a1587bc5189..04b8c88ae8d 100644
--- a/ui/litellm-dashboard/src/components/claude_code_plugins/add_plugin_form.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/add_plugin_form.tsx
@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { Modal, Form, Input, Select } from "antd";
import MessageManager from "@/components/molecules/message_manager";
import { Button } from "@tremor/react";
-import { registerClaudeCodePlugin } from "../networking";
+import { registerClaudeCodePlugin } from "@/components/networking";
import {
validatePluginName,
isValidSemanticVersion,
@@ -12,8 +12,8 @@ import {
parseSkillSource,
isValidSubPath,
SkillSourcePreview,
-} from "./helpers";
-import { PluginAuthor, PluginSource, SkillRegisterRequest } from "./types";
+} from "@/components/claude_code_plugins/helpers";
+import { PluginAuthor, PluginSource, SkillRegisterRequest } from "@/components/claude_code_plugins/types";
const { TextArea } = Input;
const { Option } = Select;
diff --git a/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_table.tsx b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/plugin_table.tsx
similarity index 97%
rename from ui/litellm-dashboard/src/components/claude_code_plugins/plugin_table.tsx
rename to ui/litellm-dashboard/src/app/(dashboard)/skills/_components/plugin_table.tsx
index 0932e658899..eb1c495374a 100644
--- a/ui/litellm-dashboard/src/components/claude_code_plugins/plugin_table.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/skills/_components/plugin_table.tsx
@@ -12,9 +12,9 @@ import { Badge, Button, Table, TableBody, TableCell, TableHead, TableHeaderCell,
import { Tooltip } from "antd";
import React, { useState } from "react";
import { DateCell, IdCell, StatusBadge } from "@/components/shared/table_cells";
-import NotificationsManager from "../molecules/notifications_manager";
-import { getCategoryBadgeColor } from "./helpers";
-import { Plugin } from "./types";
+import NotificationsManager from "@/components/molecules/notifications_manager";
+import { getCategoryBadgeColor } from "@/components/claude_code_plugins/helpers";
+import { Plugin } from "@/components/claude_code_plugins/types";
interface PluginTableProps {
pluginsList: Plugin[];
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/skills/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/skills/page.tsx
index bd2b12c73b0..2a5f79cf480 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/skills/page.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/skills/page.tsx
@@ -1,6 +1,6 @@
"use client";
-import ClaudeCodePluginsPanel from "@/components/claude_code_plugins";
+import ClaudeCodePluginsPanel from "./_components/ClaudeCodePluginsPanel";
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
export default function Skills() {