mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-21 21:05:09 +00:00
* feat: created auth client * feat: created login page for testing auth * feat: setup logout page * feat: setup graphql codegen * feat: setup graphql + react query utils * feat: setup queryprovider with localforage * feat: created auth provider * feat: update claude.md * feat: documents for bulk conversation upload * chore: install missing package * fix: setup codegen to scan for .ts files * chore: setup check conversation query * feat: upload conversation by profileId * chore: upload messages in batches * feat: account for edge cases in conversation upload * feat: delete uploaded conversations from localstorage * feat: load conversation history from api * feat: implement delete conversation using graphql * feat: delete confirmation for conversation history * fix: issue with clearing conversations after upload * feat: implement pagination for graphql chat history * chore: update CLAUDE.md * chore: update claude.md * feat: save conversations to server * fix: handle streaming check on remote conversation save * feat: restore conversation from graphql * fix: timestamp issue on the chat history page * feat: sync llm providers from background script * feat: update llm providers on change via background script * chore: added a try catch block * feat: display incomplete providers in separate UI * feat: delete provider on server when initiated by user * feat: setup scheduled tasks storage to sync to graphql * feat: auto run sync in background script * fix: sync all keys of scheduled tasks based on updatedAt timestamp * feat: added login dropdown on the sidebar * feat: simplify sidenav header * feat: update header design after login * feat: setup profile page * feat: added back button to profile page * fix: scrollbar flash in profile page * feat: finish login handshake * feat: clear storage on logout * fix: logout page style * feat: added tooltip to encourage user to sign in * feat: added back button to login page * fix: upload logic for profile picture * feat: account for profile name in sidebar branding * chore: set file upload url from backend request * chore: remove default placeholder from profile component * chore: sync with main * Revert "chore: sync with main" This reverts commit 77e06b894ce30235d1bfa31c8e2699b34df423a5. * Reapply "chore: sync with main" This reverts commit dd921d97cc9794d1872e13689c881f68e4dfee47. * chore: updated lock file * fix: run codegen before build:ext * fix: run codegen before build:gent * fix: remove hardcoded localhost header in magic link --------- Co-authored-by: Nikhil Sonti <nikhilsv92@gmail.com>
24 lines
685 B
TypeScript
24 lines
685 B
TypeScript
import {
|
|
type UseMutationOptions,
|
|
type UseMutationResult,
|
|
useMutation,
|
|
} from '@tanstack/react-query'
|
|
import type { TypedDocumentString } from '@/generated/graphql/graphql'
|
|
import { execute } from './execute'
|
|
|
|
/**
|
|
* @public
|
|
*/
|
|
export function useGraphqlMutation<TResult = unknown, TVariables = object>(
|
|
document: TypedDocumentString<TResult, TVariables>,
|
|
options?: Omit<
|
|
UseMutationOptions<TResult, unknown, TVariables>,
|
|
'mutationFn' | 'mutationKey'
|
|
>,
|
|
): UseMutationResult<TResult, unknown, TVariables> {
|
|
return useMutation<TResult, unknown, TVariables>({
|
|
mutationFn: (variables: TVariables) => execute(document, variables),
|
|
...(options ?? {}),
|
|
})
|
|
}
|