summaryrefslogtreecommitdiff
path: root/internal/llm
AgeCommit message (Collapse)Author
2025-09-19fixPaul Buetow
2025-09-17chore(openai): revert default model to gpt-4.1Paul Buetow
2025-09-17feat(openai): set default model to gpt-4oPaul Buetow
2025-09-17chore: commit uncommitted changes before version bumpPaul Buetow
2025-09-17chore(version): bump to v0.11.1 (gpt-5 defaults, timeouts, global stats, ↵v0.11.1Paul Buetow
editor fix)
2025-09-08docs: move tmux documentation to its own filePaul Buetow
2025-09-06more testsPaul 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-05tests: add more negative provider cases and table-driven LSP coverage; ↵Paul Buetow
assert headers; add indent postprocess test
2025-09-04tests: add more table-driven cases and negative provider tests; update reportPaul Buetow
2025-09-04tests: expand negative SSE and table-driven coverage; add docs/testing.md; ↵Paul Buetow
use shared fixtures
2025-09-04tests: add negative SSE test, table-driven refactors, and use shared ↵Paul Buetow
fixtures across tests; update REPORT.md progress
2025-09-04tests: add shared test fixtures, expand provider breadth (multi-choice, ↵Paul Buetow
error bodies), add LSP rewrite/diagnostics realism and table-driven tests
2025-09-04tests(llm): raise coverage to >=80%\n- Add OpenAI/Copilot HTTP success + ↵Paul Buetow
stream + token tests\n- Cover With* options and NewFromConfig success paths\n- llm package now ~80.3%
2025-09-04tests(llm): add OpenAI and Copilot HTTP tests (success + token/error paths); ↵Paul Buetow
llm coverage ~61%
2025-09-04tests(lsp,llm): add helper and factory tests to raise coverage modestly; ↵Paul Buetow
continue toward 80% target
2025-09-04llm/ollama: add comprehensive tests (Chat, ChatStream, errors) to reach >80% ↵Paul Buetow
coverage for ollama.go
2025-08-31module: set module path to codeberg.org/snonux/hexai; update imports; docs: ↵v0.3.4Paul Buetow
add go install instructions
2025-08-28copilot: add session token + codex code completion; lsp: prefer native ↵v0.3.0Paul Buetow
CodeCompleter with chat fallback; remove obsolete throttle path; add tests; bump version to 0.3.0
2025-08-22remove busy checkPaul Buetow
2025-08-19chore: commit pending changes in status, LSP, and Ollama modulesPaul Buetow
2025-08-19llm/copilot: add required headers and update default model\n\n- Send ↵Paul Buetow
X-GitHub-Api-Version and User-Agent headers for Copilot requests\n- Default Copilot model to gpt-4o-mini (avoid non-existent 'codex'/'gpt-4.1')\n- README and config.json.example: update Copilot defaults and guidance\n\nNote: Copilot provider expects Copilot-issued auth; for public access use GitHub Models via OpenAI-compatible endpoint.
2025-08-18hexaicli: load config with logger to respect provider\n\nFix CLI requiring ↵Paul Buetow
OPENAI_API_KEY when provider is ollama by actually loading user config.\n\nREADME: update Helix example to use hexai-lsp binary.
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(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(ordering): place constructors immediately after type definitions as ↵Paul Buetow
first functions
2025-08-17refactor(ordering): types/constants first; exported before private; ensure ↵Paul Buetow
consistent receiver semantics per file
2025-08-17logging: move ChatLogger to value semantics; llm: switch clients to value ↵Paul Buetow
receivers and return values from constructors
2025-08-17refactor as per manual code reviewsPaul Buetow
2025-08-17review changesPaul Buetow
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-17cli: stream responses in hexai when supported (OpenAI, Ollama)Paul Buetow
- Add llm.Streamer optional interface - Implement ChatStream for OpenAI (SSE) and Ollama (JSON stream) - CLI uses streaming; LSP unchanged (non-streaming) - README: document streaming behavior for CLI
2025-08-17llm: add GitHub Copilot providerPaul Buetow
- Implement copilot client reading COPILOT_API_KEY - Wire copilot_base_url and copilot_model config - Update README and config example; defaults to gpt-4.1 - Keep OpenAI default at gpt-4.1 for consistency
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-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(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-16llm: centralize ANSI color and logging helpers in logging.go; remove ↵Paul Buetow
duplicate color constants from openai.go
2025-08-16logging: add -log-preview-limit flag with HEXAI_LOG_PREVIEW_LIMIT env; wire ↵Paul Buetow
through llm.SetLogPreviewLimit; document in README
2025-08-16llm/openai: log full message and response content without truncation; keep ↵Paul Buetow
cyan/green coloring and base black/grey styling
2025-08-16llm/openai: switch sending color to cyan; enforce black background + grey ↵Paul Buetow
base on all messages; ensure colored segments return to base style
2025-08-16llm/openai: colorize logs — blue for outgoing context (messages), green ↵Paul Buetow
for received content preview, red for errors; print real newlines
2025-08-16llm/openai: log previews with real newlines (%s) instead of quoted strings ↵Paul Buetow
(%q) for better readability
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