diff --git a/desktop/src/features/profile/ui/UserProfilePanelFields.tsx b/desktop/src/features/profile/ui/UserProfilePanelFields.tsx index 62f4123c950..69fd02e4a55 100644 --- a/desktop/src/features/profile/ui/UserProfilePanelFields.tsx +++ b/desktop/src/features/profile/ui/UserProfilePanelFields.tsx @@ -244,6 +244,7 @@ export function buildOwnerFields({ relayAgent: RelayAgent | undefined; }): ProfileField[] { const fields: ProfileField[] = []; + const isProviderManaged = managedAgent?.backend.type === "provider"; const respondTo = managedAgent?.respondTo ?? relayAgent?.respondTo ?? null; const respondToDisplayValue = respondTo ? respondTo === "owner-only" && ownerDisplayName @@ -290,38 +291,40 @@ export function buildOwnerFields({ return fields; } - if (managedAgent?.agentCommand) { - fields.push({ - copyValue: managedAgent.agentCommand, - displayValue: runtimeLabel(managedAgent.agentCommand), - icon: Terminal, - label: "Runtime", - testId: "user-profile-runtime", - }); - } else if (relayAgent?.agentType) { - fields.push({ - copyValue: relayAgent.agentType, - displayValue: runtimeLabel(relayAgent.agentType), - icon: Terminal, - label: "Runtime", - testId: "user-profile-runtime", - }); - } else if (persona?.runtime) { - fields.push({ - copyValue: persona.runtime, - displayValue: runtimeLabel(persona.runtime), - icon: Terminal, - label: "Runtime", - testId: "user-profile-runtime", - }); - } else if (ownerPubkey) { - fields.push({ - copyValue: ownerPubkey, - displayValue: "Declared owner verified", - icon: UserRound, - label: "Agent profile", - testId: "user-profile-agent-profile", - }); + if (!isProviderManaged) { + if (managedAgent?.agentCommand) { + fields.push({ + copyValue: managedAgent.agentCommand, + displayValue: runtimeLabel(managedAgent.agentCommand), + icon: Terminal, + label: "Runtime", + testId: "user-profile-runtime", + }); + } else if (relayAgent?.agentType) { + fields.push({ + copyValue: relayAgent.agentType, + displayValue: runtimeLabel(relayAgent.agentType), + icon: Terminal, + label: "Runtime", + testId: "user-profile-runtime", + }); + } else if (persona?.runtime) { + fields.push({ + copyValue: persona.runtime, + displayValue: runtimeLabel(persona.runtime), + icon: Terminal, + label: "Runtime", + testId: "user-profile-runtime", + }); + } else if (ownerPubkey) { + fields.push({ + copyValue: ownerPubkey, + displayValue: "Declared owner verified", + icon: UserRound, + label: "Agent profile", + testId: "user-profile-agent-profile", + }); + } } if (managedAgent) { @@ -342,7 +345,7 @@ export function buildOwnerFields({ }); } - if (managedAgent?.acpCommand) { + if (managedAgent?.acpCommand && !isProviderManaged) { fields.push({ copyValue: managedAgent.acpCommand, displayValue: managedAgent.acpCommand, @@ -352,7 +355,7 @@ export function buildOwnerFields({ }); } - if (managedAgent?.mcpCommand) { + if (managedAgent?.mcpCommand && !isProviderManaged) { fields.push({ copyValue: managedAgent.mcpCommand, displayValue: managedAgent.mcpCommand, @@ -373,7 +376,7 @@ export function buildOwnerFields({ }); } - if (managedAgent) { + if (managedAgent && !isProviderManaged) { fields.push({ displayValue: managedAgent.startOnAppLaunch ? "Yes" : "No", icon: Server, diff --git a/desktop/src/features/profile/ui/UserProfilePanelSections.tsx b/desktop/src/features/profile/ui/UserProfilePanelSections.tsx index 4514b62d959..57a4de1aa38 100644 --- a/desktop/src/features/profile/ui/UserProfilePanelSections.tsx +++ b/desktop/src/features/profile/ui/UserProfilePanelSections.tsx @@ -429,7 +429,7 @@ export function ProfileSummaryView({ showDiagnosticsIngress={showDiagnosticsIngress} showInstructionBlock={showInstructionBlock} /> - {isOwner === true && managedAgent !== undefined ? ( + {isOwner === true && managedAgent?.backend.type === "local" ? (