View as Markdown

API reference: @salmonui/chat/inline-assist

InlineAssistCommandinterface

import type { InlineAssistCommand } from '@salmonui/chat/inline-assist';
interface InlineAssistCommand {
    readonly id: string;
    readonly label: string;
    readonly prompt?: string;
    readonly keywords?: readonly string[];
    readonly icon?: ReactNode;
    readonly disabled?: boolean;
}

A slash command of the command menu.

InlineAssistCommand members (6)
NameSignatureDescription
idreadonly id: string;

Stable id, reported in onCommandSelect and in the request.

labelreadonly label: string;

Menu text; also what typing after / filters on.

promptoptionalreadonly prompt?: string;

Prompt sent when the command is chosen (default: label).

keywordsoptionalreadonly keywords?: readonly string[];

More words that match the filter.

iconoptionalreadonly icon?: ReactNode;

Decorative leading icon.

disabledoptionalreadonly disabled?: boolean;