(threadId)
| 79 | } |
| 80 | |
| 81 | const deleteThread = async (threadId) => { |
| 82 | if (!threadId) return |
| 83 | |
| 84 | try { |
| 85 | await threadApi.deleteThread(threadId) |
| 86 | threads.value = threads.value.filter((thread) => thread.id !== threadId) |
| 87 | if (currentThreadId.value === threadId) { |
| 88 | currentThreadId.value = null |
| 89 | } |
| 90 | } catch (error) { |
| 91 | console.error('Failed to delete thread:', error) |
| 92 | handleChatError(error, 'delete') |
| 93 | throw error |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | const updateThread = async (threadId, title, isPinned) => { |
| 98 | if (!threadId) return |
nothing calls this directly
no outgoing calls
no test coverage detected