Chat History

Zapisane rozmowy z asystentem: filtrowanie po tytule, otwieranie, grupowanie według wieku w panelu bocznym, ze stanami ładowania, pustym i błędu.

Dostępny w
  • Angular: dostępny
  • Vue: dostępny
  • React: dostępny
  • React Native: jeszcze niedostępny

Użycie

Import

ts
import {
  SoneChatHistoryComponent,
} from "@surface-one/angular/chat-history";

Dokumentacja API

SoneChatHistoryComponentKomponent

`<sone-chat-history>` — the browser of saved assistant conversations: first load, load error (with Retry), empty, the list, refreshing (cached rows stay — stale while revalidate) and a non-blocking `notice`. Presentational: the owner loads the threads and reacts to `(selected)` / `(retryRequested)`. `query` filters the titles; `variant="sidebar"` groups compact rows by age (Today, Yesterday, …).

Selektor
sone-chat-history
Wejścia
NazwaTyp Domyślnie
threadsreadonly SoneChatHistoryThread[][]
loading

The history is loading: a spinner well at first, a "Refreshing…" line over cached rows.

booleanfalse
error

Why loading failed: a well with Retry, or an alert above cached rows.

string | nullnull
notice

A non-blocking message above the list (a row action that failed).

string | nullnull
activeThreadId

The open conversation: `aria-current` and the active fill.

string | nullnull
loadingThreadId

The conversation being opened: its row is disabled and busy, with a spinner.

string | nullnull
variantSoneChatHistoryVariant"list"
query

Filters the rows by title (case-insensitive).

string""
now

"Today" for the `sidebar` groups; `null` = the current time.

Date | nullnull
label

The region's accessible name.

—$localize`Conversation history`
emptyTitle—$localize`No conversations yet`
emptyDescription—$localize`Conversations you start will appear here.`
Wyjścia
NazwaTyp
selected

The id of the conversation to open.

string
retryRequested

Retry the failed load.

void