Skip to content

Commit a7bb34a

Browse files
committed
fix: order starter agent before example agents
1 parent 71f9b28 commit a7bb34a

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

cmd/project/create_template.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ func getSelectionOptions(categoryID string) []promptObject {
4444
},
4545
},
4646
"slack-cli#ai-apps": {
47-
{
48-
Title: fmt.Sprintf("Support Agent %s", style.Secondary("Resolve IT support cases")),
49-
Repository: "slack-cli#ai-apps/support-agent",
50-
},
5147
{
5248
Title: fmt.Sprintf("Starter Agent %s", style.Secondary("Start from scratch")),
5349
Repository: "slack-cli#ai-apps/starter-agent",
5450
},
51+
{
52+
Title: fmt.Sprintf("Support Agent %s", style.Secondary("Resolve IT support cases")),
53+
Repository: "slack-cli#ai-apps/support-agent",
54+
},
5555
},
5656
"slack-cli#automation-apps": {
5757
{
@@ -390,14 +390,14 @@ func listTemplates(ctx context.Context, clients *shared.ClientFactory, categoryS
390390
var categories []categoryInfo
391391
if categoryShortcut == "agent" {
392392
categories = []categoryInfo{
393-
{id: "slack-cli#ai-apps/support-agent", name: "Support agent"},
394393
{id: "slack-cli#ai-apps/starter-agent", name: "Starter agent"},
394+
{id: "slack-cli#ai-apps/support-agent", name: "Support agent"},
395395
}
396396
} else {
397397
categories = []categoryInfo{
398398
{id: "slack-cli#getting-started", name: "Getting started"},
399-
{id: "slack-cli#ai-apps/support-agent", name: "Support agent"},
400399
{id: "slack-cli#ai-apps/starter-agent", name: "Starter agent"},
400+
{id: "slack-cli#ai-apps/support-agent", name: "Support agent"},
401401
{id: "slack-cli#automation-apps", name: "Automation apps"},
402402
}
403403
}

cmd/project/create_test.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func TestCreateCommand(t *testing.T) {
125125
Return(
126126
iostreams.SelectPromptResponse{
127127
Prompt: true,
128-
Index: 1, // Select Starter Agent
128+
Index: 0, // Select Starter Agent
129129
},
130130
nil,
131131
)
@@ -174,7 +174,7 @@ func TestCreateCommand(t *testing.T) {
174174
Return(
175175
iostreams.SelectPromptResponse{
176176
Prompt: true,
177-
Index: 1, // Select Starter Agent
177+
Index: 0, // Select Starter Agent
178178
},
179179
nil,
180180
)
@@ -220,7 +220,7 @@ func TestCreateCommand(t *testing.T) {
220220
cm.IO.On("SelectPrompt", mock.Anything, "Select a category:", mock.Anything, mock.Anything).
221221
Return(iostreams.SelectPromptResponse{Prompt: true, Index: 1}, nil)
222222
cm.IO.On("SelectPrompt", mock.Anything, "Select a template:", mock.Anything, mock.Anything).
223-
Return(iostreams.SelectPromptResponse{Prompt: true, Index: 0}, nil)
223+
Return(iostreams.SelectPromptResponse{Prompt: true, Index: 1}, nil) // Select Support Agent
224224
cm.IO.On("SelectPrompt", mock.Anything, "Select a framework:", mock.Anything, mock.Anything).
225225
Return(iostreams.SelectPromptResponse{Prompt: true, Index: 1}, nil) // Select Bolt for Python
226226
cm.IO.On("SelectPrompt", mock.Anything, "Select an adapter:", mock.Anything, mock.Anything).
@@ -322,7 +322,7 @@ func TestCreateCommand(t *testing.T) {
322322
Return(
323323
iostreams.SelectPromptResponse{
324324
Prompt: true,
325-
Index: 1, // Select Starter Agent
325+
Index: 0, // Select Starter Agent
326326
},
327327
nil,
328328
)
@@ -403,7 +403,7 @@ func TestCreateCommand(t *testing.T) {
403403
Return(
404404
iostreams.SelectPromptResponse{
405405
Prompt: true,
406-
Index: 1, // Select Starter Agent
406+
Index: 0, // Select Starter Agent
407407
},
408408
nil,
409409
)
@@ -642,18 +642,18 @@ func TestCreateCommand(t *testing.T) {
642642
"Getting started",
643643
"slack-samples/bolt-js-starter-template",
644644
"slack-samples/bolt-python-starter-template",
645-
"Support agent",
646-
"slack-samples/bolt-js-support-agent --subdir claude-agent-sdk",
647-
"slack-samples/bolt-js-support-agent --subdir openai-agents-sdk",
648-
"slack-samples/bolt-python-support-agent --subdir claude-agent-sdk",
649-
"slack-samples/bolt-python-support-agent --subdir openai-agents-sdk",
650-
"slack-samples/bolt-python-support-agent --subdir pydantic-ai",
651645
"Starter agent",
652646
"slack-samples/bolt-js-starter-agent --subdir claude-agent-sdk",
653647
"slack-samples/bolt-js-starter-agent --subdir openai-agents-sdk",
654648
"slack-samples/bolt-python-starter-agent --subdir claude-agent-sdk",
655649
"slack-samples/bolt-python-starter-agent --subdir openai-agents-sdk",
656650
"slack-samples/bolt-python-starter-agent --subdir pydantic-ai",
651+
"Support agent",
652+
"slack-samples/bolt-js-support-agent --subdir claude-agent-sdk",
653+
"slack-samples/bolt-js-support-agent --subdir openai-agents-sdk",
654+
"slack-samples/bolt-python-support-agent --subdir claude-agent-sdk",
655+
"slack-samples/bolt-python-support-agent --subdir openai-agents-sdk",
656+
"slack-samples/bolt-python-support-agent --subdir pydantic-ai",
657657
"Automation apps",
658658
"slack-samples/bolt-js-custom-function-template",
659659
"slack-samples/bolt-python-custom-function-template",
@@ -670,18 +670,18 @@ func TestCreateCommand(t *testing.T) {
670670
CreateFunc = createClientMock.Create
671671
},
672672
ExpectedOutputs: []string{
673-
"Support agent",
674-
"slack-samples/bolt-js-support-agent --subdir claude-agent-sdk",
675-
"slack-samples/bolt-js-support-agent --subdir openai-agents-sdk",
676-
"slack-samples/bolt-python-support-agent --subdir claude-agent-sdk",
677-
"slack-samples/bolt-python-support-agent --subdir openai-agents-sdk",
678-
"slack-samples/bolt-python-support-agent --subdir pydantic-ai",
679673
"Starter agent",
680674
"slack-samples/bolt-js-starter-agent --subdir claude-agent-sdk",
681675
"slack-samples/bolt-js-starter-agent --subdir openai-agents-sdk",
682676
"slack-samples/bolt-python-starter-agent --subdir claude-agent-sdk",
683677
"slack-samples/bolt-python-starter-agent --subdir openai-agents-sdk",
684678
"slack-samples/bolt-python-starter-agent --subdir pydantic-ai",
679+
"Support agent",
680+
"slack-samples/bolt-js-support-agent --subdir claude-agent-sdk",
681+
"slack-samples/bolt-js-support-agent --subdir openai-agents-sdk",
682+
"slack-samples/bolt-python-support-agent --subdir claude-agent-sdk",
683+
"slack-samples/bolt-python-support-agent --subdir openai-agents-sdk",
684+
"slack-samples/bolt-python-support-agent --subdir pydantic-ai",
685685
},
686686
ExpectedAsserts: func(t *testing.T, ctx context.Context, cm *shared.ClientsMock) {
687687
createClientMock.AssertNotCalled(t, "Create", mock.Anything, mock.Anything, mock.Anything)

0 commit comments

Comments
 (0)