Skip to content

Commit 77245d8

Browse files
committed
fix(ui): 修正权限请求流程中的提示草稿状态
- 在权限请求未通过时清理提示草稿,避免残留内容 - 当权限被拒绝时不再重复清空提示草稿 - 取消欢迎界面的重复显示,优化视图切换逻辑
1 parent 509434c commit 77245d8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/ui/views/App.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,14 +659,14 @@ function App({ projectRoot, initialPrompt, onRestart }: AppProps): React.ReactEl
659659
if (!sessionId) {
660660
return;
661661
}
662+
setPromptDraft(null);
662663
if (result.hasDeny) {
663664
setPendingPermissionReply({
664665
sessionId,
665666
permissions: result.permissions,
666667
alwaysAllows: result.alwaysAllows,
667668
});
668669
setStatusLine("Permission denied. Add a reply, then press Enter to continue.");
669-
setPromptDraft(null);
670670
sessionManager.denySessionPermission(sessionId);
671671
return;
672672
}
@@ -753,7 +753,6 @@ function App({ projectRoot, initialPrompt, onRestart }: AppProps): React.ReactEl
753753
onCancel={() => {
754754
setPromptDraft(null);
755755
setView("chat");
756-
setShowWelcome(true);
757756
}}
758757
/>
759758
) : view === "mcp-status" ? (

0 commit comments

Comments
 (0)