onSelectConversation(conversation.id)}
+ >
+
+
+ {editingId === conversation.id ? (
+ setEditTitle(e.target.value)}
+ onBlur={() => handleEditSave(conversation.id)}
+ onKeyPress={(e) =>
+ e.key === "Enter" && handleEditSave(conversation.id)
+ }
+ className="h-6 text-sm bg-[#2A2A2A] border-0 focus:ring-2 focus:ring-[#7C68FA]"
+ autoFocus
+ />
+ ) : (
+
+ {searchQuery &&
+ conversation.title
+ .toLowerCase()
+ .includes(searchQuery.toLowerCase())
+ ? conversation.title
+ .split(new RegExp(`(${searchQuery})`, "gi"))
+ .map((part, i) =>
+ part.toLowerCase() === searchQuery.toLowerCase() ? (
+
+ {part}
+
+ ) : (
+ part
+ ),
+ )
+ : conversation.title}
+
+ )}
+
+
+
+
+