Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #326 +/- ##
==========================================
+ Coverage 64.61% 64.65% +0.04%
==========================================
Files 212 212
Lines 17755 17771 +16
==========================================
+ Hits 11472 11490 +18
+ Misses 5207 5206 -1
+ Partials 1076 1075 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
✅ Woo! So fast and fantastic work! 👏🏻
🧪 Local testing works well and I'm happy to see so much code coverage added 😄
✏️ Left a few minor non-blocking suggestions and questions. Either way, I think we can merge and iterate once you've brought in what you want.
🗳️ Extra suggestion is to update the slack --help (cmd/root.go → Examples) with an example for using this command:
Example: style.ExampleCommandsf([]style.ExampleCommand{
{Command: "login", Meaning: "Log in to your Slack account"},
{Command: "create", Meaning: "Create a new Slack app"},
{Command: "create agent", Meaning: "Create a new Slack AI Agent app"},
{Command: "init", Meaning: "Initialize an existing Slack app"},
{Command: "run", Meaning: "Start a local development server"},
{Command: "deploy", Meaning: "Deploy to the Slack Platform"},
}),💭 You've taken a clever approach. Originally, I was thinking we'd have a new official create agent command. But, thinking about it more than would mean a 3rd-level command (slack project create agent would be the full name space). This starts to get a little extreme. The only drawback is that the create agent command isn't as discoverable in our slack --help menu. If we really want, we can customize this template to display it. But let's leave that for the future.
| func NewCreateCommand(clients *shared.ClientFactory) *cobra.Command { | ||
| cmd := &cobra.Command{ | ||
| SuggestFor: []string{"new"}, | ||
| Use: "create [name] [flags]", |
There was a problem hiding this comment.
question: I wonder if we should be updating this usage or perhaps extending the description.
I think the accurate format would be:
| Use: "create [agent] [name] [flags]", |
But, I admit that it doesn't look very friendly.
There was a problem hiding this comment.
@mwbrooks Ahha this inspired similar thought for me! I wonder if we'd be alright to make "agent" a reserved word to prefer:
$ slack create [name|agent]
And I agree with later comment that a --name flag might be optional for this setup 👾
| if !templateFlagProvided { | ||
| // Shortcut to AI apps category | ||
| categoryShortcut = "agent" | ||
| // Check if a second argument was provided as the app name | ||
| if len(args) > 1 { | ||
| appNameArg = args[1] | ||
| } | ||
| } else { | ||
| // When --template is provided, "agent" is the app name | ||
| appNameArg = args[0] |
There was a problem hiding this comment.
note: This is a clever way to handle the edge-case. Personally, I start to get confused when slack create agent will name my app "agent" vs show me a prompt.
I wonder if a more obvious approach (for the simple minded folks like me) would be anytime slack create agent is used, it's focused on the agent prompt.
The drawback to my suggestion is that we'd eventually need to introduce a --name flag to allow people to customize their app, such as slack create --name agent --template <url>.
I'm okay moving forward with the current approach if it makes sense to @srtaalej and @zimeg. It comes down to personal choice.
| } | ||
| createClientMock.AssertCalled(t, "Create", mock.Anything, mock.Anything, mock.Anything, expected) | ||
| }, | ||
| }, |
There was a problem hiding this comment.
suggestion: Thoughts on adding a test for the use-case slack create agent some-name --template <url>. Seems like you've done the hard work so we could bump the test coverage a little more.
Co-authored-by: Michael Brooks <mbrooks@slack-corp.com>
Changelog
Now when you run the
slack create agentcommand a list of Agentic Apps are highlighted for quick selection.Summary
Adds a convenient agent argument to skip category selection and go directly to AI app template selection.
Usage
Behavior
Requirements