@@ -568,8 +568,8 @@ function App({ projectRoot, initialPrompt, resumeSessionId, forkSessionId, onRes
568568 const handlePlanImplementationChoice = useCallback (
569569 async ( choice : PlanImplementationChoice ) => {
570570 const proposedPlan = pendingPlanImplementation ;
571- setPendingPlanImplementation ( null ) ;
572571 if ( choice === "stay" ) {
572+ setPendingPlanImplementation ( null ) ;
573573 return ;
574574 }
575575 if ( choice === "clearContext" && proposedPlan ) {
@@ -581,6 +581,7 @@ function App({ projectRoot, initialPrompt, resumeSessionId, forkSessionId, onRes
581581 try {
582582 const sessionId = sessionManager . startPlanImplementationSession ( sourceSessionId , proposedPlan ) ;
583583 sessionManager . setActiveSessionId ( sessionId ) ;
584+ setPendingPlanImplementation ( null ) ;
584585 await resetStaticView ( loadVisibleMessages ( sessionManager , sessionId ) , { clearScreen : true } ) ;
585586 const session = sessionManager . getSession ( sessionId ) ;
586587 setStatusLine ( session ? buildStatusLine ( session , resolveCurrentSettings ( projectRoot ) ) : "" ) ;
@@ -591,8 +592,8 @@ function App({ projectRoot, initialPrompt, resumeSessionId, forkSessionId, onRes
591592 setPendingPermissionReply ( null ) ;
592593 setErrorLine ( null ) ;
593594 const source = sessionManager . getSession ( sourceSessionId ) ;
594- if ( source ?. summary && ! source . summary . includes ( "(规划) " ) ) {
595- sessionManager . renameSession ( sourceSessionId , `${ source . summary } (规划) ` ) ;
595+ if ( source ?. summary && ! source . summary . includes ( " (planned) " ) ) {
596+ sessionManager . renameSession ( sourceSessionId , `${ source . summary } (planned) ` ) ;
596597 }
597598 refreshSessionsList ( ) ;
598599 await refreshSkills ( sessionId ) ;
@@ -603,9 +604,11 @@ function App({ projectRoot, initialPrompt, resumeSessionId, forkSessionId, onRes
603604 } ) ;
604605 } catch ( error ) {
605606 setErrorLine ( error instanceof Error ? error . message : String ( error ) ) ;
607+ setPendingPlanImplementation ( proposedPlan ) ;
606608 }
607609 return ;
608610 }
611+ setPendingPlanImplementation ( null ) ;
609612 setPlanMode ( false ) ;
610613 if ( choice === "implement" && proposedPlan ) {
611614 handleSubmit ( {
0 commit comments