fix: style run

This commit is contained in:
2026-03-12 10:09:12 +01:00
parent 48dcf38e01
commit 302107e710

View File

@@ -170,6 +170,7 @@ function AgentNodeComponent({ id, data, width, height, selected }: Props) {
<BaseNode
className="min-w-[360px] min-h-[320px]"
dimensions={dimensions}
resizable
nodeId={id}
selected={selected}
handles={
@@ -182,6 +183,23 @@ function AgentNodeComponent({ id, data, width, height, selected }: Props) {
<BaseNodeHeaderRow
icon={<Bot className="size-4" />}
title={<NodeHeaderTitle nodeId={id} displayTitle={id} />}
right={
<Button
type="button"
size="sm"
variant="outline"
className="shrink-0 h-7 nodrag nopan"
onClick={runAgent}
disabled={running || loading}
>
{running || loading ? (
<Loader2 className="size-3.5 animate-spin" />
) : (
<Play className="size-3.5" />
)}
<span className="ml-1.5">Run</span>
</Button>
}
onHeaderDoubleClick={supportsFullscreen && setFullscreenNodeId ? () => setFullscreenNodeId(id) : undefined}
/>
<BaseNodeContent>
@@ -212,20 +230,6 @@ function AgentNodeComponent({ id, data, width, height, selected }: Props) {
</ul>
)}
</div>
<Button
type="button"
size="sm"
className="w-fit"
onClick={runAgent}
disabled={running || loading}
>
{running || loading ? (
<Loader2 className="size-3.5 mr-1.5 animate-spin" />
) : (
<Play className="size-3.5 mr-1.5" />
)}
Run
</Button>
{error && (
<p className="text-xs text-destructive">{error}</p>
)}