From 3c05fa4c4e42c2267fcbb7ae7d356a3b420f5b85 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Thu, 25 Dec 2025 02:55:08 +0200 Subject: [PATCH] fix: refactored linter errors --- CHANGELOG.md | 8 ++++++++ .../ui/src/components/chat/hooks/useTurnGrouping.ts | 2 +- .../ui/src/components/chat/message/MessageBody.tsx | 11 ----------- .../chat/message/parts/WorkingPlaceholder.tsx | 2 +- packages/ui/src/components/views/DiffView.tsx | 2 +- packages/ui/src/hooks/useEventStream.ts | 12 ++++++------ packages/ui/src/hooks/useSessionAutoCleanup.ts | 1 + 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebc1b7f7..4e3f83b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- Updated OpenCode SDK to 1.0.185 across all app versions. +- VS Code extension: fixed startup, more reliable OpenCode CLI/API management, and stabilized API proxying/streaming. +- VS Code extension: added an animated loading screen and introduced command for status/debug output. +- Fixed session activity tracking so it correctly handles transitions through states (including worktree sessions). +- Fixed directory path handling (including `~` expansion) to prevent invalid paths and related Git/worktree errors. +- Chat UI: improved turn grouping/activity rendering and fixed message metadata/agent selection propagation. +- Chat UI: improved agent activity status behavior and reduced image thumbnail sizes for better readability. + ## [1.3.2] - 2025-12-22 diff --git a/packages/ui/src/components/chat/hooks/useTurnGrouping.ts b/packages/ui/src/components/chat/hooks/useTurnGrouping.ts index 2fcbbb78..57f5c730 100644 --- a/packages/ui/src/components/chat/hooks/useTurnGrouping.ts +++ b/packages/ui/src/components/chat/hooks/useTurnGrouping.ts @@ -456,7 +456,7 @@ export const useTurnGrouping = (messages: ChatMessageEntry[]): UseTurnGroupingRe next.set(turnId, { ...state, previewedPartIds: newPreviewed }); return next; }); - }, []); + }, [defaultActivityExpanded]); const getTurnForMessage = React.useCallback( (messageId: string): Turn | undefined => { diff --git a/packages/ui/src/components/chat/message/MessageBody.tsx b/packages/ui/src/components/chat/message/MessageBody.tsx index 347e4fa7..cd3ff85d 100644 --- a/packages/ui/src/components/chat/message/MessageBody.tsx +++ b/packages/ui/src/components/chat/message/MessageBody.tsx @@ -304,15 +304,12 @@ const AssistantMessageBody: React.FC> = ({ syntaxTheme, isMobile, hasTouchInput, - copiedCode, - onCopyCode, expandedTools, onToggleTool, onShowPopup, streamPhase: _streamPhase, allowAnimation: _allowAnimation, onContentChange, - shouldShowHeader = true, hasTextContent = false, onCopyMessage, copiedMessage = false, @@ -1013,17 +1010,12 @@ const AssistantMessageBody: React.FC> = ({ }, [ activityPartsByPart, activityGroupSegmentsForMessage, - copiedCode, - copiedMessage, expandedTools, - hasTextContent, isMessageAnimating, isMobile, isToolFinalized, messageId, onContentChange, - onCopyCode, - onCopyMessage, onShowPopup, onToggleTool, previewableActivityPartIds, @@ -1031,14 +1023,11 @@ const AssistantMessageBody: React.FC> = ({ shouldHoldReasoning, shouldHoldTools, shouldShowActivityGroup, - shouldShowHeader, showReasoningTraces, syntaxTheme, toolConnections, turnGroupingContext, - visibleActivityPartsForTurn, visibleParts, - toolParts, standaloneToolParts, shouldRenderActivityGroup, ]); diff --git a/packages/ui/src/components/chat/message/parts/WorkingPlaceholder.tsx b/packages/ui/src/components/chat/message/parts/WorkingPlaceholder.tsx index 55bb3a18..6fc99e77 100644 --- a/packages/ui/src/components/chat/message/parts/WorkingPlaceholder.tsx +++ b/packages/ui/src/components/chat/message/parts/WorkingPlaceholder.tsx @@ -176,7 +176,7 @@ export function WorkingPlaceholder({ // IMPORTANT: When statusText becomes null, we do NOT clear the display // Only done/abort signals clear the display - }, [statusText, isWaitingForPermission, wasAborted, isComplete, state, displayedText, displayedPermission, showStatus, showResult, scheduleQueueProcess]); + }, [statusText, isWaitingForPermission, wasAborted, isComplete, state, displayedText, displayedPermission, showStatus, showResult, scheduleQueueProcess, isGenericStatus]); // Cleanup on unmount useEffect(() => { diff --git a/packages/ui/src/components/views/DiffView.tsx b/packages/ui/src/components/views/DiffView.tsx index aea87eb8..2cb10433 100644 --- a/packages/ui/src/components/views/DiffView.tsx +++ b/packages/ui/src/components/views/DiffView.tsx @@ -259,7 +259,7 @@ const DiffViewerEntry = React.memo(({ const diffData = React.useMemo(() => { if (!cachedDiff) return null; return { original: cachedDiff.original, modified: cachedDiff.modified }; - }, [cachedDiff?.original, cachedDiff?.modified]); + }, [cachedDiff]); if (!diffData) return null; diff --git a/packages/ui/src/hooks/useEventStream.ts b/packages/ui/src/hooks/useEventStream.ts index eff64bce..3638fcc4 100644 --- a/packages/ui/src/hooks/useEventStream.ts +++ b/packages/ui/src/hooks/useEventStream.ts @@ -1165,11 +1165,8 @@ export const useEventStream = () => { checkConnection, resyncMessages, requestSessionMetadataRefresh, - requestSessionListRefresh, - completeStreamingMessage, handleEvent, effectiveDirectory, - updateSessionActivityPhase, refreshSessionActivityStatus, waitForDesktopBridge, debugConnectionState, @@ -1209,6 +1206,7 @@ export const useEventStream = () => { }, [shouldHoldConnection, stopStream, publishStatus, startStream]); React.useEffect(() => { + const cooldownTimers = sessionCooldownTimersRef.current; if (typeof window !== 'undefined') { window.__messageTracker = trackMessage; @@ -1387,8 +1385,6 @@ export const useEventStream = () => { staleCheckIntervalRef.current = null; } - const cooldownTimers = sessionCooldownTimersRef.current; - cooldownTimers.forEach((timer) => clearTimeout(timer)); cooldownTimers.clear(); messageCache.clear(); @@ -1416,8 +1412,12 @@ export const useEventStream = () => { scheduleReconnect, loadMessages, requestSessionMetadataRefresh, + requestSessionListRefresh, updateSessionActivityPhase, refreshSessionActivityStatus, - shouldHoldConnection + shouldHoldConnection, + loadSessions, + maybeBootstrapIfStale, + resyncMessages ]); }; diff --git a/packages/ui/src/hooks/useSessionAutoCleanup.ts b/packages/ui/src/hooks/useSessionAutoCleanup.ts index 41e131c9..4fdd8722 100644 --- a/packages/ui/src/hooks/useSessionAutoCleanup.ts +++ b/packages/ui/src/hooks/useSessionAutoCleanup.ts @@ -167,6 +167,7 @@ export const useSessionAutoCleanup = (options?: CleanupOptions) => { autoDeleteLastRunAt, autoRun, isLoading, + sessions.length, runCleanup, ]);