summaryrefslogtreecommitdiff
path: root/internal/hexailsp/run.go
AgeCommit message (Collapse)Author
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>
2025-11-02some linter fixesPaul Buetow
2025-10-02feat: add OpenRouter providerv0.15.0Paul Buetow
2025-09-28Propagate --config overrides through CLI tools and LSP reloadsPaul Buetow
2025-09-28Add --config flag support across CLI, LSP, and tmux toolsPaul Buetow
2025-09-24Add runtime config store and reload commandPaul Buetow
2025-09-17feat(stats,tmux): global Σ@window stats across processes with flocked ↵Paul Buetow
cache; width mitigation (narrow/maxlen); configurable [stats] window_minutes; robust coverage parsing; docs update\n\n- Add internal/stats with windowed event cache + flock + atomic writes\n- Wire stats into LSP/CLI/Tmux Action; tmux shows Σ@window with per-model tail\n- HEXAI_TMUX_STATUS_NARROW and HEXAI_TMUX_STATUS_MAXLEN for width control\n- Add [stats] window_minutes to config and apply on startup\n- Improve Magefile coverage handling; add tests to lift coverage >85%\n- Update docs/tmux.md and config example
2025-09-14release: v0.10.0v0.10.0Paul Buetow
2025-09-07feat: add 'Simplify and improve' action; configurable prompts in config; ↵Paul Buetow
wire into LSP and TUI
2025-09-06fix unit test coveragePaul Buetow
2025-09-06chore(version): bump to 0.6.0; configurable prompts via config + testsv0.6.0Paul Buetow
2025-09-06use gofumptPaul Buetow
2025-09-06feat(lsp): configurable inline/chat triggers; switch inline markers to ↵Paul Buetow
>text>/>>text>; update docs and example config; tests updated to new triggers and raise LSP coverage to >=85%; chore: remove semicolon legacy; chore(mage): auto-refresh coverage daily if docs/coverage.out is older than 24h
2025-09-03Phase 2: add configurable completion debounce\n\n- App config: ↵Paul Buetow
completion_debounce_ms (default 200)\n- Server: wait until no input for debounce before LLM calls\n- Applies to chat and provider-native completion paths\n- Tests: add debounce and adjust to verify behavior\n\nAll unit tests pass.
2025-08-31module: set module path to codeberg.org/snonux/hexai; update imports; docs: ↵v0.3.4Paul Buetow
add go install instructions
2025-08-22stuffPaul Buetow
2025-08-19config: apply HEXAI_* env even without config file; docs: clarify Copilot ↵Paul Buetow
key; prefer HEXAI_COPILOT_API_KEY in builders
2025-08-19config: add HEXAI_* env overrides with precedence; prefer ↵Paul Buetow
HEXAI_OPENAI_API_KEY over OPENAI_API_KEY; update docs
2025-08-19lsp: replace time throttle with in-flight guard; improve short-prefix ↵Paul Buetow
heuristic\n\n- Prevent overlapping LLM requests via llmBusy guard\n- Remove time-based throttle and option plumbing\n- Short-prefix heuristic now skips over trailing whitespace and clamps index\n- Add tests for busy guard and trailing-space allowance
2025-08-19lsp: reduce eager completions and add throttling\n\n- Defaults: remove ';' ↵Paul Buetow
and '?' from trigger characters\n- Add min-typed-prefix heuristic for LLM completions (>=2 chars)\n- Add simple time-based throttle between LLM completions (default 900ms)\n- Tests: verify default triggers and skip logic (throttle + min prefix)\n- Config example: update trigger_characters list
2025-08-18refactor(lsp,llm,hexailsp,appconfig): split long funcs; add testsPaul Buetow
- Extract helpers to keep funcs <=50 lines; no behavior changes - Add tests for prompt removal, code actions, and LLM request builders - Table-drive TestInParamList; run gofmt
2025-08-18feat(lsp): add coding_temperature knob and remove hardcoded temps\n\n- Add ↵Paul Buetow
to app config and server options.\n- Use in LSP code actions and completions.\n- Default to provider temperature when not set.\n- Update README and config.json.example.
2025-08-18feat(config): per-provider temperature defaults and docs\n\n- Add , , to ↵Paul Buetow
config with coding-friendly default 0.2.\n- Wire defaults through providers (OpenAI, Copilot, Ollama).\n- Update CLI and LSP runners to pass configured temperatures.\n- Document temperature behavior and examples in README.\n- Update config.json.example to show new keys.
2025-08-17refactor as per manual code reviewsPaul Buetow
2025-08-17refactor: Remove unused NoDiskIO flagPaul Buetow
This flag was not used anywhere in the codebase, so it has been removed.
2025-08-17cli+lsp: refactor main packages into internal runners; add testsPaul Buetow
- Move CLI logic to internal/hexaicli with Run/RunWithClient - Move LSP logic to internal/hexailsp with Run/RunWithFactory - Extract helpers; keep behavior identical for both binaries - Add unit tests for hexaicli (input parsing, messages, streaming) and hexailsp (factory wiring, client creation, logging settings) - Add top-of-file summaries and 'Not yet reviewed by a human' comments to all Go files - Update README with internal package docs