The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): dial user-gesture session opens with foreground priority
Teknium4d14c485bea5
diff --git a/apps/desktop/src/sdk/index.ts b/apps/desktop/src/sdk/index.tsindex 88b4d394677..849a7f4b051 100644--- a/apps/desktop/src/sdk/index.ts+++ b/apps/desktop/src/sdk/index.ts@@ -1066,11 +1066,14 @@ export const host = {// not the registry-secondary path openGatewayForAgent takes for a 'local'// connection id. Behavior for a plain local open is unchanged.const dial = explicitRoute- ? () => openGatewayForAgent(explicitRoute.connectionId, explicitRoute.profile)+ ? () =>+ openGatewayForAgent(explicitRoute.connectionId, explicitRoute.profile, {+ spawnPriority: 'foreground'+ }): plan.switchWorkspace? () => ensureGatewayProfile(plan.switchWorkspace as string): plan.dialWithoutSwitching- ? () => openGatewayForProfile(plan.dialWithoutSwitching as string)+ ? () => openGatewayForProfile(plan.dialWithoutSwitching as string, { spawnPriority: 'foreground' }): nullif (dial) {diff --git a/apps/desktop/src/sdk/profile-routing.test.ts b/apps/desktop/src/sdk/profile-routing.test.tsindex f06bb28ea1c..7cd9d96a821 100644--- a/apps/desktop/src/sdk/profile-routing.test.ts+++ b/apps/desktop/src/sdk/profile-routing.test.ts@@ -629,7 +629,11 @@ describe('profile-aware plugin session opens', () => {await host.openSession('remote-chat', { route })- expect(openGatewayForAgent).toHaveBeenCalledWith('source-a', 'default')+ expect(openGatewayForAgent).toHaveBeenCalledWith(+ 'source-a',+ 'default',+ expect.objectContaining({ spawnPriority: 'foreground' })+ )expect(ensureGatewayProfile).not.toHaveBeenCalled()expect(setShowAllProfiles).toHaveBeenCalledWith(true)expect($activeGatewayProfile.get()).toBe('remote-worker')@@ -1146,7 +1150,10 @@ describe('profile-aware plugin session opens', () => {await host.openSession('bot-chat', { profile: 'worker' })expect(ensureGatewayProfile).not.toHaveBeenCalled()- expect(openGatewayForProfile).toHaveBeenCalledWith('worker')+ expect(openGatewayForProfile).toHaveBeenCalledWith(+ 'worker',+ expect.objectContaining({ spawnPriority: 'foreground' })+ )expect(setShowAllProfiles).toHaveBeenCalledWith(true)expect($activeGatewayProfile.get()).toBe('default')})diff --git a/apps/desktop/src/store/profile.ts b/apps/desktop/src/store/profile.tsindex fa80331c8c4..f034de3dcba 100644--- a/apps/desktop/src/store/profile.ts+++ b/apps/desktop/src/store/profile.ts@@ -763,7 +763,10 @@ export async function openGatewayAgent(connectionId: string, profile: string): Preturn}- await openGatewayForAgent(connection, normalizeProfileKey(profile), { activationLease: true })+ await openGatewayForAgent(connection, normalizeProfileKey(profile), {+ activationLease: true,+ spawnPriority: 'foreground'+ })}// Activate a connection-scoped agent's gateway — the (connectionId, profile)