| Age | Commit message (Collapse) | Author |
|
Amp-Thread-ID: https://ampcode.com/threads/T-019e45ff-4976-750c-b2e6-121d0e5991ef
Co-authored-by: Amp <amp@ampcode.com>
|
|
Amp-Thread-ID: https://ampcode.com/threads/T-019e45ff-4976-750c-b2e6-121d0e5991ef
Co-authored-by: Amp <amp@ampcode.com>
|
|
Correct default Ollama Cloud model to gemma4:31b-cloud (bare gemma4 tag
returns 404 on Ollama Cloud; the hosted cloud model requires the explicit
:31b-cloud tag).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Switch default Ollama Cloud model from kimi-k2.6 to gemma4.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
Switches the in-code defaults so that hexai talks to Ollama Cloud
(https://ollama.com) with model kimi-k2.6 when no provider is configured,
instead of OpenAI. The example config, README, and configuration guide
all reflect the new recommended setup; previous OpenAI / local-Ollama
options are still documented as alternatives.
Tests that depended on the implicit "openai" default now pin the
provider explicitly so they continue to exercise the OpenAI / gpt-5
code paths they were designed to cover.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Adds an optional HEXAI_OLLAMA_API_KEY (with OLLAMA_API_KEY fallback) so
the existing Ollama provider can target Ollama Cloud (ollama.ai) in
addition to a local server. When the key is empty the request is
unauthenticated, preserving local-server behavior byte-for-byte; when
set, an Authorization: Bearer header is attached for both Chat and
ChatStream. Documented cloud usage in config.toml.example.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
Code quality fixes from audit:
- Log silently discarded errors in status sinks and stats.Update call sites
- Fix json.Marshal errors silently ignored in LSP handlers
- Replace time.Sleep in tests with channel signaling (mcp) and fake clock (stats)
- Make context cancellation work in production time.Sleep sites (handlers_document, cmdentry)
- Remove init()-based provider registration from llm package; use explicit RegisterAllProviders()
- Add WaitGroup goroutine tracking to MCP server Run()
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- lsp/handlers_completion.go: extract buildNativeCompletionCacheKey and
postProcessNativeCompletion; track collectFirstCompletion in inflight;
remove redundant logLLMStats("") on error path
- lsp/handlers.go: extract checkTriggerFromContext and
checkTriggerFromCursorChar; isTriggerEvent reduced from 63→10 lines
- lsp/transport.go: use %w for error wrapping in Content-Length parse
- llm/ollama.go: extract parseOllamaStream; ChatStream reduced to ~35 lines
- appconfig/config_load.go: extract decodeModelEntryFromMap; rename 'any'
to 'found'; decodeModelEntry reduced to ~18 lines
- llm/provider.go: document why providerRegistry is package-level
- integrationtests/ask_test.go: add //go:build integration; move repoRoot
init from init() to TestMain with diagnostic message
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- lsp/handlers_completion.go: track collectFirstCompletion goroutine in
inflight WaitGroup (goroutine leak fix)
- lsp/transport.go: use %w instead of %v for error wrapping
- askcli/command_list.go: extract handleListWithFilters shared helper;
handleList/handleAll/handleReady are now single-liners
- askcli/command_list.go, urgency.go, dep.go: log ParseTaskExport errors
to stderr instead of returning 1 silently
- appconfig/config_load.go: rename 'any' variable to 'found' to avoid
shadowing the built-in identifier
- llm/provider.go: add explanatory comment for package-level registry
- integrationtests/ask_test.go: add //go:build integration tag; move
repoRoot init from init() to TestMain with diagnostic error message
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
- lsp/server.go: track request goroutines in inflight WaitGroup to
prevent use-after-close writes on shutdown
- lsp/llm_client_registry.go: acquire write lock before calling build()
to eliminate TOCTOU race on cache population
- lsp/handlers_codeaction.go: resolveSimplifyCodeAction now uses
PromptCodeActionSimplify{System,User} (was wrongly using rewrite prompts)
- askcli/taskexport.go: remove exported MustParseTaskExport to prevent
panic on malformed external input; move to unexported test helper
- cmd/ask/main.go: print error to stderr before os.Exit
- llm/{openai,ollama,openrouter}.go: add interface satisfaction assertions
- integrationtests/ask_test.go: replace type assertions with errors.As
for robust exec.ExitError unwrapping
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
|
|
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Document ~30 exported types in lsp/types.go and exported functions in
llm/provider.go, lsp/server.go, and hexailsp/run.go.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
|
|
|
|
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>
|
|
- 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>
|
|
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.
|
|
- 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
|
|
- 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>
|
|
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
editor fix)
|
|
|
|
|
|
|
|
>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
|
|
assert headers; add indent postprocess test
|
|
|
|
use shared fixtures
|
|
fixtures across tests; update REPORT.md progress
|
|
error bodies), add LSP rewrite/diagnostics realism and table-driven tests
|
|
stream + token tests\n- Cover With* options and NewFromConfig success paths\n- llm package now ~80.3%
|
|
llm coverage ~61%
|
|
continue toward 80% target
|
|
coverage for ollama.go
|
|
add go install instructions
|
|
CodeCompleter with chat fallback; remove obsolete throttle path; add tests; bump version to 0.3.0
|
|
|
|
|
|
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.
|
|
OPENAI_API_KEY when provider is ollama by actually loading user config.\n\nREADME: update Helix example to use hexai-lsp binary.
|
|
- 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
|