From d5c4e0e78069d2ae5bd37421a4caad6157c39f8e 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:17:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BF=AB=E9=80=9F=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=B6=A6=E8=89=B2=E7=BB=93=E6=9E=9C=E6=9C=AA=E5=9B=9E?= =?UTF-8?q?=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为快速编辑输入区绑定编辑器句柄 - 润色回调同时更新面板状态与编辑器文本 --- .../src/view/project-development/index.tsx | 10 +++++++++- 1 file changed, 9 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 df3cd2f22..a584dede9 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 @@ -105,7 +105,10 @@ import { type LocalGamePreviewInspectSelection, resolveEmbeddedPreviewUrl, } from '../../features/project-workspace/LocalGamePreviewFrame'; -import { ResourceReferenceInput } from '../../features/project-workspace/ResourceReferenceInput'; +import { + ResourceReferenceInput, + type ResourceReferenceInputHandle, +} from '../../features/project-workspace/ResourceReferenceInput'; import { type ChatComposerDraft, dispatchResourceReferenceInsert, @@ -1554,6 +1557,9 @@ export default function ProjectDevelopmentView({ useState(null); const [quickEditPanel, setQuickEditPanel] = useState(null); + const quickEditPromptInputRef = useRef( + null, + ); /** * 快速编辑提示词里的 `@` 资源引用。 * @@ -6484,6 +6490,7 @@ export default function ProjectDevelopmentView({ * 失败的那份请求,状态回到 idle、错误清空——同时提交侧会按新提示词重铸请求身份。 */ const applyResourceQuickEditPrompt = useCallback((text: string) => { + quickEditPromptInputRef.current?.replaceText(text); setQuickEditPanel((current) => current ? { @@ -8122,6 +8129,7 @@ export default function ProjectDevelopmentView({ // 由它拼装,因此出站 payload 与聊天 `@` 一致。