Skip to content

[Security Solution][AI Assistant] Update Message schema and interface (#13657) #232394

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 5 commits into
base: main
Choose a base branch
from

Conversation

e40pud
Copy link
Contributor

@e40pud e40pud commented Aug 20, 2025

Summary

Epic: https://github.com/elastic/security-team/issues/12768
Meta: https://github.com/elastic/security-team/issues/13657
RFC: internal link

With these changes we update the conversation Message schema by adding a new field id. This will allow us to easily refer messages that are summarized.

New messages

All new messages will be added with the id field set.

Existing messages

The id field for all existing messages will be undefined and will be updated whenever a user updates the conversation:

  • appends new messages
  • regenerates a last assistant respond

In those case above, all messages within the ongoing conversation will be updated and will have a id field set.

Testing scenarios

  1. Existing messages without id
  • Create conversation with messages in "pre this PR" code (e.g. main branch)
  • Checkout code from this PR
  • Check via Dev Tools that messages within the conversations index do not have id field set
  • Add a new message to one of the conversations
  • Check that all messages within that conversation are updated and id field set for all of them
  1. New messages
  • Checkout code from this PR
  • Create a new chat and add new messages
  • Check via Dev Tools that all messages within the new conversation have id field set

@e40pud e40pud added this to the 9.2 milestone Aug 20, 2025
@e40pud e40pud self-assigned this Aug 20, 2025
@e40pud e40pud requested a review from a team as a code owner August 20, 2025 13:15
@e40pud e40pud added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Security Assistant Security Assistant Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v9.2.0 labels Aug 20, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@e40pud e40pud requested a review from spong August 20, 2025 13:18
@elastic-vault-github-plugin-prod elastic-vault-github-plugin-prod bot requested a review from a team as a code owner August 20, 2025 13:53
@e40pud
Copy link
Contributor Author

e40pud commented Aug 20, 2025

/ci

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 10.4MB 10.4MB +20.0B

History

cc @e40pud

@e40pud e40pud requested a review from KDKHD August 22, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Security Assistant Security Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants