fix: 将 pipeIpc 添加到 AppState 类型声明,消除 4 个 as any

- AppStateStore: 添加 pipeIpc?: PipeIpcState 可选字段
- PromptInputFooter: 直接访问 s.pipeIpc
- useBackgroundTaskNavigation: 直接访问 s.pipeIpc
- usePipeRouter: 直接访问 store.getState().pipeIpc
- REPL.tsx: 移除 getPipeIpc(s as any) 中的 as any

precheck 通过
This commit is contained in:
claude-code-best
2026-06-09 23:00:06 +08:00
parent 21c17b4c6e
commit da10c45e76
5 changed files with 7 additions and 4 deletions

View File

@@ -36,6 +36,7 @@ import type { PermissionMode } from '../utils/permissions/PermissionMode.js'
import { getInitialSettings } from '../utils/settings/settings.js'
import type { SettingsJson } from '../utils/settings/types.js'
import { shouldEnableThinkingByDefault } from '../utils/thinking.js'
import type { PipeIpcState } from '../utils/pipeTransport.js'
import type { Store } from './store.js'
export type CompletionBoundary =
@@ -159,6 +160,8 @@ export type AppState = DeepImmutable<{
replBridgeInitialName: string | undefined
// Always-on bridge: first-time remote dialog pending (set by /remote-control command)
showRemoteCallout: boolean
// Pipe IPC state — added at runtime when feature('PIPE_IPC') is enabled.
pipeIpc?: PipeIpcState
}> & {
// Unified task state - excluded from DeepImmutable because TaskState contains function types
tasks: { [taskId: string]: TaskState }