From 8d4eb2ef0fca9e01d79792bfa8d008fc71b0566c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 11 Feb 2026 20:48:01 +0200 Subject: refactor: consolidate cache and state into .local/hexai directory Move all cache and state files under ~/.local/hexai/ with subdirectories: - ~/.local/hexai/cache/ (was ~/.cache/hexai/) - ~/.local/hexai/state/ (was ~/.local/state/hexai/) - ~/.local/hexai/data/ (was ~/.local/share/hexai/) This centralizes all non-config hexai files under a single .local/hexai directory, making it easier to manage and back up user data. Amp-Thread-ID: https://ampcode.com/threads/T-019c4e03-73db-70a2-ae27-3e1cc31d59c3 Co-authored-by: Amp --- internal/appconfig/config_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/appconfig/config_test.go') diff --git a/internal/appconfig/config_test.go b/internal/appconfig/config_test.go index ed7254c..cf9a725 100644 --- a/internal/appconfig/config_test.go +++ b/internal/appconfig/config_test.go @@ -321,7 +321,7 @@ func TestStateDir_XDG(t *testing.T) { if err != nil { t.Fatalf("StateDir: %v", err) } - expected := filepath.Join(dir, "hexai") + expected := filepath.Join(dir, "state") if stateDir != expected { t.Fatalf("expected %q, got %q", expected, stateDir) } @@ -337,9 +337,9 @@ func TestStateDir_Default(t *testing.T) { if err != nil { t.Fatalf("StateDir: %v", err) } - // Should default to ~/.local/state/hexai - if !strings.Contains(stateDir, ".local/state/hexai") { - t.Fatalf("expected path to contain .local/state/hexai, got %q", stateDir) + // Should default to ~/.local/hexai/state + if !strings.Contains(stateDir, ".local/hexai/state") { + t.Fatalf("expected path to contain .local/hexai/state, got %q", stateDir) } // Verify directory was created if _, err := os.Stat(stateDir); err != nil { -- cgit v1.2.3