-
Notifications
You must be signed in to change notification settings - Fork 0
Fix issue #76: next sprint item (P2): Dogfood: run ShellFor… #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -155,9 +155,26 @@ model := "" | |||||||||||||||||||||||||||||
| // ── Step 1: Ollama (skip on headless server) ── | ||||||||||||||||||||||||||||||
| steps++ | ||||||||||||||||||||||||||||||
| if isServer { | ||||||||||||||||||||||||||||||
| fmt.Printf("── Step %d/%d: Ollama (skipped — server mode) ──\n", steps, total) | ||||||||||||||||||||||||||||||
| fmt.Println(" Detected: Linux, no GPU — skipping local model setup") | ||||||||||||||||||||||||||||||
| fmt.Println(" Use CLI drivers instead: shellforge run claude, copilot, codex, gemini") | ||||||||||||||||||||||||||||||
| fmt.Printf("── Step %d/%d: Ollama (server mode) ──\n", steps, total) | ||||||||||||||||||||||||||||||
| fmt.Println(" Detected: Linux, no GPU — remote Ollama configuration") | ||||||||||||||||||||||||||||||
| fmt.Println() | ||||||||||||||||||||||||||||||
| fmt.Print(" Configure remote Ollama (OLLAMA_HOST) for GPU endpoint? [Y/n] ") | ||||||||||||||||||||||||||||||
| if confirm(reader) { | ||||||||||||||||||||||||||||||
| fmt.Print(" Enter OLLAMA_HOST (e.g., http://192.168.1.100:11434): ") | ||||||||||||||||||||||||||||||
| ollamaHost := readLine(reader) | ||||||||||||||||||||||||||||||
| if ollamaHost != "" { | ||||||||||||||||||||||||||||||
| fmt.Printf(" → Set OLLAMA_HOST=%s before running shellforge\n", ollamaHost) | ||||||||||||||||||||||||||||||
|
Comment on lines
+161
to
+166
|
||||||||||||||||||||||||||||||
| fmt.Println(" ✓ Remote Ollama configured") | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| fmt.Println(" ⚠ No OLLAMA_HOST set — will use default (localhost:11434)") | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| fmt.Println(" Skipped remote Ollama configuration") | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| fmt.Println(" Note: Use CLI drivers for API-based inference:") | ||||||||||||||||||||||||||||||
| fmt.Println(" shellforge run claude \"review open PRs\"") | ||||||||||||||||||||||||||||||
| fmt.Println(" shellforge run copilot \"update docs\"") | ||||||||||||||||||||||||||||||
| fmt.Println(" shellforge run codex \"generate tests\"") | ||||||||||||||||||||||||||||||
| fmt.Println() | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| fmt.Printf("── Step %d/%d: Ollama (local LLM inference) ──\n", steps, total) | ||||||||||||||||||||||||||||||
|
|
@@ -300,10 +317,12 @@ fmt.Println() | |||||||||||||||||||||||||||||
| steps++ | ||||||||||||||||||||||||||||||
| fmt.Printf("── Step %d/%d: Agent drivers ──\n", steps, total) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // On Mac/GPU: offer Goose (local models via Ollama). On server: skip, show API drivers. | ||||||||||||||||||||||||||||||
| if !isServer { | ||||||||||||||||||||||||||||||
| // Offer Goose for both local and remote Ollama (works with OLLAMA_HOST) | ||||||||||||||||||||||||||||||
| if _, err := exec.LookPath("goose"); err != nil { | ||||||||||||||||||||||||||||||
| fmt.Println(" Goose — AI agent with native Ollama support (actually executes tools)") | ||||||||||||||||||||||||||||||
| if isServer { | ||||||||||||||||||||||||||||||
| fmt.Println(" Note: Works with remote Ollama via OLLAMA_HOST environment variable") | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| fmt.Print(" Install Goose? [Y/n] ") | ||||||||||||||||||||||||||||||
| if confirm(reader) { | ||||||||||||||||||||||||||||||
| fmt.Println(" → Installing Goose...") | ||||||||||||||||||||||||||||||
|
|
@@ -314,12 +333,19 @@ run("sh", "-c", "curl -fsSL https://github.com/block/goose/releases/download/sta | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| if _, err := exec.LookPath("goose"); err == nil { | ||||||||||||||||||||||||||||||
| fmt.Println(" ✓ Goose installed") | ||||||||||||||||||||||||||||||
| if isServer { | ||||||||||||||||||||||||||||||
| fmt.Println(" → Run 'goose configure' and set OLLAMA_HOST for remote GPU endpoint") | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| fmt.Println(" → Run 'goose configure' to set up Ollama provider") | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||
| fmt.Println(" ⚠ Install failed — try: brew install --cask block-goose") | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
341
to
344
|
||||||||||||||||||||||||||||||
| } else { | |
| fmt.Println(" ⚠ Install failed — try: brew install --cask block-goose") | |
| } | |
| } | |
| } else { | |
| if runtime.GOOS == "darwin" { | |
| fmt.Println(" ⚠ Install failed — try: brew install --cask block-goose") | |
| } else { | |
| fmt.Println(" ⚠ Install failed — try re-running:") | |
| fmt.Println(" curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bash") | |
| fmt.Println(" See Goose install docs: https://github.com/block/goose") | |
| } | |
| } | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The step header comment says Ollama is “skip[ped] on headless server”, but server mode now performs remote Ollama (OLLAMA_HOST) configuration. Update this comment to match the new behavior so future edits don’t reintroduce the old assumption.