feat: add speculative decoding
This commit is contained in:
@@ -42,6 +42,9 @@ export const FormContext = React.createContext<FormContextProps>(
|
||||
{} as FormContextProps
|
||||
);
|
||||
|
||||
/**
|
||||
* Catalog form context
|
||||
*/
|
||||
export const CatalogFormContext = React.createContext<CatalogFormContextProps>(
|
||||
{} as CatalogFormContextProps
|
||||
);
|
||||
@@ -50,6 +53,10 @@ export const FormOuterContext = React.createContext<FormOuterContextProps>(
|
||||
{} as FormOuterContextProps
|
||||
);
|
||||
|
||||
/**
|
||||
* Hooks to use the form context
|
||||
*/
|
||||
|
||||
export const useFormContext = () => {
|
||||
const context = React.useContext(FormContext);
|
||||
if (!context) {
|
||||
@@ -68,6 +75,11 @@ export const useCatalogFormContext = () => {
|
||||
return context;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* Hooks to use the outer form context
|
||||
*/
|
||||
|
||||
export const useFormOuterContext = () => {
|
||||
const context = React.useContext(FormOuterContext);
|
||||
if (!context) {
|
||||
|
||||
Reference in New Issue
Block a user