Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)

This reverts commit c445f43f8d.
This commit is contained in:
claude-code-best
2026-04-07 15:05:03 +08:00
committed by GitHub
parent ca0c3265e6
commit 88d4c3ba24
645 changed files with 1214 additions and 7255 deletions

View File

@@ -1,5 +1,5 @@
import * as React from 'react'
import { Text, useTheme } from '@anthropic/ink'
import { Text, useTheme } from '../../ink.js'
import { getTheme, type Theme } from '../../utils/theme.js'
import { interpolateColor, parseRGB, toRGBColor } from './utils.js'

View File

@@ -1,5 +1,6 @@
import * as React from 'react'
import { Text, stringWidth, useTheme } from '@anthropic/ink'
import { stringWidth } from '../../ink/stringWidth.js'
import { Text, useTheme } from '../../ink.js'
import { getGraphemeSegmenter } from '../../utils/intl.js'
import { getTheme, type Theme } from '../../utils/theme.js'
import type { SpinnerMode } from './types.js'

View File

@@ -1,5 +1,5 @@
import * as React from 'react'
import { Text } from '@anthropic/ink'
import { Text } from '../../ink.js'
import type { Theme } from '../../utils/theme.js'
type Props = {

View File

@@ -1,13 +1,13 @@
import figures from 'figures'
import * as React from 'react'
import { useMemo, useRef } from 'react'
import { Box, Text, useAnimationFrame, stringWidth, Byline } from '@anthropic/ink'
import { toInkColor } from '../../utils/ink.js'
import { stringWidth } from '../../ink/stringWidth.js'
import { Box, Text, useAnimationFrame } from '../../ink.js'
import type { InProcessTeammateTaskState } from '../../tasks/InProcessTeammateTask/types.js'
import { formatDuration, formatNumber } from '../../utils/format.js'
import { toInkColor } from '../../utils/ink.js'
import type { Theme } from '../../utils/theme.js'
import { Byline } from '../design-system/Byline.js'
import { GlimmerMessage } from './GlimmerMessage.js'
import { SpinnerGlyph } from './SpinnerGlyph.js'
import type { SpinnerMode } from './types.js'
@@ -236,6 +236,7 @@ export function SpinnerAnimationRow({
totalTokens > 0 &&
availableSpace > usedAfterTimer + tokensWidth
const thinkingOnly =
showThinking &&
thinkingStatus === 'thinking' &&

View File

@@ -1,5 +1,5 @@
import * as React from 'react'
import { Box, Text, useTheme } from '@anthropic/ink'
import { Box, Text, useTheme } from '../../ink.js'
import { getTheme, type Theme } from '../../utils/theme.js'
import {
getDefaultCharacters,

View File

@@ -6,8 +6,8 @@ import { getSpinnerVerbs } from '../../constants/spinnerVerbs.js'
import { TURN_COMPLETION_VERBS } from '../../constants/turnCompletionVerbs.js'
import { useElapsedTime } from '../../hooks/useElapsedTime.js'
import { useTerminalSize } from '../../hooks/useTerminalSize.js'
import { Box, Text, stringWidth } from '@anthropic/ink'
import { toInkColor } from '../../utils/ink.js'
import { stringWidth } from '../../ink/stringWidth.js'
import { Box, Text } from '../../ink.js'
import type { InProcessTeammateTaskState } from '../../tasks/InProcessTeammateTask/types.js'
import { summarizeRecentActivities } from '../../utils/collapseReadSearch.js'
import {
@@ -15,7 +15,7 @@ import {
formatNumber,
truncateToWidth,
} from '../../utils/format.js'
import { toInkColor } from '../../utils/ink.js'
import { TEAMMATE_SELECT_HINT } from './teammateSelectHint.js'
type Props = {

View File

@@ -1,6 +1,6 @@
import figures from 'figures'
import * as React from 'react'
import { Box, Text, type TextProps } from '@anthropic/ink'
import { Box, Text, type TextProps } from '../../ink.js'
import { useAppState } from '../../state/AppState.js'
import { getRunningTeammatesSorted } from '../../tasks/InProcessTeammateTask/InProcessTeammateTask.js'
import { formatNumber } from '../../utils/format.js'

View File

@@ -1,5 +1,6 @@
import { useMemo } from 'react'
import { type DOMElement, useAnimationFrame, stringWidth } from '@anthropic/ink'
import { stringWidth } from '../../ink/stringWidth.js'
import { type DOMElement, useAnimationFrame } from '../../ink.js'
import type { SpinnerMode } from './types.js'
export function useShimmerAnimation(

View File

@@ -1,4 +1,4 @@
import type { RGBColor as RGBColorString } from '@anthropic/ink'
import type { RGBColor as RGBColorString } from '../../ink/styles.js'
import type { RGBColor as RGBColorType } from './types.js'
export function getDefaultCharacters(): string[] {