diff --git a/apps/desktop/src/app/settings/gateway-settings.tsx b/apps/desktop/src/app/settings/gateway-settings.tsx index 5e9e91dedc1d..4d436aa8cc6a 100644 --- a/apps/desktop/src/app/settings/gateway-settings.tsx +++ b/apps/desktop/src/app/settings/gateway-settings.tsx @@ -119,6 +119,9 @@ 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). @@ -210,6 +213,11 @@ 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') @@ -526,6 +534,7 @@ export function GatewaySettings() { return } + setCloudPortalUrl(status.portalBaseUrl) setCloudSignedIn(status.signedIn) if (status.signedIn) { @@ -864,7 +873,7 @@ export function GatewaySettings() { {g.cloudNoAgents.before} - + {g.cloudNoAgents.linkText} {g.cloudNoAgents.after} diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts index ac278dc9a088..1a326bedcfb6 100644 --- a/apps/desktop/src/i18n/en.ts +++ b/apps/desktop/src/i18n/en.ts @@ -550,8 +550,8 @@ export const en: Translations = { cloudOrgRole: role => `Role: ${role}`, cloudLoadingAgents: 'Loading your agents…', cloudNoAgents: { - before: 'No agents found on this account. Create one in the ', - linkText: 'Nous portal', + before: 'No agents found on this account. Create one in ', + linkText: 'Hermes Cloud', after: ', then refresh.' }, cloudRefresh: 'Refresh', diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts index 56a7cf059c4f..e03a18d14ff9 100644 --- a/apps/desktop/src/i18n/zh.ts +++ b/apps/desktop/src/i18n/zh.ts @@ -739,9 +739,9 @@ export const zh: Translations = { cloudOrgRole: role => `角色:${role}`, cloudLoadingAgents: '正在加载你的智能体…', cloudNoAgents: { - before: '此账户下未找到智能体。请在', - linkText: 'Nous 门户', - after: '中创建一个,然后刷新。' + before: '此账户下未找到智能体。前往 ', + linkText: 'Hermes Cloud', + after: ' 创建一个,然后刷新。' }, cloudRefresh: '刷新', cloudConnect: '连接',