mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-18 06:55:57 +08:00
enh: node show content as tooltip
This commit is contained in:
parent
1ccac9111b
commit
8d92093570
@ -85,7 +85,7 @@
|
||||
|
||||
export let updateChatMessages: Function;
|
||||
export let confirmEditResponseMessage: Function;
|
||||
export let saveNewResponseMessage: Function;
|
||||
export let saveNewResponseMessage: Function = () => {};
|
||||
|
||||
export let showPreviousMessage: Function;
|
||||
export let showNextMessage: Function;
|
||||
|
@ -3,6 +3,7 @@
|
||||
import { Handle, Position, type NodeProps } from '@xyflow/svelte';
|
||||
|
||||
import ProfileImageBase from '../Messages/ProfileImageBase.svelte';
|
||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||
|
||||
type $$Props = NodeProps;
|
||||
export let data: $$Props['data'];
|
||||
@ -11,6 +12,7 @@
|
||||
<div
|
||||
class="px-4 py-3 shadow-md rounded-xl dark:bg-black bg-white border dark:border-gray-900 w-60 h-20"
|
||||
>
|
||||
<Tooltip content={data.message.content} class="w-full">
|
||||
{#if data.message.role === 'user'}
|
||||
<div class="flex w-full">
|
||||
<ProfileImageBase
|
||||
@ -35,6 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</Tooltip>
|
||||
<Handle type="target" position={Position.Top} class="w-2 rounded-full dark:bg-gray-900" />
|
||||
<Handle type="source" position={Position.Bottom} class="w-2 rounded-full dark:bg-gray-900" />
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user