diff options
Diffstat (limited to 'internal/hexaiaction/action_fix_typos.go')
| -rw-r--r-- | internal/hexaiaction/action_fix_typos.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/hexaiaction/action_fix_typos.go b/internal/hexaiaction/action_fix_typos.go new file mode 100644 index 0000000..0059500 --- /dev/null +++ b/internal/hexaiaction/action_fix_typos.go @@ -0,0 +1,17 @@ +package hexaiaction + +import "context" + +func init() { + registerActionHandler(ActionFixTypos, actionHandlerFunc(handleFixTyposActionRequest)) +} + +func handleFixTyposActionRequest(ctx context.Context, req actionRequest) (string, error) { + return handleFixTyposAction(ctx, req.parts, req.cfg, req.client) +} + +func handleFixTyposAction(ctx context.Context, parts InputParts, cfg actionConfig, client chatDoer) (string, error) { + return runWithTimeout(ctx, timeout20s, func(cctx context.Context) (string, error) { + return runFixTypos(cctx, cfg, client, parts.Selection) + }) +} |
