MCPcopy Create free account
hub / github.com/xerrors/Yuxi / createThread

Function createThread

web/src/stores/chatThreads.js:65–79  ·  view source on GitHub ↗
(agentId, title = '新的对话')

Source from the content-addressed store, hash-verified

63 }
64
65 const createThread = async (agentId, title = '新的对话') => {
66 if (!agentId) return null
67
68 try {
69 const thread = await threadApi.createThread(agentId, title)
70 if (thread) {
71 threads.value = [thread, ...threads.value.filter((item) => item.id !== thread.id)]
72 }
73 return thread
74 } catch (error) {
75 console.error('Failed to create thread:', error)
76 handleChatError(error, 'create')
77 throw error
78 }
79 }
80
81 const deleteThread = async (threadId) => {
82 if (!threadId) return

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected