(t *testing.T)
| 376 | } |
| 377 | |
| 378 | func TestLogicMemoryMiddleware_GetConfig(t *testing.T) { |
| 379 | store := logic.NewInMemoryStore() |
| 380 | manager, err := logic.NewManager(&logic.ManagerConfig{Store: store}) |
| 381 | require.NoError(t, err) |
| 382 | |
| 383 | mw, err := NewLogicMemoryMiddleware(&LogicMemoryMiddlewareConfig{ |
| 384 | Manager: manager, |
| 385 | EnableCapture: true, |
| 386 | EnableInjection: true, |
| 387 | MaxMemories: 10, |
| 388 | MinConfidence: 0.7, |
| 389 | AsyncCapture: true, |
| 390 | InjectionPoint: "system_prompt_start", |
| 391 | }) |
| 392 | require.NoError(t, err) |
| 393 | |
| 394 | config := mw.GetConfig() |
| 395 | assert.Equal(t, true, config["enable_capture"]) |
| 396 | assert.Equal(t, true, config["enable_injection"]) |
| 397 | assert.Equal(t, 10, config["max_memories"]) |
| 398 | assert.Equal(t, 0.7, config["min_confidence"]) |
| 399 | assert.Equal(t, true, config["async_capture"]) |
| 400 | assert.Equal(t, "system_prompt_start", config["injection_point"]) |
| 401 | } |
| 402 | |
| 403 | func TestDefaultNamespaceExtractor(t *testing.T) { |
| 404 | t.Run("extract from namespace", func(t *testing.T) { |
nothing calls this directly
no test coverage detected