Skip to content

Commit

Permalink
fix: incorrect agent status display in admin ui (#632)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Hopper-Lowe <[email protected]>
  • Loading branch information
ryanhopperlowe authored Nov 19, 2024
1 parent f6db8da commit 08085a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/admin/app/components/agent/AgentPublishStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useMemo } from "react";
import { $path } from "remix-routes";
import useSWR from "swr";

import { AgentBase } from "~/lib/model/agents";
import { Agent } from "~/lib/model/agents";
import { ConsumptionUrl } from "~/lib/routers/baseRouter";
import { AssistantApiService } from "~/lib/service/api/assistantApiService";

Expand All @@ -13,8 +13,8 @@ import { Unpublish } from "~/components/agent/Unpublish";
import { CopyText } from "~/components/composed/CopyText";

type AgentPublishStatusProps = {
agent: AgentBase;
onChange: (agent: Partial<AgentBase>) => void;
agent: Agent;
onChange: (agent: Partial<Agent>) => void;
};

export function AgentPublishStatus({
Expand Down Expand Up @@ -53,7 +53,7 @@ export function AgentPublishStatus({
function renderAgentRef() {
if (!agent.alias) return <div />;

if (refAgent) {
if (refAgent && refAgent.id !== agent.id) {
const route =
refAgent.type === "agent"
? $path("/agents/:agent", {
Expand Down

0 comments on commit 08085a8

Please sign in to comment.