Skip to content

webui: save model name with conversation history (#13570) #14192

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 1 commit into
base: master
Choose a base branch
from

Conversation

deepanshu2015
Copy link

@deepanshu2015 deepanshu2015 commented Jun 15, 2025

Make sure to read the contributing guidelines before submitting a PR

added the support for model name in AI chat message as requested.
image

It saves the model in local index.db as well as shown in below image
image

@deepanshu2015 deepanshu2015 requested a review from ngxson as a code owner June 15, 2025 11:09
@deepanshu2015 deepanshu2015 marked this pull request as draft June 15, 2025 11:10
@deepanshu2015 deepanshu2015 marked this pull request as ready for review June 15, 2025 11:10
@ericcurtin ericcurtin requested a review from Copilot June 15, 2025 13:30
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for storing and displaying the model name in conversation history.

  • Adds an optional modelName field to the Conversation type.
  • Updates Dexie storage schema and createConversation to include modelName.
  • Updates the app context and ChatMessage component to extract and display the model name.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tools/server/webui/src/utils/types.ts Adds an optional modelName property to the Conversation interface.
tools/server/webui/src/utils/storage.ts Updates Dexie versions with a new schema including modelName and modifies createConversation function to accept modelName.
tools/server/webui/src/utils/app.context.tsx Extracts modelName from serverProps and passes it to createConversation.
tools/server/webui/src/components/ChatMessage.tsx Updates useAppContext destructuring and displays the model name for assistant messages.
Comments suppressed due to low confidence (1)

tools/server/webui/src/components/ChatMessage.tsx:194

  • Consider displaying the model name saved in the conversation object instead of re-extracting it from serverProps. This change would ensure consistency between what is saved and what is rendered for the user.
{msg.role === 'assistant' && serverProps?.model_path && (

@am17an
Copy link
Contributor

am17an commented Jun 15, 2025

This is being worked on at #14065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants