Chat

La anatomía completa del chat: panel, hilo, mensajes, redactor, envío, sugerencias e indicador de escritura. Los adjuntos se colocan sobre el campo como pequeñas tarjetas que se pueden quitar.

Disponible en
  • Angular: disponible
  • Vue: disponible
  • React: disponible
  • React Native: aún no disponible

Uso

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

Importación

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

Referencia de la API

SoneChatAttachmentComponentComponente

`<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.

Selector
sone-chat-attachment
Inputs
NombreTipo Predeterminado
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
NombreTipo
remove

The remove button was pressed.

void

SoneChatComposerComponentComponente

Selector
sone-chat-composer
Inputs
NombreTipo Predeterminado
layoutChatComposerLayout"inline"
Outputs
NombreTipo
submittedvoid

SoneChatComposerInputDirectiveDirectiva

Selector
textarea[soneChatComposerInput]
Outputs
NombreTipo
draftInputstring

SoneChatComposerSubmitComponentComponente

Selector
sone-chat-composer-submit
Inputs
NombreTipo Predeterminado
pendingbooleanfalse
disabledbooleanfalse

SoneChatComposerToolsDirectiveDirectiva

Selector
[soneChatComposerTools]

SoneChatMessageComponentComponente

Selector
sone-chat-message
Inputs
NombreTipo Predeterminado
fromobligatorioChatMessageFrom—
variantBubbleVariant | nullnull

SoneChatMessageContentDirectiveDirectiva

Selector
[soneChatMessageContent]
Inputs
NombreTipo Predeterminado
labelstring | undefinedundefined

SoneChatPaneActionsDirectiveDirectiva

Selector
[soneChatPaneActions]

SoneChatPaneDescriptionDirectiveDirectiva

Selector
[soneChatPaneDescription]

SoneChatPaneDirectiveDirectiva

Selector
[soneChatPane]
Inputs
NombreTipo Predeterminado
barebooleanfalse

SoneChatPaneHeaderDirectiveDirectiva

Selector
[soneChatPaneHeader]

SoneChatPaneHeadingDirectiveDirectiva

Selector
[soneChatPaneHeading]

SoneChatPaneTitleDirectiveDirectiva

Selector
[soneChatPaneTitle]

SoneChatThreadComponentComponente

Selector
sone-chat-thread
Inputs
NombreTipo Predeterminado
label—$localize`Conversation`

SoneSuggestionChipsComponentComponente

Selector
sone-suggestion-chips
Inputs
NombreTipo Predeterminado
suggestionsreadonly string[][]
disabledbooleanfalse
label—$localize`Suggested questions`
Outputs
NombreTipo
pickedstring

SoneTypingIndicatorComponentComponente

Selector
sone-typing-indicator
Inputs
NombreTipo Predeterminado
label—$localize`Thinking`