MCPcopy Create free account
hub / github.com/dtinth/ThreadGPT / rmRf

Function rmRf

src/App.tsx:735–746  ·  view source on GitHub ↗
(nodeId: string)

Source from the content-addressed store, hash-verified

733}
734
735async function rmRf(nodeId: string): Promise<number> {
736 const node = await ikv.get<ThreadNode>(storageKey(nodeId))
737 if (!node) {
738 return 0
739 }
740 return (
741 await Promise.all([
742 ...node.children.map((childId) => rmRf(childId)),
743 ikv.del(storageKey(nodeId)).then(() => 1),
744 ])
745 ).reduce((a, b) => a + b, 0)
746}
747
748interface ModelSelector {
749 disabled: boolean

Callers 1

ThreadGPTFunction · 0.85

Calls 1

storageKeyFunction · 0.85

Tested by

no test coverage detected