Files
pentagi/frontend/graphql-codegen.ts
Sergey KozyrenkoandClaude Opus 4.8 cae0295e8b feat(providers): expose per-agent extra_body in the provider config
The backend already threaded a per-agent `extra_body` map into the LLM request
(pconfig.AgentConfig, openai.WithExtraBody), but it was reachable only from YAML
provisioning — the GraphQL type, the converter, and the settings form all
dropped it. Editing a YAML-provisioned provider through the UI therefore round-
tripped its config and silently stripped extra_body.

Add `extraBody: Map` to AgentConfig / AgentConfigInput, carry it through the
converter in both directions, and give each agent an "Extra Body" JSON field in
the provider form (validated as an object, serialized on load, parsed on save).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 03:57:23 +07:00

26 lines
792 B
TypeScript

import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
documents: './graphql-schema.graphql',
generates: {
'./src/graphql/types.ts': {
config: {
dedupeFragments: true,
enumType: 'native',
exportFragmentSpreadSubTypes: true,
inlineFragmentTypes: 'combine',
scalars: { Map: 'Record<string, unknown>', Time: 'string' },
skipTypename: true,
useTypeImports: true,
},
plugins: ['typescript-operations', 'typed-document-node'],
},
},
hooks: {
afterOneFileWrite: ['npx prettier --write'],
},
schema: '../backend/pkg/graph/schema.graphqls',
};
export default config;