From fc0fd846f95e1945f96d5edbde61d204218a210e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 16 Sep 2026 13:22:57 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E5=BF=AB=E9=80=9F=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=B6=A6=E8=89=B2=E5=9B=9E=E5=A1=AB=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 回填前比较编辑器当前文本 - 防止输入区 onChange 与宿主回调形成循环 --- .../src/view/project-development/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/view/project-development/index.tsx b/apps/ai-game-creator-shell/src/view/project-development/index.tsx index a584dede9..ffe964a78 100644 --- a/apps/ai-game-creator-shell/src/view/project-development/index.tsx +++ b/apps/ai-game-creator-shell/src/view/project-development/index.tsx @@ -6490,7 +6490,10 @@ export default function ProjectDevelopmentView({ * 失败的那份请求,状态回到 idle、错误清空——同时提交侧会按新提示词重铸请求身份。 */ const applyResourceQuickEditPrompt = useCallback((text: string) => { - quickEditPromptInputRef.current?.replaceText(text); + const currentDraft = quickEditPromptInputRef.current?.getDraft(); + if (currentDraft && currentDraft.text !== text) { + quickEditPromptInputRef.current?.replaceText(text); + } setQuickEditPanel((current) => current ? {