Skip to content

Add Copy Messages button to inference detail page#6618

Open
simeonlee wants to merge 1 commit intomainfrom
simeonlee/copy-conversation
Open

Add Copy Messages button to inference detail page#6618
simeonlee wants to merge 1 commit intomainfrom
simeonlee/copy-conversation

Conversation

@simeonlee
Copy link
Member

@simeonlee simeonlee commented Feb 27, 2026

Summary

  • Adds a "Copy Messages" button to the inference detail action bar that copies the entire conversation (system prompt + input messages + output) as a JSON messages array
  • Output format is OpenAI-style messages JSON, directly pasteable into API calls
  • Single text blocks flatten to plain string content for cleaner output

Closes #6610.

Screenshots

Copy Messages button in action bar:
copy-messages-button

After clicking — "Copied" feedback state:
copy-messages-copied

Test plan

  • Unit tests for serializeConversation (20 tests covering all content block types, chat/JSON inference, edge cases)
  • Verify button appears on chat inference detail pages
  • Verify button appears on JSON inference detail pages
  • Verify copied JSON is valid and matches expected format
  • Verify "Copied" feedback state shows checkmark icon for 2 seconds

Note

Low Risk
Low risk UI-only change that adds client-side clipboard copying and a new serializer utility; main risk is incorrect/undesired message formatting or copying sensitive content, but it’s user-initiated and covered by unit tests.

Overview
Adds a Copy Messages button to the inference detail action bar that copies the full conversation (system prompt + input messages + inference output) to the clipboard, with a temporary "Copied" state.

Introduces serializeConversation to normalize chat/json inferences into an OpenAI-style messages JSON array (including support for tool calls/results, thoughts, files, and unknown blocks, with single text blocks flattened), plus a comprehensive unit test suite for the serializer.

Written by Cursor Bugbot for commit 30ab1ab. This will update automatically on new commits. Configure here.

Adds a button in the inference action bar that copies the entire
conversation (system prompt + input messages + output) as a JSON
messages array in OpenAI format. Closes #6610.
@simeonlee simeonlee self-assigned this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a way to conveniently copy the entire trace to a clipboard

1 participant