show outputs in workflow main page (#1982)
This commit is contained in:
@@ -12,20 +12,7 @@ import { useWorkflowRunTimelineQuery } from "../hooks/useWorkflowRunTimelineQuer
|
||||
import { Status } from "@/api/types";
|
||||
import { AutoResizingTextarea } from "@/components/AutoResizingTextarea/AutoResizingTextarea";
|
||||
import { isTaskVariantBlock } from "../types/workflowTypes";
|
||||
|
||||
function getAggregatedExtractedInformation(outputs: Record<string, unknown>) {
|
||||
const extractedInformation: Record<string, unknown> = {};
|
||||
Object.entries(outputs).forEach(([id, output]) => {
|
||||
if (
|
||||
typeof output === "object" &&
|
||||
output !== null &&
|
||||
"extracted_information" in output
|
||||
) {
|
||||
extractedInformation[id] = output.extracted_information;
|
||||
}
|
||||
});
|
||||
return extractedInformation;
|
||||
}
|
||||
import { getAggregatedExtractedInformation } from "./workflowRunUtils";
|
||||
|
||||
function formatExtractedInformation(outputs: Record<string, unknown>) {
|
||||
const aggregateExtractedInformation =
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
export function getAggregatedExtractedInformation(
|
||||
outputs: Record<string, unknown>,
|
||||
) {
|
||||
const extractedInformation: Record<string, unknown> = {};
|
||||
Object.entries(outputs).forEach(([id, output]) => {
|
||||
if (
|
||||
typeof output === "object" &&
|
||||
output !== null &&
|
||||
"extracted_information" in output
|
||||
) {
|
||||
extractedInformation[id] = output.extracted_information;
|
||||
}
|
||||
});
|
||||
return extractedInformation;
|
||||
}
|
||||
Reference in New Issue
Block a user