Repository navigation
v1.6.2
This release fixes the embedded widget, which clipped its messages in a narrow frame, and extends the bridge that a host page uses to drive it, without changing anything for a host that already works.
Embedded widget
In a narrow iframe, around 370 px, the message list could grow wider than the frame when a message held a code block with a long line. Headings and paragraphs were then cut in the middle of a word and the button that scrolls to the bottom sat off centre, while the message box below still fitted. The messages now wrap inside the frame, and the code block scrolls sideways inside its own frame. The full application and the compare mode were not affected.
A new width parameter of the embed URL sets the width of the chat column and of the message box, medium by default, large or xlarge. Until now the column always started at the medium width, however wide the iframe was. An unknown value is ignored.
The origins that a deployment lets embed the widget (embedOrigins in config.json) accept a host or an IP, with or without a port, as the documentation says. A token such as intranet.example.com:8443 or localhost:4302, a host name followed by a port, was read as a URL with an unknown scheme and never matched anything, so the widget ignored every message of that host. It is now kept as written and matches that host and port on any scheme.
Headless runs
A run message can now carry its own systemPrompt, temperature, maxTokens and thinking. Each one applies to that run alone and replaces the stored setting for it, without writing anything: thinking: false switches the thinking of the model off for the run, and an empty systemPrompt sends none. A value of the wrong type is ignored, like a non-numeric temperature in the URL.
This also closes a race. A run read the system prompt and the sampling after it had waited for the model, so two runs started back to back with different prompts, or a config message sent in between, could end up with the wrong one. A run now reads them when it starts, and carrying its own prompt is the reliable way to run several at once.
A new abort message, with the id of a run, cancels it. As with a run whose id is reused, or an iframe that goes away, nothing more is sent for it: no chunk, no done and no error. An id that is not running is ignored. The silent field of a run is accepted and has no effect, since a run is always silent.
Handshake
The ready message now carries the version of the widget and the list of its capabilities, the messages and options it understands (config, send, run, run.options and abort), so a host can check for a feature instead of sending blind. A widget older than this release sends neither field, so a host should treat both as optional. A message of a type the widget does not know still gets no reply, which keeps a page from probing it.
Everything in this release is additive: a host written for 1.6.1 keeps working as it is, and config.json, local overrides and stored settings are read as before. The embedding guide describes every message and parameter.