feat: chat auto tag

This commit is contained in:
Timothy J. Baek
2024-10-19 20:34:17 -07:00
parent 2db0f58dcb
commit d795940ced
7 changed files with 233 additions and 11 deletions

View File

@@ -19,6 +19,8 @@
// Addons
let titleAutoGenerate = true;
let autoTags = true;
let responseAutoCopy = false;
let widescreenMode = false;
let splitLargeChunks = false;
@@ -112,6 +114,11 @@
});
};
const toggleAutoTags = async () => {
autoTags = !autoTags;
saveSettings({ autoTags });
};
const toggleResponseAutoCopy = async () => {
const permission = await navigator.clipboard
.readText()
@@ -149,6 +156,7 @@
onMount(async () => {
titleAutoGenerate = $settings?.title?.auto ?? true;
autoTags = $settings.autoTags ?? true;
responseAutoCopy = $settings.responseAutoCopy ?? false;
showUsername = $settings.showUsername ?? false;
@@ -431,6 +439,26 @@
</div>
</div>
<div>
<div class=" py-0.5 flex w-full justify-between">
<div class=" self-center text-xs">{$i18n.t('Chat Tags Auto-Generation')}</div>
<button
class="p-1 px-3 text-xs flex rounded transition"
on:click={() => {
toggleAutoTags();
}}
type="button"
>
{#if autoTags === true}
<span class="ml-2 self-center">{$i18n.t('On')}</span>
{:else}
<span class="ml-2 self-center">{$i18n.t('Off')}</span>
{/if}
</button>
</div>
</div>
<div>
<div class=" py-0.5 flex w-full justify-between">
<div class=" self-center text-xs">