diff options
| author | Paul Buetow <paul@buetow.org> | 2025-08-31 22:59:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-08-31 22:59:11 +0300 |
| commit | befce3c1cc7d230a8cfa9105c8c276312b74cd29 (patch) | |
| tree | 2df8b2a9f3942769dd6ab90dbcbf40750a1986ae | |
| parent | 66ee5a0e77599a6c9a77ed34a87d5960f364f7e7 (diff) | |
refactor(showcase): remove Codex LLM support
docs: update showcase help text and AI tool fallback to exclude Codex.
| -rw-r--r-- | internal/cmd/showcase.go | 4 | ||||
| -rw-r--r-- | internal/showcase/showcase.go | 49 |
2 files changed, 4 insertions, 49 deletions
diff --git a/internal/cmd/showcase.go b/internal/cmd/showcase.go index ea5128c..6f9f984 100644 --- a/internal/cmd/showcase.go +++ b/internal/cmd/showcase.go @@ -23,7 +23,7 @@ var showcaseCmd = &cobra.Command{ Long: `Generate a comprehensive showcase of all your projects using AI. This feature creates a formatted document with project summaries, statistics, and code snippets. By default uses Claude, but will try hexai first if available, -then codex (if installed), and can also use aichat.`, +and can also use aichat.`, Example: ` # Generate showcase with cached summaries gitsyncer showcase @@ -64,6 +64,6 @@ func init() { showcaseCmd.Flags().StringVarP(&outputPath, "output", "o", "", "custom output path (default: ~/git/foo.zone-content/gemtext/about/showcase.gmi.tpl)") showcaseCmd.Flags().StringVar(&outputFormat, "format", "gemtext", "output format: gemtext, markdown, html") showcaseCmd.Flags().StringVar(&excludePattern, "exclude", "", "exclude repos matching pattern") - showcaseCmd.Flags().StringVar(&showcaseAITool, "ai-tool", "claude", "AI tool for summaries: hexai, claude, claude-code, codex, or aichat (default tries hexai→claude→codex→aichat)") + showcaseCmd.Flags().StringVar(&showcaseAITool, "ai-tool", "claude", "AI tool for summaries: hexai, claude, claude-code, or aichat (default tries hexai→claude→aichat)") showcaseCmd.Flags().StringVar(&showcaseRepo, "repo", "", "only generate showcase for a single repository") } diff --git a/internal/showcase/showcase.go b/internal/showcase/showcase.go index 7203d5e..01e0e2b 100644 --- a/internal/showcase/showcase.go +++ b/internal/showcase/showcase.go @@ -233,15 +233,13 @@ func (g *Generator) generateProjectSummary(repoName string, forceRegenerate bool selectedTool = "hexai" } else if _, err := exec.LookPath("claude"); err == nil { selectedTool = "claude" - } else if _, err := exec.LookPath("codex"); err == nil { - selectedTool = "codex" } else if _, err := exec.LookPath("aichat"); err == nil { selectedTool = "aichat" } else { // No AI tool available; fall back to README-based summary later selectedTool = "" } - case "hexai", "aichat", "codex": + case "hexai", "aichat": if _, err := exec.LookPath(g.aiTool); err != nil { // Requested tool missing; fall back to README-based summary later selectedTool = "" @@ -347,55 +345,12 @@ func (g *Generator) generateProjectSummary(repoName string, forceRegenerate bool // Will fall back below cmd = nil } - case "codex": - // Run codex CLI from inside the repository directory and let it infer context - // Try several non-interactive variants with a timeout, then fall back to prompt+stdin - fmt.Printf("Running codex CLI in repository directory...\n") - if os.Getenv("GITSYNCER_DEBUG") != "" { - if p, e := exec.LookPath("codex"); e == nil { - fmt.Printf(" codex path: %s\n", p) - } - } - - attempts := [][]string{ - {}, - {"describe"}, - {"describe", "."}, - {"project", "describe"}, - {"summary"}, - } - - for _, a := range attempts { - out, err := runCommandWithTimeout("codex", a...) - if err == nil { - trimmed := strings.TrimSpace(out) - if trimmed != "" { - summary = trimmed - break - } - } else if os.Getenv("GITSYNCER_DEBUG") != "" { - fmt.Printf(" codex %s failed: %v\n", strings.Join(a, " "), err) - } - } - - if summary == "" { - // Fall back to providing a prompt and synthesized context via stdin - fmt.Printf(" Falling back to prompt + stdin payload\n") - contextPayload, fromReadme := buildAIInputContext(repoPath) - if fromReadme { - fmt.Printf(" Using README content as input\n") - } else { - fmt.Printf(" No README found; using synthesized repo context\n") - } - cmd = exec.Command("codex", prompt) - cmd.Stdin = strings.NewReader(contextPayload) - } default: // No/unsupported tool; will fall back below cmd = nil } - if cmd != nil { + if cmd != nil { if output, err := cmd.Output(); err == nil { summary = strings.TrimSpace(string(output)) } |
