Restore recipe parameters functionality (#3530)
This commit is contained in:
@@ -70,11 +70,11 @@ const substituteParameters = (text: string, params: Record<string, string>): str
|
||||
* This should be called after recipe parameters are collected
|
||||
*/
|
||||
export const updateSystemPromptWithParameters = async (
|
||||
recipeParameters: Record<string, string>
|
||||
recipeParameters: Record<string, string>,
|
||||
recipeConfig?: { instructions?: string | null }
|
||||
): Promise<void> => {
|
||||
try {
|
||||
const recipeConfig = window.appConfig?.get?.('recipe');
|
||||
const originalInstructions = (recipeConfig as { instructions?: string })?.instructions;
|
||||
const originalInstructions = recipeConfig?.instructions;
|
||||
|
||||
if (!originalInstructions) {
|
||||
return;
|
||||
@@ -96,7 +96,9 @@ export const updateSystemPromptWithParameters = async (
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
console.warn(`Failed to update system prompt with parameters: ${response.statusText}`);
|
||||
console.warn(
|
||||
`Failed to update system prompt with parameters: ${response.status} ${response.statusText}`
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error updating system prompt with parameters:', error);
|
||||
|
||||
Reference in New Issue
Block a user