View as Markdown

API reference: @salmonui/chat/inline-assist

InlineAssistInputPropstype

import type { InlineAssistInputProps } from '@salmonui/chat/inline-assist';
type InlineAssistInputProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'onKeyDown' | 'value'> & {
    readonly ref: Ref<HTMLTextAreaElement>;
    readonly value: string;
    readonly onChange: (event: {
        readonly currentTarget: {
            readonly value: string;
        };
    }) => void;
    readonly onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
};

Props of the default prompt <textarea>; spread them on a custom input in renderComposer.

InlineAssistInputProps members (4, 4 inherited)
NameSignatureDescription
refinheritedref: Ref<HTMLTextAreaElement>;
valueinheritedvalue: string;
onChangeinheritedonChange: (event: { readonly currentTarget: { readonly value: string; }; }) => void;
onKeyDowninheritedonKeyDown: (event: KeyboardEvent<HTMLElement>) => void;