feat(cmd): add --name flag to disambiguate 'agent' shortcut#327
feat(cmd): add --name flag to disambiguate 'agent' shortcut#327
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #327 +/- ##
==========================================
+ Coverage 64.68% 64.69% +0.01%
==========================================
Files 212 212
Lines 17771 17778 +7
==========================================
+ Hits 11495 11502 +7
Misses 5203 5203
Partials 1073 1073 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
✅ Wow, I never imagined we'd turn around and land --name so quickly! Thank you 🙇🏻
🧪 Local testing works great!
📝 I've left a few minor suggestions around the help information. The goal is to add clarity. I also left a suggestion around 2 additional test cases so that future changes don't break the expected functionality.
| // --name flag overrides any positional app name argument | ||
| // This allows users to name their app "agent" without triggering the AI Agent shortcut | ||
| if nameFlagProvided { | ||
| appNameArg = createAppNameFlag | ||
| } | ||
|
|
There was a problem hiding this comment.
praise: Love the comment calling out that --name flag overrides any position app name argument.
| "creates an app named agent using name flag without triggering shortcut": { | ||
| CmdArgs: []string{"--name", "agent"}, |
There was a problem hiding this comment.
suggestion: Since our intent is for --name flag to override the <name> argument, perhaps we should have test for the combination to guarantee that future code changes don't create a regression in this behaviour:.
It may also be a good idea to test the agent use-case.
The test cases could be:
slack create my-project --name my-name→ Expectsmy-nameslack create agent my-project --name my-name→ Expectsmy-name
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
Summary
The
create agentcommand is a shortcut to AI Agent templates, but users who want to name their appagenthad no clear way to do so. Add--nameflag to explicitly set the app name, bypassing the shortcut behavior.Follow up to PR #326
Behavior
Requirements