Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
danielhanchen
04d625ac03 studio/frontend: rename per-message export to unsloth-message-<date>.md
The assistant message action bar's "Export as Markdown" path used the
assistant-ui default filename of `message-<epoch-ms>.md`, which is
neither human-readable nor consistent with Studio's other export path
(Settings -> Chat -> Export writes
`unsloth-chats-YYYY-MM-DD.json`). A user who exports several messages
during a session ends up with a Downloads folder of opaque epoch-stamp
files.

Pass a `filename` prop to `ActionBarPrimitive.ExportMarkdown` matching
the JSON export's naming, so the file lands as
`unsloth-message-2026-05-19.md` instead.
2026-05-19 15:19:28 +00:00

View file

@ -1152,7 +1152,15 @@ const AssistantActionBar: FC = () => {
onCloseAutoFocus={(e) => e.preventDefault()}
className="aui-action-bar-more-content z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md"
>
<ActionBarPrimitive.ExportMarkdown asChild={true}>
<ActionBarPrimitive.ExportMarkdown
asChild={true}
// Match Settings -> Chat -> Export's human-readable naming
// (``unsloth-chats-YYYY-MM-DD.json``) rather than
// assistant-ui's default ``message-<epoch-ms>.md``. The
// component re-renders often enough that the date stays
// fresh in practice.
filename={`unsloth-message-${new Date().toISOString().slice(0, 10)}.md`}
>
<ActionBarMorePrimitive.Item className="aui-action-bar-more-item flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground">
<DownloadIcon strokeWidth={1.75} className="size-icon" />
Export as Markdown