diff --git a/apps/desktop/src/app/settings/gateway-settings.tsx b/apps/desktop/src/app/settings/gateway-settings.tsx index 4d436aa8cc6..57ed01dc904 100644 --- a/apps/desktop/src/app/settings/gateway-settings.tsx +++ b/apps/desktop/src/app/settings/gateway-settings.tsx @@ -31,6 +31,10 @@ interface GatewaySettingsState { cloudOrg: string } +// Where the "no agents found" empty state sends you to create one — the Hermes +// Cloud instance-setup flow (?setup=instance deep-links into the create form). +const HERMES_CLOUD_SETUP_URL = 'https://portal.nousresearch.com/cloud?setup=instance' + const EMPTY_STATE: GatewaySettingsState = { envOverride: false, mode: 'local', @@ -119,9 +123,6 @@ export function GatewaySettings() { const [cloudAgents, setCloudAgents] = useState([]) const [cloudDiscover, setCloudDiscover] = useState('idle') const [cloudConnectingId, setCloudConnectingId] = useState(null) - // Portal base URL echoed by cloud.status() — used to build the "create an - // agent" link so it honors HERMES_PORTAL_BASE_URL instead of a hardcoded host. - const [cloudPortalUrl, setCloudPortalUrl] = useState('') // Multi-org users: when discovery returns needsOrgSelection, we hold the org // list here and show a picker. `cloudOrg` is the chosen org slug/id (null = // not yet chosen / single-org user). @@ -213,11 +214,6 @@ export function GatewaySettings() { const isConnectedAgent = (agent: DesktopCloudAgent) => Boolean(connectedCloudUrl && agent.dashboardUrl && normalizeCloudUrl(agent.dashboardUrl) === connectedCloudUrl) - // "Create an agent" target: the Hermes Cloud instance-setup page, derived from - // the portal base URL (cloud.status echoes it) so it honors - // HERMES_PORTAL_BASE_URL; falls back to the canonical host before status lands. - const createCloudAgentUrl = `${(cloudPortalUrl || 'https://portal.nousresearch.com').replace(/\/+$/, '')}/cloud?setup=instance` - useEffect(() => { if (state.mode !== 'remote' || !trimmedUrl || !/^https?:\/\//i.test(trimmedUrl)) { setProbeStatus('idle') @@ -534,7 +530,6 @@ export function GatewaySettings() { return } - setCloudPortalUrl(status.portalBaseUrl) setCloudSignedIn(status.signedIn) if (status.signedIn) { @@ -873,7 +868,7 @@ export function GatewaySettings() { {g.cloudNoAgents.before} - + {g.cloudNoAgents.linkText} {g.cloudNoAgents.after}