diff options
| author | Paul Buetow <paul@buetow.org> | 2025-08-17 18:52:51 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-08-17 18:52:51 +0300 |
| commit | 454451105ad3522d2ac3d22136eedee4a4d034af (patch) | |
| tree | aa4b5723809c4d45bfc9094a38c01c6415582f9c /internal/lsp | |
| parent | 498923e77c201ca90dc35c7934f4f7f1c9c3ccd2 (diff) | |
cli+lsp: refactor main packages into internal runners; add tests
- 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
Diffstat (limited to 'internal/lsp')
| -rw-r--r-- | internal/lsp/context.go | 2 | ||||
| -rw-r--r-- | internal/lsp/context_test.go | 2 | ||||
| -rw-r--r-- | internal/lsp/document.go | 2 | ||||
| -rw-r--r-- | internal/lsp/document_test.go | 2 | ||||
| -rw-r--r-- | internal/lsp/handlers.go | 2 | ||||
| -rw-r--r-- | internal/lsp/handlers_test.go | 2 | ||||
| -rw-r--r-- | internal/lsp/server.go | 2 | ||||
| -rw-r--r-- | internal/lsp/transport.go | 2 | ||||
| -rw-r--r-- | internal/lsp/types.go | 2 |
9 files changed, 18 insertions, 0 deletions
diff --git a/internal/lsp/context.go b/internal/lsp/context.go index e746058..02aa40a 100644 --- a/internal/lsp/context.go +++ b/internal/lsp/context.go @@ -1,3 +1,5 @@ +// Summary: Builds additional context snippets based on configured mode and truncates text by token heuristic. +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/context_test.go b/internal/lsp/context_test.go index fe5d73b..54553d6 100644 --- a/internal/lsp/context_test.go +++ b/internal/lsp/context_test.go @@ -1,3 +1,5 @@ +// Summary: Tests for context-building logic (window, full-file) and truncation behavior. +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/document.go b/internal/lsp/document.go index 05f024f..dbecd5e 100644 --- a/internal/lsp/document.go +++ b/internal/lsp/document.go @@ -1,3 +1,5 @@ +// Summary: In-memory document model for the LSP; tracks text, lines, and applies edits. +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/document_test.go b/internal/lsp/document_test.go index e8fa6bb..da17cc5 100644 --- a/internal/lsp/document_test.go +++ b/internal/lsp/document_test.go @@ -1,3 +1,5 @@ +// Summary: Tests for LSP document model (line management, edits, and transformations). +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/handlers.go b/internal/lsp/handlers.go index a16affb..7903c73 100644 --- a/internal/lsp/handlers.go +++ b/internal/lsp/handlers.go @@ -1,3 +1,5 @@ +// Summary: LSP JSON-RPC handlers; implements core methods and integrates with the LLM client when enabled. +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/handlers_test.go b/internal/lsp/handlers_test.go index 0ba29cf..9a490e3 100644 --- a/internal/lsp/handlers_test.go +++ b/internal/lsp/handlers_test.go @@ -1,3 +1,5 @@ +// Summary: Tests for LSP handlers and request processing, including diagnostics and code actions. +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/server.go b/internal/lsp/server.go index cc7d88e..9fb02c3 100644 --- a/internal/lsp/server.go +++ b/internal/lsp/server.go @@ -1,3 +1,5 @@ +// Summary: Minimal LSP server over stdio; manages documents, dispatches requests, and tracks stats. +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/transport.go b/internal/lsp/transport.go index 4d352f8..0c63aa8 100644 --- a/internal/lsp/transport.go +++ b/internal/lsp/transport.go @@ -1,3 +1,5 @@ +// Summary: LSP transport utilities to read and write JSON-RPC messages with Content-Length framing. +// Not yet reviewed by a human package lsp import ( diff --git a/internal/lsp/types.go b/internal/lsp/types.go index dbd7331..42a315f 100644 --- a/internal/lsp/types.go +++ b/internal/lsp/types.go @@ -1,3 +1,5 @@ +// Summary: LSP protocol types used by the server (requests, responses, params, capabilities). +// Not yet reviewed by a human package lsp import "encoding/json" |
