# gizweb:chatui

Presentation values for chat components. No records, persistence or agent runtime.

```gizlang
import * as Chatui from "gizweb:chatui";
```

## Types

### `ModelOption`

```gizlang
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`: `string`
- `name`: `string`
- `group`: `string`
- `note`: `string`

### `Source`

```gizlang
type Source = { title: string; url: string; }
```

A source a reply cites: its title and URL.

- `title`: `string`
- `url`: `string`

### `Chip`

```gizlang
type Chip = { letter: string; site: string; title: string; url: string; }
```

A cited site as a chip: its initial, site, title and URL.

- `letter`: `string`
- `site`: `string`
- `title`: `string`
- `url`: `string`

## Functions

### `chips`

```gizlang
function chips(sources: Vec<Source>): Vec<Chip>
```

One chip per distinct site of `sources`, at most six.

Effects: fail.

### `keyed`

```gizlang
function keyed(text: string, key: string): string
```

The HTML of Markdown `text`, its blocks keyed by `key`.

Effects: fail, read, write, console, io.

### `groups`

```gizlang
function groups(models: Vec<ModelOption>): Vec<string>
```

The distinct groups of `models`, in order.

Effects: fail.

