diff --git a/src/ccstatusline.ts b/src/ccstatusline.ts index a1a6be1..a84dd68 100644 --- a/src/ccstatusline.ts +++ b/src/ccstatusline.ts @@ -6,6 +6,8 @@ import type { BlockMetrics, TokenMetrics } from './types'; +import type { RenderContext } from './types/RenderContext'; +import type { StatusJSON } from './types/StatusJSON'; import { StatusJSONSchema } from './types/StatusJSON'; import { updateColorMap } from './utils/colors'; import { @@ -20,9 +22,7 @@ import { import { calculateMaxWidthsFromPreRendered, preRenderAllWidgets, - renderStatusLine, - type RenderContext, - type StatusJSON + renderStatusLine } from './utils/renderer'; async function readStdin(): Promise { diff --git a/src/tui/components/StatusLinePreview.tsx b/src/tui/components/StatusLinePreview.tsx index 3eb236d..fe71ce9 100644 --- a/src/tui/components/StatusLinePreview.tsx +++ b/src/tui/components/StatusLinePreview.tsx @@ -5,6 +5,7 @@ import { } from 'ink'; import React from 'react'; +import type { RenderContext } from '../../types/RenderContext'; import type { Settings } from '../../types/Settings'; import type { WidgetItem } from '../../types/Widget'; import { @@ -12,7 +13,6 @@ import { preRenderAllWidgets, renderStatusLineWithInfo, type PreRenderedWidget, - type RenderContext, type RenderResult } from '../../utils/renderer'; import { canDetectTerminalWidth } from '../../utils/terminal'; diff --git a/src/utils/renderer.ts b/src/utils/renderer.ts index 7639003..6bdb289 100644 --- a/src/utils/renderer.ts +++ b/src/utils/renderer.ts @@ -19,18 +19,6 @@ import { import { getTerminalWidth } from './terminal'; import { getWidget } from './widgets'; -// Re-export types for backward compatibility -export type { StatusJSON } from '../types/StatusJSON'; -export type { TokenMetrics, TokenUsage, TranscriptLine } from '../types/TokenMetrics'; -export type { RenderContext } from '../types/RenderContext'; - -// Color functions moved to colors.ts -// Re-exported for backward compatibility -export { applyColors } from './colors'; - -// Re-export getTerminalWidth for backward compatibility -export { getTerminalWidth }; - // Helper function to format token counts export function formatTokens(count: number): string { if (count >= 1000000) diff --git a/src/widgets/TerminalWidth.ts b/src/widgets/TerminalWidth.ts index 700776b..0c48c83 100644 --- a/src/widgets/TerminalWidth.ts +++ b/src/widgets/TerminalWidth.ts @@ -5,7 +5,7 @@ import type { WidgetEditorDisplay, WidgetItem } from '../types/Widget'; -import { getTerminalWidth } from '../utils/renderer'; +import { getTerminalWidth } from '../utils/terminal'; export class TerminalWidthWidget implements Widget { getDefaultColor(): string { return 'gray'; }