Added colors to types
This commit is contained in:
parent
907c3ca9f7
commit
d19fdf5373
2 changed files with 11 additions and 3 deletions
|
|
@ -464,10 +464,10 @@ export default function GenericNode({
|
||||||
data={data}
|
data={data}
|
||||||
color={
|
color={
|
||||||
nodeColors[
|
nodeColors[
|
||||||
types[data.node?.template[templateField].type!]
|
data.node?.template[templateField].type!
|
||||||
] ??
|
] ??
|
||||||
nodeColors[
|
nodeColors[
|
||||||
data.node?.template[templateField].type!
|
types[data.node?.template[templateField].type!]
|
||||||
] ??
|
] ??
|
||||||
nodeColors.unknown
|
nodeColors.unknown
|
||||||
}
|
}
|
||||||
|
|
@ -519,7 +519,13 @@ export default function GenericNode({
|
||||||
dataType: data.type,
|
dataType: data.type,
|
||||||
})}
|
})}
|
||||||
data={data}
|
data={data}
|
||||||
color={nodeColors[types[data.type]] ?? nodeColors.unknown}
|
color={
|
||||||
|
(data.node?.output_types &&
|
||||||
|
data.node.output_types.length > 0
|
||||||
|
? nodeColors[data.node.output_types[0]] ??
|
||||||
|
nodeColors[types[data.node.output_types[0]]]
|
||||||
|
: nodeColors[types[data.type]]) ?? nodeColors.unknown
|
||||||
|
}
|
||||||
title={
|
title={
|
||||||
data.node?.output_types && data.node.output_types.length > 0
|
data.node?.output_types && data.node.output_types.length > 0
|
||||||
? data.node.output_types.join("|")
|
? data.node.output_types.join("|")
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,8 @@ export const nodeColors: { [char: string]: string } = {
|
||||||
prompts: "#4367BF",
|
prompts: "#4367BF",
|
||||||
llms: "#6344BE",
|
llms: "#6344BE",
|
||||||
chains: "#FE7500",
|
chains: "#FE7500",
|
||||||
|
Document: "#7AAE42",
|
||||||
|
list: "#9AAE42",
|
||||||
agents: "#903BBE",
|
agents: "#903BBE",
|
||||||
tools: "#FF3434",
|
tools: "#FF3434",
|
||||||
memories: "#F5B85A",
|
memories: "#F5B85A",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue