mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 05:45:51 +00:00
* feat: 支持自托管的 remote-control-server (#214) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import React from 'react'
|
|
import { FpsMetricsProvider } from '../context/fpsMetrics.js'
|
|
import { StatsProvider, type StatsStore } from '../context/stats.js'
|
|
import { type AppState, AppStateProvider } from '../state/AppState.js'
|
|
import { onChangeAppState } from '../state/onChangeAppState.js'
|
|
import type { FpsMetrics } from '../utils/fpsTracker.js'
|
|
import { ThemeProvider } from '@anthropic/ink'
|
|
|
|
type Props = {
|
|
getFpsMetrics: () => FpsMetrics | undefined
|
|
stats?: StatsStore
|
|
initialState: AppState
|
|
children: React.ReactNode
|
|
}
|
|
|
|
/**
|
|
* Top-level wrapper for interactive sessions.
|
|
* Provides FPS metrics, stats context, and app state to the component tree.
|
|
*/
|
|
export function App({
|
|
getFpsMetrics,
|
|
stats,
|
|
initialState,
|
|
children,
|
|
}: Props): React.ReactNode {
|
|
return (
|
|
<FpsMetricsProvider getFpsMetrics={getFpsMetrics}>
|
|
<StatsProvider store={stats}>
|
|
<AppStateProvider
|
|
initialState={initialState}
|
|
onChangeAppState={onChangeAppState}
|
|
>
|
|
{children}
|
|
</AppStateProvider>
|
|
</StatsProvider>
|
|
</FpsMetricsProvider>
|
|
)
|
|
}
|