MCPcopy Create free account
hub / github.com/TanStack/ai / commit

Function commit

examples/ts-react-chat/src/routes/threads.tsx:186–191  ·  view source on GitHub ↗
(next: Array<ThreadMeta>)

Source from the content-addressed store, hash-verified

184 }, [])
185
186 const commit = (next: Array<ThreadMeta>) => {
187 const sorted = [...next].sort(byRecency)
188 threadsRef.current = sorted
189 setThreads(sorted)
190 writeIndex(sorted)
191 }
192
193 const createThread = (): ThreadMeta => {
194 const thread: ThreadMeta = {

Callers 3

createThreadFunction · 0.85
deleteThreadFunction · 0.85
touchThreadFunction · 0.85

Calls 1

writeIndexFunction · 0.85

Tested by

no test coverage detected