{$i18n.t('Prompts')} • {$WEBUI_NAME} {#if loaded} { deleteHandler(deletePrompt); }} >
{$i18n.t('This will delete')} {deletePrompt.command}.
{ console.log(importFiles); const reader = new FileReader(); reader.onload = async (event) => { const savedPrompts = JSON.parse(event.target.result); console.log(savedPrompts); for (const prompt of savedPrompts) { await createNewPrompt(localStorage.token, { command: prompt.command.charAt(0) === '/' ? prompt.command.slice(1) : prompt.command, title: prompt.title, content: prompt.content }).catch((error) => { toast.error(`${error}`); return null; }); } prompts = await getPromptList(localStorage.token); await _prompts.set(await getPrompts(localStorage.token)); importFiles = []; promptsImportInputElement.value = ''; }; reader.readAsText(importFiles[0]); }} />
{$i18n.t('Prompts')}
{filteredItems.length}
{#if $user?.role === 'admin'} {#if prompts.length} {/if} {/if}
{#if query}
{/if}
{ if (e.deltaY !== 0) { e.preventDefault(); e.currentTarget.scrollLeft += e.deltaY; } }} >
{ localStorage.workspaceViewOption = value; await tick(); }} />
{#if (filteredItems ?? []).length !== 0}
{#each filteredItems as prompt}
{prompt.title}
{prompt.command}
{$i18n.t('By {{name}}', { name: capitalizeFirstLetter( prompt?.user?.name ?? prompt?.user?.email ?? $i18n.t('Deleted User') ) })}
{#if shiftKey} {:else} { shareHandler(prompt); }} cloneHandler={() => { cloneHandler(prompt); }} exportHandler={() => { exportHandler(prompt); }} deleteHandler={async () => { deletePrompt = prompt; showDeleteConfirm = true; }} onClose={() => {}} > {/if}
{/each}
{:else}
😕
{$i18n.t('No prompts found')}
{$i18n.t('Try adjusting your search or filter to find what you are looking for.')}
{/if}
{#if $config?.features.enable_community_sharing}
{$i18n.t('Made by Open WebUI Community')}
{$i18n.t('Discover a prompt')}
{$i18n.t('Discover, download, and explore custom prompts')}
{/if} {:else}
{/if}