feat(tui): make /copy copy last assistant message (#56053)

This commit is contained in:
Victor Navarro
2026-10-16 14:16:53 +02:00
committed by GitHub
Unverified
parent d889cb2044
commit b0d762154c
+3 -3
View File
@@ -1136,6 +1136,9 @@ export function Session(props: {
title: "Copy last assistant message",
id: "messages.copy",
group: "Session",
slash: {
name: "copy",
},
run: () => {
const lastAssistantMessage = messagesBeforeRevert().findLast(
(msg): msg is SessionMessageAssistant => msg.type === "assistant",
@@ -1189,9 +1192,6 @@ export function Session(props: {
title: "Copy session transcript",
id: "session.copy",
group: "Session",
slash: {
name: "copy",
},
run: async () => {
try {
const sessionData = session()