- Issue created by @mindaugasd
To use prompt for various and extensive purposes of AI → module, where could be prompt library which opens in the modal.
1. Create render element 'prompt_library_link', which enables to integrate link anywhere.
$build = [
'prompt_link' => [
'#theme' => 'prompt_library_link',
'#title' => 'Choose prompt from the library',
'#input_selector' => 'textarea'
]
];
2. Clicking the link, opens a popup modal to select a prompt.
3. Popup has tabs and views, where user can filter prompts based on bookmarks, category or recently used.
4. Selecting a prompt, modal closes and input element is automatically pre-filled.
Active
1.0
Code