Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

Room settings polish: say which agents are yours, and focus a new role's name

Simon Flack5fbb929b5fc8
diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-configuration-panel.tsx b/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-configuration-panel.tsx
index 57ce606e6..1fbaca12f 100644
--- a/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-configuration-panel.tsx
+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-configuration-panel.tsx
@@ -1393,12 +1393,17 @@ const AddAgentPanel = observer(function AddAgentPanel({
const members = new Set(room.agentIds);
const remoteAgents = useWorkspaceAgents(workspaceId);
const serverId = workspacesStore.serverIdFor(workspaceId);
+ const viewerId = serverId ? (switchServersStore.statusFor(serverId)?.user?.id ?? null) : null;
return (
<AddParticipantPanel
noun="agent"
footer={null}
searchPlaceholder="Search agents…"
- allInText="Every agent on this server is already in this room."
+ allInText={
+ (remoteAgents.data ?? []).length === 0
+ ? 'There are no agents on this server yet.'
+ : 'Every agent on this server is already in this room.'
+ }
loading={remoteAgents.isPending}
loadError={
remoteAgents.isError ? failureText(remoteAgents.error, 'Could not list the agents.') : null
@@ -1412,7 +1417,8 @@ const AddAgentPanel = observer(function AddAgentPanel({
<AgentAvatar name={agent.name} iconUrl={agent.iconUrl} serverId={serverId} size={22} />
),
detail: [
- localAgentFor(agent.id, workspaceId)
+ localAgentFor(agent.id, workspaceId) ||
+ (viewerId !== null && agent.ownerId === viewerId)
? 'yours'
: agent.ownerName
? `${agent.ownerName}’s`
diff --git a/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-settings-sections.tsx b/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-settings-sections.tsx
index c8b91a99c..5f338edf0 100644
--- a/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-settings-sections.tsx
+++ b/console/apps/switch-console-desktop/src/renderer/features/switch-rooms/room-settings-sections.tsx
@@ -363,6 +363,7 @@ function RoleForm({
<Input
className="h-9"
aria-label="Role name"
+ autoFocus
placeholder="Role name, e.g. reviewer"
value={name}
onChange={(e) => setName(e.target.value)}