From a6060b81a53780772c7d36e069b3f957d718b282 Mon Sep 17 00:00:00 2001 From: eduardruzga Date: Fri, 22 Nov 2024 10:17:28 +0200 Subject: [PATCH 01/23] Export chat from sidebar --- app/components/sidebar/HistoryItem.tsx | 11 +++++- app/utils/chatExport.ts | 46 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 app/utils/chatExport.ts diff --git a/app/components/sidebar/HistoryItem.tsx b/app/components/sidebar/HistoryItem.tsx index df270c8..6a6f61b 100644 --- a/app/components/sidebar/HistoryItem.tsx +++ b/app/components/sidebar/HistoryItem.tsx @@ -1,6 +1,7 @@ import * as Dialog from '@radix-ui/react-dialog'; import { useEffect, useRef, useState } from 'react'; import { type ChatHistoryItem } from '~/lib/persistence'; +import { exportChat } from '~/utils/chatExport'; interface HistoryItemProps { item: ChatHistoryItem; @@ -43,9 +44,17 @@ export function HistoryItem({ item, onDelete, onDuplicate }: HistoryItemProps) { > {item.description} -
+
{hovering && (
+