summaryrefslogtreecommitdiff
path: root/internal/lsp/server.go
AgeCommit message (Collapse)Author
2025-09-19fixPaul Buetow
2025-09-14release: v0.10.0v0.10.0Paul Buetow
2025-09-08docs: move tmux documentation to its own filePaul 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-03lsp: add 'Hexai: implement unit test' code action for Gov0.4.1Paul Buetow
- Generate or append tests to _test.go - Jump to generated test via showDocument (command + server-initiated) - Document the feature in docs/go-unit-tests.md - Prefix action titles with 'Hexai: ' - Bump version to 0.4.1
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-09-03Phase 1: remove single in-flight LLM gate\n\n- Drop llmBusy state and busy ↵Paul Buetow
item\n- Remove concurrency guard in completion paths\n- Allow manual invoke (TriggerKind=1) even after whitespace\n- Delete llm_busy_test; update TODO\n\nAll unit tests pass.
2025-09-03delete dead codePaul Buetow
2025-08-31module: set module path to codeberg.org/snonux/hexai; update imports; docs: ↵v0.3.4Paul Buetow
add go install instructions
2025-08-29lsp: refactor dispatch to handler map; split handlers into feature files ↵Paul Buetow
(completion, codeaction, init, document); decompose completion logic into small helpers; update review checklist
2025-08-28lsp: limit to one in-flight LLM query; return visible 'LLM busy' completion ↵Paul Buetow
item with provider/model; retain chat EOL suppression
2025-08-22remove busy checkPaul Buetow
2025-08-22stuffPaul Buetow
2025-08-22lsp: treat manual completion as trigger; remove space from default triggers; ↵Paul Buetow
avoid auto after whitespace
2025-08-20betterPaul Buetow
2025-08-20lsp: add tiny LRU cache for last 10 completions; ignore trailing whitespace ↵Paul Buetow
in cache key; log cache hits; report busy with isIncomplete to prompt client retry
2025-08-19lsp: include space in trigger characters and allow space-triggered ↵Paul Buetow
completions\n\n- Defaults now include space (" ") in trigger list\n- Prefix heuristic treats space as structural trigger (no min-prefix required)\n- README and config example updated\n- Tests: add coverage for space trigger
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-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-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
2025-08-17lsp/config: include ';' and '?' in default trigger charactersPaul Buetow
- Default trigger set when unset now [., :, /, _, ;, ?] - Update README and example config accordingly
2025-08-17lsp/config: make completion trigger characters configurablePaul Buetow
- Add trigger_characters to JSON config and ServerOptions - Store on server and advertise in initialize - Update README and example config - Preserve previous defaults when unset
2025-08-16lsp: refactor NewServer to use options structPaul Buetow
- Introduce ServerOptions to reduce constructor parameter count - Update main.go call site; preserve defaults and behavior - Build and run tests
2025-08-16lsp: add 'Resolve diagnostics' code action scoped to selectionPaul Buetow
- Parse diagnostics from CodeAction context; filter to overlap with selection - Build LLM prompt from selection-only diagnostics; replace only selected range - Keep existing 'Rewrite selection' action; return both when applicable - Add Diagnostic and CodeActionContext types; make CodeActionParams.Context raw JSON - Add helpers for range overlap; unit tests for filtering/overlap - Update README to document resolve-diagnostics action
2025-08-16refactor(config): drop env-based config (except OPENAI_API_KEY)Paul Buetow
- Switch to config-file-only; only OPENAI_API_KEY read from env.\n- llm: replace env autodetect with Config + NewFromConfig; add newOpenAI/newOllama.\n- lsp: NewServer now accepts injected llm.Client.\n- cli: remove env overrides; extend appConfig with provider-specific fields; build client from config + OPENAI_API_KEY.\n- docs: update README (config-only, defaults to OpenAI, minimal example); simplify flags table.\n- add config.json.example.\n- prompts: enforce ;text; (no spaces) and add ;;text; to remove entire line; tests added.
2025-08-16feat(logging): add LLM stats averages and per-minute metricsPaul Buetow
2025-08-16feat(llm): add Ollama provider + provider selection and CLI override; update ↵v0.0.1Paul Buetow
README and logs
2025-08-16logging: migrate LSP logs to global singleton (internal/logging); use ↵Paul Buetow
consistent colors/prefix; refactor LLM provider to use global logger and remove per-client loggers
2025-08-16context: log when full-file/window context is skipped because document is ↵Paul Buetow
not open; add -no-disk-io flag with HEXAI_NO_DISK_IO env; plumb through server
2025-08-16lsp: split monolithic server.go into modules; add configurable max tokens ↵Paul Buetow
and context strategies (minimal|window|file-on-new-func|always-full); provide flags/env fallbacks; add unit tests for helpers and context; update README; remove obsolete files
2025-08-16llm: add pluggable provider with OpenAI default; extensive logging; LSP ↵Paul Buetow
completion integration with TextEdit, param-aware prompts; remove idle gating; label/filter improvements; docs update
2025-08-14Revert "feat(lsp): gate completion by context — require preceding space ↵Paul Buetow
and >=2s idle since last change; add logging for gating decisions" This reverts commit eb0bb96fd23cae6e92c5f8d77ef29db8b6d50dc1.
2025-08-14feat(lsp): gate completion by context — require preceding space and >=2s ↵Paul Buetow
idle since last change; add logging for gating decisions
2025-08-14feat(lsp): scaffold barebones LSP server with contextual completion; add ↵Paul Buetow
Taskfile and AGENTS.md; enable -log context logging