Files
AutoGPT/autogpt_platform/frontend/orval.config.ts
Reinier van der Leer aa256f21cd feat(platform/library): Infinite scroll in Agent Runs list (#10709)
- Resolves #10645

### Changes 🏗️

- Implement infinite scroll in the Agent Runs list (on
`/library/agents/[id]`)
- Add horizontal scroll support to `ScrollArea` and `InfiniteScroll`
components
- Fix `InfiniteScroll` triggering twice
- Fix date handling by React Queries
  - Add response mutator to parse dates coming out of API
  - Make legacy `GraphExecutionMeta` compatible with generated type

### 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:
  - Open `/library/agents/[id]`
    - [x] Agent runs list loads
  - Scroll agent runs list to the end
    - [x] More runs are loaded and appear in the list
2025-08-22 15:35:09 +00:00

71 lines
1.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",
},
},
"getV1List graph executions": {
query: {
useInfinite: true,
useInfiniteQueryParam: "page",
},
},
},
},
},
hooks: {
afterAllFilesWrite: "prettier --write",
},
},
// 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",
// },
// },
});