From f99353c5494f9b62e8df178b2ec33fdce48bd44b Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 1 Jul 2026 12:15:55 +1000 Subject: [PATCH] feat(desktop): linkify 'Nous portal' in the cloud no-agents message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Hermes Cloud discovery returns zero agents, the empty-state message now renders 'Nous portal' as a hyperlink to https://portal.nousresearch.com/agents (opened via the app's ExternalLink → shell.openExternal), so the user can jump straight to creating an agent instead of finding the portal manually. The cloudNoAgents i18n string becomes { before, linkText, after } (en + zh) so each locale controls link placement; ja/zh-hant fall back to en via defineLocale. No external-link icon on this inline link to keep the sentence clean. tsc + eslint clean; link verified present in the packaged renderer bundle. --- apps/desktop/src/app/settings/gateway-settings.tsx | 9 ++++++++- apps/desktop/src/i18n/en.ts | 6 +++++- apps/desktop/src/i18n/types.ts | 2 +- apps/desktop/src/i18n/zh.ts | 6 +++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/app/settings/gateway-settings.tsx b/apps/desktop/src/app/settings/gateway-settings.tsx index 9c7ffdbbe4d..0130dab6cc1 100644 --- a/apps/desktop/src/app/settings/gateway-settings.tsx +++ b/apps/desktop/src/app/settings/gateway-settings.tsx @@ -10,6 +10,7 @@ import type { DesktopConnectionProbeResult } from '@/global' import { useI18n } from '@/i18n' +import { ExternalLink } from '@/lib/external-link' import { AlertCircle, Check, Cloud, FileText, Globe, Loader2, LogIn, Monitor, RefreshCw } from '@/lib/icons' import { cn } from '@/lib/utils' import { notify, notifyError } from '@/store/notifications' @@ -795,7 +796,13 @@ export function GatewaySettings() { ) : cloudAgents.length === 0 ? (
- {g.cloudNoAgents} + + {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 91d4d6af57b..232e38bcf7e 100644 --- a/apps/desktop/src/i18n/en.ts +++ b/apps/desktop/src/i18n/en.ts @@ -545,7 +545,11 @@ export const en: Translations = { cloudOrgChange: 'Change org', cloudOrgRole: role => `Role: ${role}`, cloudLoadingAgents: 'Loading your agents…', - cloudNoAgents: 'No agents found on this account. Create one in the Nous portal, then refresh.', + cloudNoAgents: { + before: 'No agents found on this account. Create one in the ', + linkText: 'Nous portal', + after: ', then refresh.' + }, cloudRefresh: 'Refresh', cloudConnect: 'Connect', cloudConnecting: 'Connecting…', diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts index 659406079f8..dc3e8869339 100644 --- a/apps/desktop/src/i18n/types.ts +++ b/apps/desktop/src/i18n/types.ts @@ -456,7 +456,7 @@ export interface Translations { cloudOrgChange: string cloudOrgRole: (role: string) => string cloudLoadingAgents: string - cloudNoAgents: string + cloudNoAgents: { before: string; linkText: string; after: string } cloudRefresh: string cloudConnect: string cloudConnecting: string diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts index 34275941e30..5b3895489f2 100644 --- a/apps/desktop/src/i18n/zh.ts +++ b/apps/desktop/src/i18n/zh.ts @@ -734,7 +734,11 @@ export const zh: Translations = { cloudOrgChange: '切换组织', cloudOrgRole: role => `角色:${role}`, cloudLoadingAgents: '正在加载你的智能体…', - cloudNoAgents: '此账户下未找到智能体。请在 Nous 门户中创建一个,然后刷新。', + cloudNoAgents: { + before: '此账户下未找到智能体。请在', + linkText: 'Nous 门户', + after: '中创建一个,然后刷新。' + }, cloudRefresh: '刷新', cloudConnect: '连接', cloudConnecting: '正在连接…',