ragflow/web/src/pages/agent/form/components/output.tsx
balibabu cc0227cf6e
Fix: Fixed the issue that the condition of deleting the classification operator cannot be connected anymore #3221 (#9068)
### What problem does this PR solve?
Fix: Fixed the issue that the condition of deleting the classification
operator cannot be connected anymore #3221
### Type of change



- [x] Bug Fix (non-breaking change which fixes an issue)
2025-07-28 14:16:20 +08:00

33 lines
730 B
TypeScript

export type OutputType = {
title: string;
type?: string;
};
type OutputProps = {
list: Array<OutputType>;
};
export function transferOutputs(outputs: Record<string, any>) {
return Object.entries(outputs).map(([key, value]) => ({
title: key,
type: value?.type,
}));
}
export function Output({ list }: OutputProps) {
return (
<section className="space-y-2">
<div>Output</div>
<ul>
{list.map((x, idx) => (
<li
key={idx}
className="bg-background-highlight text-background-checked rounded-sm px-2 py-1"
>
{x.title}: <span className="text-text-sub-title">{x.type}</span>
</li>
))}
</ul>
</section>
);
}