-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Description
Hi ChatKit team — we’re integrating the ChatKit embed (web component + @openai/chatkit-react) and ran into what looks like a gap in message actions.
Summary
- In the ChatKit embed UI, there’s a “copy/share message” affordance for assistant turns, but not for user messages.
- We’d like to enable a copy icon/action on user messages as well (preferably behind an explicit option).
Current behavior
- User messages (
type: "user_message") do not show a copy action in the thread UI. - Assistant messages do, and widgets can participate in copy via
WidgetItem.copy_text(works as expected). - Public options don’t appear to expose any “copy” toggle:
threadItemActionsonly includesfeedback+retry.- Docs/API reference: https://openai.github.io/chatkit-js/api/openai/chatkit/type-aliases/threaditemactionsoption/
We also inspected the currently hosted ChatKit frame bundle and the clipboard text builder appears to only include assistant_message items (plus widgets when copy_text is present), and excludes user_message.
Repro (minimal)
- Load the embed script: https://cdn.platform.openai.com/deployments/chatkit/chatkit.js
- Mount
<openai-chatkit>(or via@openai/chatkit-react) with a working backend. - Send a user message and wait for an assistant response.
- Observe: assistant message has copy/share UI; user message does not.
Why it matters
- In many chat UIs, users frequently want to copy their own prompt (reuse, quote, edit elsewhere, share with support, etc.).
- In embed contexts, a “copy user message” action is especially useful because the host app often can’t easily augment per-message UI (cross-origin iframe).
Proposal (one possible API shape)
Option A: extend threadItemActions (keeps actions in one place)
threadItemActions: {
feedback?: boolean;
retry?: boolean;
copy?: {
enabled?: boolean;
includeUserMessages?: boolean; // default false for back-compat
includeAssistantMessages?: boolean; // default true (existing behavior)
};
}Option B: separate user message actions (more explicit)
userMessageActions?: {
copy?: boolean;
}Implementation notes (for your consideration)
- For
user_message.content, copy could concatenateinput_text+input_tagtext into plain text. - Attachments could be ignored, or appended as e.g.
[attachment: filename].
Question
- Is the absence of a user-message copy action intentional? If so, can the docs explicitly call it out?
- If not intentional, we’d love to see a supported way to enable copy for user messages.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels