View as Markdown

API reference: @salmonui/chat/conversation

ConversationItemActionEventinterface

import type { ConversationItemActionEvent } from '@salmonui/chat/conversation';
interface ConversationItemActionEvent {
    readonly action: string;
    readonly message: ConversationMessage;
    readonly feedback?: 'positive' | 'negative' | undefined;
    preventDefault(): void;
    readonly defaultPrevented: boolean;
}
ConversationItemActionEvent members (5)
NameSignatureDescription
actionreadonly action: string;

A built-in action ('copy', 'reply', 'pin', 'delete', 'edit', 'regenerate', 'feedback') or a custom item's id.

messagereadonly message: ConversationMessage;
feedbackoptionalreadonly feedback?: 'positive' | 'negative' | undefined;

'feedback': the rating the click sets (undefined clears it).

preventDefaultpreventDefault(): void;

Cancels the built-in follow-up of a built-in action.

defaultPreventedreadonly defaultPrevented: boolean;