ui: import conversations or settings by dropping them anywhere in the app (#32958)
* ui : add global drag-and-drop import for conversations and settings
Dropping an exported conversation (.zip, .jsonl) or settings (.json)
anywhere in the app now routes to a global importer instead of attaching
the file to a message. A state machine in use-drop-import classifies the
file, shows a review dialog (settings diff, single-conversation preview,
or bulk picker), and applies it on confirmation. The chat screen defers
import files so they are not treated as attachments.
* ui : preview settings diff before importing from Import/Export tab
The Import/Export settings tab now opens the same settings diff dialog
used by drag-and-drop (showing which values would change) before applying
an imported settings file. It reuses computeSettingsDiff from the global
drop-import hook instead of importing immediately.
* ui : fix formatting in drag-and-drop import
* ui : use SvelteMap/SvelteSet and fix eslint in drag-and-drop import
* ui : adapt drag-and-drop import to current lint rules
Assisted-by: Claude (Opus 5.5 Medium)
* ui : fix importing dropped conversations
Store a plain snapshot of the previewed conversation, since IndexedDB
cannot clone the reactive proxy, and collapse drops that carry the same
conversation more than once to its newest copy, so the selection list
no longer crashes on duplicate keys.
Assisted-by: Claude (Opus 5.5 Medium)
* ui : simplify the dropped conversation preview dialog
Drop the icon and the description from the header, and give the
preview padding and a subtler border.
Assisted-by: Claude (Opus 5.5 Medium)
* ui : set the dropped conversation preview on a recessed surface
Assisted-by: Claude (Opus 5.5 Medium)
* ui : ask to open a dropped conversation after importing it
Assisted-by: Claude (Opus 5.5 Medium)
* ui : diff dropped settings against what importing applies
Importing applies the file over the defaults, so a key the file leaves
out goes back to its default instead of showing as unset.
Assisted-by: Claude (Opus 5.5 Medium)
* ui : match the settings import preview to the conversation preview
Assisted-by: Claude (Opus 5.5 Medium)
* ui : set the drop import text through type roles
Assisted-by: Claude (Opus 5.5 Medium)
* ui : attach dropped files on the chat unless they are exports
The chat now reads each dropped .json, .jsonl or .zip and hands only real
Llama Chat exports to the importer, through a drop-import context set by the
layout; everything else is attached as on master, mixed drops included. Its
drag events no longer bubble to the document, so the import overlay no
longer shows over the chat or stays up after an attachment drop.
Assisted-by: Claude (Opus 5.5 Medium)
* ui : one drop area to import and a choice of what to export
The Import/Export tab now has a single drop area (or file picker) that takes
conversations, settings or a full backup and goes through the same previews
as dropping anywhere in the app. Export asks for conversations, settings or
everything; everything is one ZIP with the conversations and settings.json,
which importing reads back, showing the settings first and the conversations
after. Sensitive data is an inline checkbox instead of its own dialog.
Bulk import now reports conversations already in the library instead of
counting them as imported, and reloads groups like the tab used to.
Assisted-by: Claude (Opus 5.5 Medium)
* ui : import demo traces through the Import/Export drop area
Assisted-by: Claude (Opus 5.5 Medium)