mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
refactor(ui): delete the discarded expressions, not just their bindings
Dropping the binding but keeping the initializer left two statements that compute a value and throw it away: a ternary in ChatUI returning rawSelected from both branches under a comment about resolving server IDs, and an isAdminRole call in the prompts panel that also kept its import alive. Both computations were already unreachable in effect; remove them whole.
This commit is contained in:
parent
a3d1efeaa5
commit
0fba22151a
2 changed files with 1 additions and 4 deletions
|
|
@ -589,8 +589,6 @@ const ChatUI: React.FC<ChatUIProps> = ({
|
|||
NotificationsManager.fromBackend("Please select an MCP server to test");
|
||||
return;
|
||||
}
|
||||
// Resolve the real server ID (toolsets use toolset: prefix)
|
||||
rawSelected.startsWith("toolset:") ? rawSelected : rawSelected;
|
||||
if (!selectedMCPDirectTool) {
|
||||
NotificationsManager.fromBackend("Please select an MCP tool to call");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import PromptInfoView from "./prompt_info";
|
|||
import AddPromptForm from "./add_prompt_form";
|
||||
import PromptEditorView from "./prompt_editor_view";
|
||||
import NotificationsManager from "@/components/molecules/notifications_manager";
|
||||
import { isAdminRole, isProxyAdminRole } from "@/utils/roles";
|
||||
import { isProxyAdminRole } from "@/utils/roles";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
AlertDialog,
|
||||
|
|
@ -47,7 +47,6 @@ const PromptsPanel: React.FC<PromptsProps> = ({ accessToken, userRole }) => {
|
|||
const [isDeleting, setIsDeleting] = useState(false);
|
||||
const [promptToDelete, setPromptToDelete] = useState<{ id: string; name: string } | null>(null);
|
||||
|
||||
userRole ? isAdminRole(userRole) : false;
|
||||
// Admin Viewer follows the read-parity rule: see prompts, no writes.
|
||||
const canModify = userRole ? isProxyAdminRole(userRole) : false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue