fix: initial prompt not filled in after accepting new recipe (#3637)
This commit is contained in:
@@ -61,6 +61,7 @@ import { MainPanelLayout } from './Layout/MainPanelLayout';
|
||||
import ChatInput from './ChatInput';
|
||||
import { ScrollArea, ScrollAreaHandle } from './ui/scroll-area';
|
||||
import { RecipeWarningModal } from './ui/RecipeWarningModal';
|
||||
import ParameterInputModal from './ParameterInputModal';
|
||||
import { useChatEngine } from '../hooks/useChatEngine';
|
||||
import { useRecipeManager } from '../hooks/useRecipeManager';
|
||||
import { useSessionContinuation } from '../hooks/useSessionContinuation';
|
||||
@@ -188,6 +189,9 @@ function BaseChatContent({
|
||||
recipeConfig,
|
||||
initialPrompt,
|
||||
isGeneratingRecipe,
|
||||
isParameterModalOpen,
|
||||
setIsParameterModalOpen,
|
||||
handleParameterSubmit,
|
||||
handleAutoExecution,
|
||||
recipeError,
|
||||
setRecipeError,
|
||||
@@ -524,7 +528,7 @@ function BaseChatContent({
|
||||
chatState={chatState}
|
||||
onStop={onStopGoose}
|
||||
commandHistory={commandHistory}
|
||||
initialValue={_input || (messages.length === 0 ? initialPrompt : '')}
|
||||
initialValue={_input || ''}
|
||||
setView={setView}
|
||||
numTokens={sessionTokenCount}
|
||||
inputTokens={sessionInputTokens || localInputTokens}
|
||||
@@ -537,6 +541,8 @@ function BaseChatContent({
|
||||
sessionCosts={sessionCosts}
|
||||
setIsGoosehintsModalOpen={setIsGoosehintsModalOpen}
|
||||
recipeConfig={recipeConfig}
|
||||
recipeAccepted={recipeAccepted}
|
||||
initialPrompt={initialPrompt}
|
||||
{...customChatInputProps}
|
||||
/>
|
||||
</div>
|
||||
@@ -564,6 +570,15 @@ function BaseChatContent({
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Recipe Parameter Modal */}
|
||||
{isParameterModalOpen && recipeConfig?.parameters && (
|
||||
<ParameterInputModal
|
||||
parameters={recipeConfig.parameters}
|
||||
onSubmit={handleParameterSubmit}
|
||||
onClose={() => setIsParameterModalOpen(false)}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Recipe Error Modal */}
|
||||
{recipeError && (
|
||||
<div className="fixed inset-0 z-[300] flex items-center justify-center bg-black/50">
|
||||
|
||||
Reference in New Issue
Block a user