{#key sorted} {#each chara.chats as chat, i} {/each} {/key}
{#if DBState.db.characters[$selectedCharID]?.chaId !== '§playground'} {#if parseKeyValue(DBState.db.customPromptTemplateToggle).length > 4}
{#each parseKeyValue(DBState.db.customPromptTemplateToggle) as toggle}
{ DBState.db.globalChatVariables[`toggle_${toggle[0]}`] = DBState.db.globalChatVariables[`toggle_${toggle[0]}`] === '1' ? '0' : '1' }} />
{/each} {#if DBState.db.supaModelType !== 'none' || DBState.db.hanuraiEnable}
{/if}
{:else if parseKeyValue(DBState.db.customPromptTemplateToggle).length > 0}
{#each parseKeyValue(DBState.db.customPromptTemplateToggle) as toggle}
{ DBState.db.globalChatVariables[`toggle_${toggle[0]}`] = DBState.db.globalChatVariables[`toggle_${toggle[0]}`] === '1' ? '0' : '1' }} />
{/each} {#if DBState.db.supaModelType !== 'none' || DBState.db.hanuraiEnable}
{/if} {:else}
{#if DBState.db.supaModelType !== 'none' || DBState.db.hanuraiEnable}
{/if} {/if} {/if}
{#if chara.type === 'group'}
{/if}