summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-02-08Bump version to 0.18.2v0.18.2Paul Buetow
2026-02-08Add unit tests to improve coverage above 80% targetPaul Buetow
Implement comprehensive unit tests for critical internal packages to increase overall test coverage from 80.9% to 81.8%, providing a buffer above the 80% threshold specified in project guidelines. Changes: - Add config parsing tests (parseTemperatureValue, decodeModelEntry, resolvedModel, parseSurfaceEntries) - Add HumanBytes utility tests with edge cases and boundary values - Fix HumanBytes bug: corrected suffix array indexing (off-by-one error) - Fix HumanBytes to handle negative values correctly - Add comprehensive shellJoin and isSafeBare tests for shell escaping - Update comments to reflect actual behavior and implementation details Coverage impact: - internal/appconfig: Improved config parsing function coverage - internal/textutil: HumanBytes now at 100% coverage (fixed bug in process) - internal/tmux: shellJoin and isSafeBare now at 100% coverage - Overall project: 80.9% → 81.8% (+0.9%) All tests pass. Code formatted with gofumpt. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-08Merge: resolve README conflict, keep hexai-tmux-edit and Custom prompt docsPaul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08chore: stop tracking build artifacts and temp filesPaul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08Bump version to 0.18.1Paul Buetow
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08Fix Claude agent clearing to use readline instead of vim commandsPaul Buetow
Claude Code's prompt input field does not support vim commands for clearing. The previous sequence 'Escape gg C-v G d i' resulted in literal text 'gGdijo' appearing in the prompt instead of clearing it. Changed to 'C-a C-k' (Emacs/readline style): - C-a: Move cursor to start of line - C-k: Kill (delete) from cursor to end of line Also added 150ms delay after Escape key in sendClearSequence to ensure mode transitions complete before subsequent keys are sent (though Claude uses readline, this helps other potential vim-based agents). Changes: - internal/tmuxedit/claude_agent.go: clearKeys "C-a C-k" instead of vim - internal/tmuxedit/claude_agent_test.go: Update test expectations - internal/tmuxedit/agentutil.go: Add time import and Escape delay - docs/usage.md: Update claude clear method documentation - docs/tmux.md: Clarify claude uses readline not vim - config.toml.example: Update claude description Integration tested: - Extracted: "final verification test" - Sent: "FINAL REPLACED TEXT NO VIM COMMANDS" - Result: Clean replacement with NO vim command artifacts - All unit tests pass (67/67) - Coverage: 80.9% Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08Fix amp agent prompt extraction to use TUI box patternPaul Buetow
Amp CLI runs in TUI mode with box-drawing UI (│ text │) similar to Cursor, not shell-style (> prompt). Updated prompt pattern from `(?m)>\s*(.+)$` to `(?m)│\s*(.+?)\s*│\s*$` to correctly extract text from amp's box UI. Changes: - internal/tmuxedit/config_agent.go: Update amp promptPat to box pattern - internal/tmuxedit/config_agent_test.go: Update test to use box format - docs/usage.md: Document detection order and clear methods for all agents - docs/tmux.md: Clarify input mode handling (Vim vs Emacs/readline) - config.toml.example: Add detailed agent descriptions and patterns - prompts/tmux-edit-integration-tests.md: Add test status, mock editor best practices Integration tests verified: - Amp detection: amp/sourcegraph keywords - Prompt extraction: "hello world test" correctly captured - End-to-end workflow: text modification and sending works - Multi-line support: all lines delivered correctly - All unit tests pass (67/67) - Coverage: 80.9% (meets requirement) - Cursor and Claude implementations unchanged Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08refactor tmuxedit to Agent interface with cursor/claude/config implementationsPaul Buetow
Replace monolithic AgentConfig struct with an Agent interface backed by baseAgent defaults and separate implementations for cursor (box-drawing extraction, bulk backspace clearing) and claude (section-scoped extraction with continuation lines, vim clearing). Simple agents (amp, aider) and user-defined agents use configAgent with baseAgent defaults. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08fix hexai-tmux-edit agent detection, multi-line extraction, and clearingPaul Buetow
- Reorder agents: cursor first to avoid false positive from "Claude 4.5 Sonnet" model name appearing in cursor panes - Change cursor detect pattern to box-drawing UI elements instead of name-based matching - Change claude detect pattern to ❯ prompt instead of generic "claude" - Support multi-line prompt extraction using last-contiguous-block algorithm to ignore command-review and dialog boxes - Fix deduplicateText to always return full edited text (clear + resend) instead of stripping original prefix which caused double-removal - Replace vim-style clear (Escape gg dG i) with universal End+BSpace*200 since cursor's prompt is not actually vim - Add Key*N repeat syntax in ClearKeys (parsed by parseKeyRepeat, sent via tmux send-keys -N) - Add 300ms sleep after clear to let TUI drain queued backspaces before new text arrives - Add debug logging to /tmp/hexai-tmux-edit.log - Add strip pattern for "ctrl+c to stop" noise in cursor prompt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08add tmux popup editor screenshots to docsPaul Buetow
Include demo screenshots from the original blog post showing the popup editor overlay and the result after text is sent back to the agent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08add hexai-tmux-edit documentation to all doc filesPaul Buetow
Update README, build guide, configuration guide, usage guide, and tmux guide with hexai-tmux-edit popup editor documentation including supported agents, keybinding setup, flags, workflow, and configuration examples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08add hexai-tmux-edit: tmux popup editor for AI agent promptsPaul Buetow
New tool that opens $EDITOR in a tmux popup for composing longer prompts when working with AI CLI agents (Claude Code, Cursor, Amp, Aider, etc.). Captures existing prompt text from the target pane, pre-fills the editor, and sends edited text back via tmux send-keys. Config-driven agent detection via regex patterns in [tmux_edit] config section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08add gitignore-aware file filtering for LSP completions and code actionsPaul Buetow
Files matching .gitignore patterns or user-configured extra patterns are now skipped for completions and code actions. Configurable via [ignore] section in config.toml with gitignore, extra_patterns, and lsp_notify_ignored options. Includes hot-reload support and env var overrides (HEXAI_IGNORE_*). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08add per-project .hexaiconfig.toml config override and lower coverage target ↵Paul Buetow
to 80% Introduce support for a .hexaiconfig.toml file at the git repository root that selectively overrides the global config. Precedence order: defaults → global config → project config → env vars. Also lower the coverage threshold from 85% to 80%. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08add claudePaul Buetow
2026-02-06cleanupPaul Buetow
2026-02-06cleanupPaul Buetow
2026-02-06Merge branch 'main' of codeberg.org:snonux/hexaiPaul Buetow
2026-02-06Merge branch 'main' of codeberg.org:snonux/hexaiPaul Buetow
2026-02-06coveragePaul Buetow
2026-02-06coveragePaul Buetow
2026-02-06ignore serenapaul@buetow.org
2026-02-06ignore serenapaul@buetow.org
2026-02-06chore: bump version to 0.17.0v0.17.0paul@buetow.org
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06chore: bump version to 0.17.0paul@buetow.org
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06chore: regenerate coverage data after Copilot removalpaul@buetow.org
Update coverage.out and coverage.html to reflect the current codebase without GitHub Copilot files. This eliminates the "no such file or directory" error when running mage install. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06chore: regenerate coverage data after Copilot removalpaul@buetow.org
Update coverage.out and coverage.html to reflect the current codebase without GitHub Copilot files. This eliminates the "no such file or directory" error when running mage install. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06Remove GitHub Copilot provider supportpaul@buetow.org
Remove all GitHub Copilot integration from the codebase to streamline the supported provider set to OpenAI, OpenRouter, Anthropic, and Ollama. Changes: - Delete core Copilot implementation (copilot.go) and all related tests - Remove Copilot configuration fields from App struct and Config - Remove Copilot from provider factory and API key handling - Update all test files to replace Copilot references with other providers - Remove Copilot documentation from README, configuration guide, and examples - Remove Copilot section from config.toml.example All tests pass successfully after removal. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06Remove GitHub Copilot provider supportpaul@buetow.org
Remove all GitHub Copilot integration from the codebase to streamline the supported provider set to OpenAI, OpenRouter, Anthropic, and Ollama. Changes: - Delete core Copilot implementation (copilot.go) and all related tests - Remove Copilot configuration fields from App struct and Config - Remove Copilot from provider factory and API key handling - Update all test files to replace Copilot references with other providers - Remove Copilot documentation from README, configuration guide, and examples - Remove Copilot section from config.toml.example All tests pass successfully after removal. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06chore: bump version to 0.16.1v0.16.1paul@buetow.org
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06chore: bump version to 0.16.1paul@buetow.org
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06fix: add missing Anthropic and OpenRouter provider support in config and LSPpaul@buetow.org
- Add Anthropic field merging in config.mergeProviderFields() to properly load AnthropicModel/BaseURL/Temperature from config.toml - Add anthropic and openrouter cases in lsp.resolveDefaultModel() to prevent fallback to OpenAI defaults - Update default Anthropic model to valid claude-3-5-sonnet-20240620 (previous 20241022 doesn't exist) - Update test expectation to match new default model This fixes the issue where Anthropic provider configuration was ignored, causing LSP to return dummy completions instead of real LLM responses. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-06fix: add missing Anthropic and OpenRouter provider support in config and LSPpaul@buetow.org
- Add Anthropic field merging in config.mergeProviderFields() to properly load AnthropicModel/BaseURL/Temperature from config.toml - Add anthropic and openrouter cases in lsp.resolveDefaultModel() to prevent fallback to OpenAI defaults - Update default Anthropic model to valid claude-3-5-sonnet-20240620 (previous 20241022 doesn't exist) - Update test expectation to match new default model This fixes the issue where Anthropic provider configuration was ignored, causing LSP to return dummy completions instead of real LLM responses. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-02Merge pull request #2 from florianbuetow/feature-timeout-configPaul Bütow
feat: add configurable request timeout for LLM calls
2026-02-02Merge pull request #2 from florianbuetow/feature-timeout-configPaul Bütow
feat: add configurable request timeout for LLM calls
2026-02-01docs: update PR.md with additional files modifiedFlorian
2026-02-01docs: update PR.md with additional files modifiedFlorian
2026-02-01fix: pass RequestTimeout to all llm.Config instancesFlorian
Add RequestTimeout field to llm.Config construction in: - internal/hexailsp/run.go (buildClientIfNil) - internal/llmutils/client.go (NewClientFromApp) - internal/lsp/server.go (newClientForProvider) This ensures the configured timeout is used in all code paths, not just the ones already updated.
2026-02-01fix: pass RequestTimeout to all llm.Config instancesFlorian
Add RequestTimeout field to llm.Config construction in: - internal/hexailsp/run.go (buildClientIfNil) - internal/llmutils/client.go (NewClientFromApp) - internal/lsp/server.go (newClientForProvider) This ensures the configured timeout is used in all code paths, not just the ones already updated.
2026-01-31feat: add configurable request timeout for LLM callsFlorian
Local LLMs (LM Studio, Ollama, etc.) often need more than the default 30-second timeout. Added request_timeout config option (in seconds) to [general] section and HEXAI_REQUEST_TIMEOUT env var. Original constructor signatures preserved via *WithTimeout variants, so no test changes required.
2026-01-31feat: add configurable request timeout for LLM callsFlorian
Local LLMs (LM Studio, Ollama, etc.) often need more than the default 30-second timeout. Added request_timeout config option (in seconds) to [general] section and HEXAI_REQUEST_TIMEOUT env var. Original constructor signatures preserved via *WithTimeout variants, so no test changes required.
2026-01-30docs: add Anthropic to supported providers in READMEPaul Buetow
2026-01-30docs: add Anthropic to supported providers in READMEPaul Buetow
2026-01-30chore: bump version to 0.16.0v0.16.0Paul Buetow
Major features: - Native Anthropic API provider support - Configurable completion_wait_all option for multi-backend completions
2026-01-30chore: bump version to 0.16.0Paul Buetow
Major features: - Native Anthropic API provider support - Configurable completion_wait_all option for multi-backend completions
2026-01-30feat: add completion_wait_all config and fix Anthropic system messagesPaul Buetow
- Add completion_wait_all config option (default true) to wait for all backends before returning results, or return first result immediately - Fix Anthropic API: extract system messages to top-level system field as required by Messages API (was causing 400 errors) - Add anthropic case to server.go clientFor() for model overrides
2026-01-30feat: add completion_wait_all config and fix Anthropic system messagesPaul Buetow
- Add completion_wait_all config option (default true) to wait for all backends before returning results, or return first result immediately - Fix Anthropic API: extract system messages to top-level system field as required by Messages API (was causing 400 errors) - Add anthropic case to server.go clientFor() for model overrides
2026-01-30fix: restore corrupted cmd/hexai/main.go from commit 6103208feature/anthropic-api-providerPaul Buetow
Amp-Thread-ID: https://ampcode.com/threads/T-019c0e27-1598-778e-ad3b-fa43ce6e7073 Co-authored-by: Amp <amp@ampcode.com>
2026-01-29refactor: apply code style best practices to Anthropic implementationPaul Buetow
- Reorganize anthropic.go: types, interface checks, constructor, public methods, private methods - Extract helper methods from Chat() and ChatStream() to keep functions under 50 lines - Add resolveOptions(), sendRequest(), extractContent() private methods - Add explicit interface satisfaction check for Client and Streamer - Add documentation comments to all public methods (Chat, Name, DefaultModel, ChatStream) - Apply gofmt and gofumpt formatting - Apply goimports for import ordering All 51 tests in llm package pass All code adheres to best practices from go-projects.md: - Value semantics (value receivers only) - Constructors before methods - Public before private - Functions under 50 lines - Explicit interface satisfaction - Documentation on all public identifiers - Proper error handling - Context as first parameter for I/O functions Amp-Thread-ID: https://ampcode.com/threads/T-019c0af1-f215-72cf-9940-b014b1a9576b Co-authored-by: Amp <amp@ampcode.com>
2026-01-29feat: add native Anthropic API provider supportPaul Buetow
- Implement new anthropicClient with full Client interface - Add Streamer interface for token-by-token streaming via SSE - Add Anthropic Messages API v1 integration with proper headers - Support claude-3-5-sonnet-20241022 as default model - Add configuration via [anthropic] TOML section - Add environment variable overrides (HEXAI_ANTHROPIC_*) - Support both HEXAI_ANTHROPIC_API_KEY and ANTHROPIC_API_KEY fallback - Integrate Anthropic key handling in LSP, CLI, and llmutils - Update provider factory to support 'anthropic' provider name - Add 11 comprehensive unit tests for Anthropic client - Update config.toml.example with [anthropic] section - Update NewFromConfig() signature to accept anthropicAPIKey parameter - All 51 internal LLM tests pass (11 new Anthropic tests + 40 existing) Anthropic models can be accessed via: [anthropic] model = "claude-3-5-sonnet-20241022" base_url = "https://api.anthropic.com/v1" temperature = 0.2 or environment: export HEXAI_PROVIDER="anthropic" export HEXAI_ANTHROPIC_API_KEY="your-key" Amp-Thread-ID: https://ampcode.com/threads/T-019c0af1-f215-72cf-9940-b014b1a9576b Co-authored-by: Amp <amp@ampcode.com>