feat: add directed arrowheads to mindmap links

This commit is contained in:
2026-03-01 22:32:06 +01:00
parent 6a0dbb6511
commit ff8756425f
2 changed files with 21 additions and 0 deletions

View File

@@ -262,6 +262,22 @@ export const A2UIMindmap: React.FC<A2UIComponentProps> = ({ component }) => {
viewBox={`0 0 ${layout.svgWidth} ${layout.svgHeight}`}
preserveAspectRatio="xMidYMid meet"
>
<defs>
<marker
id={`${component.id}-arrow`}
viewBox="0 0 10 6"
refX="9"
refY="3"
markerWidth="8"
markerHeight="6"
orient="auto"
>
<path
d="M0,0 L10,3 L0,6"
className="assistant-panel-mindmap-arrow"
/>
</marker>
</defs>
{/* Links */}
{layout.links.map((link, i) => (
<path
@@ -269,6 +285,7 @@ export const A2UIMindmap: React.FC<A2UIComponentProps> = ({ component }) => {
className="assistant-panel-mindmap-link"
d={edgePath(link.points)}
fill="none"
markerEnd={`url(#${component.id}-arrow)`}
/>
))}
{/* Nodes */}

View File

@@ -454,6 +454,10 @@
stroke-width: 1.5;
}
.assistant-panel-mindmap-arrow {
fill: var(--vscode-panel-border);
}
.assistant-panel-mindmap-label {
font-size: 13px;
fill: var(--vscode-foreground);