This commit is contained in:
pablonyx
2025-03-06 10:55:12 -08:00
committed by GitHub
parent 626da583aa
commit bfbc1cd954
4 changed files with 6 additions and 7 deletions

View File

@@ -191,6 +191,7 @@ export const FolderDropdown = forwardRef<HTMLDivElement, FolderDropdownProps>(
onChange={(e) => setNewFolderName(e.target.value)} onChange={(e) => setNewFolderName(e.target.value)}
className="text-sm font-medium bg-transparent outline-none w-full pb-1 border-b border-background-500 transition-colors duration-200" className="text-sm font-medium bg-transparent outline-none w-full pb-1 border-b border-background-500 transition-colors duration-200"
onKeyDown={(e) => { onKeyDown={(e) => {
e.stopPropagation();
if (e.key === "Enter") { if (e.key === "Enter") {
handleEdit(); handleEdit();
} }

View File

@@ -303,7 +303,6 @@ const FolderItem = ({
key={chatSession.id} key={chatSession.id}
chatSession={chatSession} chatSession={chatSession}
isSelected={chatSession.id === currentChatId} isSelected={chatSession.id === currentChatId}
skipGradient={isDragOver}
showShareModal={showShareModal} showShareModal={showShareModal}
showDeleteModal={showDeleteModal} showDeleteModal={showDeleteModal}
/> />

View File

@@ -32,21 +32,17 @@ export function ChatSessionDisplay({
chatSession, chatSession,
search, search,
isSelected, isSelected,
skipGradient,
closeSidebar, closeSidebar,
showShareModal, showShareModal,
showDeleteModal, showDeleteModal,
foldersExisting,
isDragging, isDragging,
}: { }: {
chatSession: ChatSession; chatSession: ChatSession;
isSelected: boolean; isSelected: boolean;
search?: boolean; search?: boolean;
skipGradient?: boolean;
closeSidebar?: () => void; closeSidebar?: () => void;
showShareModal?: (chatSession: ChatSession) => void; showShareModal?: (chatSession: ChatSession) => void;
showDeleteModal?: (chatSession: ChatSession) => void; showDeleteModal?: (chatSession: ChatSession) => void;
foldersExisting?: boolean;
isDragging?: boolean; isDragging?: boolean;
}) { }) {
const router = useRouter(); const router = useRouter();
@@ -238,8 +234,12 @@ export function ChatSessionDisplay({
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
}} }}
onChange={(e) => setChatName(e.target.value)} onChange={(e) => {
setChatName(e.target.value);
}}
onKeyDown={(event) => { onKeyDown={(event) => {
event.stopPropagation();
if (event.key === "Enter") { if (event.key === "Enter") {
onRename(); onRename();
event.preventDefault(); event.preventDefault();

View File

@@ -264,7 +264,6 @@ export function PagesTab({
> >
<ChatSessionDisplay <ChatSessionDisplay
chatSession={chat} chatSession={chat}
foldersExisting={foldersExisting}
isSelected={currentChatId === chat.id} isSelected={currentChatId === chat.id}
showShareModal={showShareModal} showShareModal={showShareModal}
showDeleteModal={showDeleteModal} showDeleteModal={showDeleteModal}