♻️ (csvOutputComponent): replace FlowPoolObjectType with VertexBuildTypeAPI for type consistency

💡 (IOFieldView): update console.log to provide more detailed flowPool node data
This commit is contained in:
cristhianzl 2024-06-10 11:35:20 -03:00
commit 5ef79e33fa
2 changed files with 6 additions and 4 deletions

View file

@ -7,7 +7,7 @@ import {
CSVViewErrorTitle,
} from "../../constants/constants";
import { useDarkStore } from "../../stores/darkStore";
import { FlowPoolObjectType } from "../../types/chat";
import { VertexBuildTypeAPI } from "../../types/api";
import { NodeType } from "../../types/flow";
import ForwardedIconComponent from "../genericIconComponent";
import TableComponent from "../tableComponent";
@ -19,7 +19,7 @@ function CsvOutputComponent({
flowPool,
}: {
csvNode: NodeType;
flowPool: FlowPoolObjectType;
flowPool: VertexBuildTypeAPI;
}) {
const csvNodeArtifacts = flowPool?.data?.artifacts?.repr;
const jsonString = csvNodeArtifacts?.replace(/'/g, '"');
@ -67,7 +67,7 @@ function CsvOutputComponent({
if (file) {
const { rowData: data, colDefs: columns } = convertCSVToData(
file,
separator,
separator
);
setRowData(data);
setColDefs(columns);

View file

@ -49,7 +49,9 @@ export default function IOFieldView({
(flowPool[node!.id] ?? [])[(flowPool[node!.id]?.length ?? 1) - 1]?.data
.results.result ?? "";
console.log(flowPoolNode?.data?.artifacts?.records);
console.log(
(flowPool[node!.id] ?? [])[(flowPool[node!.id]?.length ?? 1) - 1]?.data
);
function handleOutputType() {
if (!node) return <>"No node found!"</>;