()
| 191 | } |
| 192 | |
| 193 | const createThread = (): ThreadMeta => { |
| 194 | const thread: ThreadMeta = { |
| 195 | id: crypto.randomUUID(), |
| 196 | title: NEW_CHAT_TITLE, |
| 197 | updatedAt: Date.now(), |
| 198 | } |
| 199 | commit([thread, ...threadsRef.current]) |
| 200 | return thread |
| 201 | } |
| 202 | |
| 203 | const deleteThread = (id: string) => { |
| 204 | threadPersistence.removeItem(id) |
no test coverage detected