Skip to content

Commit

Permalink
chore(weave): Fixes ArtifactRefLinks for Values #1133
Browse files Browse the repository at this point in the history
  • Loading branch information
tssweeney authored Jan 24, 2024
1 parent 0a2c8bc commit 0cd6654
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,10 @@ const WeaveEditorField: FC<{
return <WeaveEditorObject node={node} path={path} />;
}
if (isAssignableTo(node.type, maybe({type: 'OpDef'}))) {
return <WeaveViewOpDef node={node} />;
return <WeaveViewSmallRef node={node} />;
}
if (isAssignableTo(node.type, maybe({type: 'WandbArtifactRef'}))) {
return <WeaveViewSmallRef node={node} />;
}
return <div>[No editor for type {weave.typeToString(node.type)}]</div>;
};
Expand Down Expand Up @@ -776,7 +779,7 @@ export const WeaveEditorTable: FC<{
);
};

export const WeaveViewOpDef: FC<{
export const WeaveViewSmallRef: FC<{
node: Node;
}> = ({node}) => {
const opDefQuery = useNodeValue(node);
Expand All @@ -789,6 +792,6 @@ export const WeaveViewOpDef: FC<{
} else if (opDefRef != null) {
return <SmallRef objRef={opDefRef} />;
} else {
return <div>invalid op def: {opDefQuery.result}</div>;
return <div>invalid ref: {opDefQuery.result}</div>;
}
};

0 comments on commit 0cd6654

Please sign in to comment.