Open Pwuts opened 1 day ago
I wonder if we can do reflection to handle some of this via enumerators like we do enumerating the blocks in the directory
\~ @ntindle
I wonder if we can do reflection to handle some of this via enumerators like we do enumerating the blocks in the directory
\~ @ntindle
The number of files you need to add/edit for new blocks with auth, and webhook-triggered blocks, is quite large. For DX we should try to reduce/simplify this.
File you have to add/edit for a new block:
backend/blocks/my_block.py
Files where references have to be added for a new provider (in the credentials system):
backend/integrations/providers.py
-ProviderName
enumfrontend/src/components/integrations/credentials-input.tsx
-providerIcons
frontend/src/components/integrations/credentials-provider.tsx
-providerDisplayNames
frontend/src/lib/autogpt-server-api/types.ts
-PROVDER_NAMES
Extra files for a new OAuth provider:
backend/integrations/oauth/{provider}.py
backend/integrations/oauth/__init__.py
backend/util/settings.py
+.env.example
- OAuth server credentialsExtra files for a new
WebhooksManager
:backend/integrations/webhooks/{provider}.py
backend/integrations/webhooks/__init__.py
I'm sure we can put the front end stuff together in one file. Not so sure about the back end. As long as it's clearly documented, I don't see an issue with having to add (references in) multiple files, but if we can reasonably avoid it that's still good.
_Originally posted by @Pwuts in https://github.com/Significant-Gravitas/AutoGPT/pull/8358#discussion_r1843982423_