diff --git a/src/components/AgentProgressLine.tsx b/src/components/AgentProgressLine.tsx index abdff603..7e0d26e6 100644 --- a/src/components/AgentProgressLine.tsx +++ b/src/components/AgentProgressLine.tsx @@ -1,5 +1,4 @@ import { c as _c } from "react-compiler-runtime"; -import * as React from 'react'; import { Box, Text } from '../ink.js'; import { formatNumber } from '../utils/format.js'; import type { Theme } from '../utils/theme.js'; @@ -20,7 +19,7 @@ type Props = { lastToolInfo?: string | null; hideType?: boolean; }; -export function AgentProgressLine(t0) { +export function AgentProgressLine(t0: Props) { const $ = _c(32); const { agentType, diff --git a/src/components/App.tsx b/src/components/App.tsx index 0113fb3c..b4ab803e 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1,5 +1,5 @@ import { c as _c } from "react-compiler-runtime"; -import React from 'react'; +import type { ReactNode } from 'react'; import { FpsMetricsProvider } from '../context/fpsMetrics.js'; import { StatsProvider, type StatsStore } from '../context/stats.js'; import { type AppState, AppStateProvider } from '../state/AppState.js'; @@ -9,14 +9,14 @@ type Props = { getFpsMetrics: () => FpsMetrics | undefined; stats?: StatsStore; initialState: AppState; - children: React.ReactNode; + children: ReactNode; }; /** * Top-level wrapper for interactive sessions. * Provides FPS metrics, stats context, and app state to the component tree. */ -export function App(t0) { +export function App(t0: Props) { const $ = _c(9); const { getFpsMetrics, diff --git a/src/components/ApproveApiKey.tsx b/src/components/ApproveApiKey.tsx index 41cfc9ca..fa92d1cf 100644 --- a/src/components/ApproveApiKey.tsx +++ b/src/components/ApproveApiKey.tsx @@ -1,5 +1,4 @@ import { c as _c } from "react-compiler-runtime"; -import React from 'react'; import { Text } from '../ink.js'; import { saveGlobalConfig } from '../utils/config.js'; import { Select } from './CustomSelect/index.js'; @@ -8,7 +7,7 @@ type Props = { customApiKeyTruncated: string; onDone(approved: boolean): void; }; -export function ApproveApiKey(t0) { +export function ApproveApiKey(t0: Props) { const $ = _c(17); const { customApiKeyTruncated, @@ -16,7 +15,7 @@ export function ApproveApiKey(t0) { } = t0; let t1; if ($[0] !== customApiKeyTruncated || $[1] !== onDone) { - t1 = function onChange(value) { + t1 = function onChange(value: 'yes' | 'no') { bb2: switch (value) { case "yes": { @@ -102,7 +101,7 @@ export function ApproveApiKey(t0) { } let t8; if ($[11] !== onChange) { - t8 = onChange(value_0 as 'yes' | 'no')} onCancel={() => onChange("no")} />; $[11] = onChange; $[12] = t8; } else { diff --git a/src/components/EffortPicker.tsx b/src/components/EffortPicker.tsx index 2e86509e..ac8ee416 100644 --- a/src/components/EffortPicker.tsx +++ b/src/components/EffortPicker.tsx @@ -1,18 +1,15 @@ -import React, { useState } from 'react' +import type { ReactNode } from 'react' import { Box, Text } from '../ink.js' import { useMainLoopModel } from '../hooks/useMainLoopModel.js' import { useAppState, useSetAppState } from '../state/AppState.js' -import type { EffortLevel, OpenAIEffortLevel } from '../utils/effort.js' +import type { EffortLevel } from '../utils/effort.js' import { getAvailableEffortLevels, getDisplayedEffortLevel, getEffortLevelDescription, getEffortLevelLabel, - getEffortValueDescription, modelSupportsEffort, modelUsesOpenAIEffort, - standardEffortToOpenAI, - isOpenAIEffortLevel, } from '../utils/effort.js' import { getAPIProvider } from '../utils/model/providers.js' import { getReasoningEffortForModel } from '../services/api/providerConfig.js' @@ -22,7 +19,7 @@ import { KeyboardShortcutHint } from './design-system/KeyboardShortcutHint.js' import { Byline } from './design-system/Byline.js' type EffortOption = { - label: React.ReactNode + label: ReactNode value: string description: string isAvailable: boolean @@ -44,8 +41,6 @@ export function EffortPicker({ onSelect, onCancel }: Props) { // For OpenAI/Codex, get the model's default reasoning effort const modelReasoningEffort = usesOpenAIEffort ? getReasoningEffortForModel(model) : undefined - const defaultEffortForModel = modelReasoningEffort || currentDisplayedLevel - const options: EffortOption[] = [ { label: , diff --git a/src/components/PromptInput/IssueFlagBanner.tsx b/src/components/PromptInput/IssueFlagBanner.tsx index 38899677..ef503207 100644 --- a/src/components/PromptInput/IssueFlagBanner.tsx +++ b/src/components/PromptInput/IssueFlagBanner.tsx @@ -1,7 +1,3 @@ -import * as React from 'react'; -import { FLAG_ICON } from '../../constants/figures.js'; -import { Box, Text } from '../../ink.js'; - /** * ANT-ONLY: Banner shown in the transcript that prompts users to report * issues via /issue. Appears when friction is detected in the conversation.