Skip to content

feat(chat-messages): add follow-up prompts#2082

Open
robertwilde wants to merge 1 commit into
mainfrom
feat/ai/follow-up-prompts
Open

feat(chat-messages): add follow-up prompts#2082
robertwilde wants to merge 1 commit into
mainfrom
feat/ai/follow-up-prompts

Conversation

@robertwilde

@robertwilde robertwilde commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Closes #2066

Adds follow-up prompt support to SiChatInputComponent. A new followUpPrompts input (string[]) renders suggested next actions as pill buttons above the chat input; clicking a prompt inserts its text into the input field and emits a followUpPromptSelected output so the consuming application can react (e.g. clear the list). The si-chat-container example is updated to demonstrate the feature with three realistic prompts. Documentation is updated in both the chat input component page and the AI chat pattern page.


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces follow-up prompts to the SiChatInputComponent, enabling users to select suggested actions that populate the chat input field. The implementation includes new input and output signals, template updates for rendering prompt buttons, and corresponding documentation and styling. Feedback from the review suggests using $index for tracking in the @for loop to avoid issues with duplicate strings, disabling prompt buttons while a message is being sent, and ensuring the textarea height is recalculated after a prompt is selected.

Comment thread projects/element-ng/chat-messages/si-chat-input.component.html Outdated
Comment thread projects/element-ng/chat-messages/si-chat-input.component.html Outdated
Comment thread projects/element-ng/chat-messages/si-chat-input.component.ts
@robertwilde robertwilde force-pushed the feat/ai/follow-up-prompts branch 3 times, most recently from f3d97be to 0ff44dd Compare May 19, 2026 14:32
@robertwilde robertwilde marked this pull request as ready for review May 19, 2026 14:32
@robertwilde robertwilde requested review from a team as code owners May 19, 2026 14:32
@robertwilde

Copy link
Copy Markdown
Collaborator Author

@panch1739 check this out :)

@panch1739 panch1739 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robertwilde Nice! One only note, the button should have a total height of 32px and the gap between them, 8px :)

Image

Thank you so much!

@robertwilde robertwilde force-pushed the feat/ai/follow-up-prompts branch 2 times, most recently from c8c7230 to b0f5be7 Compare May 22, 2026 08:17
Comment thread projects/element-ng/chat-messages/si-chat-input.component.ts Outdated
Comment thread projects/element-ng/chat-messages/si-chat-input.component.ts
Comment thread projects/element-ng/chat-messages/si-chat-input.component.html Outdated
Comment thread projects/element-ng/chat-messages/si-chat-input.component.ts Outdated
Comment thread projects/element-ng/chat-messages/si-chat-input.component.html
@robertwilde robertwilde changed the title feat(ai-chat): add follow-up prompts feat(chat-messages): add follow-up prompts May 27, 2026
@robertwilde robertwilde force-pushed the feat/ai/follow-up-prompts branch 6 times, most recently from e9edffa to a5db26e Compare June 3, 2026 07:09
@robertwilde robertwilde force-pushed the feat/ai/follow-up-prompts branch from a5db26e to 808930a Compare June 9, 2026 08:27
@robertwilde robertwilde force-pushed the feat/ai/follow-up-prompts branch from 808930a to fefb7aa Compare June 30, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI patterns: Add follow-up prompts

4 participants