Skip to content

Commit 13c30d6

Browse files
committed
refactor: Components structure
Refactors the directory structure by moving chat-related components to a dedicated "app" directory. This change improves organization and maintainability by grouping components based on their function within the application.
1 parent b5d9f55 commit 13c30d6

38 files changed

+52
-111
lines changed

tools/server/webui/src/lib/components/chat/ChatAttachmentsList.svelte renamed to tools/server/webui/src/lib/components/app/chat/ChatAttachmentsList.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { ChatAttachmentImagePreview, ChatAttachmentFilePreview } from '$lib/components';
2+
import { ChatAttachmentImagePreview, ChatAttachmentFilePreview } from '$lib/components/app';
33
import ChatAttachmentPreviewDialog from './ChatAttachmentPreviewDialog.svelte';
44
import type { ChatUploadedFile } from '$lib/types/chat.d.ts';
55
import type { DatabaseMessageExtra } from '$lib/types/database.d.ts';

tools/server/webui/src/lib/components/chat/ChatForm.svelte renamed to tools/server/webui/src/lib/components/app/chat/ChatForm.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import autoResizeTextarea from '$lib/utils/autoresize-textarea';
44
import { Square, Paperclip, Mic, ArrowUp, Upload, X } from '@lucide/svelte';
55
import type { ChatUploadedFile } from '$lib/types/chat.d.ts';
6-
import { ChatAttachmentsList } from '$lib/components';
6+
import { ChatAttachmentsList } from '$lib/components/app';
77
import { inputClasses } from '$lib/constants/input-classes';
88
import { onMount } from 'svelte';
99
@@ -164,7 +164,7 @@
164164

165165
<form
166166
onsubmit={handleSubmit}
167-
class="{inputClasses} border-radius-bottom-none mx-auto max-w-4xl overflow-hidden rounded-3xl backdrop-blur-md {className}"
167+
class="{inputClasses} border-radius-bottom-none mx-auto max-w-[48rem] overflow-hidden rounded-3xl backdrop-blur-md {className}"
168168
>
169169
<ChatAttachmentsList bind:uploadedFiles {onFileRemove} class="mb-3 px-5 pt-5" />
170170

tools/server/webui/src/lib/components/chat/ChatHeader.svelte renamed to tools/server/webui/src/lib/components/app/chat/ChatHeader.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import { Button } from '$lib/components/ui/button';
33
import { Settings } from '@lucide/svelte';
4-
import { ChatSettingsDialog } from '$lib/components';
4+
import { ChatSettingsDialog } from '$lib/components/app';
55
66
let settingsOpen = $state(false);
77

tools/server/webui/src/lib/components/chat/ChatMessages/ChatMessage.svelte renamed to tools/server/webui/src/lib/components/app/chat/ChatMessages/ChatMessage.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Edit, Copy, RefreshCw, Check, X } from '@lucide/svelte';
33
import { Card } from '$lib/components/ui/card';
44
import { Button } from '$lib/components/ui/button';
5-
import { ChatAttachmentsList, ChatThinkingBlock, MarkdownContent } from '$lib/components';
5+
import { ChatAttachmentsList, ChatThinkingBlock, MarkdownContent } from '$lib/components/app';
66
import { Tooltip, TooltipContent, TooltipTrigger } from '$lib/components/ui/tooltip';
77
import type { ChatRole } from '$lib/types/chat';
88
import type { DatabaseMessage } from '$lib/types/database';
@@ -232,6 +232,11 @@
232232
? 'right-0'
233233
: 'left-0'} text-muted-foreground absolute text-xs transition-all duration-150 group-hover:pointer-events-none group-hover:opacity-0"
234234
>
235-
{message.timestamp ? new Date(message.timestamp).toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' }) : ''}
235+
{message.timestamp
236+
? new Date(message.timestamp).toLocaleTimeString(undefined, {
237+
hour: '2-digit',
238+
minute: '2-digit'
239+
})
240+
: ''}
236241
</div>
237242
{/snippet}

0 commit comments

Comments
 (0)