What happened
The Title field in AssistantThreadsSetSuggestedPromptsParameters is never included in the API request. In SetAssistantThreadsSuggestedPromptsContext, only channel_id,
thread_ts, and prompts are added to the form values — the title parameter is silently ignored.
Expected behavior
Setting the Title field should send it as the title parameter to the assistant.threads.setSuggestedPrompts API, allowing customization of the heading above the suggested
prompts (default is "Try these prompts:").
Steps to reproduce
reproducible code
client := slack.New("xoxb-...")
err := client.SetAssistantThreadsSuggestedPrompts(slack.AssistantThreadsSetSuggestedPromptsParameters{
Title: "Explore more on this topic",
ChannelID: "C123",
ThreadTS: "1234.5678",
Prompts: []slack.AssistantThreadsPrompt{
{Title: "What is DNS?", Message: "What is DNS?"},
},
})
The title above the prompts remains "Try these prompts:" regardless of the Title value.
The fix in assistant.go is straightforward — add the title to the form values:
if params.Title != "" {
values.Add("title", params.Title)
}
Versions
- Go: 1.24
- slack-go/slack: v0.17.3
What happened
The
Titlefield inAssistantThreadsSetSuggestedPromptsParametersis never included in the API request. InSetAssistantThreadsSuggestedPromptsContext, onlychannel_id,thread_ts, andpromptsare added to the form values — thetitleparameter is silently ignored.Expected behavior
Setting the
Titlefield should send it as thetitleparameter to theassistant.threads.setSuggestedPromptsAPI, allowing customization of the heading above the suggestedprompts (default is "Try these prompts:").
Steps to reproduce
reproducible code
The title above the prompts remains "Try these prompts:" regardless of the Title value.
The fix in assistant.go is straightforward — add the title to the form values:
Versions