mirror of
https://github.com/nexu-io/open-design.git
synced 2026-05-31 19:04:39 +07:00
fix: prevent handlePromptChange from clearing examplePromptInfoRef
The ref is now only cleared by onExamplePromptStatusChange(null) which HomeHero triggers when the user actually edits the text or clicks clear. This prevents the race where usePromptExample sets the ref and then onPromptChange immediately clears it in the same tick.
This commit is contained in:
parent
83186728f0
commit
a4162f8063
1 changed files with 0 additions and 1 deletions
|
|
@ -891,7 +891,6 @@ export function HomeView({
|
||||||
function handlePromptChange(nextPrompt: string) {
|
function handlePromptChange(nextPrompt: string) {
|
||||||
setPrompt(nextPrompt);
|
setPrompt(nextPrompt);
|
||||||
setPromptEditedByUser(true);
|
setPromptEditedByUser(true);
|
||||||
examplePromptInfoRef.current = null;
|
|
||||||
if (!active?.queryTemplate) return;
|
if (!active?.queryTemplate) return;
|
||||||
const extracted = extractPluginInputsFromPrompt(
|
const extracted = extractPluginInputsFromPrompt(
|
||||||
active.queryTemplate,
|
active.queryTemplate,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue