Skip to content

Commit

Permalink
feat: Data Tab
Browse files Browse the repository at this point in the history
Removed Chat History Tab
Added Data Tab
Data tab can export and delete chat history, import API keys, import and export settings
  • Loading branch information
dustinwloring1988 committed Dec 17, 2024
1 parent fce8999 commit a9b15e5
Show file tree
Hide file tree
Showing 3 changed files with 294 additions and 123 deletions.
8 changes: 4 additions & 4 deletions app/components/settings/SettingsWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ import { classNames } from '~/utils/classNames';
import { DialogTitle, dialogVariants, dialogBackdropVariants } from '~/components/ui/Dialog';
import { IconButton } from '~/components/ui/IconButton';
import styles from './Settings.module.scss';
import ChatHistoryTab from './chat-history/ChatHistoryTab';
import ProvidersTab from './providers/ProvidersTab';
import { useSettings } from '~/lib/hooks/useSettings';
import FeaturesTab from './features/FeaturesTab';
import DebugTab from './debug/DebugTab';
import EventLogsTab from './event-logs/EventLogsTab';
import ConnectionsTab from './connections/ConnectionsTab';
import DataTab from './data/DataTab';

interface SettingsProps {
open: boolean;
onClose: () => void;
}

type TabType = 'chat-history' | 'providers' | 'features' | 'debug' | 'event-logs' | 'connection';
type TabType = 'data' | 'providers' | 'features' | 'debug' | 'event-logs' | 'connection';

export const SettingsWindow = ({ open, onClose }: SettingsProps) => {
const { debug, eventLogs } = useSettings();
const [activeTab, setActiveTab] = useState<TabType>('chat-history');
const [activeTab, setActiveTab] = useState<TabType>('data');

const tabs: { id: TabType; label: string; icon: string; component?: ReactElement }[] = [
{ id: 'chat-history', label: 'Chat History', icon: 'i-ph:book', component: <ChatHistoryTab /> },
{ id: 'data', label: 'Data', icon: 'i-ph:database', component: <DataTab /> },
{ id: 'providers', label: 'Providers', icon: 'i-ph:key', component: <ProvidersTab /> },
{ id: 'connection', label: 'Connection', icon: 'i-ph:link', component: <ConnectionsTab /> },
{ id: 'features', label: 'Features', icon: 'i-ph:star', component: <FeaturesTab /> },
Expand Down
119 changes: 0 additions & 119 deletions app/components/settings/chat-history/ChatHistoryTab.tsx

This file was deleted.

Loading

0 comments on commit a9b15e5

Please sign in to comment.