Skip to content

Commit 82dfa20

Browse files
[9.0] add system message in copy conversation JSON payload (#212009) (#212071)
# Backport This will backport the following commits from `main` to `9.0`: - [add system message in copy conversation JSON payload (#212009)](#212009) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Arturo Lidueña","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-21T12:48:15Z","message":"add system message in copy conversation JSON payload (#212009)\n\nCloses #212006\n## Problem\nDue to #209773 we no longer add\nthe system message to the output from the \"Copy conversation\" button.","sha":"4783925e567681d1d2f9410e18ffa24050e4b69a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:Obs AI Assistant","backport:version","v9.1.0","v8.19.0"],"title":"add system message in copy conversation JSON payload","number":212009,"url":"https://github.com/elastic/kibana/pull/212009","mergeCommit":{"message":"add system message in copy conversation JSON payload (#212009)\n\nCloses #212006\n## Problem\nDue to #209773 we no longer add\nthe system message to the output from the \"Copy conversation\" button.","sha":"4783925e567681d1d2f9410e18ffa24050e4b69a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212009","number":212009,"mergeCommit":{"message":"add system message in copy conversation JSON payload (#212009)\n\nCloses #212006\n## Problem\nDue to #209773 we no longer add\nthe system message to the output from the \"Copy conversation\" button.","sha":"4783925e567681d1d2f9410e18ffa24050e4b69a"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Arturo Lidueña <[email protected]>
1 parent 3517988 commit 82dfa20

File tree

1 file changed

+2
-1
lines changed
  • x-pack/platform/packages/shared/kbn-ai-assistant/src/chat

1 file changed

+2
-1
lines changed

x-pack/platform/packages/shared/kbn-ai-assistant/src/chat/chat_body.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ export function ChatBody({
255255
const deserializedMessages = (conversation.value?.messages ?? messages).map(deserializeMessage);
256256

257257
const content = JSON.stringify({
258-
title: initialTitle,
258+
title: conversation.value?.conversation.title || initialTitle,
259+
systemMessage: conversation.value?.systemMessage,
259260
messages: deserializedMessages,
260261
});
261262

0 commit comments

Comments
 (0)