Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions ui/desktop/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default function ChatView({
}

function ChatContent({
readyForAutoUserPrompt,
chat,
setChat,
setView,
Expand All @@ -103,7 +102,6 @@ function ChatContent({
const [droppedFiles, setDroppedFiles] = useState<string[]>([]);

const scrollRef = useRef<ScrollAreaHandle>(null);
const hasSentPromptRef = useRef(false);

const {
summaryContent,
Expand Down Expand Up @@ -291,13 +289,10 @@ function ChatContent({
}
}, [messages]);

useEffect(() => {
const prompt = recipeConfig?.prompt;
if (prompt && !hasSentPromptRef.current && readyForAutoUserPrompt) {
append(prompt);
hasSentPromptRef.current = true;
}
}, [recipeConfig?.prompt, append, readyForAutoUserPrompt]);
// Pre-fill input with recipe prompt instead of auto-sending it
const initialPrompt = useMemo(() => {
return recipeConfig?.prompt || '';
}, [recipeConfig?.prompt]);

// Handle submit
const handleSubmit = (e: React.FormEvent) => {
Expand Down Expand Up @@ -632,7 +627,7 @@ function ChatContent({
isLoading={isLoading}
onStop={onStopGoose}
commandHistory={commandHistory}
initialValue={_input}
initialValue={_input || initialPrompt}
setView={setView}
hasMessages={hasMessages}
numTokens={sessionTokenCount}
Expand Down
Loading