feat: rework ux for deleting chats (#46)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { format, isAfter, isThisWeek, isThisYear, isToday, isYesterday, subDays } from 'date-fns';
|
||||
import type { ChatHistory } from '~/lib/persistence';
|
||||
import type { ChatHistoryItem } from '~/lib/persistence';
|
||||
|
||||
type Bin = { category: string; items: ChatHistory[] };
|
||||
type Bin = { category: string; items: ChatHistoryItem[] };
|
||||
|
||||
export function binDates(_list: ChatHistory[]) {
|
||||
export function binDates(_list: ChatHistoryItem[]) {
|
||||
const list = _list.toSorted((a, b) => Date.parse(b.timestamp) - Date.parse(a.timestamp));
|
||||
|
||||
const binLookup: Record<string, Bin> = {};
|
||||
|
||||
Reference in New Issue
Block a user