@m6d/cortex-angular 0.9.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -143,6 +143,7 @@ landing for it.
143
143
  | `composer` | `TemplateRef` | The widget's composer, or its "messages disabled" notice; place it with `ngTemplateOutlet` |
144
144
  | `send` | `(prompt: string) => void` | Sends a first message; does nothing until the handshake answers, or for an agent that takes no messages |
145
145
  | `openThread` | `(thread: ThreadSummary) => void` | Opens a thread |
146
+ | `openHistory` | `() => void` | Shows the whole history, as the header's `openHistory` |
146
147
 
147
148
  ### `threadList`
148
149
 
@@ -164,7 +165,7 @@ ship unset and fall back when you leave them out:
164
165
 
165
166
  | Token | Falls back to | Styles |
166
167
  | -------------------------------- | --------------------------- | ------------------------------------ |
167
- | `--cortex-font-size-message` | `--cortex-font-size` | Message bubbles and the composer |
168
+ | `--cortex-font-size-message` | `--cortex-font-size` | Message text and the composer |
168
169
  | `--cortex-font-size-header` | `--cortex-font-size` | The chat and history titles |
169
170
  | `--cortex-color-send-empty` | `transparent` | The send button with nothing to send |
170
171
  | `--cortex-color-send-empty-text` | `--cortex-color-text-muted` | Its icon |
@@ -204,7 +205,7 @@ pending call would settle an embedded flow before the user completes it.
204
205
  ## Media blocks
205
206
 
206
207
  The assistant can answer with more than text. A fenced block tagged `mermaid`,
207
- `vega-lite` or `map` renders as a diagram, chart or map inside the message,
208
+ `vega-lite`, `map` or `report` renders as a diagram, chart, map or report inside the message,
208
209
  with a placeholder while the block is still streaming and an error card (with
209
210
  the source) when it cannot be drawn. An image attachment the model references
210
211
  as `![alt](attachment#<id>)` on its own line renders inline.
@@ -216,6 +217,12 @@ maps (plus its stylesheet, `leaflet/dist/leaflet.css`, in your page). Maps
216
217
  draw OpenStreetMap tiles and need no key. A block whose library fails to load
217
218
  at runtime shows the error card.
218
219
 
220
+ A report is an HTML fragment the agent writes. The widget removes scripts,
221
+ images, links and anything that would load a URL, draws the rest in a shadow
222
+ root that takes its colors from your `--cortex-color-*` theme, and draws each
223
+ `<figure data-chart>` inside it with the chart renderer. Which forms an agent
224
+ writes is its `media` setting on the server; reports are off by default.
225
+
219
226
  Leaflet finds its marker images next to wherever the build put the one the
220
227
  stylesheet references, so an Angular build needs the other two copied there as
221
228
  well:
@@ -227,7 +234,8 @@ well:
227
234
  ```
228
235
 
229
236
  `mediaRenderers` swaps a renderer or adds a fence tag of your own. A renderer
230
- draws a closed fence's source into the host element and returns its teardown:
237
+ draws a closed fence's source into the host element and returns its teardown;
238
+ its context carries the widget's color `scheme` and `locale`:
231
239
 
232
240
  ```ts
233
241
  mediaRenderers: {