This commit is contained in:
zhaxnb 2025-03-11 20:50:01 +00:00 committed by GitHub
commit c216e77dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 1 deletions

View File

@ -55,6 +55,8 @@
let webSearch = null;
let reasoningDisplay = false;
const toggleSplitLargeChunks = async () => {
splitLargeChunks = !splitLargeChunks;
saveSettings({ splitLargeChunks: splitLargeChunks });
@ -211,6 +213,12 @@
saveSettings({ webSearch: webSearch });
};
const toggleReasoningDisplay = async () => {
reasoningDisplay = reasoningDisplay === false ? true : false;
saveSettings({ reasoningDisplay: reasoningDisplay });
};
onMount(async () => {
titleAutoGenerate = $settings?.title?.auto ?? true;
autoTags = $settings.autoTags ?? true;
@ -250,6 +258,7 @@
backgroundImageUrl = $settings.backgroundImageUrl ?? null;
webSearch = $settings.webSearch ?? null;
reasoningDisplay = $settings.reasoningDisplay ?? false;
});
</script>
@ -722,6 +731,26 @@
</button>
</div>
</div>
<div>
<div class=" py-0.5 flex w-full justify-between">
<div class=" self-center text-xs">{$i18n.t('Default Reasoning Display')}</div>
<button
class="p-1 px-3 text-xs flex rounded-sm transition"
on:click={() => {
toggleReasoningDisplay();
}}
type="button"
>
{#if reasoningDisplay === false}
<span class="ml-2 self-center">{$i18n.t('Off')}</span>
{:else}
<span class="ml-2 self-center">{$i18n.t('On')}</span>
{/if}
</button>
</div>
</div>
<div class=" my-1.5 text-sm font-medium">{$i18n.t('Voice')}</div>

View File

@ -3,6 +3,7 @@
const i18n = getContext('i18n');
import dayjs from '$lib/dayjs';
import { settings } from '$lib/stores';
import duration from 'dayjs/plugin/duration';
import relativeTime from 'dayjs/plugin/relativeTime';
@ -33,7 +34,7 @@
import ChevronDown from '../icons/ChevronDown.svelte';
import Spinner from './Spinner.svelte';
export let open = false;
export let open = $settings?.reasoningDisplay ?? false;
export let id = '';
export let className = '';
export let buttonClassName =

View File

@ -1140,6 +1140,7 @@
"Web Search": "",
"Web Search Engine": "",
"Web Search in Chat": "",
"Default Reasoning Display": "",
"Web Search Query Generation": "",
"Webhook URL": "",
"WebUI Settings": "",

View File

@ -1140,6 +1140,7 @@
"Web Search": "联网搜索",
"Web Search Engine": "联网搜索引擎",
"Web Search in Chat": "聊天中的网页搜索",
"Default Reasoning Display": "推理默认显示",
"Web Search Query Generation": "网页搜索关键词生成",
"Webhook URL": "Webhook URL",
"WebUI Settings": "WebUI 设置",