Skip to content

Commit ee06bb7

Browse files
cmp0xffdeepseek-v4-pro
andcommitted
fix(cli): 规划会话标题使用英文后缀并在失败时保留方案弹窗
清除上下文派生失败时不再提前关闭方案弹窗,供用户重新选择。 源会话标题后缀由中文改为英文 " (planned)",与英文选择界面保持一致; 派生成功后才清除 pendingPlanImplementation,失败时在 catch 中恢复。 Co-authored-by: deepseek-v4-pro <noreply@deepseek.com>
1 parent 01ab326 commit ee06bb7

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎packages/cli/src/ui/views/App.tsx‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)