The widget is one custom element, <diosc-chat>. The embed loader mounts it for you; in a framework
app you render it yourself. Configuration beyond the attributes below is set with
diosc('config', …).
The assistant to load. Resolved from the embed key when omitted.
bind-endpoint
The host’s BYOA bind endpoint. The kit POSTs here when it needs to bind identity. Optional for an anonymous-only page: without it the hub binds the connection anonymously when the Assistant allows anonymous use (details).
mode
fab (default) for the floating launcher, or embed for an inline, container-anchored panel.
position
bottom-right (default) or bottom-left. Ignored in embed mode.
theme-mode
light, dark, or system (follows the OS prefers-color-scheme, live). Picks which of the Assistant’s two color sets is active; unset uses the Assistant’s own theme mode. Can be changed at any time, re-themes in place. Same as diosc('setThemeMode', …); a command wins over the attribute and is reflected back to it. See Theming.
embed-min-width-px
Minimum container width (default 320) below which the embed frame shows a too-narrow placeholder. Ignored in fab mode.
When you embed via the loader script, you don’t set these by hand. The loader resolves them from your
embed key and mounts the element for you.
Most of these can also be set with diosc('config', …).
Set bind-endpoint as an attribute rather than through config: an attribute lands before auto-connect
dispatches the bind, so it avoids a config/connect race.
mode="embed" requires the embeddedPanelMode capability. Every standard plan grants it, and so does a
hub with no license key; without custom branding (a Pro capability) the panel keeps the “Powered by
DioscHub” attribution. A custom plan that turns the capability off makes the element render nothing.
The server asks the kit to (re)bind identity via the host bind endpoint (with no bind endpoint, the kit asks the hub for an anonymous binding instead).
A bind landed: the host’s, or the hub’s own anonymous binding on a page with no bind endpoint. Carries the bound identity (or null for anonymous), role feature flags, and the REST token (null for anonymous).
A restore is rejected because the session isn’t owned by the bound identity — the kit drops the persisted token and starts fresh. Payload: { code, message }.
session:list
The session list arrives.
session:renamed / session:pinned
A session is renamed or (un)pinned.
session:path_changed
The session’s page context changes.
session:state_changed
Session state changes.
session:user_changed
The session’s user identity changes.
session:upgraded
An anonymous session is promoted in place to an authenticated one (the visitor signed in).
session:start_refused
DioscHub refused to start a chat, or the widget could not start one. Payload: { code, message, retryAfterMs?, scope? }. message is the plain sentence the widget shows the visitor; retryAfterMs and scope ('device' or 'ip') come with RATE_LIMITED. See When a chat can’t start.
session:error
A session-level error occurs. A refused chat start fires session:start_refused instead.
A file in the user’s library changes status or progress. Payload: { fileId, filename, mimeType, status, reason, warnings, progress, canRead, canSearch, isIndexed } (isIndexed is deprecated). See Chat files & indexing.
files:updated
A file the session uploaded finished indexing. Payload: { fileId, filename }.