updateNodeData(id, { modelId })} />
Message
{ updateNodeData(id, { query: evt.currentTarget.value }); }} {@attach autosized.attachment} >
{#if isLoading}
Sending... {:else} Send Message {/if}
{#if data.response || isLoading}
Response
{#if data.response}
{data.response}
{:else if isLoading}
Generating response...
{/if}
{/if}
{ const curr = getNode(id); const newNode: Node = { id: crypto.randomUUID(), position: { x: curr?.position.x ?? 100, y: (curr?.position.y ?? 0) + 400 }, data: { query: "", response: "", modelId: data.modelId }, type: "chat", width: undefined, height: undefined, }; nodes.current.push(newNode); const edge: Edge = { id: crypto.randomUUID(), source: curr!.id, target: newNode.id, animated: true, label: "", data: {}, }; edges.current.push(edge); }} >
Add Node
(nodes.current = nodes.current.filter(n => n.id !== id))} >