summaryrefslogtreecommitdiff
path: root/internal/askcli/dispatch.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-29 08:01:37 +0300
committerPaul Buetow <paul@buetow.org>2026-03-29 08:01:37 +0300
commitd600ea8c411d5f9962a64ea52bba6ec21ac661be (patch)
treef95443db2d7e277dc7fa3d8a14c0b0d969a0f306 /internal/askcli/dispatch.go
parentaa6c7bfb84b95b3eb4ce64987210264b9521c9ad (diff)
feat: implicit add for na/no-agent scope prefix
Amp-Thread-ID: https://ampcode.com/threads/T-019d37f6-6549-7119-979a-88bc1225c594 Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'internal/askcli/dispatch.go')
-rw-r--r--internal/askcli/dispatch.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/askcli/dispatch.go b/internal/askcli/dispatch.go
index 974ceea..eab793b 100644
--- a/internal/askcli/dispatch.go
+++ b/internal/askcli/dispatch.go
@@ -53,6 +53,11 @@ func (d *Dispatcher) Dispatch(ctx context.Context, args []string, stdin io.Reade
}
subcommand := args[0]
entry, ok := commandRegistry.get(subcommand)
+ if !ok && scope != taskScopeAgent {
+ args = append([]string{"add"}, args...)
+ subcommand = "add"
+ entry, ok = commandRegistry.get(subcommand)
+ }
if !ok {
return d.unknownCommand(stderr, subcommand)
}