gizweb:chatui
Presentation values for chat components. No records, persistence or agent runtime.
import * as Chatui from "gizweb:chatui";Types
ModelOption
type ModelOption = { id: string; name: string; group: string; note: string; }A model a chat can pick: its id, name, group and a short note.
id:stringname:stringgroup:stringnote:string
Source
type Source = { title: string; url: string; }A source a reply cites: its title and URL.
title:stringurl:string
Chip
type Chip = { letter: string; site: string; title: string; url: string; }A cited site as a chip: its initial, site, title and URL.
letter:stringsite:stringtitle:stringurl:string
Functions
chips
function chips(sources: Vec<Source>): Vec<Chip>One chip per distinct site of sources, at most six.
Effects: fail.
keyed
function keyed(text: string, key: string): stringThe HTML of Markdown text, its blocks keyed by key.
Effects: fail, read, write, console, io.
groups
function groups(models: Vec<ModelOption>): Vec<string>The distinct groups of models, in order.
Effects: fail.