summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/tui.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-07 14:39:22 +0300
committerPaul Buetow <paul@buetow.org>2025-09-07 14:39:22 +0300
commit4c93677c79983560eea13c372a20ed78f02af4f9 (patch)
tree5002ece7e13b8fafb54325ec29f1ae69151ea8a9 /internal/hexaiaction/tui.go
parent90e586831c0351fb5808ef5c1eca0692178731c9 (diff)
feat: add 'Simplify and improve' action; configurable prompts in config; wire into LSP and TUI
Diffstat (limited to 'internal/hexaiaction/tui.go')
-rw-r--r--internal/hexaiaction/tui.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/hexaiaction/tui.go b/internal/hexaiaction/tui.go
index 7275480..80b1fee 100644
--- a/internal/hexaiaction/tui.go
+++ b/internal/hexaiaction/tui.go
@@ -28,6 +28,7 @@ type model struct {
func newModel() model {
items := []list.Item{
item{title: "Rewrite selection", desc: "", kind: ActionRewrite, hotkey: 'r'},
+ item{title: "Simplify and improve", desc: "", kind: ActionSimplify, hotkey: 'i'},
item{title: "Document code", desc: "", kind: ActionDocument, hotkey: 'c'},
item{title: "Generate Go unit test(s)", desc: "", kind: ActionGoTest, hotkey: 't'},
item{title: "Skip", desc: "", kind: ActionSkip, hotkey: 's'},
@@ -77,7 +78,7 @@ func handleKey(m model, msg tea.KeyMsg) (tea.Model, tea.Cmd) {
m.list.Select(0)
case "end":
if n := len(m.list.Items()); n > 0 { m.list.Select(n - 1) }
- case "s", "r", "c", "t":
+ case "s", "r", "c", "t", "i":
items := m.list.Items()
for i := 0; i < len(items); i++ {
if it, ok := items[i].(item); ok && strings.ToLower(string(it.hotkey)) == low {