fix(ui): resolve build errors and unused variable warnings

- Fixed 'refreshStatic' use-before-declaration in AppContainer.tsx.
- Removed unused 'version' and 'showHeaderDetails' variables in MainContent.tsx.
- Cleaned up unused 'useAppContext' import in MainContent.tsx.
- This commit ensures the branch builds successfully after the sticky topic header implementation.
This commit is contained in:
Abhijit Balaji
2026-04-02 10:50:37 -04:00
parent 0d50b16f69
commit ba207ad00b
2 changed files with 12 additions and 16 deletions
@@ -8,7 +8,6 @@ import { Box, Static } from 'ink';
import { HistoryItemDisplay } from './HistoryItemDisplay.js';
import { useUIState } from '../contexts/UIStateContext.js';
import { useSettings } from '../contexts/SettingsContext.js';
import { useAppContext } from '../contexts/AppContext.js';
import { useAlternateBuffer } from '../hooks/useAlternateBuffer.js';
import {
@@ -29,7 +28,6 @@ const MemoizedHistoryItemDisplay = memo(HistoryItemDisplay);
// This threshold is arbitrary but should be high enough to never impact normal
// usage.
export const MainContent = () => {
const { version } = useAppContext();
const uiState = useUIState();
const isAlternateBuffer = useAlternateBuffer();
@@ -50,9 +48,7 @@ export const MainContent = () => {
mainAreaWidth,
staticAreaMaxItemHeight,
availableTerminalHeight,
cleanUiDetailsVisible,
} = uiState;
const showHeaderDetails = cleanUiDetailsVisible;
const lastUserPromptIndex = useMemo(() => {
for (let i = uiState.history.length - 1; i >= 0; i--) {