summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/action_diagnostics.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-19 08:36:13 +0300
committerPaul Buetow <paul@buetow.org>2026-06-19 08:36:13 +0300
commit8dbec6969ceff32662c41bd267210c34b90d8810 (patch)
treea91c3561a74287a41d60d9f00fe4fe3a6e9e04a8 /internal/hexaiaction/action_diagnostics.go
parent54cf02d5ec926799f1e96c6b21d4cfd41fc0617d (diff)
Refactor hexaiaction handlers for nk0
Diffstat (limited to 'internal/hexaiaction/action_diagnostics.go')
-rw-r--r--internal/hexaiaction/action_diagnostics.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/hexaiaction/action_diagnostics.go b/internal/hexaiaction/action_diagnostics.go
new file mode 100644
index 0000000..bb2c412
--- /dev/null
+++ b/internal/hexaiaction/action_diagnostics.go
@@ -0,0 +1,17 @@
+package hexaiaction
+
+import "context"
+
+func init() {
+ registerActionHandler(ActionDiagnostics, actionHandlerFunc(handleDiagnosticsActionRequest))
+}
+
+func handleDiagnosticsActionRequest(ctx context.Context, req actionRequest) (string, error) {
+ return handleDiagnosticsAction(ctx, req.parts, req.cfg, req.client)
+}
+
+func handleDiagnosticsAction(ctx context.Context, parts InputParts, cfg actionConfig, client chatDoer) (string, error) {
+ return runWithTimeout(ctx, timeout20s, func(cctx context.Context) (string, error) {
+ return runDiagnostics(cctx, cfg, client, parts.Diagnostics, parts.Selection)
+ })
+}