Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified tools/server/public/index.html.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import ChatMessageBranchingControls from './ChatMessageBranchingControls.svelte';

interface Props {
message: DatabaseMessage;
role: 'user' | 'assistant';
justify: 'start' | 'end';
actionsPosition: 'left' | 'right';
Expand All @@ -29,7 +28,6 @@
actionsPosition,
deletionInfo,
justify,
message,
onCopy,
onEdit,
onConfirmDelete,
Expand All @@ -49,26 +47,17 @@
</script>

<div class="relative {justify === 'start' ? 'mt-2' : ''} flex h-6 items-center justify-{justify}">
<div
class="hidden items-center text-xs text-muted-foreground transition-opacity md:flex md:group-hover:opacity-0"
>
{new Date(message.timestamp).toLocaleTimeString(undefined, {
hour: '2-digit',
minute: '2-digit'
})}
</div>

<div
class="absolute top-0 {actionsPosition === 'left'
? 'left-0'
: 'right-0'} flex items-center gap-2 opacity-100 transition-opacity md:opacity-0 md:group-hover:opacity-100"
: 'right-0'} flex items-center gap-2 opacity-100 transition-opacity"
>
{#if siblingInfo && siblingInfo.totalSiblings > 1}
<ChatMessageBranchingControls {siblingInfo} {onNavigateToSibling} />
{/if}

<div
class="pointer-events-auto inset-0 flex items-center gap-1 opacity-100 transition-all duration-150 md:pointer-events-none md:opacity-0 md:group-hover:pointer-events-auto md:group-hover:opacity-100"
class="pointer-events-auto inset-0 flex items-center gap-1 opacity-100 transition-all duration-150"
>
<ActionButton icon={Copy} tooltip="Copy" onclick={onCopy} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@

{#if message.timestamp && !isEditing}
<ChatMessageActions
{message}
role="assistant"
justify="start"
actionsPosition="left"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
actionsPosition="right"
{deletionInfo}
justify="end"
{message}
{onConfirmDelete}
{onCopy}
{onDelete}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@
{localConfig}
onConfigChange={handleConfigChange}
onThemeChange={handleThemeChange}
isMobile={false}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import * as Select from '$lib/components/ui/select';
import { Textarea } from '$lib/components/ui/textarea';
import { SETTING_CONFIG_DEFAULT, SETTING_CONFIG_INFO } from '$lib/constants/settings-config';
import { IsMobile } from '$lib/hooks/is-mobile.svelte';
import { supportsVision } from '$lib/stores/server.svelte';
import type { Component } from 'svelte';

Expand All @@ -13,10 +14,11 @@
localConfig: SettingsConfigType;
onConfigChange: (key: string, value: string | boolean) => void;
onThemeChange?: (theme: string) => void;
isMobile?: boolean;
}

let { fields, localConfig, onConfigChange, onThemeChange, isMobile = false }: Props = $props();
let { fields, localConfig, onConfigChange, onThemeChange }: Props = $props();

let isMobile = $state(new IsMobile());
</script>

{#each fields as field (field.key)}
Expand Down Expand Up @@ -109,6 +111,7 @@
{/if}
{:else if field.type === 'checkbox'}
{@const isDisabled = field.key === 'pdfAsImage' && !supportsVision()}

<div class="flex items-start space-x-3">
<Checkbox
id={field.key}
Expand Down