mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-10 23:05:17 -05:00
Current Apollo blocks only work with keywords; the huge number of list filter fields doesn't work because it's passing the wrong GET parameter (missing `[]`). ### Changes 🏗️ Change the GET request to a POST request for Apollo. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [x] Run SearchPeopleBlock with title filter
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
import React from "react";
|
|
import { ContentRenderer } from "./ui/render";
|
|
import { beautifyString } from "@/lib/utils";
|
|
import * as Separator from "@radix-ui/react-separator";
|
|
|
|
type NodeOutputsProps = {
|
|
title?: string;
|
|
truncateLongData?: boolean;
|
|
data: { [key: string]: Array<any> };
|
|
};
|
|
|
|
export default function NodeOutputs({
|
|
title,
|
|
truncateLongData,
|
|
data,
|
|
}: NodeOutputsProps) {
|
|
return (
|
|
<div className="m-4 space-y-4">
|
|
{title && <strong className="mt-2flex">{title}</strong>}
|
|
{Object.entries(data).map(([pin, dataArray]) => (
|
|
<div key={pin} className="">
|
|
<div className="flex items-center">
|
|
<strong className="mr-2">Pin:</strong>
|
|
<span>{beautifyString(pin)}</span>
|
|
</div>
|
|
<div className="mt-2">
|
|
<strong className="mr-2">Data:</strong>
|
|
<div className="mt-1">
|
|
{dataArray.slice(0, 10).map((item, index) => (
|
|
<React.Fragment key={index}>
|
|
<ContentRenderer
|
|
value={item}
|
|
truncateLongData={truncateLongData}
|
|
/>
|
|
{index < Math.min(dataArray.length, 10) - 1 && ", "}
|
|
</React.Fragment>
|
|
))}
|
|
{dataArray.length > 10 && (
|
|
<span style={{ color: "#888" }}>
|
|
<br />
|
|
<b>⋮</b>
|
|
<br />
|
|
<span>and {dataArray.length - 10} more</span>
|
|
</span>
|
|
)}
|
|
</div>
|
|
<Separator.Root className="my-4 h-[1px] bg-gray-300" />
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
}
|