diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-29 08:01:37 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-29 08:01:37 +0300 |
| commit | d600ea8c411d5f9962a64ea52bba6ec21ac661be (patch) | |
| tree | f95443db2d7e277dc7fa3d8a14c0b0d969a0f306 /internal/askcli/dispatch.go | |
| parent | aa6c7bfb84b95b3eb4ce64987210264b9521c9ad (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.go | 5 |
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) } |
