chore: format
This commit is contained in:
@@ -172,9 +172,7 @@ Based on the user's instruction, update and enhance the existing notes or select
|
||||
// Filter out empty assistant placeholder messages to avoid sending
|
||||
// an empty trailing assistant message as "response prefill", which is
|
||||
// incompatible with enable_thinking in llama.cpp and similar backends.
|
||||
const filteredMessages = messages.filter(
|
||||
(m) => !(m.role === 'assistant' && m.content === '')
|
||||
);
|
||||
const filteredMessages = messages.filter((m) => !(m.role === 'assistant' && m.content === ''));
|
||||
|
||||
const chatMessages = JSON.parse(
|
||||
JSON.stringify([
|
||||
|
||||
@@ -545,7 +545,9 @@
|
||||
isPinned={note.is_pinned ?? false}
|
||||
onPin={async () => {
|
||||
await toggleNotePinnedStatusById(localStorage.token, note.id);
|
||||
pinnedNotes.set(await getPinnedNoteList(localStorage.token).catch(() => []));
|
||||
pinnedNotes.set(
|
||||
await getPinnedNoteList(localStorage.token).catch(() => [])
|
||||
);
|
||||
init();
|
||||
}}
|
||||
>
|
||||
@@ -613,7 +615,9 @@
|
||||
isPinned={note.is_pinned ?? false}
|
||||
onPin={async () => {
|
||||
await toggleNotePinnedStatusById(localStorage.token, note.id);
|
||||
pinnedNotes.set(await getPinnedNoteList(localStorage.token).catch(() => []));
|
||||
pinnedNotes.set(
|
||||
await getPinnedNoteList(localStorage.token).catch(() => [])
|
||||
);
|
||||
init();
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -115,24 +115,24 @@
|
||||
{/if}
|
||||
|
||||
{#if onPin}
|
||||
<button
|
||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||
on:click={() => {
|
||||
onPin();
|
||||
show = false;
|
||||
}}
|
||||
>
|
||||
{#if isPinned}
|
||||
<PinSlash />
|
||||
<div class="flex items-center">{$i18n.t('Unpin')}</div>
|
||||
{:else}
|
||||
<Pin />
|
||||
<div class="flex items-center">{$i18n.t('Pin to Sidebar')}</div>
|
||||
{/if}
|
||||
</button>
|
||||
{/if}
|
||||
<button
|
||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||
on:click={() => {
|
||||
onPin();
|
||||
show = false;
|
||||
}}
|
||||
>
|
||||
{#if isPinned}
|
||||
<PinSlash />
|
||||
<div class="flex items-center">{$i18n.t('Unpin')}</div>
|
||||
{:else}
|
||||
<Pin />
|
||||
<div class="flex items-center">{$i18n.t('Pin to Sidebar')}</div>
|
||||
{/if}
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
<button
|
||||
<button
|
||||
class="select-none flex gap-2 items-center px-3 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-xl w-full"
|
||||
on:click={() => {
|
||||
onDelete();
|
||||
|
||||
Reference in New Issue
Block a user