Skip to content

Commit adcdbbd

Browse files
committed
tui: remove duplicate copy message command entry
1 parent 662435c commit adcdbbd

File tree

1 file changed

+0
-41
lines changed
  • packages/opencode/src/cli/cmd/tui/routes/session

1 file changed

+0
-41
lines changed

packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -467,47 +467,6 @@ export function Session() {
467467
dialog.clear()
468468
},
469469
},
470-
{
471-
title: "Copy last assistant message",
472-
value: "messages.copy",
473-
keybind: "messages_copy",
474-
category: "Session",
475-
onSelect: (dialog) => {
476-
const lastAssistantMessage = messages().findLast((msg) => msg.role === "assistant")
477-
if (lastAssistantMessage) {
478-
const parts = sync.data.part[lastAssistantMessage.id] ?? []
479-
const textParts = parts.filter((part) => part.type === "text")
480-
if (textParts.length > 0) {
481-
const text = textParts
482-
.map((part) => part.text)
483-
.join("\n")
484-
.trim()
485-
if (text) {
486-
Clipboard.copy(text)
487-
.then(() =>
488-
toast.show({ message: "Message copied to clipboard!", variant: "success" }),
489-
)
490-
.catch(() =>
491-
toast.show({ message: "Failed to copy to clipboard", variant: "error" }),
492-
)
493-
} else {
494-
toast.show({
495-
message: "No text content found in last assistant message",
496-
variant: "error",
497-
})
498-
}
499-
} else {
500-
toast.show({
501-
message: "No text parts found in last assistant message",
502-
variant: "error",
503-
})
504-
}
505-
} else {
506-
toast.show({ message: "No assistant messages found", variant: "error" })
507-
}
508-
dialog.clear()
509-
},
510-
},
511470
])
512471

513472
const revert = createMemo(() => {

0 commit comments

Comments
 (0)