From 2702c4f67a0b4e99cae75ddfc505ecdd97272cb8 Mon Sep 17 00:00:00 2001 From: Arjun Mahanti Date: Wed, 16 Sep 2026 10:44:57 -0400 Subject: [PATCH] Use shared sidebar actions and extract agent name field Signed-off-by: Arjun Mahanti --- .../agents/ui/AgentInstanceEditDialog.tsx | 33 +++----------- .../features/agents/ui/EditAgentNameField.tsx | 45 +++++++++++++++++++ .../pulse/ui/MessagesSidebarSection.tsx | 9 ++-- 3 files changed, 57 insertions(+), 30 deletions(-) create mode 100644 desktop/src/features/agents/ui/EditAgentNameField.tsx diff --git a/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx b/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx index 676733ebb9..e9c6b2da16 100644 --- a/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx +++ b/desktop/src/features/agents/ui/AgentInstanceEditDialog.tsx @@ -68,6 +68,7 @@ import { selectionOnRuntimeChange, type RuntimeModelProviderSelection, } from "./runtimeModelProviderSelection"; +import { EditAgentNameField } from "./EditAgentNameField"; import { AgentCreationPreview } from "./AgentCreationPreview"; import { OwnerOnlyAccessField } from "./OwnerOnlyAccessField"; import type { EnvVarsValue } from "./EnvVarsEditor"; @@ -975,33 +976,11 @@ export function AgentInstanceEditDialog({ )}
-
- - Agent name - -
- setName(event.target.value)} - placeholder="Agent name" - value={name} - /> -
-
+ void; +}) { + return ( +
+ + Agent name + +
+ onChange(event.target.value)} + placeholder="Agent name" + value={value} + /> +
+
+ ); +} diff --git a/desktop/src/features/pulse/ui/MessagesSidebarSection.tsx b/desktop/src/features/pulse/ui/MessagesSidebarSection.tsx index 1a39d2cbea..6a11fa60c6 100644 --- a/desktop/src/features/pulse/ui/MessagesSidebarSection.tsx +++ b/desktop/src/features/pulse/ui/MessagesSidebarSection.tsx @@ -2,6 +2,7 @@ import { useState, type ReactNode } from "react"; import { ChevronDown } from "lucide-react"; import { cn } from "@/shared/lib/cn"; import { StatusEmoji } from "@/features/user-status/ui/StatusEmoji"; +import { Button } from "@/shared/ui/button"; /** Collapsible classic section, using the same capsule rows as Recents. */ export function MessagesSidebarSection({ @@ -23,9 +24,11 @@ export function MessagesSidebarSection({ aria-label={name} >

- +

{open && children}