summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-16 15:52:45 +0300
committerPaul Buetow <paul@buetow.org>2025-08-16 15:52:45 +0300
commita8d0e40b60d016ced94d86b62a400092af653d6b (patch)
tree60435f812fbd2f29541aa32126e620d9d1b9aa32
parentee1757c5f29b22b60ed0b0ec40009798820d28ed (diff)
cmd: support HEXAI_CONTEXT_MODE env fallback for -context-mode; update README flags table and usage
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index aad155f..40c7b90 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ If no key is configured, Hexai will fall back to a basic, local completion.
- Completion settings:
- `-max-tokens`: maximum tokens for LLM completions (default `500`). If the flag isn’t provided, `HEXAI_MAX_TOKENS` is used when set.
- - `-context-mode`: how much additional context to include with completion prompts. One of:
+ - `-context-mode`: how much additional context to include with completion prompts (If the flag isn’t provided, `HEXAI_CONTEXT_MODE` is used when set). One of:
- `minimal`: no extra context
- `window`: include a sliding window around the cursor
- `file-on-new-func` (default): include the full file only when defining a new function (cursor before the opening `{`)
@@ -43,6 +43,6 @@ Notes:
| `-stdio` | `true` | — | Run as LSP over stdio (only supported mode). |
| `-log` | `/tmp/hexai.log` | — | Path to log file (optional). |
| `-max-tokens` | `500` | `HEXAI_MAX_TOKENS` | Max tokens for LLM completions. |
-| `-context-mode` | `file-on-new-func` | — | `minimal` `window` `file-on-new-func` `always-full` |
+| `-context-mode` | `file-on-new-func` | `HEXAI_CONTEXT_MODE` | `minimal` `window` `file-on-new-func` `always-full` |
| `-context-window-lines` | `120` | — | Lines around cursor when using `window` mode. |
| `-max-context-tokens` | `2000` | `HEXAI_MAX_CONTEXT_TOKENS` | Token budget for additional context. |