Skip to content

The agent that grows with you

feat(desktop): add profile window and default context actions

brooklyn!09aaa4cc41c8
diff --git a/apps/desktop/DESIGN.md b/apps/desktop/DESIGN.md
index 7518ef37ca3..194ab4f2469 100644
--- a/apps/desktop/DESIGN.md
+++ b/apps/desktop/DESIGN.md
@@ -63,6 +63,13 @@ one-off at the call site.
- **Projects own workspace cwd.** Use Sidebar → Projects for local folders and
worktrees; do not reintroduce a per-session/right-sidebar folder-picker flow.
+Profile icons and condensed profile rows offer **Open in new window** and
+**Set as default** in their existing context menus. Opening a profile creates a
+full peer window without switching the source window. The desktop default
+applies at startup and to generic new chats; explicit profile/project actions
+and profile-specific windows keep their own destinations. Changing the default
+does not move existing sessions or replace the active conversation.
+
Navigation must preserve context. A background session finishing, a tool result
arriving, or a project refresh may update badges and cached data; it must not
replace the foreground transcript or steal focus.
diff --git a/apps/desktop/pr-assets/profile-launch-menu.png b/apps/desktop/pr-assets/profile-launch-menu.png
new file mode 100644
index 00000000000..da6e33c4a59
Binary files /dev/null and b/apps/desktop/pr-assets/profile-launch-menu.png differ
diff --git a/apps/desktop/src/app/chat/sidebar/profile-launch-menu.test.tsx b/apps/desktop/src/app/chat/sidebar/profile-launch-menu.test.tsx
new file mode 100644
index 00000000000..12a8e65dbd7
--- /dev/null
+++ b/apps/desktop/src/app/chat/sidebar/profile-launch-menu.test.tsx
@@ -0,0 +1,79 @@
+import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'
+import { afterEach, beforeEach, expect, it, vi } from 'vitest'
+
+import { I18nProvider } from '@/i18n'
+import { $defaultProfileRoute } from '@/store/default-profile'
+import { notify, notifyError } from '@/store/notifications'
+
+import { ProfileLaunchContextMenu } from './profile-launch-menu'
+
+vi.mock('@/store/notifications', () => ({ notify: vi.fn(), notifyError: vi.fn() }))
+
+const openWindow = vi.fn()
+const setDefault = vi.fn()
+
+beforeEach(() => {
+ openWindow.mockResolvedValue({ ok: true })
+ setDefault.mockImplementation(async route => route)
+ Object.defineProperty(window, 'hermesDesktop', {
+ configurable: true,
+ value: { openWindow, profile: { setDefault } }
+ })
+ $defaultProfileRoute.set(null)
+})
+
+afterEach(() => {
+ cleanup()
+ vi.clearAllMocks()
+ $defaultProfileRoute.set(null)
+})
+
+it('opens the clicked canonical route without selecting it and saves only that route as default', async () => {
+ const select = vi.fn()
+ const route = { connectionId: 'homelab', profile: 'designer' }
+ render(
+ <I18nProvider configClient={null}>
+ <ProfileLaunchContextMenu {...route} label="Design studio">
+ <button onClick={select} type="button">
+ Design studio
+ </button>
+ </ProfileLaunchContextMenu>
+ </I18nProvider>
+ )
+
+ fireEvent.contextMenu(screen.getByRole('button', { name: 'Design studio' }))
+ await act(async () => fireEvent.click(screen.getByRole('menuitem', { name: 'Open in new window' })))
+ expect(openWindow).toHaveBeenCalledWith(route)
+ expect(select).not.toHaveBeenCalled()
+ expect(setDefault).not.toHaveBeenCalled()
+
+ fireEvent.contextMenu(screen.getByRole('button', { name: 'Design studio' }))
+ await act(async () => fireEvent.click(screen.getByRole('menuitem', { name: 'Set as default' })))
+ expect(setDefault).toHaveBeenCalledWith(route)
+ expect($defaultProfileRoute.get()).toEqual(route)
+ expect(select).not.toHaveBeenCalled()
+ expect(notify).toHaveBeenCalledWith(expect.objectContaining({ kind: 'success' }))
+
+ fireEvent.contextMenu(screen.getByRole('button', { name: 'Design studio' }))
+ expect(screen.getByRole('menuitem', { name: 'Default profile' }).getAttribute('aria-disabled')).toBe('true')
+})
+
+it('distinguishes the same profile on another source and reports a rejected default write without success', async () => {
+ const original = { connectionId: 'homelab', profile: 'designer' }
+ $defaultProfileRoute.set(original)
+ setDefault.mockRejectedValue(new Error('Disk is read-only'))
+ render(
+ <I18nProvider configClient={null}>
+ <ProfileLaunchContextMenu connectionId="local" label="Local designer" profile="designer">
+ <button type="button">Local designer</button>
+ </ProfileLaunchContextMenu>
+ </I18nProvider>
+ )
+
+ fireEvent.contextMenu(screen.getByRole('button', { name: 'Local designer' }))
+ await act(async () => fireEvent.click(screen.getByRole('menuitem', { name: 'Set as default' })))
+ expect(setDefault).toHaveBeenCalledWith({ connectionId: 'local', profile: 'designer' })
+ expect($defaultProfileRoute.get()).toEqual(original)
+ expect(notifyError).toHaveBeenCalled()
+ expect(notify).not.toHaveBeenCalled()
+})
diff --git a/apps/desktop/src/app/chat/sidebar/profile-launch-menu.tsx b/apps/desktop/src/app/chat/sidebar/profile-launch-menu.tsx
new file mode 100644
index 00000000000..6ba9bab4370
--- /dev/null
+++ b/apps/desktop/src/app/chat/sidebar/profile-launch-menu.tsx
@@ -0,0 +1,84 @@
+import { useStore } from '@nanostores/react'
+import type { ReactNode } from 'react'
+
+import { Codicon } from '@/components/ui/codicon'
+import {
+ ContextMenu,
+ ContextMenuContent,
+ ContextMenuItem,
+ ContextMenuSeparator,
+ ContextMenuTrigger
+} from '@/components/ui/context-menu'
+import type { DesktopProfileRoute } from '@/global'
+import { useI18n } from '@/i18n'
+import { $defaultProfileRoute, setDefaultProfile } from '@/store/default-profile'
+import { notify, notifyError } from '@/store/notifications'
+import { canOpenNewWindow, openNewWindow } from '@/store/windows'
+
+interface ProfileLaunchMenuProps extends DesktopProfileRoute {
+ label: string
+}
+
+export function ProfileLaunchMenuItems({ connectionId, label, profile }: ProfileLaunchMenuProps) {
+ const { t } = useI18n()
+ const p = t.profiles
+ const defaultRoute = useStore($defaultProfileRoute)
+ const isDefault = defaultRoute?.connectionId === connectionId && defaultRoute.profile === profile
+ const route = { connectionId, profile }
+
+ const makeDefault = async () => {
+ try {
+ await setDefaultProfile(route)
+ notify({ kind: 'success', title: p.defaultSet(label), message: p.defaultDescription })
+ } catch (error) {
+ notifyError(error, p.failedSetDefault)
+ }
+ }
+
+ return (
+ <>
+ {canOpenNewWindow() && (
+ <ContextMenuItem onSelect={() => void openNewWindow(route)}>
+ <Codicon name="link-external" size="0.875rem" />
+ <span>{p.openInNewWindow}</span>
+ </ContextMenuItem>
+ )}
+ <ContextMenuItem
+ disabled={isDefault || !window.hermesDesktop?.profile?.setDefault}
+ onSelect={() => void makeDefault()}
+ >
+ <Codicon name={isDefault ? 'check' : 'home'} size="0.875rem" />
+ <span>{isDefault ? p.defaultProfile : p.setAsDefault}</span>
+ </ContextMenuItem>
+ </>
+ )
+}
+
+export function ProfileLaunchContextMenu({ children, ...route }: ProfileLaunchMenuProps & { children: ReactNode }) {
+ const { t } = useI18n()
+
+ return (
+ <ContextMenu>
+ <ContextMenuTrigger asChild>
+ <span className="contents">{children}</span>
+ </ContextMenuTrigger>
+ <ContextMenuContent
+ aria-label={t.profiles.actions}
+ className="min-w-52"
+ collisionPadding={{ bottom: 44, left: 8, right: 8, top: 8 }}
+ onCloseAutoFocus={event => event.preventDefault()}
+ >
+ <ProfileLaunchMenuItems {...route} />
+ </ContextMenuContent>
+ </ContextMenu>
+ )
+}
+
+export function ProfileLaunchMenuSection(props: ProfileLaunchMenuProps) {
+ return (
+ <>
+ <ProfileLaunchMenuItems {...props} />
+ <ContextMenuSeparator />
+ </>
+ )
+}
diff --git a/apps/desktop/src/app/chat/sidebar/profile-rail-fleet.test.tsx b/apps/desktop/src/app/chat/sidebar/profile-rail-fleet.test.tsx
index 06624375f5e..258dd0fc174 100644
--- a/apps/desktop/src/app/chat/sidebar/profile-rail-fleet.test.tsx
+++ b/apps/desktop/src/app/chat/sidebar/profile-rail-fleet.test.tsx
@@ -16,6 +16,7 @@ const navigate = vi.fn()
const selectConnection = vi.fn()
const selectProfile = vi.fn()
const getAgentRoster = vi.fn()
+const openWindow = vi.fn()
vi.mock('react-router', () => ({
useNavigate: () => navigate
@@ -33,6 +34,8 @@ vi.mock('@/i18n', () => ({
colorFor: 'Color',
connectGateway: 'Manage gateways…',
editSoul: 'Edit SOUL.md…',
+ openInNewWindow: 'Open in new window',
+ setAsDefault: 'Set as default',
exportProfile: 'Export profile…',
failedLoadSoul: 'Failed to load SOUL.md',
failedSaveSoul: 'Failed to save SOUL.md',
@@ -206,7 +209,8 @@ async function renderFleet() {
beforeEach(() => {
getAgentRoster.mockResolvedValue(roster)
selectConnection.mockResolvedValue(undefined)
- ;(window as { hermesDesktop?: unknown }).hermesDesktop = { getAgentRoster }
+ openWindow.mockResolvedValue({ ok: true })
+ ;(window as { hermesDesktop?: unknown }).hermesDesktop = { getAgentRoster, openWindow }
})
afterEach(() => {
@@ -223,6 +227,40 @@ afterEach(() => {
})
describe('ProfileRail fleet mode', () => {
+ it.each([false, true])(
+ 'keeps right-click launch routes exact without selecting a profile (condensed=%s)',
+ async condensed => {
+ armFleet()
+ activeConnectionId.set('local')
+ profiles.set([
+ { is_default: true, name: 'default' },
+ { is_default: false, name: 'builder' },
+ ...(condensed ? Array.from({ length: 12 }, (_, index) => ({ is_default: false, name: `p${index}` })) : [])
+ ])
+ await renderFleet()
+
+ for (const target of [
+ { label: 'builder', connectionId: null, profile: 'builder' },
+ { label: 'scout · Gateway A', connectionId: 'gateway-a', profile: 'scout' },
+ { label: 'default · Gateway A', connectionId: 'gateway-a', profile: 'default' }
+ ]) {
+ if (condensed) {
+ fireEvent.pointerDown(screen.getByRole('button', { name: 'Profiles' }), { button: 0, ctrlKey: false })
+ }
+ fireEvent.contextMenu(
+ screen.getByRole(condensed ? (target.connectionId ? 'menuitem' : 'menuitemradio') : 'button', {
+ name: target.label
+ })
+ )
+ await act(async () => fireEvent.click(screen.getByRole('menuitem', { name: 'Open in new window' })))
+ expect(openWindow).toHaveBeenLastCalledWith({ connectionId: target.connectionId, profile: target.profile })
+ expect(selectProfile).not.toHaveBeenCalled()
+ expect(selectConnection).not.toHaveBeenCalled()
+ fireEvent.keyDown(document.activeElement ?? document.body, { key: 'Escape' })
+ }
+ }
+ )
+
it('keeps the custom named-profile order when a source becomes inactive', async () => {
armFleet()
profiles.set([...profiles.get(), { name: 'editor', is_default: false }])
diff --git a/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx b/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx
index d4ef9bbf207..98b22da9f71 100644
--- a/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx
+++ b/apps/desktop/src/app/chat/sidebar/profile-switcher.tsx
@@ -18,6 +18,7 @@ import {
useSortable
} from '@dnd-kit/sortable'
import { CSS } from '@dnd-kit/utilities'
+import { LOCAL_CONNECTION_ID } from '@hermes/shared'
import { useStore } from '@nanostores/react'
import { Fragment, useEffect, useMemo, useRef, useState } from 'react'
import { useNavigate } from 'react-router'
@@ -97,6 +98,7 @@ import { PROFILES_ROUTE, SETTINGS_ROUTE } from '../../routes'
import { ConnectionGlyph } from './connection-glyph'
import { buildRestGroups, countRestAgents, type FleetAgent, type FleetGroup, fleetRouteKey } from './fleet-rail'
+import { ProfileLaunchContextMenu, ProfileLaunchMenuSection } from './profile-launch-menu'
import { ProfileRemoteOverrideDialog } from './profile-remote-override-dialog'
import { useFleetRoster } from './use-fleet-roster'
import { useProfilePrewarm } from './use-profile-prewarm'
@@ -191,6 +193,9 @@ export function ProfileRail() {
// Registry order for the whole strip, active group included — the active
// gateway keeps its slot instead of jumping to the front on a switch.
const activeConnection = connections?.find(connection => connection.id === activeConnectionId) ?? null
+ // Named picks on This device retain the legacy profile door, which resolves
+ // per-profile remote overrides. At-rest fleet actions keep their exact source.
+ const namedProfileConnectionId = activeConnectionId === LOCAL_CONNECTION_ID ? null : activeConnectionId
const fleetSequence = useMemo(() => {
const byId = new Map(restGroups.map(group => [group.connectionId, group]))
@@ -370,8 +375,10 @@ export function ProfileRail() {
<ProfileSquare
active={!isAll && normalizeProfileKey(profile.name) === activeKey}
color={resolveProfileColor(profile.name, colors)}
+ connectionId={namedProfileConnectionId}
key={profile.name}
label={profileLabel(profile)}
+ name={profile.name}
// The legacy per-profile remote override predates the
// gateway registry; once the rail shows machines directly
// it only confuses, so it is offered on single-gateway
@@ -426,9 +433,11 @@ export function ProfileRail() {
// profile) → return to default. So leaving a profile never lands on all.
<ProfilePill
active={isAll || onDefault}
+ connectionId={activeConnectionId ?? undefined}
glyph={isAll ? 'layers' : 'home'}
label={onDefault ? p.showAllProfiles : p.switchToProfile(profileLabel(defaultProfile))}
onSelect={() => (onDefault ? setShowAllProfiles(true) : selectProfile(defaultProfile.name))}
+ profile={defaultProfile.name}
/>
) : (
<ProfilePill active={isAll} glyph="layers" label={p.allProfiles} onSelect={() => setShowAllProfiles(true)} />
@@ -438,20 +447,23 @@ export function ProfileRail() {
{!fleet && !multiProfile && defaultProfile && (
<ProfilePill
active
+ connectionId={activeConnectionId ?? undefined}
glyph="home"
label={profileLabel(defaultProfile)}
onSelect={() => selectProfile(defaultProfile.name)}
+ profile={defaultProfile.name}
/>
)}
{condensed ? (
// Condensed path: one compact dropdown instead of N squares. No drag
- // reorder, no long-press recolor, no per-square context menu — Manage
- // covers rename/delete at this scale.
+ // reorder or long-press recolor; right-click rows keeps launch actions
+ // available, while Manage covers rename/delete at this scale.
<div className="flex min-w-0 flex-1 items-center gap-1">
<ProfileDropdown
activeKey={isAll ? null : activeKey}
colors={colors}
+ connectionId={namedProfileConnectionId}
onCreate={() => setCreateOpen(true)}
onImport={() => void runImportProfileFlow()}
onSelect={selectProfile}
@@ -489,9 +501,11 @@ export function ProfileRail() {
{defaultProfile && (
<ProfilePill
active={onDefault}
+ connectionId={activeConnectionId ?? undefined}
glyph="home"
label={profileLabel(defaultProfile)}
onSelect={() => selectProfile(defaultProfile.name)}
+ profile={defaultProfile.name}
/>
)}
{activeStrip}
@@ -726,6 +740,7 @@ function ImportProfileButton({ label }: { label: string }) {
function ProfileDropdown({
activeKey,
colors,
+ connectionId,
onCreate,
onImport,
onSelect,
@@ -735,6 +750,7 @@ function ProfileDropdown({
}: {
activeKey: null | string
colors: Record<string, string>
+ connectionId: null | string
onCreate: () => void
onImport: () => void
onSelect: (name: string) => void
@@ -792,6 +808,7 @@ function ProfileDropdown({
{profiles.map(profile => (
<ProfileDropdownItem
color={resolveProfileColor(profile.name, colors)}
+ connectionId={connectionId}
key={profile.name}
label={profileLabel(profile)}
name={profile.name}
@@ -807,22 +824,28 @@ function ProfileDropdown({
{!group.reachable && <span aria-hidden="true" className="size-1.5 shrink-0 rounded-full bg-amber-500" />}
</DropdownMenuLabel>
{[group.defaultAgent, ...group.named].map(agent => (
- <DropdownMenuItem
- aria-label={p.fleet.onGateway(agent.profile, group.label)}
- className="min-w-0"
+ <ProfileLaunchContextMenu
+ connectionId={agent.connectionId}
key={agent.profile}
- onSelect={() => onSelectRest(agent)}
+ label={p.fleet.onGateway(agent.profile, group.label)}
+ profile={agent.profile}
>
- <span className="flex min-w-0 items-center gap-1.5">
- <ProfileGlyph
- aria-hidden="true"
- color={resolveProfileColor(agent.profile, colors)}
- isDefault={agent.isDefault}
- name={agent.profile}
- />
- <span className="truncate">{agent.profile}</span>
- </span>
- </DropdownMenuItem>
+ <DropdownMenuItem
+ aria-label={p.fleet.onGateway(agent.profile, group.label)}
+ className="min-w-0"
+ onSelect={() => onSelectRest(agent)}
+ >
+ <span className="flex min-w-0 items-center gap-1.5">
+ <ProfileGlyph
+ aria-hidden="true"
+ color={resolveProfileColor(agent.profile, colors)}
+ isDefault={agent.isDefault}
+ name={agent.profile}
+ />
+ <span className="truncate">{agent.profile}</span>
+ </span>
+ </DropdownMenuItem>
+ </ProfileLaunchContextMenu>
))}
</div>
))}
@@ -833,21 +856,33 @@ function ProfileDropdown({
// One dropdown row per profile — its own component so each row can own a
// hover-intent prewarm timer (see useProfilePrewarm).
-function ProfileDropdownItem({ color, label, name }: { color: null | string; label: string; name: string }) {
+function ProfileDropdownItem({
+ color,
+ connectionId,
+ label,
+ name
+}: {
+ color: null | string
+ connectionId: null | string
+ label: string
+ name: string
+}) {
const { cancelPrewarm, startPrewarm } = useProfilePrewarm(name)
return (
- <DropdownMenuRadioItem
- className="min-w-0"
- onPointerEnter={startPrewarm}
- onPointerLeave={cancelPrewarm}
- value={name}
- >
- <span className="flex min-w-0 items-center gap-1.5">
- <ProfileGlyph aria-hidden="true" color={color} isDefault={false} name={name} />
- <span className="truncate">{label}</span>
- </span>
- </DropdownMenuRadioItem>
+ <ProfileLaunchContextMenu connectionId={connectionId} label={label} profile={name}>
+ <DropdownMenuRadioItem
+ className="min-w-0"
+ onPointerEnter={startPrewarm}
+ onPointerLeave={cancelPrewarm}
+ value={name}
+ >
+ <span className="flex min-w-0 items-center gap-1.5">
+ <ProfileGlyph aria-hidden="true" color={color} isDefault={false} name={name} />
+ <span className="truncate">{label}</span>
+ </span>
+ </DropdownMenuRadioItem>
+ </ProfileLaunchContextMenu>
)
}
@@ -862,6 +897,7 @@ interface ProfilePillProps {
pending?: boolean
slot?: string
connectionId?: string
+ profile?: string
}
function ProfilePill({
@@ -872,9 +908,10 @@ function ProfilePill({
muted = false,
onSelect,
pending = false,
+ profile,
slot
}: ProfilePillProps) {
- return (
+ const button = (
<Tip label={label}>
<Button
aria-busy={pending || undefined}
@@ -900,6 +937,12 @@ function ProfilePill({
</Button>
</Tip>
)
+
+ return profile ? (
+ <ProfileLaunchContextMenu connectionId={connectionId ?? null} label={profile} profile={profile}>
+ {button}
+ </ProfileLaunchContextMenu>
+ ) : button
}
// The gateway marker that heads every group on the fleet rail: its kind glyph
@@ -990,6 +1033,7 @@ function FleetRestGroup({
muted
onSelect={() => onSelect(group.defaultAgent)}
pending={pendingRoute === defaultKey}
+ profile={group.defaultAgent.profile}
slot="profile-rail-rest-home"
/>
{group.named.map(agent => (
@@ -1080,10 +1124,11 @@ function RestSquare({
<ContextMenuContent
aria-label={p.actions}
- className="w-44"
+ className="min-w-52"
collisionPadding={{ bottom: 44, left: 8, right: 8, top: 8 }}
onCloseAutoFocus={event => event.preventDefault()}
>
+ <ProfileLaunchMenuSection connectionId={agent.connectionId} label={label} profile={agent.profile} />
<ContextMenuItem onSelect={onSelect}>
<Codicon name="arrow-right" size="0.875rem" />
<span className="truncate">{p.fleet.switchTo(agent.profile, agent.connectionLabel)}</span>
@@ -1133,7 +1178,9 @@ function RestSquare({
interface ProfileSquareProps {
active: boolean
color: null | string
+ connectionId: null | string
label: string
+ name: string
onSelect: () => void
onRecolor: (color: null | string) => void
onRename: () => void
@@ -1161,7 +1208,9 @@ const LONG_PRESS_MS = 450
function ProfileSquare({
active,
color,
+ connectionId,
label,
+ name,
onConnectRemote,
onDelete,
onEditSoul,
@@ -1178,10 +1227,10 @@ function ProfileSquare({
const suppressClick = useRef(false)
// Hovering a square telegraphs the switch — start that profile's backend
// spawn now so a cold click doesn't pay the full boot.
- const { cancelPrewarm, startPrewarm } = useProfilePrewarm(label)
+ const { cancelPrewarm, startPrewarm } = useProfilePrewarm(name)
const { attributes, isDragging, listeners, setNodeRef, transform, transition } = useSortable({
- id: label,
+ id: name,
transition: RAIL_TRANSITION
})
@@ -1300,13 +1349,14 @@ function ProfileSquare({
statusbar) — Radix then flips the menu up instead of squishing it. */}
<ContextMenuContent
aria-label={p.actions}
- className="w-40"
+ className="min-w-52"
collisionPadding={{ bottom: 44, left: 8, right: 8, top: 8 }}
// Menu close refocuses the trigger — which doubles as the popover
// anchor — so the picker reads it as focus-outside and dies on open.
// Suppress the refocus and the picker survives.
onCloseAutoFocus={event => event.preventDefault()}
>
+ <ProfileLaunchMenuSection connectionId={connectionId} label={label} profile={name} />
<ContextMenuItem onSelect={() => setPickerOpen(true)}>
<Codicon name="symbol-color" size="0.875rem" />
<span>{p.color}</span>
@@ -1319,7 +1369,7 @@ function ProfileSquare({
<Codicon name="edit" size="0.875rem" />
<span>{p.editSoul}</span>
</ContextMenuItem>
- <ContextMenuItem onSelect={() => void runExportProfileFlow(label)}>
+ <ContextMenuItem onSelect={() => void runExportProfileFlow(name)}>
<Codicon name="package" size="0.875rem" />
<span>{p.exportMenu}</span>
</ContextMenuItem>
diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.ts
index 70c7faff669..2a378e62118 100644
--- a/apps/desktop/src/i18n/ar.ts
+++ b/apps/desktop/src/i18n/ar.ts
@@ -1631,6 +1631,12 @@ export const ar = defineLocale({
actions: 'إجراءات',
color: 'اللون',
colorFor: 'اللون',
+ openInNewWindow: 'فتح في نافذة جديدة',
+ setAsDefault: 'تعيين كافتراضي',
+ defaultProfile: 'الملف الشخصي الافتراضي',
+ defaultSet: name => `أصبح ${name} الملف الافتراضي`,
+ defaultDescription: 'يُستخدم عند فتح Hermes وللمحادثات الجديدة. تبقى الجلسات الحالية في ملفاتها الشخصية.',
+ failedSetDefault: 'تعذّر تعيين الملف الشخصي الافتراضي',
setColor: color => `ضبط اللون ${color}`,
autoColor: 'لون تلقائي',
noProfiles: 'لا توجد ملفات شخصية',
diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.ts
index 1d2ce023240..1a764f374d7 100644
--- a/apps/desktop/src/i18n/en.ts
+++ b/apps/desktop/src/i18n/en.ts
@@ -2400,6 +2400,12 @@ export const en: Translations = {
actions: 'Actions',
color: 'Color…',
colorFor: 'Color',
+ openInNewWindow: 'Open in new window',
+ setAsDefault: 'Set as default',
+ defaultProfile: 'Default profile',
+ defaultSet: name => `${name} is now the default`,
+ defaultDescription: 'Used when Hermes opens and for new chats. Existing sessions stay in their profiles.',
+ failedSetDefault: 'Could not set the default profile',
setColor: color => `Set color ${color}`,
autoColor: 'Auto',
noProfiles: 'No profiles yet.',
diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.ts
index 3d1b2473086..47b4a14115c 100644
--- a/apps/desktop/src/i18n/ja.ts
+++ b/apps/desktop/src/i18n/ja.ts
@@ -1916,6 +1916,12 @@ export const ja = defineLocale({
color: 'カラー…',
colorFor: 'カラー',
+ openInNewWindow: '新しいウィンドウで開く',
+ setAsDefault: 'デフォルトに設定',
+ defaultProfile: 'デフォルトのプロファイル',
+ defaultSet: name => `${name} をデフォルトに設定しました`,
+ defaultDescription: 'Hermes の起動時と新しいチャットに使用します。既存のセッションのプロファイルは変わりません。',
+ failedSetDefault: 'デフォルトのプロファイルを設定できませんでした',
setColor: color => `カラー ${color} に設定`,
autoColor: '自動',
noProfiles: 'プロファイルが見つかりません。',
diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.ts
index df21d80553a..4257d789db1 100644
--- a/apps/desktop/src/i18n/ru.ts
+++ b/apps/desktop/src/i18n/ru.ts
@@ -2183,6 +2183,12 @@ export const ru = defineLocale({
actions: 'Действия',
color: 'Цвет…',
colorFor: 'Цвет',
+ openInNewWindow: 'Открыть в новом окне',
+ setAsDefault: 'Сделать по умолчанию',
+ defaultProfile: 'Профиль по умолчанию',
+ defaultSet: name => `${name} теперь используется по умолчанию`,
+ defaultDescription: 'Используется при запуске Hermes и для новых чатов. Профили существующих сессий не меняются.',
+ failedSetDefault: 'Не удалось установить профиль по умолчанию',
setColor: color => `Установить цвет ${color}`,
autoColor: 'Авто',
noProfiles: 'Профилей пока нет.',
diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.ts
index 536d29b0298..5c276184909 100644
--- a/apps/desktop/src/i18n/types.ts
+++ b/apps/desktop/src/i18n/types.ts
@@ -2073,6 +2073,12 @@ export interface Translations {
actions: string
color: string
colorFor: string
+ openInNewWindow: string
+ setAsDefault: string
+ defaultProfile: string
+ defaultSet: (name: string) => string
+ defaultDescription: string
+ failedSetDefault: string
setColor: (color: string) => string
autoColor: string
noProfiles: string
diff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.ts
index c434702518b..5bc17f7994a 100644
--- a/apps/desktop/src/i18n/zh-hant.ts
+++ b/apps/desktop/src/i18n/zh-hant.ts
@@ -1906,6 +1906,12 @@ export const zhHant = defineLocale({
actions: '動作',
color: '顏色…',
colorFor: '顏色',
+ openInNewWindow: '在新視窗中開啟',
+ setAsDefault: '設為預設',
+ defaultProfile: '預設設定檔',
+ defaultSet: name => `${name} 已設為預設`,
+ defaultDescription: '用於 Hermes 啟動和新建聊天。現有工作階段仍保留在各自的設定檔中。',
+ failedSetDefault: '無法設定預設設定檔',
setColor: color => `設定顏色 ${color}`,
autoColor: '自動',
noProfiles: '找不到設定檔。',
diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.ts
index 1ab0cf0b686..195d2f76bff 100644
--- a/apps/desktop/src/i18n/zh.ts
+++ b/apps/desktop/src/i18n/zh.ts
@@ -2548,6 +2548,12 @@ export const zh = defineLocale({
actions: '操作',
color: '颜色…',
colorFor: '颜色',
+ openInNewWindow: '在新窗口中打开',
+ setAsDefault: '设为默认',
+ defaultProfile: '默认配置档案',
+ defaultSet: name => `${name} 已设为默认`,
+ defaultDescription: '用于 Hermes 启动和新建聊天。现有会话仍保留在各自的配置档案中。',
+ failedSetDefault: '无法设置默认配置档案',
setColor: color => `设置颜色 ${color}`,
autoColor: '自动',
noProfiles: '暂无配置档案。',
diff --git a/apps/desktop/src/store/windows.ts b/apps/desktop/src/store/windows.ts
index bf24e6f0fb4..c6f2c5b4435 100644
--- a/apps/desktop/src/store/windows.ts
+++ b/apps/desktop/src/store/windows.ts
@@ -216,12 +216,12 @@ export async function openSessionInNewWindow(sessionId: string, opts?: { watch?:
// Open a new full-chrome app window — a peer instance of the primary that
// renders the complete app against the shared backend. No-ops outside Electron.
-export async function openNewWindow(): Promise<void> {
+export async function openNewWindow(route?: { connectionId: null | string; profile: string }): Promise<void> {
if (!canOpenNewWindow()) {
return
}
- await runWindowOpen(() => window.hermesDesktop.openWindow(), 'Could not open a new window')
+ await runWindowOpen(() => window.hermesDesktop.openWindow(route), 'Could not open a new window')
}
/** Pop the in-app Browser into its own OS window. Returns whether the