(q,K,{theme:_})
| 3189 | 1. Initial task: "Search for and understand the implementation of vim mode in the codebase" - Do not use the exit plan mode tool because you are not planning the implementation steps of a task. |
| 3190 | 2. Initial task: "Help me implement yank mode for vim" - Use the exit plan mode tool after you have finished planning the implementation steps of the task. |
| 3191 | 3. Initial task: "Add a new feature to handle user authentication" - If unsure about auth method (OAuth, JWT, etc.), use AskUserQuestion first, then use exit plan mode tool after clarifying the approach. |
| 3192 | `;function ijK(){return null}function rjK(q,K,{theme:_}){let{plan:z,filePath:Y}=q,$=!z||z.trim()==="",A=Y?_3(Y):"",O=q.awaitingLeaderApproval;if($)return j9.createElement(u,{flexDirection:"column",marginTop:1},j9.createElement(u,{flexDirection:"row"},j9.createElement(k,{color:lT("plan")},A_),j9.createElement(k,null," Exited plan mode")));if(O)return j9.createElement(u,{flexDirection:"column",marginTop:1},j9.createElement(u,{flexDirection:"row"},j9.createElement(k,{color:lT("plan")},A_),j9.createElement(k,null," Plan submitted for team lead approval")),j9.createElement(s8,null,j9.createElement(u,{flexDirection:"column"},Y&&j9.createElement(k,{dimColor:!0},"Plan file: ",A),j9.createElement(k,{dimColor:!0},"Waiting for team lead to review and approve..."))));return j9.createElement(u,{flexDirection:"column",marginTop:1},j9.createElement(u,{flexDirection:"row"},j9.createElement(k,{color:lT("plan")},A_),j9.createElement(k,null," User approved Claude's plan")),j9.createElement(s8,null,j9.createElement(u,{flexDirection:"column"},Y&&j9.createElement(k,{dimColor:!0},"Plan saved to: ",A," · /plan to edit"),j9.createElement(AO,null,z))))}function ojK({plan:q},{theme:K}){let _=q??mX()??"No plan found";return j9.createElement(u,{flexDirection:"column"},j9.createElement(lb8,{plan:_}))}var j9;var ajK=y(()=>{xN();gK();Er1();zz();yW();s6();bK();SJ();j9=O6(D6(),1)});var mK6={};T8(mK6,{setAutoModeFlagCli:()=>S1Y,setAutoModeCircuitBroken:()=>b1Y,setAutoModeActive:()=>ge1,isAutoModeCircuitBroken:()=>x1Y,isAutoModeActive:()=>h1Y,getAutoModeFlagCli:()=>C1Y,_resetForTesting:()=>I1Y});function ge1(q){me1=q}function h1Y(){return me1}function S1Y(q){pe1=q}function C1Y(){return pe1}function b1Y(q){Be1=q}function x1Y(){return Be1}function I1Y(){me1=!1,pe1=!1,Be1=!1}var me1=!1,pe1=!1,Be1=!1;import{writeFile as u1Y}from"fs/promises";var sjK,ZR6,m1Y,tjK,eXw,p1Y,pD;var R88=y(()=>{x7();v8();k8();Bq();i$();_8();ue1();E8();SJ();l8();AY();RJ();Z$();ajK();sjK=Eq(mK6),ZR6=(fX(),Eq(ejK)),m1Y=B6(()=>L.object({tool:L.enum(["Bash"]).describe("The tool this prompt applies to"),prompt:L.string().describe('Semantic description of the action, e.g. "run tests", "install dependencies"')})),tjK=B6(()=>L.strictObject({allowedPrompts:L.array(m1Y()).optional().describe("Prompt-based permissions needed to implement the plan. These describe categories of actions rather than specific commands.")}).passthrough()),eXw=B6(()=>tjK().extend({plan:L.string().optional().describe("The plan content (injected by normalizeToolInput from disk)"),planFilePath:L.string().optional().describe("The plan file path (injected by normalizeToolInput)")})),p1Y=B6(()=>L.object({plan:L.string().nullable().describe("The plan that was presented to the user"),isAgent:L.boolean(),filePath:L.string().optional().describe("The file path where the plan was saved"),hasTaskTool:L.boolean().optional().describe("Whether the Agent tool is available in the current context"),planWasEdited:L.boolean().optional().describe("True when the user edited the plan (CCR web UI or Ctrl+G); determines whether the plan is echoed back in tool_result"),awaitingLeaderApproval:L.boolean().optional().describe("When true, the teammate has sent a plan approval request to the team leader"),requestId:L.string().optional().describe("Unique identifier for the plan approval request")})),pD=sq({name:kX,searchHint:"present plan for approval and start coding (plan mode only)",maxResultSizeChars:1e5,async description(){return"Prompts the user to exit plan mode and start coding"},async prompt(){return njK},get inputSchema(){return tjK()},get outputSchema(){return p1Y()},userFacingName(){return""},shouldDefer:!0,isEnabled(){if(eH().length>0)return!1;return!0},isConcurrencySafe(){return!0},isReadOnly(){return!1},requiresUserInteraction(){if($Y())return!1;return!0},async validateInput(q,{getAppState:K,options:_}){if($Y())return{result:!0};let z=K().toolPermissionContext.mode;if(z!=="plan")return d("tengu_exit_plan_mode_called_outside_plan",{model:_.mainLoopModel,mode:z,hasExitedPlanModeInSession:sb6()}),{result:!1,message:"You are not in plan mode. This tool is only for exiting plan mode after writing a plan. If your plan was already approved, continue with implementation.",errorCode:1};return{result:!0}},async checkPermissions(q,K){if($Y())return{behavior:"allow",updatedInput:q};return{behavior:"ask",message:"Exit plan mode?",updatedInput:q}},renderToolUseMessage:ijK,renderToolResultMessage:rjK,renderToolUseRejectedMessage:ojK,async call(q,K){let _=!!K.agentId,z=nP(K.agentId),Y="plan"in q&&typeof q.plan==="string"?q.plan:void 0,$=Y??mX(K.agentId);if(Y!==void 0&&z)await u1Y(z,Y,"utf-8").catch((j)=>H6(j)),fx8();if($Y()&&fc6()){if(!$)throw Error(`No plan file found at ${z}. Please write your plan to this file before calling ExitPlanMode.`);let j=M_()||"unknown",H=$9(),J=jE6("plan_approval",iL(j,H||"default")),M={type:"plan_approval_request",from:j,timestamp:new Date().toISOString(),planFilePath:z,planContent:$,requestId:J};await R_("team-lead",{from:j,text:g6(M),timestamp:new Date().toISOString()},H);let X=K.getAppState(),P=Tm8(j,X);if(P)Ie1(P,K.setAppState,!0);return{data:{plan:$,isAgent:!0,filePath:z,awaitingLeaderApproval:!0,requestId:J}}}let A=K.getAppState(),O=null;{let j=A.toolPermissionContext.prePlanMode??"default";if(j==="auto"&&!(ZR6?.isAutoModeGateEnabled()??!1)){let H=ZR6?.getAutoModeUnavailableReason()??"circuit-breaker";O=ZR6?.getAutoModeUnavailableNotification(H)??"auto mode unavailable",N(`[auto-mode gate @ ExitPlanModeV2Tool] prePlanMode=${j} but gate is off (reason=${H}) — falling back to default on plan exit`,{level:"warn"})}}if(O)K.addNotification?.({key:"auto-mode-gate-plan-exit-fallback",text:`plan exit → default · ${O}`,priority:"immediate",color:"warning",timeoutMs:1e4});K.setAppState((j)=>{if(j.toolPermissionContext.mode!=="plan")return j;qE(!0),Ex(!0);let H=j.toolPermissionContext.prePlanMode??"default";{if(H==="auto"&&!(ZR6?.isAutoModeGateEnabled()??!1))H="default";let X=H==="auto",P=sjK?.isAutoModeActive()??!1;if(sjK?.setAutoModeActive(X),P&&!X)VZ(!0)}let J=H==="auto",M=j.toolPermissionContext;if(J)M=ZR6?.stripDangerousPermissionsForAutoMode(M)??M;else if(j.toolPermissionContext.strippedDangerousRules)M=ZR6?.restoreDangerousPermissions(M)??M;return{...j,toolPermissionContext:{...M,mode:H,prePlanMode:void 0}}});let w=nq()&&K.options.tools.some((j)=>g_(j,v4));return{data:{plan:$,isAgent:_,filePath:z,hasTaskTool:w||void 0,planWasEdited:Y!==void 0||void 0}}},mapToolResultToToolResultBlockParam({isAgent:q,plan:K,filePath:_,hasTaskTool:z,planWasEdited:Y,awaitingLeaderApproval:$,requestId:A},O){if($)return{type:"tool_result",content:`Your plan has been submitted to the team lead for approval. |
| 3193 | |
| 3194 | Plan file: ${_} |
nothing calls this directly
no test coverage detected