fix: lint workflow (#1167)

This commit is contained in:
josh 2025-09-08 21:02:06 +01:00 committed by GitHub
parent 256b4e0b89
commit 431eb919b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 28 additions and 22 deletions

View file

@ -5,7 +5,7 @@ import { cn } from '@/lib/utils';
import type { UIMessage } from 'ai';
import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
import type { ComponentProps, HTMLAttributes, ReactElement } from 'react';
import { createContext, useContext, useEffect, useState } from 'react';
import { createContext, useContext, useEffect, useState, useMemo } from 'react';
type BranchContextType = {
currentBranch: number;
@ -82,7 +82,10 @@ export type BranchMessagesProps = HTMLAttributes<HTMLDivElement>;
export const BranchMessages = ({ children, ...props }: BranchMessagesProps) => {
const { currentBranch, setBranches, branches } = useBranch();
const childrenArray = Array.isArray(children) ? children : [children];
const childrenArray = useMemo(() =>
Array.isArray(children) ? children : [children],
[children]
);
// Use useEffect to update branches when they change
useEffect(() => {