feat(tui) - /copy (#12613)

# /copy!

/copy allows you to copy the latest **complete** message from Codex on
the TUI.
This commit is contained in:
Won Park
2026-02-24 14:17:01 -08:00
committed by GitHub
parent 61cd3a9700
commit ee1520e79e
6 changed files with 267 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ pub enum SlashCommand {
Agent,
// Undo,
Diff,
Copy,
Mention,
Status,
DebugConfig,
@@ -74,6 +75,7 @@ impl SlashCommand {
// SlashCommand::Undo => "ask Codex to undo a turn",
SlashCommand::Quit | SlashCommand::Exit => "exit Codex",
SlashCommand::Diff => "show git diff (including untracked files)",
SlashCommand::Copy => "copy the latest Codex output to your clipboard",
SlashCommand::Mention => "mention a file",
SlashCommand::Skills => "use skills to improve how Codex performs specific tasks",
SlashCommand::Status => "show current session configuration and token usage",
@@ -145,6 +147,7 @@ impl SlashCommand {
| SlashCommand::MemoryDrop
| SlashCommand::MemoryUpdate => false,
SlashCommand::Diff
| SlashCommand::Copy
| SlashCommand::Rename
| SlashCommand::Mention
| SlashCommand::Skills
@@ -170,6 +173,7 @@ impl SlashCommand {
fn is_visible(self) -> bool {
match self {
SlashCommand::SandboxReadRoot => cfg!(target_os = "windows"),
SlashCommand::Copy => !cfg!(target_os = "android"),
SlashCommand::Rollout | SlashCommand::TestApproval => cfg!(debug_assertions),
_ => true,
}