Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: agent delete & access control icons #1260

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ui/admin/app/components/agent/AgentAccessControl.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { EyeIcon } from "lucide-react";
import useSWR from "swr";

import { Agent } from "~/lib/model/agents";
import { UserService } from "~/lib/service/api/userService";
import { assetUrl } from "~/lib/utils/assetUrl";

import { UserAuthorizationSelect } from "~/components/agent/UserAuthorizationSelect";
import { LoadingSpinner } from "~/components/ui/LoadingSpinner";
Expand Down Expand Up @@ -37,7 +37,11 @@ export function AgentAccessControl({ agent }: AgentAccessControlProps) {
<TooltipTrigger asChild>
<DialogTrigger asChild>
<Button variant="ghost" size="icon">
<EyeIcon />
<img
src={assetUrl("/assets/user_lock.svg")}
alt="User Permissions Icon"
className="h-4 w-4 dark:invert"
/>
</Button>
</DialogTrigger>
</TooltipTrigger>
Expand Down
4 changes: 2 additions & 2 deletions ui/admin/app/components/agent/AgentAlias.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ConsumptionUrl } from "~/lib/routers/baseRouter";
import { AssistantApiService } from "~/lib/service/api/assistantApiService";

import { AgentAccessControl } from "~/components/agent/AgentAccessControl";
import { AgentDropdownActions } from "~/components/agent/AgentDropdownActions";
import { DeleteAgent } from "~/components/agent/DeleteAgent";
import { Publish } from "~/components/agent/Publish";
import { CopyText } from "~/components/composed/CopyText";
import { WarningAlert } from "~/components/composed/WarningAlert";
Expand Down Expand Up @@ -73,7 +73,7 @@ export function AgentAlias({ agent, onChange }: AgentAliasProps) {

<div className="flex gap-2">
<AgentAccessControl agent={agent} />
<AgentDropdownActions agent={agent} />
<DeleteAgent id={agent.id} />
</div>
</div>
{conflictingAlias && (
Expand Down
36 changes: 36 additions & 0 deletions ui/admin/public/assets/user_lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.