View as Markdown

API reference: @salmonui/chat/inline-assist

InlineAssistApiinterface

import type { InlineAssistApi } from '@salmonui/chat/inline-assist';
interface InlineAssistApi {
    open(): void;
    close(): void;
    send(text?: string): void;
    stop(): void;
    showCommands(): void;
    hideCommands(): void;
    focus(): void;
    readonly element: HTMLElement | null;
}

Imperative API (ref).

InlineAssistApi members (8)
NameSignatureDescription
openopen(): void;
closeclose(): void;
sendsend(text?: string): void;

Sends text (default: the current prompt) as a new request.

stopstop(): void;

Aborts the running response.

showCommandsshowCommands(): void;

Shows the command menu (unfiltered).

hideCommandshideCommands(): void;
focusfocus(): void;

Focuses the prompt.

elementreadonly element: HTMLElement | null;

The dialog element while open.