diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-07 14:39:22 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-07 14:39:22 +0300 |
| commit | 4c93677c79983560eea13c372a20ed78f02af4f9 (patch) | |
| tree | 5002ece7e13b8fafb54325ec29f1ae69151ea8a9 /internal/hexaiaction/prompts.go | |
| parent | 90e586831c0351fb5808ef5c1eca0692178731c9 (diff) | |
feat: add 'Simplify and improve' action; configurable prompts in config; wire into LSP and TUI
Diffstat (limited to 'internal/hexaiaction/prompts.go')
| -rw-r--r-- | internal/hexaiaction/prompts.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/hexaiaction/prompts.go b/internal/hexaiaction/prompts.go index 2e0e4e2..3c33f8a 100644 --- a/internal/hexaiaction/prompts.go +++ b/internal/hexaiaction/prompts.go @@ -43,8 +43,14 @@ func runDiagnostics(ctx context.Context, cfg appconfig.App, client chatDoer, dia } func runDocument(ctx context.Context, cfg appconfig.App, client chatDoer, selection string) (string, error) { - sys := cfg.PromptCodeActionDocumentSystem - user := Render(cfg.PromptCodeActionDocumentUser, map[string]string{"selection": selection}) + sys := cfg.PromptCodeActionDocumentSystem + user := Render(cfg.PromptCodeActionDocumentUser, map[string]string{"selection": selection}) + return runOnceWithOpts(ctx, client, sys, user, reqOptsFrom(cfg)) +} + +func runSimplify(ctx context.Context, cfg appconfig.App, client chatDoer, selection string) (string, error) { + sys := cfg.PromptCodeActionSimplifySystem + user := Render(cfg.PromptCodeActionSimplifyUser, map[string]string{"selection": selection}) return runOnceWithOpts(ctx, client, sys, user, reqOptsFrom(cfg)) } |
