Skip to content

v0.7.0

Choose a tag to compare

@snonux snonux released this 07 Feb 19:48
· 450 commits to main since this release

Release v0.7.0

Release Notes

Overview

This release of Hexai focuses on significantly improving in-editor productivity and smoothness of use—especially for Helix/Tmux users—by introducing a new TUI-based code action runner, enhanced Helix integration, improved command-line tooling, and strong test coverage. It also brings many usability improvements, bug fixes, and documentation updates.


Features

Interactive TUI Action Runner (hexai-action)

  • New binary: hexai-action

    • Provides a terminal UI (TUI) for selecting and running code actions (e.g., rewrite, explain, refactor, document) directly on selected code.
    • Integrates with Helix using :pipe hexai-action to replace selections with chosen action results.
  • Seamless Tmux Integration

    • When run inside a tmux session via :pipe, Hexai automatically opens the TUI in a split pane for a focused and intuitive action workflow.
    • Gracefully falls back to in-terminal TUI or simple echo when TUI or tmux are unavailable.
  • Flexible CLI flags

    • Supports --tmux, --no-tmux, --infile, --outfile, --tmux-target, --tmux-split, and --tmux-percent for advanced and scriptable integrations.
  • Extensive Unit Tests and Coverage

    • New internal/tmux and internal/hexaiaction packages have ≥85% test coverage; main binary also has CLI integration-style tests.
  • Documentation Improvements

    • Updated README and usage guides for action runner setup and tmux integration.
    • Step-by-step examples for Helix configuration.

Other Notable Features

  • Helix Keybinding Simplicity: No helper scripts required; just pipe the selection via :pipe hexai-action.
  • Robust Input Handling: Supports inline instructions in code comments or semicolons for one-step rewrite operations.
  • Menu-based Action Selection: Choose the code action interactively using arrow keys or hotkeys; immediate feedback in split pane.

Improvements

  • Test Coverage Boost: Cross-package test coverage exceeds 85%, improving reliability and making future contributions safer.
  • Build and Install Experience: Mage targets now include the hexai-action binary and cross-package coverage reporting.
  • Better CLI & Binary Structure: All binaries (hexai, hexai-lsp, hexai-action) are consistently built, tested, and installed via mage and go install.
  • Documentation:
    • All configuration, integration, and testing guides have been updated for clarity and to include hexai-action.
    • config.toml.example is referenced directly for quick configuration.
    • Testing guides explain package-specific and CI-relevant test environments.
  • Housekeeping: Removal of outdated helper scripts, refactors to keep function sizes small, and consistent build/test runner logic.

Bug Fixes

  • Unit Test Reliability: Fixed unit tests to pass in all environments, including cases where network access is restricted.
  • Coverage Calculation: Addressed cases where coverage reports were incomplete or incorrectly calculated.
  • TUI Robustness: The TUI runner now gracefully handles absence of TTY or tmux, echoing input or providing minimal fallback rather than failing unexpectedly.

Breaking Changes & Migration Steps

  • Helix Integration:
    The recommended way to use Hexai code actions in Helix is now:

    C-a = ":pipe hexai-action"
    
    • Migration:
      If your configuration previously relied on shell scripts or complex pipelines, update to call hexai-action directly as shown above.
  • Script Deprecation:
    Helper scripts such as llminputs/ai and hx.hexai-action-prompt are now obsolete; all orchestration is handled internally. They can be safely removed from your workflow.

  • Configuration Format Unchanged:
    No config migration is required from v0.6.0; only new options and better coverage/documentation are added.


How This Benefits You

  • Faster, Focused Code Changes: Immediate access to AI code actions without leaving your editor window.
  • Seamless Editor Experience: Auto-handling of in-terminal, tmux, or fallback modes ensures you always get a usable result.
  • Reliable and Future-Proof: Improved test coverage and code structure mean easier upgrades and more rapid delivery of new features.
  • Clearer Guidance and Setup: All documentation is refreshed—getting started and advanced usage is easier than ever.

Getting Started

  • Install all binaries:
    mage build && mage install
    or
    go install codeberg.org/snonux/hexai/cmd/hexai-action@latest
  • Update Helix keybindings:
    C-a = ":pipe hexai-action"
    
  • See docs/usage.md and README for more examples and flags.

Thank you to all contributors and users for your feedback and testing! Happy hacking—now with a powerful interactive AI-driven coding companion!