(projectId: string, threadId: string)
| 309 | |
| 310 | // Remove a chat thread from a project and persist the change |
| 311 | export function deleteChatThread(projectId: string, threadId: string): void { |
| 312 | const base = |
| 313 | loadChatState() || |
| 314 | ({ threadsByProject: {}, version: 1 } as PersistedChatsState) |
| 315 | const list = base.threadsByProject[projectId] || [] |
| 316 | base.threadsByProject[projectId] = list.filter((t) => t.id !== threadId) |
| 317 | saveChatState({ ...base }) |
| 318 | } |
no test coverage detected