mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-21 15:55:50 +00:00
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:
@@ -336,6 +336,3 @@ export async function handleBgStart(args: string[]): Promise<void> {
|
|||||||
process.exitCode = 1
|
process.exitCode = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy export alias — kept for backward compatibility with cli.tsx
|
|
||||||
export const handleBgFlag = handleBgStart
|
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ export function buildUltraplanPrompt(blurb: string, seedPlan?: string, promptId?
|
|||||||
if (seedPlan) {
|
if (seedPlan) {
|
||||||
parts.push('Here is a draft plan to refine:', '', seedPlan, '');
|
parts.push('Here is a draft plan to refine:', '', seedPlan, '');
|
||||||
}
|
}
|
||||||
// parts.push(ULTRAPLAN_INSTRUCTIONS)
|
|
||||||
parts.push(getPromptText(promptId!));
|
parts.push(getPromptText(promptId!));
|
||||||
|
|
||||||
if (blurb) {
|
if (blurb) {
|
||||||
@@ -341,8 +340,6 @@ async function launchDetached(opts: {
|
|||||||
// occurs after teleportToRemote succeeds (avoids 30min orphan).
|
// occurs after teleportToRemote succeeds (avoids 30min orphan).
|
||||||
let sessionId: string | undefined;
|
let sessionId: string | undefined;
|
||||||
try {
|
try {
|
||||||
// const model = getUltraplanModel()
|
|
||||||
|
|
||||||
const eligibility = await checkRemoteAgentEligibility();
|
const eligibility = await checkRemoteAgentEligibility();
|
||||||
if (!eligibility.eligible) {
|
if (!eligibility.eligible) {
|
||||||
logEvent('tengu_ultraplan_create_failed', {
|
logEvent('tengu_ultraplan_create_failed', {
|
||||||
@@ -365,7 +362,6 @@ async function launchDetached(opts: {
|
|||||||
const session = await teleportToRemote({
|
const session = await teleportToRemote({
|
||||||
initialMessage: prompt,
|
initialMessage: prompt,
|
||||||
description: blurb || 'Refine local plan',
|
description: blurb || 'Refine local plan',
|
||||||
// model,
|
|
||||||
permissionMode: 'plan',
|
permissionMode: 'plan',
|
||||||
ultraplan: true,
|
ultraplan: true,
|
||||||
signal,
|
signal,
|
||||||
@@ -404,7 +400,6 @@ async function launchDetached(opts: {
|
|||||||
logEvent('tengu_ultraplan_launched', {
|
logEvent('tengu_ultraplan_launched', {
|
||||||
has_seed_plan: Boolean(seedPlan),
|
has_seed_plan: Boolean(seedPlan),
|
||||||
prompt_identifier: promptIdentifier as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
|
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
|
// TODO(#23985): replace registerRemoteAgentTask + startDetachedPoll with
|
||||||
// ExitPlanModeScanner inside startRemoteSessionPolling.
|
// ExitPlanModeScanner inside startRemoteSessionPolling.
|
||||||
|
|||||||
@@ -134,10 +134,6 @@ export function Onboarding({ onDone }: Props): React.ReactNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const steps: OnboardingStep[] = [];
|
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 });
|
steps.push({ id: 'theme', component: themeStep });
|
||||||
|
|
||||||
if (apiKeyNeedingApproval) {
|
if (apiKeyNeedingApproval) {
|
||||||
|
|||||||
5
src/types/global.d.ts
vendored
5
src/types/global.d.ts
vendored
@@ -51,11 +51,6 @@ declare function ExperimentEnrollmentNotice(): JSX.Element | null
|
|||||||
// Hook timing threshold (re-exported from services/tools/toolExecution.ts)
|
// Hook timing threshold (re-exported from services/tools/toolExecution.ts)
|
||||||
declare const HOOK_TIMING_DISPLAY_THRESHOLD_MS: number
|
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
|
// T — Generic type parameter leaked from React compiler output
|
||||||
// (react/compiler-runtime emits compiled JSX that loses generic type params)
|
// (react/compiler-runtime emits compiled JSX that loses generic type params)
|
||||||
declare type T = unknown
|
declare type T = unknown
|
||||||
|
|||||||
@@ -191,9 +191,6 @@ export function isAsyncHookJSONOutput(
|
|||||||
|
|
||||||
// Compile-time assertion that SDK and Zod types match
|
// Compile-time assertion that SDK and Zod types match
|
||||||
// Disabled: decompilation type mismatch makes these types non-equal
|
// 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 */
|
/** Context passed to callback hooks for state access */
|
||||||
export type HookCallbackContext = {
|
export type HookCallbackContext = {
|
||||||
|
|||||||
@@ -91,11 +91,6 @@ export type BaseTextInputProps = {
|
|||||||
*/
|
*/
|
||||||
readonly onExitMessage?: (show: boolean, key?: string) => void
|
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
|
* Optional callback to reset history position
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user