summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-07 14:42:00 +0300
committerPaul Buetow <paul@buetow.org>2025-09-07 14:42:00 +0300
commit54aa859adc8c96e8bc6551c0c7d40446144c98ea (patch)
treec1fcea2cec46671f0719b5f61b17f8648ba9bc53
parent4c93677c79983560eea13c372a20ed78f02af4f9 (diff)
docs: document simplify action prompts; update examples and flags; add simplify entries to config.toml.example
-rw-r--r--PROJECTSTATUS.md57
-rw-r--r--config.toml.example2
-rw-r--r--docs/configuration.md8
-rw-r--r--docs/usage.md1
4 files changed, 11 insertions, 57 deletions
diff --git a/PROJECTSTATUS.md b/PROJECTSTATUS.md
index a5687fa..d1d865a 100644
--- a/PROJECTSTATUS.md
+++ b/PROJECTSTATUS.md
@@ -4,67 +4,14 @@ This documents shows future items and in progress items. Already completed ones
## Features
-### [/] AI menu
-
-```
-[keys.normal]
-C-p = ":sh hexai --menu"
-```
-
-Or maybe
-
-```
-[keys.normal]
-C-p = ":sh hexai-tmux-action"
-```
-
-And then generate a menu with all the code actions hexai-lsp knows of and include hotkeys for each menu item! Also print out a notice that this is a work-around due to limitations in Helix's current LSP UI.
-
-### More features
-
+* [ ] In-editor chat triggers should be context aware of the current file, buffer and function!
* [ ] Kagi FastGPT for in-editor search
- Think about an in-editor chat trigger, maybe with S> for search!
* [ ] Test whethe GitHub Copilot support actually works now, and if not, fix it!
-
-> It looks like your message is:
-
-```
-- >foo bar baz?
-```
-
-Could you clarify what you mean or what you’re asking for?
-- If you’re asking about the syntax, `>foo bar baz` is not standard in most programming languages.
-- If you’re referencing a command-line or shell prompt, `foo bar baz` could be a command (`foo`) with arguments (`bar` and `baz`).
-- If you’re asking about a specific language or context, please provide more details so I can help you better!
-
-
-* [/] implement a code action for selected code block the way via a unix pipe as faster access in helix
- - pipe selected code to external command and replace selection with output
- - the external command should open a menu to select an action (e.g. "format", "refactor", "explain", "test", etc.) and then apply it to the selected code
- - the external menu can be opened in a separate tmux pane
* [ ] Fish and zsh and bash shell integration for command completion? Have access to the current shell history (N last commands), current directory content, and current directory name.
* [ ] Be able to re-configure the temperature in-editor
-
-Be able to switch LLMs.
-
-* [ ] Ollama local LLM models (e.g. Qwen Coder vs Deepseek-R1 for different purposes)
-* [ ] OpenAI models
-* [ ] Claude models
-* [ ] Gemini models
+* [ ] Be able to switch LLMs.
## More
* [ ] Useful: https://deepwiki.com/helix-editor/helix/4.3-language-server-protocol`
-
-Can Claude Code be used for Code Completion?
-
-> Yes, Claude (including Claude's coding capabilities, sometimes referred to as "Claude Code") can be used for code completion. You can provide Claude with a partial code snippet or function, and it can generate the next lines or complete the function based on context and intent. This works similarly to how other AI code assistants (like GitHub Copilot or ChatGPT) provide code completion.
-
-However, Claude is typically accessed via chat or API, rather than being directly integrated into IDEs for real-time, inline code completion. Some third-party tools or plugins may bridge this gap, but out of the box, Claude is best used for code completion via conversational prompts.
-
-**In summary:**
-- Claude can perform code completion when prompted.
-- It is not natively integrated into IDEs for real-time completion, but can be used via chat or API.
-- You can use it to finish functions, suggest code, or generate boilerplate based on your input.
-
-j
diff --git a/config.toml.example b/config.toml.example
index 3b331c3..d9ed8ee 100644
--- a/config.toml.example
+++ b/config.toml.example
@@ -73,6 +73,8 @@ temperature = 0.2
# document_user = "Add documentation comments to this code:\n{{selection}}"
# go_test_system = "You are a precise Go unit test generator. Given a Go function, write one or more Test* functions using the testing package. Do NOT include package or imports, only the test function(s). Prefer table-driven tests. Keep it minimal and idiomatic."
# go_test_user = "Function under test:\n{{function}}"
+# simplify_system = "You are a precise code improvement engine. Simplify and improve the given code while preserving behavior. Return only the improved code with no prose or backticks."
+# simplify_user = "Improve this code:\n{{selection}}"
[prompts.cli]
# default_system = "You are Hexai CLI. Default to very short, concise answers. If the user asks for commands, output only the commands (one per line) with no commentary or explanation. Only when the word 'explain' appears in the prompt, produce a verbose explanation."
diff --git a/docs/configuration.md b/docs/configuration.md
index 09ff519..11f23c1 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -51,9 +51,13 @@ This is mostly useful when Helix runs in a [tmux](https://tmux.github.io/) sessi
- Flags:
- `--infile` Read input from the given file instead of stdin.
- `--outfile` Write output to the given file instead of stdout (truncates/creates).
- - `--tmux` force tmux-pane mode.
- - `--no-tmux` disable tmux mode even if available.
- `--tmux-target` tmux target pane/window (advanced).
- `--tmux-split v|h` split orientation (default: `v`).
- `--tmux-percent N` split size percentage (default: `33`).
- `--ui-child` internal; used by the parent process when spawning inside tmux.
+
+Code action prompts
+
+- All prompts can be customized under `[prompts.code_action]` in `config.toml`. In addition to `rewrite_*`, `diagnostics_*`, `document_*`, and `go_test_*`, the following templates control the “Simplify and improve” action:
+ - `simplify_system`
+ - `simplify_user` (uses `{{selection}}`)
diff --git a/docs/usage.md b/docs/usage.md
index fb65596..925ac26 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -108,6 +108,7 @@ hexai 'install ripgrep on macOS and explain'
`hexai-tmux-action` runs code actions over a selection or diagnostics+selection piped from stdin, or read from a file.
- Choose an action with arrow keys, `j/k`, `g/G`, Enter, or hotkeys `[s] [r] [c] [t]`.
+ - Includes: Rewrite selection, Simplify and improve, Document code, Generate Go unit test(s), Skip.
- Output is written to stdout by default, or to a file via `--outfile`.
Input formats