Skip to content

feat(ai): Gemini web default for free AI shell suggestions - #1

Open
eSlider wants to merge 8 commits into
masterfrom
feature/ollama-ai-defaults
Open

eSlider wants to merge 8 commits into
masterfrom
feature/ollama-ai-defaults

Conversation

@eSlider

@eSlider eSlider commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a native Go Gemini web (StreamGenerate) client so ? queries work without API keys or running a separate proxy service
  • Default AI backend is now gemini for new installs and upgrades without cloud API keys; Ollama remains available via hishtory config-set ai-completion-backend ollama
  • Improve AI suggestion normalization (strip markdown fences, balanced quotes) and add backend switching (gemini, ollama, chat, auto)

Test plan

  • go test github.com/ddworken/hishtory/shared/ai (unit + mock Gemini)
  • GEMINI_LIVE_TEST=1 go test ... -run TestLiveGeminiWeb against gemini.google.com
  • go install .
  • CI: Go Tests + Pre-Commit on all shards

Made with Cursor

eSlider and others added 6 commits April 21, 2026 14:36
…anup

Add Ollama /api/generate client with gemma3:1b default; route by endpoint and
keys; config ai-completion-backend (ollama/chat/auto); migrate no-key users
off default cloud URLs; trim markdown/punctuation from suggestions; tests and
README updates.

Made-with: Cursor
Recognize common markdown fence language tags, remove opening fence + lang
line first, then existing suffix/quote cleanup. Adds regression tests.

Made-with: Cursor
Remove trailing ", ', and ` only when the same character wraps the whole
string (utf8-safe). Fix markdown fence handling so symmetric ``` blocks
strip correctly without leaving a stray closing fence.

Made-with: Cursor
Port Gemini StreamGenerate client directly into Go so ?-queries work
without API keys or a local proxy. Keep Ollama and chat backends as
opt-in alternatives.

Co-authored-by: Cursor <[email protected]>
Run gofumpt/gci across touched files, lowercase Gemini/Ollama error
strings for ST1005, and add a lightweight fork-ci workflow for eSlider/hishtory.

Co-authored-by: Cursor <[email protected]>
Comment thread shared/ai/gemini_web.go Fixed
eSlider and others added 2 commits June 7, 2026 13:44
…ession anchor'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants