Show metadata sections in node panel and preserve them during merge
- Render metadata.sections as labeled blocks in NodePanel sidebar - Fix memory_merge to carry forward metadata from merged nodes
This commit is contained in:
@@ -90,6 +90,18 @@ export default function NodePanel({
|
||||
<Field label="Content" field="content" value={node.content} />
|
||||
<Field label="Tags" field="tags" value={node.tags.join(', ')} />
|
||||
|
||||
{node.metadata?.sections?.length > 0 && (
|
||||
<div className="mb-3">
|
||||
<label className="text-[10px] uppercase tracking-wide text-gray-500">Sections</label>
|
||||
{node.metadata.sections.map((s: { label: string; body: string }, i: number) => (
|
||||
<div key={i} className="mt-2 bg-gray-800/50 rounded p-2">
|
||||
<div className="text-xs font-medium text-indigo-400">{s.label}</div>
|
||||
<div className="text-sm text-gray-300 mt-0.5 whitespace-pre-wrap">{s.body}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="mt-4">
|
||||
<label className="text-[10px] uppercase tracking-wide text-gray-500">Connections</label>
|
||||
{node.connections.outgoing.length === 0 && node.connections.incoming.length === 0 && (
|
||||
|
||||
Reference in New Issue
Block a user