(t *testing.T)
| 380 | } |
| 381 | |
| 382 | func 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 | |
| 406 | func TestExtractJSON(t *testing.T) { |
| 407 | tests := []struct { |
nothing calls this directly
no test coverage detected