mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-08-26 04:56:36 +00:00
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>
26 lines
792 B
TypeScript
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;
|