From cd839671d0794fac97f1d2f125ba4cf4c4feafa9 Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Sat, 20 Jun 2026 10:22:13 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B8=85=E7=90=86=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=9D=97=E4=B8=8E=20legacy=20shim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 注释代码(已死的、引用不存在符号的注释块): - 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 --- src/cli/bg.ts | 3 --- src/commands/ultraplan.tsx | 5 ----- src/components/Onboarding.tsx | 4 ---- src/types/global.d.ts | 5 ----- src/types/hooks.ts | 3 --- src/types/textInputTypes.ts | 5 ----- 6 files changed, 25 deletions(-) diff --git a/src/cli/bg.ts b/src/cli/bg.ts index 2f1125e7d..0e9181c18 100644 --- a/src/cli/bg.ts +++ b/src/cli/bg.ts @@ -336,6 +336,3 @@ export async function handleBgStart(args: string[]): Promise { process.exitCode = 1 } } - -// Legacy export alias — kept for backward compatibility with cli.tsx -export const handleBgFlag = handleBgStart diff --git a/src/commands/ultraplan.tsx b/src/commands/ultraplan.tsx index 2a7e2ee85..ae5e53042 100644 --- a/src/commands/ultraplan.tsx +++ b/src/commands/ultraplan.tsx @@ -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. diff --git a/src/components/Onboarding.tsx b/src/components/Onboarding.tsx index 2d0cf32ed..e60d21cd1 100644 --- a/src/components/Onboarding.tsx +++ b/src/components/Onboarding.tsx @@ -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) { diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 539126983..aa796c168 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -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): JSX.Element | null -// declare function UltraplanLaunchDialog(props: Record): JSX.Element | null -// declare function launchUltraplan(...args: unknown[]): Promise - // T — Generic type parameter leaked from React compiler output // (react/compiler-runtime emits compiled JSX that loses generic type params) declare type T = unknown diff --git a/src/types/hooks.ts b/src/types/hooks.ts index 9f1ae3b73..d69d6d3b7 100644 --- a/src/types/hooks.ts +++ b/src/types/hooks.ts @@ -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 -// type _assertSDKTypesMatch = Assert> /** Context passed to callback hooks for state access */ export type HookCallbackContext = { diff --git a/src/types/textInputTypes.ts b/src/types/textInputTypes.ts index 26e2c29ed..487512882 100644 --- a/src/types/textInputTypes.ts +++ b/src/types/textInputTypes.ts @@ -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 */