Give a connector node an icon that is not a code icon
A device read over a proprietary protocol was showing the fallback used for a function node. A connector's type cannot be in the built-in icon map — that is the point of it being a connector — so they share a plug. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LF61rxW1FG5YCD2J9YqjY
This commit is contained in:
@@ -303,6 +303,18 @@ function FlowEditorInner({
|
||||
[nodeTypeInfo],
|
||||
)
|
||||
|
||||
// Which types came from an installed connector rather than the engine. They
|
||||
// cannot be in the icon map, so they share one.
|
||||
const pluginTypes = useMemo(
|
||||
() =>
|
||||
new Set(
|
||||
(nodeTypeInfo ?? [])
|
||||
.filter((info) => info.plugin)
|
||||
.map((info) => info.type),
|
||||
),
|
||||
[nodeTypeInfo],
|
||||
)
|
||||
|
||||
const issuesByNode = useMemo(() => {
|
||||
const map = new Map<string, string[]>()
|
||||
for (const issue of issues) {
|
||||
@@ -328,11 +340,20 @@ function FlowEditorInner({
|
||||
flow: flowName,
|
||||
typeLabel:
|
||||
typeLabels.get(definition?.type ?? "") ?? definition?.type ?? "",
|
||||
isPlugin: pluginTypes.has(definition?.type ?? ""),
|
||||
issueText: nodeIssues.join("\n"),
|
||||
} satisfies FlowNodeData,
|
||||
}
|
||||
}),
|
||||
[canvasNodes, definitions, flowName, issuesByNode, selectedId, typeLabels],
|
||||
[
|
||||
canvasNodes,
|
||||
definitions,
|
||||
flowName,
|
||||
issuesByNode,
|
||||
pluginTypes,
|
||||
selectedId,
|
||||
typeLabels,
|
||||
],
|
||||
)
|
||||
|
||||
// A cheap fingerprint of the wiring: it changes when a name does, but not
|
||||
|
||||
Reference in New Issue
Block a user