Skip to content

SetAssistantThreadsSuggestedPrompts: Title parameter not sent in API request #1527

@otomaticx

Description

@otomaticx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions