View as Markdown

API reference: @salmonui/chat/text-suggest

useTextSuggestfunction

import { useTextSuggest } from '@salmonui/chat/text-suggest';
function useTextSuggest(options: TextSuggestOptions): TextSuggest;

Attaches inline suggestions to the <textarea> that receives ref. Options are read when events happen, so suggest and the callbacks may be inline functions.