コンポーネント AI チャット Chat Chat チャットの完全な構成要素。ペイン、スレッド、メッセージ、コンポーザー、送信、サジェスト、入力中インジケーター。添付ファイルは削除できる小さなカードとして入力欄の上に並びます。
対応フレームワーク Angular: 対応 Vue: 対応 React: 対応 React Native: 未対応 使い方 Angular Vue / Nuxt React / Next.js
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.
Summarize the key decisions What are my action items? <div soneChatPane style ="max-width: 560px; width: 100%" >
<div soneChatPaneHeader >
<div soneChatPaneHeading >
<h3 soneChatPaneTitle > Ask about this meeting</h3 >
<span soneChatPaneDescription > Answers use the planning meeting transcript</span >
</div >
<div soneChatPaneActions >
<button soneBtn type ="button" variant ="ghost" size ="sm" (click )="reset()" >
<sone-icon icon ="plus" /> <span > New</span >
</button >
</div >
</div >
<sone-chat-thread style ="max-height: 360px" >
@for (turn of turns(); track turn.id) {
<sone-chat-message [from ]="turn.role" >
<div soneChatMessageContent > {{ turn.content }}</div >
</sone-chat-message >
}
@if (pending()) {
<sone-chat-message from ="assistant" > <sone-typing-indicator /> </sone-chat-message >
}
</sone-chat-thread >
<sone-suggestion-chips [suggestions ]="starters" [disabled ]="pending()" (picked )="send($event)" />
<sone-chat-composer (submitted )="send(draft())" >
@if (attached()) {
<sone-chat-attachment title ="Planning meeting" url ="meetings.example.com/planning" removable
(remove )="attached.set(false)" > <sone-mark icon ="meetings" tone ="lagoon" /> </sone-chat-attachment >
}
<textarea soneChatComposerInput rows ="1" aria-label ="Your question"
placeholder ="Ask about this meeting…" [value ]="draft()"
(draftInput )="draft.set($event)" [disabled ]="pending()" > </textarea >
<sone-chat-composer-submit [pending ]="pending()" [disabled ]="pending() || !draft().trim()" />
</sone-chat-composer >
</div > インポート import {
SoneChatAttachmentComponent ,
SoneChatComposerComponent ,
SoneChatComposerInputDirective ,
SoneChatComposerSubmitComponent ,
SoneChatComposerToolsDirective ,
SoneChatMessageComponent ,
SoneChatMessageContentDirective ,
SoneChatPaneActionsDirective ,
SoneChatPaneDescriptionDirective ,
SoneChatPaneDirective ,
SoneChatPaneHeaderDirective ,
SoneChatPaneHeadingDirective ,
SoneChatPaneTitleDirective ,
SoneChatThreadComponent ,
SoneSuggestionChipsComponent ,
SoneTypingIndicatorComponent ,
} from "@surface-one/angular/chat" ;API リファレンス SoneChatAttachmentComponentコンポーネント `<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.
セレクター sone-chat-attachmentSoneChatComposerComponentコンポーネント
セレクター sone-chat-composer
セレクター textarea[soneChatComposerInput]SoneChatComposerSubmitComponentコンポーネント
セレクター sone-chat-composer-submit
セレクター [soneChatComposerTools]SoneChatMessageComponentコンポーネント
セレクター sone-chat-messageSoneChatMessageContentDirectiveディレクティブ
セレクター [soneChatMessageContent]SoneChatPaneActionsDirectiveディレクティブ
セレクター [soneChatPaneActions]SoneChatPaneDescriptionDirectiveディレクティブ
セレクター [soneChatPaneDescription]SoneChatPaneDirectiveディレクティブ
セレクター [soneChatPane]
セレクター [soneChatPaneHeader]SoneChatPaneHeadingDirectiveディレクティブ
セレクター [soneChatPaneHeading]SoneChatPaneTitleDirectiveディレクティブ
セレクター [soneChatPaneTitle]SoneChatThreadComponentコンポーネント
セレクター sone-chat-threadSoneSuggestionChipsComponentコンポーネント
セレクター sone-suggestion-chipsSoneTypingIndicatorComponentコンポーネント
セレクター sone-typing-indicator