MCPcopy Create free account
hub / github.com/diillson/chatcli / TestVectorIndex_ForgetRemoves

Function TestVectorIndex_ForgetRemoves

cli/workspace/memory/vector_store_test.go:123–132  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

121}
122
123func TestVectorIndex_ForgetRemoves(t *testing.T) {
124 dir := t.TempDir()
125 provider := &fakeProvider{dim: 16}
126 v := NewVectorIndex(dir, provider, nil)
127 _ = v.BackfillFacts(context.Background(), map[string]string{"f1": "alpha", "f2": "beta"})
128 v.Forget("f1")
129 if v.Count() != 1 {
130 t.Errorf("Forget should leave 1 entry; got %d", v.Count())
131 }
132}

Callers

nothing calls this directly

Calls 5

BackfillFactsMethod · 0.95
ForgetMethod · 0.95
CountMethod · 0.95
NewVectorIndexFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected