mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-30 03:00:41 -04:00
- Depends on https://github.com/Significant-Gravitas/AutoGPT/pull/11120 In this PR, I’ve added a search functionality to the new block menu with pagination. https://github.com/user-attachments/assets/4c199997-4b5a-43c7-83b6-66abb1feb915 ### Changes 🏗️ - Add a frontend for the search list with pagination functionality. - Updated the search route to use GET method. - Removed the SearchRequest model and replaced it with individual query parameters. ### Checklist 📋 #### For code changes: - [x] The search functionality is working perfectly. - [x] If the search query doesn’t exist, it correctly displays a “No Result” UI.
104 lines
2.7 KiB
TypeScript
104 lines
2.7 KiB
TypeScript
import { defineConfig } from "orval";
|
|
|
|
export default defineConfig({
|
|
autogpt_api_client: {
|
|
input: {
|
|
target: `./src/app/api/openapi.json`,
|
|
override: {
|
|
transformer: "./src/app/api/transformers/fix-tags.mjs",
|
|
},
|
|
},
|
|
output: {
|
|
workspace: "./src/app/api",
|
|
target: `./__generated__/endpoints`,
|
|
schemas: "./__generated__/models",
|
|
mode: "tags-split",
|
|
client: "react-query",
|
|
httpClient: "fetch",
|
|
indexFiles: false,
|
|
override: {
|
|
mutator: {
|
|
path: "./mutators/custom-mutator.ts",
|
|
name: "customMutator",
|
|
},
|
|
query: {
|
|
useQuery: true,
|
|
useMutation: true,
|
|
usePrefetch: true,
|
|
// Will add more as their use cases arise
|
|
},
|
|
useDates: true,
|
|
operations: {
|
|
"getV2List library agents": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV2List favorite library agents": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV1List graph executions": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV2Get builder blocks": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
useQuery: true,
|
|
},
|
|
},
|
|
"getV2Get builder integration providers": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV2List store agents": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
useQuery: true,
|
|
},
|
|
},
|
|
"getV2Builder search": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
hooks: {
|
|
afterAllFilesWrite:
|
|
"prettier --ignore-path= --write ./src/app/api/__generated__",
|
|
},
|
|
},
|
|
// autogpt_zod_schema: {
|
|
// input: {
|
|
// target: `./src/app/api/openapi.json`,
|
|
// override: {
|
|
// transformer: "./src/app/api/transformers/fix-tags.mjs",
|
|
// },
|
|
// },
|
|
// output: {
|
|
// workspace: "./src/app/api",
|
|
// target: `./__generated__/zod-schema`,
|
|
// schemas: "./__generated__/models",
|
|
// mode: "tags-split",
|
|
// client: "zod",
|
|
// indexFiles: false,
|
|
// },
|
|
// hooks: {
|
|
// afterAllFilesWrite: "prettier --write",
|
|
// },
|
|
// },
|
|
});
|