diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-19 08:36:13 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-19 08:36:13 +0300 |
| commit | 8dbec6969ceff32662c41bd267210c34b90d8810 (patch) | |
| tree | a91c3561a74287a41d60d9f00fe4fe3a6e9e04a8 /internal/hexaiaction/action_simplify.go | |
| parent | 54cf02d5ec926799f1e96c6b21d4cfd41fc0617d (diff) | |
Refactor hexaiaction handlers for nk0
Diffstat (limited to 'internal/hexaiaction/action_simplify.go')
| -rw-r--r-- | internal/hexaiaction/action_simplify.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/hexaiaction/action_simplify.go b/internal/hexaiaction/action_simplify.go new file mode 100644 index 0000000..4d7c83b --- /dev/null +++ b/internal/hexaiaction/action_simplify.go @@ -0,0 +1,17 @@ +package hexaiaction + +import "context" + +func init() { + registerActionHandler(ActionSimplify, actionHandlerFunc(handleSimplifyActionRequest)) +} + +func handleSimplifyActionRequest(ctx context.Context, req actionRequest) (string, error) { + return handleSimplifyAction(ctx, req.parts, req.cfg, req.client) +} + +func handleSimplifyAction(ctx context.Context, parts InputParts, cfg actionConfig, client chatDoer) (string, error) { + return runWithTimeout(ctx, timeout20s, func(cctx context.Context) (string, error) { + return runSimplify(cctx, cfg, client, parts.Selection) + }) +} |
