Skip to content

chat: Add support for status messages #1862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

gadenbuie
Copy link
Collaborator

@gadenbuie gadenbuie commented Feb 20, 2025

This PR adds support for status messges which are added into the chat messages area. These messages are useful for communicate state changes, e.g. model changing or other information.

Status messages take text or HTML and can be "dynamic" or "static". Static messages are never changed, but dynamic status messages are allowed to be overwritten if a new status message is added before the user enters a chat. (If you switch through many models, the status message shows you the last model picked prior to the next message.)

This PR also adds a new template for multi-model ChatOllama usage, allowing the user to switch between local models easily. It also showcases a few other actions, like last-message editing, clearing/cancelling the chat, or changing the creativity level.

Kapture.2025-02-20.at.14.35.39.mp4

Note: there are a few things about the demo that are improved by #1861, in particular adding a status message scrolls the status message into view. That feature isn't great in this PR but is fixed by the changes in #1861.

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie
@gadenbuie gadenbuie requested a review from cpsievert February 20, 2025 19:39

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie
@gadenbuie gadenbuie marked this pull request as ready for review February 20, 2025 19:58
gadenbuie and others added 5 commits February 20, 2025 15:21

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie
And fix StatusMessage type

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie

Verified

This commit was signed with the committer’s verified signature.
gadenbuie Garrick Aden-Buie
@cpsievert cpsievert force-pushed the chat/status-message branch from 0f63598 to ad23361 Compare March 5, 2025 19:25
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.

None yet

2 participants