🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🐛 fix(agent): show channels for device-backed heterogeneous agents (#20371)
AmAzing-9e8f7af5f1c5
diff --git a/src/features/AgentProfileTabs/index.tsx b/src/features/AgentProfileTabs/index.tsxindex 56214ab7fe3..63ef1ec7267 100644--- a/src/features/AgentProfileTabs/index.tsx+++ b/src/features/AgentProfileTabs/index.tsx@@ -8,15 +8,12 @@ import { useAgentShareSupported } from '@/business/client/useAgentShareSupportedimport { useResourceAccess } from '@/features/ResourcePermission/useResourceAccess';import { useWorkspaceAwareNavigate } from '@/features/Workspace/useWorkspaceAwareNavigate';import { usePermission } from '@/hooks/usePermission';-import { useAgentStore } from '@/store/agent';-import { agentSelectors } from '@/store/agent/selectors';import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';import {type AgentProfileTab,buildAgentProfileTabOptions,buildAgentProfileTabPath,- supportsMessageChannels,} from './tabOptions';export type { AgentProfileTab } from './tabOptions';@@ -58,9 +55,6 @@ const AgentProfileTabs = memo<AgentProfileTabsProps>(({ active, agentId }) => {const { t } = useTranslation(['chat', 'common', 'spend']);const navigate = useWorkspaceAwareNavigate();- const heterogeneousProviderType = useAgentStore(- agentSelectors.currentAgentHeterogeneousProviderType,- );const { allowed: canEditContent } = usePermission('edit_own_content');const { canEditResource, canManageResource, isAccessResolved } = useResourceAccess('agent',@@ -71,7 +65,6 @@ const AgentProfileTabs = memo<AgentProfileTabsProps>(({ active, agentId }) => {const canConfigure = !!isAgentEditable && isAccessResolved && canEditContent && canEditResource;const canManageShare =!!isAgentEditable && isAccessResolved && canEditContent && canManageResource;- const channelsSupported = supportsMessageChannels(heterogeneousProviderType);const { visible: shareVisible } = useAgentShareSupported(agentId);const options = useMemo(@@ -79,7 +72,6 @@ const AgentProfileTabs = memo<AgentProfileTabsProps>(({ active, agentId }) => {buildAgentProfileTabOptions({active,canConfigure,- channelsSupported,labels: {channel: t('tab.integration'),// Inside the profile group the whole surface *is* the agent profile,@@ -91,7 +83,7 @@ const AgentProfileTabs = memo<AgentProfileTabsProps>(({ active, agentId }) => {},shareSupported: shareVisible === true && canManageShare,}),- [active, canConfigure, canManageShare, channelsSupported, shareVisible, t],+ [active, canConfigure, canManageShare, shareVisible, t],);// A lone segment is a label, not a switcher.diff --git a/src/features/AgentProfileTabs/tabOptions.test.ts b/src/features/AgentProfileTabs/tabOptions.test.tsindex 5960b843808..f7150683ccf 100644--- a/src/features/AgentProfileTabs/tabOptions.test.ts+++ b/src/features/AgentProfileTabs/tabOptions.test.ts@@ -1,10 +1,6 @@import { describe, expect, it } from 'vitest';-import {- buildAgentProfileTabOptions,- buildAgentProfileTabPath,- supportsMessageChannels,-} from './tabOptions';+import { buildAgentProfileTabOptions, buildAgentProfileTabPath } from './tabOptions';const labels = {channel: 'tab.integration',@@ -13,18 +9,6 @@ const labels = {statistics: 'usageStats.title',};-describe('supportsMessageChannels', () => {- it('allows cloud agents and the CLI providers that host channels', () => {- expect(supportsMessageChannels()).toBe(true);- expect(supportsMessageChannels('claude-code')).toBe(true);- expect(supportsMessageChannels('codex')).toBe(true);- });-- it('rejects device-only heterogeneous agents', () => {- expect(supportsMessageChannels('opencode')).toBe(false);- });-});-describe('buildAgentProfileTabPath', () => {it('builds the sub-route of the agent', () => {expect(buildAgentProfileTabPath('agt_1', 'statistics')).toBe('/agent/agt_1/statistics');@@ -36,7 +20,6 @@ describe('buildAgentProfileTabOptions', () => {const options = buildAgentProfileTabOptions({active: 'profile',canConfigure: true,- channelsSupported: true,labels,shareSupported: true,});@@ -49,23 +32,21 @@ describe('buildAgentProfileTabOptions', () => {]);});- it('drops channels when the agent cannot host them', () => {+ it('allows configuring channels even when the agent needs a device to execute', () => {const options = buildAgentProfileTabOptions({active: 'profile',canConfigure: true,- channelsSupported: false,labels,shareSupported: false,});- expect(options.map((option) => option.value)).toEqual(['profile', 'statistics']);+ expect(options.map((option) => option.value)).toEqual(['profile', 'channel', 'statistics']);});it('drops the config tabs for a member without edit access', () => {const options = buildAgentProfileTabOptions({active: 'statistics',canConfigure: false,- channelsSupported: true,labels,shareSupported: true,});@@ -77,7 +58,6 @@ describe('buildAgentProfileTabOptions', () => {const options = buildAgentProfileTabOptions({active: 'channel',canConfigure: false,- channelsSupported: false,labels,shareSupported: false,});@@ -89,7 +69,6 @@ describe('buildAgentProfileTabOptions', () => {const options = buildAgentProfileTabOptions({active: 'profile',canConfigure: true,- channelsSupported: true,labels,shareSupported: false,});@@ -101,7 +80,6 @@ describe('buildAgentProfileTabOptions', () => {const options = buildAgentProfileTabOptions({active: 'share',canConfigure: false,- channelsSupported: false,labels,shareSupported: false,});diff --git a/src/features/AgentProfileTabs/tabOptions.ts b/src/features/AgentProfileTabs/tabOptions.tsindex 45b53f075ac..df9efbc8db6 100644--- a/src/features/AgentProfileTabs/tabOptions.ts+++ b/src/features/AgentProfileTabs/tabOptions.ts@@ -7,16 +7,6 @@ export interface AgentProfileTabOption {value: AgentProfileTab;}-/**- * Message channels exist for cloud agents and for the two CLI providers whose- * runtime can host them — a device-only heterogeneous agent has nothing to- * connect, so the segment must not be offered.- */-export const supportsMessageChannels = (heterogeneousProviderType?: string) =>- !heterogeneousProviderType ||- heterogeneousProviderType === 'claude-code' ||- heterogeneousProviderType === 'codex';-export const buildAgentProfileTabPath = (agentId: string, tab: AgentProfileTab) =>urlJoin('/agent', agentId, tab);@@ -35,18 +25,17 @@ export const buildAgentProfileTabPath = (agentId: string, tab: AgentProfileTab)export const buildAgentProfileTabOptions = ({active,canConfigure,- channelsSupported,labels,shareSupported,}: {active: AgentProfileTab;canConfigure: boolean;- channelsSupported: boolean;labels: Record<AgentProfileTab, string>;shareSupported: boolean;}): AgentProfileTabOption[] => {const showProfile = canConfigure || active === 'profile';- const showChannel = (canConfigure && channelsSupported) || active === 'channel';+ // Channels can dispatch to a bound device; cloud sandbox support is not required.+ const showChannel = canConfigure || active === 'channel';// Sharing hands visitors real execution on the owner's account, so the// segment follows the same configure gate as Profile / Channels on top of the// capability gate (personal, non-builtin agents on deployments that allow it).