feat: rework ux for deleting chats (#46)

This commit is contained in:
Dominic Elm
2024-08-21 07:58:43 +02:00
committed by GitHub
parent fcfef742d5
commit 1e11ab6395
10 changed files with 307 additions and 57 deletions

View File

@@ -1,12 +1,12 @@
import { useNavigate, useLoaderData } from '@remix-run/react';
import { useState, useEffect } from 'react';
import { useLoaderData, useNavigate } from '@remix-run/react';
import type { Message } from 'ai';
import { openDatabase, setMessages, getMessages, getNextId, getUrlId } from './db';
import { useEffect, useState } from 'react';
import { toast } from 'react-toastify';
import { AnalyticsAction, sendAnalyticsEvent } from '~/lib/analytics';
import { workbenchStore } from '~/lib/stores/workbench';
import { sendAnalyticsEvent, AnalyticsAction } from '~/lib/analytics';
import { getMessages, getNextId, getUrlId, openDatabase, setMessages } from './db';
export interface ChatHistory {
export interface ChatHistoryItem {
id: string;
urlId?: string;
description?: string;