import { c as _c } from "react/compiler-runtime"; import React from 'react'; import { handlePlanModeTransition } from '../../../bootstrap/state.js'; import { Box, Text } from '../../../ink.js'; import { type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, logEvent } from '../../../services/analytics/index.js'; import { useAppState } from '../../../state/AppState.js'; import { isPlanModeInterviewPhaseEnabled } from '../../../utils/planModeV2.js'; import { Select } from '../../CustomSelect/index.js'; import { PermissionDialog } from '../PermissionDialog.js'; import type { PermissionRequestProps } from '../PermissionRequest.js'; export function EnterPlanModePermissionRequest(t0) { const $ = _c(18); const { toolUseConfirm, onDone, onReject, workerBadge } = t0; const toolPermissionContextMode = useAppState(_temp); let t1; if ($[0] !== onDone || $[1] !== onReject || $[2] !== toolPermissionContextMode || $[3] !== toolUseConfirm) { t1 = function handleResponse(value) { if (value === "yes") { logEvent("tengu_plan_enter", { interviewPhaseEnabled: isPlanModeInterviewPhaseEnabled(), entryMethod: "tool" as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS }); handlePlanModeTransition(toolPermissionContextMode, "plan"); onDone(); toolUseConfirm.onAllow({}, [{ type: "setMode", mode: "plan", destination: "session" }]); } else { onDone(); onReject(); toolUseConfirm.onReject(); } }; $[0] = onDone; $[1] = onReject; $[2] = toolPermissionContextMode; $[3] = toolUseConfirm; $[4] = t1; } else { t1 = $[4]; } const handleResponse = t1; let t2; if ($[5] === Symbol.for("react.memo_cache_sentinel")) { t2 = Claude wants to enter plan mode to explore and design an implementation approach.; $[5] = t2; } else { t2 = $[5]; } let t3; if ($[6] === Symbol.for("react.memo_cache_sentinel")) { t3 = In plan mode, Claude will: · Explore the codebase thoroughly · Identify existing patterns · Design an implementation strategy · Present a plan for your approval; $[6] = t3; } else { t3 = $[6]; } let t4; if ($[7] === Symbol.for("react.memo_cache_sentinel")) { t4 = No code changes will be made until you approve the plan.; $[7] = t4; } else { t4 = $[7]; } let t5; if ($[8] === Symbol.for("react.memo_cache_sentinel")) { t5 = { label: "Yes, enter plan mode", value: "yes" as const }; $[8] = t5; } else { t5 = $[8]; } let t6; if ($[9] === Symbol.for("react.memo_cache_sentinel")) { t6 = [t5, { label: "No, start implementing now", value: "no" as const }]; $[9] = t6; } else { t6 = $[9]; } let t7; if ($[10] !== handleResponse) { t7 = () => handleResponse("no"); $[10] = handleResponse; $[11] = t7; } else { t7 = $[11]; } let t8; if ($[12] !== handleResponse || $[13] !== t7) { t8 = {t2}{t3}{t4}