chore: run biome lints

This commit is contained in:
Anish Sarkar 2025-12-25 19:32:18 +05:30
parent ee5d14c86c
commit 46bb52a444
5 changed files with 22 additions and 36 deletions

View file

@ -26,7 +26,9 @@ import { notesApiService } from "@/lib/apis/notes-api.service";
import { authenticatedFetch, getBearerToken, redirectToLogin } from "@/lib/auth-utils"; import { authenticatedFetch, getBearerToken, redirectToLogin } from "@/lib/auth-utils";
// BlockNote types // BlockNote types
type BlockNoteInlineContent = string | { text?: string; type?: string; styles?: Record<string, unknown> }; type BlockNoteInlineContent =
| string
| { text?: string; type?: string; styles?: Record<string, unknown> };
interface BlockNoteBlock { interface BlockNoteBlock {
type: string; type: string;

View file

@ -297,9 +297,7 @@ const MessageAttachmentChip: FC = () => {
}; };
export const UserMessageAttachments: FC = () => { export const UserMessageAttachments: FC = () => {
return ( return <MessagePrimitive.Attachments components={{ Attachment: MessageAttachmentChip }} />;
<MessagePrimitive.Attachments components={{ Attachment: MessageAttachmentChip }} />
);
}; };
export const ComposerAttachments: FC = () => { export const ComposerAttachments: FC = () => {

View file

@ -505,7 +505,13 @@ const Composer: FC = () => {
setMentionedDocuments([]); setMentionedDocuments([]);
setMentionedDocumentIds([]); setMentionedDocumentIds([]);
} }
}, [showDocumentPopover, isThreadRunning, composerRuntime, setMentionedDocuments, setMentionedDocumentIds]); }, [
showDocumentPopover,
isThreadRunning,
composerRuntime,
setMentionedDocuments,
setMentionedDocumentIds,
]);
// Handle document removal from inline editor // Handle document removal from inline editor
const handleDocumentRemove = useCallback( const handleDocumentRemove = useCallback(

View file

@ -69,10 +69,7 @@ function useEntranceAnimation(delay = 0): boolean {
/** /**
* Check if an extension belongs to a specific category * Check if an extension belongs to a specific category
*/ */
function isExtensionInCategory( function isExtensionInCategory(ext: string, category: FileExtensionCategory): boolean {
ext: string,
category: FileExtensionCategory
): boolean {
return (FILE_EXTENSIONS[category] as readonly string[]).includes(ext); return (FILE_EXTENSIONS[category] as readonly string[]).includes(ext);
} }
@ -172,8 +169,7 @@ function parseAndRenderWithBadges(text: string): React.ReactNode {
// Chain of Thought Components // Chain of Thought Components
// ============================================================================ // ============================================================================
export interface ChainOfThoughtItemProps export interface ChainOfThoughtItemProps extends React.HTMLAttributes<HTMLDivElement> {
extends React.HTMLAttributes<HTMLDivElement> {
children: React.ReactNode; children: React.ReactNode;
} }
@ -183,10 +179,7 @@ export const ChainOfThoughtItem: React.FC<ChainOfThoughtItemProps> = ({
...props ...props
}) => ( }) => (
<div <div
className={cn( className={cn("text-muted-foreground text-sm flex flex-wrap items-center gap-1", className)}
"text-muted-foreground text-sm flex flex-wrap items-center gap-1",
className
)}
{...props} {...props}
> >
{typeof children === "string" ? parseAndRenderWithBadges(children) : children} {typeof children === "string" ? parseAndRenderWithBadges(children) : children}
@ -290,10 +283,7 @@ export interface ChainOfThoughtProps {
className?: string; className?: string;
} }
export const ChainOfThought: React.FC<ChainOfThoughtProps> = ({ export const ChainOfThought: React.FC<ChainOfThoughtProps> = ({ children, className }) => {
children,
className,
}) => {
const childrenArray = React.Children.toArray(children); const childrenArray = React.Children.toArray(children);
return ( return (

View file

@ -135,10 +135,7 @@ export function parseThinkingResult(data: unknown): DeepAgentThinkingResult {
/** /**
* Check if title contains any of the keywords * Check if title contains any of the keywords
*/ */
function titleContainsKeywords( function titleContainsKeywords(title: string, keywords: readonly string[]): boolean {
title: string,
keywords: readonly string[]
): boolean {
const titleLower = title.toLowerCase(); const titleLower = title.toLowerCase();
return keywords.some((keyword) => titleLower.includes(keyword)); return keywords.some((keyword) => titleLower.includes(keyword));
} }
@ -180,15 +177,8 @@ interface ThinkingStepDisplayProps {
/** /**
* Component to display a single thinking step with controlled open state * Component to display a single thinking step with controlled open state
*/ */
const ThinkingStepDisplay: FC<ThinkingStepDisplayProps> = ({ const ThinkingStepDisplay: FC<ThinkingStepDisplayProps> = ({ step, isOpen, onToggle }) => {
step, const icon = useMemo(() => getStepIcon(step.status, step.title), [step.status, step.title]);
isOpen,
onToggle,
}) => {
const icon = useMemo(
() => getStepIcon(step.status, step.title),
[step.status, step.title]
);
const isInProgress = step.status === STEP_STATUS.IN_PROGRESS; const isInProgress = step.status === STEP_STATUS.IN_PROGRESS;
const isCompleted = step.status === STEP_STATUS.COMPLETED; const isCompleted = step.status === STEP_STATUS.COMPLETED;