refac
Some checks are pending
Python CI / Ruff Format (3.11) (push) Waiting to run
Python CI / Ruff Format (3.12) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args: free_disk:false name:main suffix:]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/amd64 runner:ubuntu-latest], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args: free_disk:false name:main suffix:]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true USE_CUDA_VER=cu126 free_disk:true name:cuda126 suffix:-cuda126]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_CUDA=true free_disk:true name:cuda suffix:-cuda]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_OLLAMA=true free_disk:false name:ollama suffix:-ollama]) (push) Waiting to run
Create and publish Docker images with specific build args / build (map[arch:linux/arm64 runner:ubuntu-24.04-arm], map[build_args:USE_SLIM=true free_disk:false name:slim suffix:-slim]) (push) Waiting to run
Create and publish Docker images with specific build args / merge (map[name:cuda suffix:-cuda]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:cuda126 suffix:-cuda126]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:main suffix:]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:ollama suffix:-ollama]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / merge (map[name:slim suffix:-slim]) (push) Blocked by required conditions
Create and publish Docker images with specific build args / notify-helm-charts (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (, main) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda, cuda) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-cuda126, cuda126) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-ollama, ollama) (push) Blocked by required conditions
Create and publish Docker images with specific build args / copy-to-dockerhub (-slim, slim) (push) Blocked by required conditions
Frontend Build / Format & Build (push) Waiting to run
Frontend Build / Unit Tests (push) Waiting to run

This commit is contained in:
Timothy Jaeryang Baek 2026-10-31 14:07:26 +09:00
parent 3d0de7ed86
commit a6f999e774
3 changed files with 26 additions and 8 deletions

View file

@ -101,7 +101,7 @@
: 'auto'}
class="relative {embedded
? ''
: `rounded-2xl border border-gray-100/50 dark:border-gray-850/50 hover:border-gray-200 focus-within:border-gray-100/70 hover:dark:border-gray-800 focus-within:dark:border-gray-800/70 transition bg-white/5 dark:bg-gray-500/5 ps-3 pb-2.5 ${contextLabel || quote ? 'pt-1' : 'pt-2.5'}`} {($settings?.highContrastMode ??
: `rounded-2xl border border-gray-100/50 dark:border-gray-850/50 hover:border-gray-200/70 focus-within:border-gray-100/70 hover:dark:border-gray-800/70 focus-within:dark:border-gray-800/70 transition bg-white/5 dark:bg-gray-500/5 ps-3 pb-2.5 ${contextLabel || quote ? 'pt-1' : 'pt-2.5'}`} {($settings?.highContrastMode ??
false)
? 'focus-within:outline focus-within:outline-2 focus-within:-outline-offset-2 focus-within:outline-blue-500'
: ''}"

View file

@ -21,6 +21,7 @@
import ProfileImage from '$lib/components/chat/Messages/ProfileImage.svelte';
import { WEBUI_API_BASE_URL } from '$lib/constants';
import CommentComposer from './CommentComposer.svelte';
import CommentReplyComposer from './CommentReplyComposer.svelte';
import { scrollToComment } from '$lib/utils';
import XMark from '$lib/components/icons/XMark.svelte';
@ -224,7 +225,7 @@
hovered = [];
};
const leave = () => {
if (!$commentSelectionDraft) hide();
if (!$commentSelectionDraft && !preview?.contains(document.activeElement)) hide();
};
const reveal = async (items: LocatedComment[], rect: DOMRect) => {
referenceRect = rect;
@ -249,7 +250,7 @@
);
};
const move = (event: MouseEvent) => {
if ($commentSelectionDraft) return;
if ($commentSelectionDraft || preview?.contains(document.activeElement)) return;
if (popup?.popper.contains(event.target as Node)) return;
if (event.buttons || !window.getSelection()?.isCollapsed) {
hide();
@ -309,7 +310,11 @@
}
return;
}
if (event.key === 'Escape' && hovered.length) {
if (
event.key === 'Escape' &&
hovered.length &&
!document.getElementById('suggestions-container')
) {
event.stopPropagation();
hide();
}
@ -322,7 +327,7 @@
}
};
const scroll = (event: Event) => {
if ($commentSelectionDraft) {
if ($commentSelectionDraft || preview?.contains(document.activeElement)) {
void popup?.popperInstance?.update();
return;
}
@ -444,7 +449,7 @@
</div>
{/if}
{#each hovered as { comment } (comment.id)}
<div class="px-3 py-2">
<div class="w-80 max-w-[calc(100vw-24px)] px-3 py-2">
<div class="mb-2.5 flex min-w-0 items-center gap-2">
<ProfileImage
src={comment.user?.id
@ -481,6 +486,16 @@
class="mt-2 p-0 text-xs text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100"
on:click={() => open(comment)}>{$i18n.t('View comment')}</button
>
<div class="-mx-1 mt-2">
<CommentReplyComposer
{comment}
autofocus={false}
className=""
onCancel={null}
onSubmitted={hide}
onPosted={refresh}
/>
</div>
</div>
{/each}
</div>

View file

@ -4,13 +4,16 @@
import { commentsRequest, resourceQuery, type ResourceComment } from '$lib/apis/comments';
import CommentComposer from './CommentComposer.svelte';
export let comment: ResourceComment;
export let onCancel: () => void;
export let autofocus = true;
export let className = 'px-3 py-2';
export let onCancel: (() => void) | null;
export let onSubmitted: (id: string) => void;
export let onPosted: (comment: ResourceComment) => void;
let postedComment: ResourceComment | null = null;
let composer: CommentComposer;
let container: HTMLDivElement;
onMount(() => {
if (!autofocus) return;
tick().then(() => {
container?.scrollIntoView({ block: 'nearest' });
composer?.focus();
@ -18,7 +21,7 @@
});
</script>
<div class="px-3 py-2" bind:this={container}>
<div class={className} bind:this={container}>
<CommentComposer
bind:this={composer}
resource={comment}