Chat Transcript
Generated from public Vue/TypeScript exports by
pnpm docs:generate. Edit source comments and stories to update this reference. Types describe the declared API; browser/device constraints are covered in the guides. This catalog reflects source commitfc6bfb108634735f1657e533206c3f8702ad357d; match your installed package and typed manifest before using an export. Source review does not establish registry-release availability.
ChatTranscript
import { ChatTranscript } from '@gxp-dev/app-ui'
Props
| Name | Type | Required / default | Description |
|---|---|---|---|
messages | ChatMessage[] | Required | Array of chat messages to display |
autoScroll | boolean | undefined | true | Auto-scroll to bottom on new messages (default: true) |
showTimestamps | boolean | undefined | true | Show timestamps (default: true) |
relativeTime | boolean | undefined | true | Use relative time format via timeAgo (default: true) |
showRoleLabels | boolean | undefined | true | Show role labels (default: true) |
roleLabels | Partial<Record<MessageRole, string>> | undefined | {} | Custom role labels |
typingText | string | undefined | "Typing..." | Text shown when typing indicator is active |
isTyping | boolean | undefined | false | Whether the assistant is currently typing/generating |
liveUserText | string | undefined | "" | Live transcription text (user speaking) |
liveAssistantText | string | undefined | "" | Live transcription text (assistant speaking) |
emptyText | string | undefined | "No messages yet..." | Empty state text |
maxHeight | string | undefined | undefined | Maximum height in CSS units (default: none) |
Events
| Name | Type | Required / default | Description |
|---|---|---|---|
message-click | [message: ChatMessage] | — | — |
Slots
| Name | Type | Required / default | Description |
|---|---|---|---|
message | { message: ChatMessage; } | — | — |
live-user | { text: string; } | — | — |
live-assistant | { text: string; } | — | — |
typing | {} | — | — |
empty | {} | — | — |
Exposed methods and values
| Name | Type | Required / default | Description |
|---|---|---|---|
scrollToBottom | () => void | — | — |
Examples
These are authored Storybook excerpts, not complete standalone modules. Relative imports refer to the story file; in an app import public components from @gxp-dev/app-ui. Default meta arguments are applied before each story.
Default
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ChatTranscript } from '.'
import type { ChatMessage } from '.'
const defaultArgs = {
messages: sampleMessages,
autoScroll: true,
showTimestamps: true,
relativeTime: true,
showRoleLabels: true,
isTyping: false,
}
{}
WithTypingIndicator
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ChatTranscript } from '.'
import type { ChatMessage } from '.'
const defaultArgs = {
messages: sampleMessages,
autoScroll: true,
showTimestamps: true,
relativeTime: true,
showRoleLabels: true,
isTyping: false,
}
{
args: {
isTyping: true,
},
}
WithLiveTranscription
import type { Meta, StoryObj } from '@storybook/vue3-vite'
import { ChatTranscript } from '.'
import type { ChatMessage } from '.'
const defaultArgs = {
messages: sampleMessages,
autoScroll: true,
showTimestamps: true,
relativeTime: true,
showRoleLabels: true,
isTyping: false,
}
{
args: {
liveUserText: 'I am currently speaking and this is being transcribed in real-time...',
},
}