Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

useContext

Julius Marminge5748a995f730
diff --git a/apps/web/src/components/ui/combobox.tsx b/apps/web/src/components/ui/combobox.tsx
index ee4997529..262a2b6f3 100644
--- a/apps/web/src/components/ui/combobox.tsx
+++ b/apps/web/src/components/ui/combobox.tsx
@@ -21,7 +21,9 @@ function Combobox<Value, Multiple extends boolean | undefined = false>(
) {
const chipsRef = React.useRef<Element | null>(null);
return (
- <ComboboxContext.Provider value={{ chipsRef, multiple: !!props.multiple }}>
+ <ComboboxContext.Provider
+ value={React.useMemo(() => ({ chipsRef, multiple: !!props.multiple }), [props.multiple])}
+ >
<ComboboxPrimitive.Root {...props} />
</ComboboxContext.Provider>
);
diff --git a/apps/web/src/components/ui/toggle-group.tsx b/apps/web/src/components/ui/toggle-group.tsx
index 4124dc6ed..5f858baad 100644
--- a/apps/web/src/components/ui/toggle-group.tsx
+++ b/apps/web/src/components/ui/toggle-group.tsx
@@ -42,7 +42,9 @@ function ToggleGroup({
orientation={orientation}
{...props}
>
- <ToggleGroupContext.Provider value={{ size, variant }}>
+ <ToggleGroupContext.Provider
+ value={React.useMemo(() => ({ size, variant }), [size, variant])}
+ >
{children}
</ToggleGroupContext.Provider>
</ToggleGroupPrimitive>
diff --git a/turbo.json b/turbo.json
index 4ad892445..afa37c03a 100644
--- a/turbo.json
+++ b/turbo.json
@@ -25,7 +25,8 @@
},
"typecheck": {
"dependsOn": ["^typecheck"],
- "outputs": []
+ "outputs": [],
+ "cache": false
},
"test": {
"dependsOn": ["^build"],