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

Function cleanupThreadState

web/src/composables/useAgentThreadState.js:47–60  ·  view source on GitHub ↗
(threadId)

Source from the content-addressed store, hash-verified

45 }
46
47 const cleanupThreadState = (threadId) => {
48 if (!threadId) return
49 const threadState = chatState.threadStates[threadId]
50 if (!threadState) return
51
52 if (typeof onBeforeCleanupThread === 'function') {
53 onBeforeCleanupThread(threadId)
54 }
55
56 if (threadState.runStreamAbortController) {
57 threadState.runStreamAbortController.abort()
58 }
59 delete chatState.threadStates[threadId]
60 }
61
62 const resetOnGoingConv = (threadId = null) => {
63 const targetThreadId =

Callers 1

resetOnGoingConvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected