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 与聊天 `@` 一致。