smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Content · Components

ContentAgentChat

Renders an AI chat interface alongside a specific piece of content, supporting multiple topics (threads).

Public export

typescript
import { ContentAgentChat } from '@happyvertical/smrt-content/svelte';
Import path
@happyvertical/smrt-content/svelte
Props
10
Props described
10 of 10
Bindable state
0
Callback events
2
Verified release
0.62.10

Props

NameTypeRequiredDescription
apiBaseUrlstringNoBase URL for API requests to fetch and update chat sessions.
assistantContextContentEditorAssistantContext | nullNoContext object from the parent editor containing content and editor state.
contentIdstringNoIdentifier of the content being discussed in the chat.
currentEditorStatestringNoCurrent markdown or structured state of the content editor.
currentReferenceIdsstring[]NoList of reference or link identifiers mentioned in the content.
formFieldsRecord<string, string>NoCurrent form field values to include in AI context.
currentProfileIdstringNoIdentifier of the profile owner or collaborator in the chat.
assistantFieldAllowListContentEditorAssistantFieldUpdateAllowListNoPolicy object defining which fields the assistant can modify.
onapplyfields(fields: Record<string, string>) => voidNoFired when the assistant recommends field updates in its response.
onclose() => voidNoFired when the user closes the chat interface.

Bindable state

This component has no bindable public state.

Callback events

  • onapplyfields(fields: Record<string, string>) => void
  • onclose() => void

Examples and explanation