mirror of
https://github.com/open-webui/open-webui
synced 2025-05-23 14:24:22 +00:00
enh: always expand details option
This commit is contained in:
parent
74da9c4e54
commit
dbf051ff4e
@ -18,6 +18,7 @@
|
|||||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
import ArrowDownTray from '$lib/components/icons/ArrowDownTray.svelte';
|
import ArrowDownTray from '$lib/components/icons/ArrowDownTray.svelte';
|
||||||
import Source from './Source.svelte';
|
import Source from './Source.svelte';
|
||||||
|
import { settings } from '$lib/stores';
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
@ -242,6 +243,7 @@
|
|||||||
{:else if token.type === 'details'}
|
{:else if token.type === 'details'}
|
||||||
<Collapsible
|
<Collapsible
|
||||||
title={token.summary}
|
title={token.summary}
|
||||||
|
open={$settings?.expandDetails ?? false}
|
||||||
attributes={token?.attributes}
|
attributes={token?.attributes}
|
||||||
className="w-full space-y-1"
|
className="w-full space-y-1"
|
||||||
dir="auto"
|
dir="auto"
|
||||||
|
@ -39,6 +39,8 @@
|
|||||||
let chatDirection: 'LTR' | 'RTL' = 'LTR';
|
let chatDirection: 'LTR' | 'RTL' = 'LTR';
|
||||||
let ctrlEnterToSend = false;
|
let ctrlEnterToSend = false;
|
||||||
|
|
||||||
|
let expandDetails = false;
|
||||||
|
|
||||||
let imageCompression = false;
|
let imageCompression = false;
|
||||||
let imageCompressionSize = {
|
let imageCompressionSize = {
|
||||||
width: '',
|
width: '',
|
||||||
@ -55,6 +57,11 @@
|
|||||||
|
|
||||||
let webSearch = null;
|
let webSearch = null;
|
||||||
|
|
||||||
|
const togglExpandDetails = () => {
|
||||||
|
expandDetails = !expandDetails;
|
||||||
|
saveSettings({ expandDetails });
|
||||||
|
};
|
||||||
|
|
||||||
const toggleSplitLargeChunks = async () => {
|
const toggleSplitLargeChunks = async () => {
|
||||||
splitLargeChunks = !splitLargeChunks;
|
splitLargeChunks = !splitLargeChunks;
|
||||||
saveSettings({ splitLargeChunks: splitLargeChunks });
|
saveSettings({ splitLargeChunks: splitLargeChunks });
|
||||||
@ -570,6 +577,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class=" py-0.5 flex w-full justify-between">
|
||||||
|
<div class=" self-center text-xs">{$i18n.t('Always Expand Details')}</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="p-1 px-3 text-xs flex rounded-sm transition"
|
||||||
|
on:click={() => {
|
||||||
|
togglExpandDetails();
|
||||||
|
}}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
{#if expandDetails === 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>
|
||||||
<div class=" py-0.5 flex w-full justify-between">
|
<div class=" py-0.5 flex w-full justify-between">
|
||||||
<div class=" self-center text-xs">
|
<div class=" self-center text-xs">
|
||||||
|
Loading…
Reference in New Issue
Block a user