enh: node show content as tooltip
This commit is contained in:
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
export let updateChatMessages: Function;
|
export let updateChatMessages: Function;
|
||||||
export let confirmEditResponseMessage: Function;
|
export let confirmEditResponseMessage: Function;
|
||||||
export let saveNewResponseMessage: Function;
|
export let saveNewResponseMessage: Function = () => {};
|
||||||
|
|
||||||
export let showPreviousMessage: Function;
|
export let showPreviousMessage: Function;
|
||||||
export let showNextMessage: Function;
|
export let showNextMessage: Function;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
import { Handle, Position, type NodeProps } from '@xyflow/svelte';
|
import { Handle, Position, type NodeProps } from '@xyflow/svelte';
|
||||||
|
|
||||||
import ProfileImageBase from '../Messages/ProfileImageBase.svelte';
|
import ProfileImageBase from '../Messages/ProfileImageBase.svelte';
|
||||||
|
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||||
|
|
||||||
type $$Props = NodeProps;
|
type $$Props = NodeProps;
|
||||||
export let data: $$Props['data'];
|
export let data: $$Props['data'];
|
||||||
@@ -11,6 +12,7 @@
|
|||||||
<div
|
<div
|
||||||
class="px-4 py-3 shadow-md rounded-xl dark:bg-black bg-white border dark:border-gray-900 w-60 h-20"
|
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'}
|
{#if data.message.role === 'user'}
|
||||||
<div class="flex w-full">
|
<div class="flex w-full">
|
||||||
<ProfileImageBase
|
<ProfileImageBase
|
||||||
@@ -35,6 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
</Tooltip>
|
||||||
<Handle type="target" position={Position.Top} class="w-2 rounded-full dark:bg-gray-900" />
|
<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" />
|
<Handle type="source" position={Position.Bottom} class="w-2 rounded-full dark:bg-gray-900" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user