diff options
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | cmd/hexai-lsp/main.go | 4 | ||||
| -rw-r--r-- | cmd/hexai/main.go | 4 | ||||
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | internal/hexaicli/run.go | 6 | ||||
| -rw-r--r-- | internal/hexaicli/testhelpers_test.go | 2 | ||||
| -rw-r--r-- | internal/hexailsp/run.go | 8 | ||||
| -rw-r--r-- | internal/hexailsp/run_test.go | 8 | ||||
| -rw-r--r-- | internal/llm/copilot.go | 4 | ||||
| -rw-r--r-- | internal/llm/ollama.go | 2 | ||||
| -rw-r--r-- | internal/llm/openai.go | 2 | ||||
| -rw-r--r-- | internal/lsp/codeaction_test.go | 8 | ||||
| -rw-r--r-- | internal/lsp/completion_cache_test.go | 10 | ||||
| -rw-r--r-- | internal/lsp/completion_codex_path_test.go | 8 | ||||
| -rw-r--r-- | internal/lsp/context.go | 2 | ||||
| -rw-r--r-- | internal/lsp/handlers_codeaction.go | 14 | ||||
| -rw-r--r-- | internal/lsp/handlers_completion.go | 4 | ||||
| -rw-r--r-- | internal/lsp/handlers_document.go | 12 | ||||
| -rw-r--r-- | internal/lsp/handlers_init.go | 4 | ||||
| -rw-r--r-- | internal/lsp/handlers_utils.go | 10 | ||||
| -rw-r--r-- | internal/lsp/server.go | 4 | ||||
| -rw-r--r-- | internal/lsp/testfakes_test.go | 4 | ||||
| -rw-r--r-- | internal/lsp/transport.go | 2 |
23 files changed, 67 insertions, 62 deletions
@@ -31,3 +31,8 @@ Hexai uses Mage for developer tasks. Install Mage, then run targets like build, - Install binaries to `GOPATH/bin`: `mage install` Note: `mage lint` uses `golangci-lint`. Install via `mage devinstall` if needed. + +## Install + +- CLI: `go install codeberg.org/snonux/hexai/cmd/hexai@latest` +- LSP: `go install codeberg.org/snonux/hexai/cmd/hexai-lsp@latest` diff --git a/cmd/hexai-lsp/main.go b/cmd/hexai-lsp/main.go index 5ff79fa..f2cad6d 100644 --- a/cmd/hexai-lsp/main.go +++ b/cmd/hexai-lsp/main.go @@ -6,8 +6,8 @@ import ( "log" "os" - "hexai/internal" - "hexai/internal/hexailsp" + "codeberg.org/snonux/hexai/internal" + "codeberg.org/snonux/hexai/internal/hexailsp" ) func main() { diff --git a/cmd/hexai/main.go b/cmd/hexai/main.go index 48cb7db..00fa4a3 100644 --- a/cmd/hexai/main.go +++ b/cmd/hexai/main.go @@ -7,8 +7,8 @@ import ( "fmt" "os" - "hexai/internal" - "hexai/internal/hexaicli" + "codeberg.org/snonux/hexai/internal" + "codeberg.org/snonux/hexai/internal/hexaicli" ) func main() { @@ -1,4 +1,4 @@ -module hexai +module codeberg.org/snonux/hexai go 1.21 diff --git a/internal/hexaicli/run.go b/internal/hexaicli/run.go index 14eff4f..7471816 100644 --- a/internal/hexaicli/run.go +++ b/internal/hexaicli/run.go @@ -12,9 +12,9 @@ import ( "strings" "time" - "hexai/internal/appconfig" - "hexai/internal/llm" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/appconfig" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" ) // Run executes the Hexai CLI behavior given arguments and I/O streams. diff --git a/internal/hexaicli/testhelpers_test.go b/internal/hexaicli/testhelpers_test.go index bd3c3dd..97b531d 100644 --- a/internal/hexaicli/testhelpers_test.go +++ b/internal/hexaicli/testhelpers_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - "hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/llm" ) // setStdin sets os.Stdin from a string and returns a restore func and reader. diff --git a/internal/hexailsp/run.go b/internal/hexailsp/run.go index 4700f27..1ff1ded 100644 --- a/internal/hexailsp/run.go +++ b/internal/hexailsp/run.go @@ -8,10 +8,10 @@ import ( "os" "strings" - "hexai/internal/appconfig" - "hexai/internal/llm" - "hexai/internal/logging" - "hexai/internal/lsp" + "codeberg.org/snonux/hexai/internal/appconfig" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/lsp" ) // ServerRunner is the minimal interface satisfied by lsp.Server. diff --git a/internal/hexailsp/run_test.go b/internal/hexailsp/run_test.go index df810e2..340a08a 100644 --- a/internal/hexailsp/run_test.go +++ b/internal/hexailsp/run_test.go @@ -9,10 +9,10 @@ import ( "path/filepath" "testing" - "hexai/internal/appconfig" - "hexai/internal/llm" - "hexai/internal/logging" - "hexai/internal/lsp" + "codeberg.org/snonux/hexai/internal/appconfig" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/lsp" ) // fake server capturing options and recording run calls diff --git a/internal/llm/copilot.go b/internal/llm/copilot.go index 7b3574c..16eeda6 100644 --- a/internal/llm/copilot.go +++ b/internal/llm/copilot.go @@ -14,8 +14,8 @@ import ( "time" "encoding/base64" - appver "hexai/internal" - "hexai/internal/logging" + appver "codeberg.org/snonux/hexai/internal" + "codeberg.org/snonux/hexai/internal/logging" ) // copilotClient implements Client against GitHub Copilot's Chat Completions API. diff --git a/internal/llm/ollama.go b/internal/llm/ollama.go index c465723..ce607a7 100644 --- a/internal/llm/ollama.go +++ b/internal/llm/ollama.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/logging" ) // ollamaClient implements Client against a local Ollama server. diff --git a/internal/llm/openai.go b/internal/llm/openai.go index 3093891..e9a1fdc 100644 --- a/internal/llm/openai.go +++ b/internal/llm/openai.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/logging" ) // openAIClient implements Client against OpenAI's Chat Completions API. diff --git a/internal/lsp/codeaction_test.go b/internal/lsp/codeaction_test.go index f5abbbf..5a74d66 100644 --- a/internal/lsp/codeaction_test.go +++ b/internal/lsp/codeaction_test.go @@ -1,10 +1,10 @@ package lsp import ( - "context" - "encoding/json" - "hexai/internal/llm" - "testing" + "context" + "encoding/json" + "codeberg.org/snonux/hexai/internal/llm" + "testing" ) type fakeLLM struct { diff --git a/internal/lsp/completion_cache_test.go b/internal/lsp/completion_cache_test.go index 779f89d..9ef0f00 100644 --- a/internal/lsp/completion_cache_test.go +++ b/internal/lsp/completion_cache_test.go @@ -1,12 +1,12 @@ package lsp import ( - "bytes" - "log" - "strings" - "testing" + "bytes" + "log" + "strings" + "testing" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/logging" ) func TestCompletionCache_IgnoresWhitespaceBeforeCursor(t *testing.T) { diff --git a/internal/lsp/completion_codex_path_test.go b/internal/lsp/completion_codex_path_test.go index c8ce912..6030d92 100644 --- a/internal/lsp/completion_codex_path_test.go +++ b/internal/lsp/completion_codex_path_test.go @@ -1,11 +1,11 @@ package lsp import ( - "context" - "errors" - "testing" + "context" + "errors" + "testing" - "hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/llm" ) // fakeCodeLLM implements both llm.Client and llm.CodeCompleter. diff --git a/internal/lsp/context.go b/internal/lsp/context.go index 89f245d..72331a8 100644 --- a/internal/lsp/context.go +++ b/internal/lsp/context.go @@ -2,7 +2,7 @@ package lsp import ( - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/logging" "strings" ) diff --git a/internal/lsp/handlers_codeaction.go b/internal/lsp/handlers_codeaction.go index 2599238..4407ac0 100644 --- a/internal/lsp/handlers_codeaction.go +++ b/internal/lsp/handlers_codeaction.go @@ -2,13 +2,13 @@ package lsp import ( - "context" - "encoding/json" - "fmt" - "hexai/internal/llm" - "hexai/internal/logging" - "strings" - "time" + "context" + "encoding/json" + "fmt" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" + "strings" + "time" ) func (s *Server) handleCodeAction(req Request) { diff --git a/internal/lsp/handlers_completion.go b/internal/lsp/handlers_completion.go index 56baeab..73c903f 100644 --- a/internal/lsp/handlers_completion.go +++ b/internal/lsp/handlers_completion.go @@ -5,8 +5,8 @@ import ( "context" "encoding/json" "fmt" - "hexai/internal/llm" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" "strings" "time" ) diff --git a/internal/lsp/handlers_document.go b/internal/lsp/handlers_document.go index 0dba2f7..53c1588 100644 --- a/internal/lsp/handlers_document.go +++ b/internal/lsp/handlers_document.go @@ -2,12 +2,12 @@ package lsp import ( - "context" - "encoding/json" - "hexai/internal/llm" - "hexai/internal/logging" - "strings" - "time" + "context" + "encoding/json" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" + "strings" + "time" ) func (s *Server) handleDidOpen(req Request) { diff --git a/internal/lsp/handlers_init.go b/internal/lsp/handlers_init.go index 1047e78..99ab026 100644 --- a/internal/lsp/handlers_init.go +++ b/internal/lsp/handlers_init.go @@ -2,8 +2,8 @@ package lsp import ( - "hexai/internal" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal" + "codeberg.org/snonux/hexai/internal/logging" "os" ) diff --git a/internal/lsp/handlers_utils.go b/internal/lsp/handlers_utils.go index d2cf52d..42b35a5 100644 --- a/internal/lsp/handlers_utils.go +++ b/internal/lsp/handlers_utils.go @@ -2,11 +2,11 @@ package lsp import ( - "fmt" - "hexai/internal/llm" - "hexai/internal/logging" - "strings" - "time" + "fmt" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" + "strings" + "time" ) // llmRequestOpts builds request options from server settings. diff --git a/internal/lsp/server.go b/internal/lsp/server.go index 624c2cd..999c3e4 100644 --- a/internal/lsp/server.go +++ b/internal/lsp/server.go @@ -4,8 +4,8 @@ package lsp import ( "bufio" "encoding/json" - "hexai/internal/llm" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/llm" + "codeberg.org/snonux/hexai/internal/logging" "io" "log" "sync" diff --git a/internal/lsp/testfakes_test.go b/internal/lsp/testfakes_test.go index 7887692..41fa705 100644 --- a/internal/lsp/testfakes_test.go +++ b/internal/lsp/testfakes_test.go @@ -1,8 +1,8 @@ package lsp import ( - "context" - "hexai/internal/llm" + "context" + "codeberg.org/snonux/hexai/internal/llm" ) // countingLLM counts Chat calls; minimal implementation for tests that need diff --git a/internal/lsp/transport.go b/internal/lsp/transport.go index 4cda4c6..c30fbd1 100644 --- a/internal/lsp/transport.go +++ b/internal/lsp/transport.go @@ -4,7 +4,7 @@ package lsp import ( "encoding/json" "fmt" - "hexai/internal/logging" + "codeberg.org/snonux/hexai/internal/logging" "io" "net/textproto" "strconv" |
