Change endpoint configuration to use base URL pattern,
automatically appending /chat/completions path.
- Update default endpoint to base URL format
- Add automatic path construction in strategy
- Update README examples to use base URLs
- Update endpoint description to "base URL"
Follows OpenAI SDK standard pattern where users configure
base URL and library appends specific paths.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enable AI suggestions on empty prompts with enhanced
environmental context.
- Update AI_MIN_INPUT default from 3 to 0
- Add ALLOW_EMPTY_BUFFER opt-in config variable
- Remove empty-buffer guards in modify, suggest, enable
- Add zle-line-init hook for prompt-time suggestions
- Enhance history gathering with PWD-aware priority
- Add env context for dir listing, git branch, status
- Implement dual prompts: predict vs complete modes
- Add prompt artifact stripping for $ and > prefixes
- Update README with empty buffer configuration
- Add tests for empty buffer and artifact stripping
Empty buffer suggestions require zsh 5.3+ and work best with
AI strategy, leveraging directory context, git state, and
command history to predict likely next actions.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add new AI strategy that queries OpenAI-compatible LLM APIs
to generate intelligent command completions based on partial
input, working directory, and recent shell history.
- Add AI strategy implementation with JSON escaping
- Add context gathering with PWD prioritization
- Add response normalization for clean suggestions
- Add configuration defaults for AI settings
- Add comprehensive test suite with mocked responses
- Update README with setup guide and examples
Enables LLM-powered completions via ZSH_AUTOSUGGEST_AI_API_KEY
with silent failure and fallback to next strategy. Supports
OpenAI, Ollama, and custom endpoints. Requires curl and jq.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The testing docker image has been split up. Instead of having one image
with all supported versions of zsh installed, we now have a separate
image for each supported zsh version.
We use GitHub Action matrices to run jobs in parallel for all of the
supported versions.
We no longer need to publish images to Docker Hub. The images are just
built by CI (or developers) as needed from the Dockerfile in the repo.
There's something funny occasionally happening when `with_history` is
used twice in the same test. It seems to be happening more frequently
since asynchronous mode was enabled by default. My guess is it has
something to do with the `C-c` keys being sent toward the end not
consistently terminating the prompt. But I'm really not sure how it
would ever get into a `then` block like it seems to:
```
Failure/Error: wait_for { session.content }.to eq('echo "hello\nworld"')
expected: "echo \"hello\\nworld\""
got: "then> echo \"hello\\"
```
Sticking to only one `with_history` per terminal session (per test)
seems to fix the flakiness.
I also removed an old test case because I could not understand why it
was necessary and so couldn't write a good description for it. Could be
we'll need to add it back in at some point.