mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 21:15:57 +03:00
feat(tui): make /copy copy last assistant message (#56053)
This commit is contained in:
committed by
GitHub
Unverified
parent
d889cb2044
commit
b0d762154c
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user