(t *testing.T)
| 55 | } |
| 56 | |
| 57 | func TestManager_ProcessExtraction(t *testing.T) { |
| 58 | dir := t.TempDir() |
| 59 | mgr := NewManager(dir, DefaultConfig(), testLogger()) |
| 60 | |
| 61 | response := `## DAILY |
| 62 | - Modified cli/workspace/memory/store.go |
| 63 | - Added new profile system |
| 64 | |
| 65 | ## LONGTERM |
| 66 | - ChatCLI uses Go 1.25 with Bubble Tea TUI framework |
| 67 | - User prefers Portuguese for conversation |
| 68 | |
| 69 | ## PROFILE_UPDATE |
| 70 | name=Edilson |
| 71 | role=Software Engineer |
| 72 | expertise_level=expert |
| 73 | preferred_language=Portuguese |
| 74 | |
| 75 | ## TOPICS |
| 76 | Go, Bubble Tea, memory systems, TUI |
| 77 | |
| 78 | ## PROJECTS |
| 79 | project_name=chatcli |
| 80 | project_path=/Users/edilson/GolandProjects/chatcli |
| 81 | project_status=active |
| 82 | project_technologies=Go, Bubble Tea` |
| 83 | |
| 84 | mgr.ProcessExtraction(response) |
| 85 | |
| 86 | // Check profile |
| 87 | profile := mgr.Profile.Get() |
| 88 | if profile.Name != "Edilson" { |
| 89 | t.Errorf("expected name Edilson, got %q", profile.Name) |
| 90 | } |
| 91 | if profile.Role != "Software Engineer" { |
| 92 | t.Errorf("expected role, got %q", profile.Role) |
| 93 | } |
| 94 | |
| 95 | // Check topics |
| 96 | topics := mgr.Topics.GetAll() |
| 97 | if len(topics) < 3 { |
| 98 | t.Errorf("expected at least 3 topics, got %d", len(topics)) |
| 99 | } |
| 100 | |
| 101 | // Check projects |
| 102 | projects := mgr.Projects.GetAll() |
| 103 | if len(projects) != 1 { |
| 104 | t.Errorf("expected 1 project, got %d", len(projects)) |
| 105 | } |
| 106 | |
| 107 | // Check facts |
| 108 | if mgr.Facts.Count() < 1 { |
| 109 | t.Error("expected at least one fact from LONGTERM section") |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | func TestManager_RelevantContext(t *testing.T) { |
| 114 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected