chore: 清理注释代码块与 legacy shim

注释代码(已死的、引用不存在符号的注释块):
- Onboarding.tsx: 注释化的 preflight if-block(引用不存在的 preflightStep)
- ultraplan.tsx: 两处引用不存在符号的注释(ULTRAPLAN_INSTRUCTIONS、getUltraplanModel)
- types/hooks.ts: 禁用的 type-fest IsEqual 类型断言块
- types/global.d.ts: 已被真实模块取代的 Ultraplan ambient declares
- types/textInputTypes.ts: 注释化的 onMessage interface 成员

legacy shim:
- cli/bg.ts: 删除 handleBgFlag 别名 export(同胞 handleBgStart 已被所有调用点使用)

Co-Authored-By: glm-5.2 <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-06-20 10:22:13 +08:00
parent 03d399cd5f
commit cd839671d0
6 changed files with 0 additions and 25 deletions

View File

@@ -336,6 +336,3 @@ export async function handleBgStart(args: string[]): Promise<void> {
process.exitCode = 1
}
}
// Legacy export alias — kept for backward compatibility with cli.tsx
export const handleBgFlag = handleBgStart

View File

@@ -75,7 +75,6 @@ export function buildUltraplanPrompt(blurb: string, seedPlan?: string, promptId?
if (seedPlan) {
parts.push('Here is a draft plan to refine:', '', seedPlan, '');
}
// parts.push(ULTRAPLAN_INSTRUCTIONS)
parts.push(getPromptText(promptId!));
if (blurb) {
@@ -341,8 +340,6 @@ async function launchDetached(opts: {
// occurs after teleportToRemote succeeds (avoids 30min orphan).
let sessionId: string | undefined;
try {
// const model = getUltraplanModel()
const eligibility = await checkRemoteAgentEligibility();
if (!eligibility.eligible) {
logEvent('tengu_ultraplan_create_failed', {
@@ -365,7 +362,6 @@ async function launchDetached(opts: {
const session = await teleportToRemote({
initialMessage: prompt,
description: blurb || 'Refine local plan',
// model,
permissionMode: 'plan',
ultraplan: true,
signal,
@@ -404,7 +400,6 @@ async function launchDetached(opts: {
logEvent('tengu_ultraplan_launched', {
has_seed_plan: Boolean(seedPlan),
prompt_identifier: promptIdentifier as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
// model: model as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
});
// TODO(#23985): replace registerRemoteAgentTask + startDetachedPoll with
// ExitPlanModeScanner inside startRemoteSessionPolling.

View File

@@ -134,10 +134,6 @@ export function Onboarding({ onDone }: Props): React.ReactNode {
}
const steps: OnboardingStep[] = [];
// Preflight check disabled — users may use third-party API providers
// if (oauthEnabled) {
// steps.push({ id: 'preflight', component: preflightStep })
// }
steps.push({ id: 'theme', component: themeStep });
if (apiKeyNeedingApproval) {

View File

@@ -51,11 +51,6 @@ declare function ExperimentEnrollmentNotice(): JSX.Element | null
// Hook timing threshold (re-exported from services/tools/toolExecution.ts)
declare const HOOK_TIMING_DISPLAY_THRESHOLD_MS: number
// Ultraplan (internal)
// declare function UltraplanChoiceDialog(props: Record<string, unknown>): JSX.Element | null
// declare function UltraplanLaunchDialog(props: Record<string, unknown>): JSX.Element | null
// declare function launchUltraplan(...args: unknown[]): Promise<string>
// T — Generic type parameter leaked from React compiler output
// (react/compiler-runtime emits compiled JSX that loses generic type params)
declare type T = unknown

View File

@@ -191,9 +191,6 @@ export function isAsyncHookJSONOutput(
// Compile-time assertion that SDK and Zod types match
// Disabled: decompilation type mismatch makes these types non-equal
// import type { IsEqual } from 'type-fest'
// type Assert<T extends true> = T
// type _assertSDKTypesMatch = Assert<IsEqual<SchemaHookJSONOutput, HookJSONOutput>>
/** Context passed to callback hooks for state access */
export type HookCallbackContext = {

View File

@@ -91,11 +91,6 @@ export type BaseTextInputProps = {
*/
readonly onExitMessage?: (show: boolean, key?: string) => void
/**
* Optional callback to show custom message
*/
// readonly onMessage?: (show: boolean, message?: string) => void
/**
* Optional callback to reset history position
*/