From 46ef8a1975b62fb0dc3f584ff0d75e7c6ffe9053 Mon Sep 17 00:00:00 2001 From: Ting-Wai To <40179554+tingwai@users.noreply.github.com> Date: Thu, 11 Sep 2025 12:36:45 -0700 Subject: [PATCH] fix lint --- extensions/cli/src/ui/hooks/useChat.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/extensions/cli/src/ui/hooks/useChat.ts b/extensions/cli/src/ui/hooks/useChat.ts index fabadeb0e..1bb2cd10e 100644 --- a/extensions/cli/src/ui/hooks/useChat.ts +++ b/extensions/cli/src/ui/hooks/useChat.ts @@ -1,4 +1,5 @@ /* eslint-disable max-lines */ +/* eslint-disable max-statements */ import type { ChatHistoryItem, Session } from "core/index.js"; import { useApp } from "ink"; import { useEffect, useRef, useState } from "react"; @@ -526,7 +527,7 @@ export function useChat({ } catch (error) { // If compaction fails, remove the queued message from display setQueuedMessages((prev) => - prev.filter((msg) => msg !== queuedMessageForDisplay) + prev.filter((msg) => msg !== queuedMessageForDisplay), ); throw error; // Re-throw to maintain error handling } finally { @@ -541,14 +542,11 @@ export function useChat({ // Remove the queued message from display since it's now in chat history setQueuedMessages((prev) => - prev.filter((msg) => msg !== queuedMessageForDisplay) + prev.filter((msg) => msg !== queuedMessageForDisplay), ); // Execute the streaming response with the updated history - await executeStreamingResponse( - newHistory, - currentCompactionIndex, - ); + await executeStreamingResponse(newHistory, currentCompactionIndex); } else { // Format message with attached files and images logger.debug("Processing message with images", { @@ -596,7 +594,7 @@ export function useChat({ } catch (error) { // If compaction fails, remove the triggering message from queue display setQueuedMessages((prev) => - prev.filter((msg) => msg !== compactionQueuedMessage) + prev.filter((msg) => msg !== compactionQueuedMessage), ); throw error; // Re-throw to maintain error handling } finally { @@ -611,7 +609,7 @@ export function useChat({ // Remove the triggering message from queue display since it's now in chat history setQueuedMessages((prev) => - prev.filter((msg) => msg !== compactionQueuedMessage) + prev.filter((msg) => msg !== compactionQueuedMessage), ); // Execute the streaming response