diff --git a/front/components/assistant_builder/InstructionScreen.tsx b/front/components/assistant_builder/InstructionScreen.tsx index 22c15f231193..f9758a2b85d5 100644 --- a/front/components/assistant_builder/InstructionScreen.tsx +++ b/front/components/assistant_builder/InstructionScreen.tsx @@ -307,8 +307,11 @@ function Suggestions({ owner: WorkspaceType; instructions: string; }) { - const [suggestions, setSuggestions] = - useState(STATIC_SUGGESTIONS); + const [suggestions, setSuggestions] = useState( + !instructions + ? STATIC_SUGGESTIONS + : { status: "unavailable", reason: "irrelevant" } + ); const [loading, setLoading] = useState(false); const [error, setError] = useState(null); @@ -342,6 +345,12 @@ function Suggestions({ debounce(debounceHandle, updateSuggestions); }, [instructions, updateSuggestions]); + if ( + suggestions.status === "unavailable" && + suggestions.reason === "irrelevant" + ) { + return null; + } return (
@@ -384,7 +393,10 @@ function Suggestions({ )); } - if (suggestions.status === "unavailable") { + if ( + suggestions.status === "unavailable" && + suggestions.reason === "user_not_finished" + ) { return ( Suggestions will appear when you're done writing.