diff options
| author | Paul Buetow <paul@buetow.org> | 2025-10-31 20:13:32 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-10-31 20:13:32 +0200 |
| commit | 11eea6a82cbfdde40ec1457c6ea080da4da6b7dc (patch) | |
| tree | 8026068f6a3beb3ee02c45f06f4487f4b89caaf1 /internal/cli/description_cache.go | |
| parent | 5c3e0b5cf99d028c4f06be7a825388b296e37a22 (diff) | |
feat: implement amp AI tool support and replace Taskfile with Magev0.10.0
- Add amp as default AI tool for release notes and showcase generation
- Fallback chain: amp → hexai → claude → aichat
- Replace Taskfile.yaml with magefile.go for build automation
- Update all documentation (README.md, AGENTS.md, doc/development.md)
- Update version to 0.10.0
Amp-Thread-ID: https://ampcode.com/threads/T-735ba1e2-0255-4b43-8ed1-6c0d2f78301b
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'internal/cli/description_cache.go')
| -rw-r--r-- | internal/cli/description_cache.go | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/internal/cli/description_cache.go b/internal/cli/description_cache.go index 1cfc951..a2ce9ab 100644 --- a/internal/cli/description_cache.go +++ b/internal/cli/description_cache.go @@ -1,38 +1,37 @@ package cli import ( - "encoding/json" - "fmt" - "os" - "path/filepath" + "encoding/json" + "fmt" + "os" + "path/filepath" ) // loadDescriptionCache loads the per-repo canonical description cache func loadDescriptionCache(workDir string) map[string]string { - cache := make(map[string]string) - cacheFile := filepath.Join(workDir, ".gitsyncer-descriptions-cache.json") - data, err := os.ReadFile(cacheFile) - if err != nil { - return cache - } - if err := json.Unmarshal(data, &cache); err != nil { - fmt.Printf("Warning: Failed to parse descriptions cache: %v\n", err) - return make(map[string]string) - } - fmt.Printf("Loaded descriptions cache with %d entries\n", len(cache)) - return cache + cache := make(map[string]string) + cacheFile := filepath.Join(workDir, ".gitsyncer-descriptions-cache.json") + data, err := os.ReadFile(cacheFile) + if err != nil { + return cache + } + if err := json.Unmarshal(data, &cache); err != nil { + fmt.Printf("Warning: Failed to parse descriptions cache: %v\n", err) + return make(map[string]string) + } + fmt.Printf("Loaded descriptions cache with %d entries\n", len(cache)) + return cache } // saveDescriptionCache saves the per-repo canonical description cache func saveDescriptionCache(workDir string, cache map[string]string) error { - cacheFile := filepath.Join(workDir, ".gitsyncer-descriptions-cache.json") - data, err := json.MarshalIndent(cache, "", " ") - if err != nil { - return fmt.Errorf("failed to marshal descriptions cache: %w", err) - } - if err := os.WriteFile(cacheFile, data, 0644); err != nil { - return fmt.Errorf("failed to write descriptions cache: %w", err) - } - return nil + cacheFile := filepath.Join(workDir, ".gitsyncer-descriptions-cache.json") + data, err := json.MarshalIndent(cache, "", " ") + if err != nil { + return fmt.Errorf("failed to marshal descriptions cache: %w", err) + } + if err := os.WriteFile(cacheFile, data, 0644); err != nil { + return fmt.Errorf("failed to write descriptions cache: %w", err) + } + return nil } - |
