Used the new getChatWidth function in ChatProcessingInfo
This commit is contained in:
parent
62614a5faa
commit
416bb35130
|
|
@ -4,16 +4,14 @@
|
||||||
import { slotsService } from '$lib/services/slots';
|
import { slotsService } from '$lib/services/slots';
|
||||||
import { isLoading, activeMessages, activeConversation } from '$lib/stores/chat.svelte';
|
import { isLoading, activeMessages, activeConversation } from '$lib/stores/chat.svelte';
|
||||||
import { config } from '$lib/stores/settings.svelte';
|
import { config } from '$lib/stores/settings.svelte';
|
||||||
import { MAX_WIDTH_CLASSES, DEFAULT_MAX_WIDTH_CLASS } from '$lib/constants/width-classes';
|
import { getChatWidth } from '$lib/utils/chat-width';
|
||||||
|
|
||||||
const processingState = useProcessingState();
|
const processingState = useProcessingState();
|
||||||
|
|
||||||
let isCurrentConversationLoading = $derived(isLoading());
|
let isCurrentConversationLoading = $derived(isLoading());
|
||||||
let processingDetails = $derived(processingState.getProcessingDetails());
|
let processingDetails = $derived(processingState.getProcessingDetails());
|
||||||
let showSlotsInfo = $derived(isCurrentConversationLoading || config().keepStatsVisible);
|
let showSlotsInfo = $derived(isCurrentConversationLoading || config().keepStatsVisible);
|
||||||
let maxWidthClass = $derived(
|
let widthConfig = $derived(getChatWidth(config().autoChatWidth, config().customChatWidth));
|
||||||
config().responsiveChatWidth ? MAX_WIDTH_CLASSES : DEFAULT_MAX_WIDTH_CLASS
|
|
||||||
);
|
|
||||||
|
|
||||||
// Track loading state reactively by checking if conversation ID is in loading conversations array
|
// Track loading state reactively by checking if conversation ID is in loading conversations array
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
|
@ -81,7 +79,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="chat-processing-info-container pointer-events-none" class:visible={showSlotsInfo}>
|
<div class="chat-processing-info-container pointer-events-none" class:visible={showSlotsInfo}>
|
||||||
<div class="chat-processing-info-content {maxWidthClass}">
|
<div class="chat-processing-info-content {widthConfig.class}" style={widthConfig.style}>
|
||||||
{#each processingDetails as detail (detail)}
|
{#each processingDetails as detail (detail)}
|
||||||
<span class="chat-processing-info-detail pointer-events-auto">{detail}</span>
|
<span class="chat-processing-info-detail pointer-events-auto">{detail}</span>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue