-
Notifications
You must be signed in to change notification settings - Fork 84
feat(react): add defaultHeaders prop to TamboClientProvider #1191
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
base: main
Are you sure you want to change the base?
Conversation
|
@mikestaub is attempting to deploy a commit to the tambo ai Team on Vercel. A member of the Team first needs to authorize it. |
alecf
left a comment
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.
Thanks for the contribution, this is great!
I think we need to change the name slightly. Curious @MichaelMilstead or @michaelmagan if you have any preferences here.
| * Hook to access the default headers for Tambo API requests | ||
| * @returns The default headers object | ||
| */ | ||
| export const useTamboDefaultHeaders = () => { |
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.
I'd like to avoid adding an extra hook here since we can get it from useTamboClient()?.defaultHeaders - is there a particular reason to add a separate hook?
| queryClient: QueryClient; | ||
| /** Whether the session token is currently being updated */ | ||
| isUpdatingToken: boolean; | ||
| /** Additional headers to include in all requests */ |
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.
I think the name defaultHeaders implies that it is all the existing header or something, rather than extra headers that we are adding to the existing (default) headers.
How about additionalHeaders or extraHeaders
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.
@alecf I addressed both comments
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Can this be merged now? |
Co-authored-by: CharlieHelps <charlie@charlielabs.ai>
Resolves: #534