-
Notifications
You must be signed in to change notification settings - Fork 44.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(frontend): Automatically choose client/server-side API client #8916
fix(frontend): Automatically choose client/server-side API client #8916
Conversation
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
✅ Deploy Preview for auto-gpt-docs canceled.
|
@@ -1,5 +1,6 @@ | |||
import { AutoGPTServerAPI } from "./client"; | |||
|
|||
// TODO: rename to BackendAPI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not do this in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope, would cause a huge amount of changes and also conflicts on ongoing PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there no imports of this anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
@Pwuts getting this error after making these changes? |
I spent a lot of time playing this game, and couldn’t get it working which is why I had it the other way. I think making test components for each would probably be productive as you try various methods |
useBackendAPI
hook introduced in feat(blocks): Add webhook block status indicator #8838We have separate client-side and server-side API clients. Choosing the right one should be done in the exporting module, not in all import locations.
Changes 🏗️
AutoGPTServerAPI
toAutoGPTServerAPIClientSide
autogpt-server-api/clientServer
intoautogpt-server-api/client
AutoGPTServerAPI
export inautogpt-server-api/client
Checklist 📋
For code changes:
Example test plan