MCPcopy Create free account
hub / github.com/astercloud/aster / TestSessionSummaryManager_Disabled

Function TestSessionSummaryManager_Disabled

pkg/memory/session_summary_test.go:382–404  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

380}
381
382func TestSessionSummaryManager_Disabled(t *testing.T) {
383 mockProvider := &MockSummaryProvider{
384 response: `{"summary": "test", "topics": [], "key_points": [], "decisions": [], "action_items": []}`,
385 }
386
387 config := SessionSummaryConfig{
388 Enabled: false,
389 }
390
391 manager := NewSessionSummaryManager(mockProvider, config)
392
393 ctx := context.Background()
394 sessionID := "test-session"
395 messages := []types.Message{
396 {Role: "user", Content: "Hello"},
397 }
398
399 // 尝试生成摘要(应该失败)
400 _, err := manager.GenerateSummary(ctx, sessionID, messages)
401 if err == nil {
402 t.Fatal("Expected error when summary is disabled")
403 }
404}
405
406func TestExtractJSON(t *testing.T) {
407 tests := []struct {

Callers

nothing calls this directly

Calls 2

GenerateSummaryMethod · 0.95
NewSessionSummaryManagerFunction · 0.85

Tested by

no test coverage detected