Chat

L’anatomie complète d’un chat : panneau, fil, messages, zone de saisie, envoi, suggestions et indicateur de saisie. Les pièces jointes se placent au-dessus du champ en petites cartes que l’on peut retirer.

Disponible pour
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: pas encore disponible

Utilisation

Ask about this meeting

Answers use the planning meeting transcript
What did Ada and Leo decide about the onboarding checklist?
They agreed to cut the checklist from twelve steps to five and to ship the shorter version behind a feature flag first. Leo owns the rollout.
Planning meetingmeetings.example.com/planning

Importation

ts
import {
  SoneChatAttachmentComponent,
  SoneChatComposerComponent,
  SoneChatComposerInputDirective,
  SoneChatComposerSubmitComponent,
  SoneChatComposerToolsDirective,
  SoneChatMessageComponent,
  SoneChatMessageContentDirective,
  SoneChatPaneActionsDirective,
  SoneChatPaneDescriptionDirective,
  SoneChatPaneDirective,
  SoneChatPaneHeaderDirective,
  SoneChatPaneHeadingDirective,
  SoneChatPaneTitleDirective,
  SoneChatThreadComponent,
  SoneSuggestionChipsComponent,
  SoneTypingIndicatorComponent,
} from "@surface-one/angular/chat";

Référence de l’API

SoneChatAttachmentComponentComposant

`<sone-chat-attachment>` — a linked or uploaded item in the composer: a grey card with a mark (the projected content: a favicon, a file icon, a `<sone-mark>`), the `title` and its `url` (or a size), and — when `removable` — a small round remove button (“Remove {title}”) that emits `remove`. Put it inside `<sone-chat-composer>`, which lines attachments up above the field.

Sélecteur
sone-chat-attachment
Inputs
NomType Par défaut
title

What it is: a page title, a file name.

string""
url

Where it is (or its size), under the title.

string | nullnull
removable

Shows the remove button.

booleanfalse
Outputs
NomType
remove

The remove button was pressed.

void

SoneChatComposerComponentComposant

Sélecteur
sone-chat-composer
Inputs
NomType Par défaut
layoutChatComposerLayout"inline"
Outputs
NomType
submittedvoid

SoneChatComposerInputDirectiveDirective

Sélecteur
textarea[soneChatComposerInput]
Outputs
NomType
draftInputstring

SoneChatComposerSubmitComponentComposant

Sélecteur
sone-chat-composer-submit
Inputs
NomType Par défaut
pendingbooleanfalse
disabledbooleanfalse

SoneChatComposerToolsDirectiveDirective

Sélecteur
[soneChatComposerTools]

SoneChatMessageComponentComposant

Sélecteur
sone-chat-message
Inputs
NomType Par défaut
fromobligatoireChatMessageFrom—
variantBubbleVariant | nullnull

SoneChatMessageContentDirectiveDirective

Sélecteur
[soneChatMessageContent]
Inputs
NomType Par défaut
labelstring | undefinedundefined

SoneChatPaneActionsDirectiveDirective

Sélecteur
[soneChatPaneActions]

SoneChatPaneDescriptionDirectiveDirective

Sélecteur
[soneChatPaneDescription]

SoneChatPaneDirectiveDirective

Sélecteur
[soneChatPane]
Inputs
NomType Par défaut
barebooleanfalse

SoneChatPaneHeaderDirectiveDirective

Sélecteur
[soneChatPaneHeader]

SoneChatPaneHeadingDirectiveDirective

Sélecteur
[soneChatPaneHeading]

SoneChatPaneTitleDirectiveDirective

Sélecteur
[soneChatPaneTitle]

SoneChatThreadComponentComposant

Sélecteur
sone-chat-thread
Inputs
NomType Par défaut
label—$localize`Conversation`

SoneSuggestionChipsComponentComposant

Sélecteur
sone-suggestion-chips
Inputs
NomType Par défaut
suggestionsreadonly string[][]
disabledbooleanfalse
label—$localize`Suggested questions`
Outputs
NomType
pickedstring

SoneTypingIndicatorComponentComposant

Sélecteur
sone-typing-indicator
Inputs
NomType Par défaut
label—$localize`Thinking`